Class: ExtensionsService
Table of contents
Constructors
Properties
Methods
- enableWallet
- getCardano
- getDisabledExtensionNames
- getEnabledExtensionNames
- getWalletExtensionNames
- getWalletExtensions
Constructors
constructor
• new ExtensionsService(_maxRetryCount?)
Parameters
| Name | Type | Description |
|---|---|---|
_maxRetryCount? | number | Description maximum number of attempts when trying to retrieve or enable a wallet |
Properties
_maxRetryCount
• Private Readonly _maxRetryCount: any
Description
maximum number of attempts when trying to retrieve or enable a wallet
Methods
enableWallet
▸ enableWallet<Name>(defaultApi): Promise<EnabledWalletApi>
Description
Tries to enable a wallet every second for _maxRetryCount times
Type parameters
| Name | Type |
|---|---|
Name | extends "nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace" |
Parameters
| Name | Type |
|---|---|
defaultApi | DefaultWalletApi<Name> |
Returns
Promise<EnabledWalletApi>
getCardano
▸ getCardano<Attr, Resp>(attr?): Promise<null | Resp>
Description
Tries to get the cardano object or one of its attributes every second for _maxRetryCount times
Type parameters
| Name | Type |
|---|---|
Attr | extends undefined | "nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace" = undefined |
Resp | Attr extends undefined ? Partial<{ eternl: DefaultWalletApi<"eternl"> ; flint: DefaultWalletApi<"flint"> ; gerowallet: DefaultWalletApi<"gerowallet"> ; lace: DefaultWalletApi<"lace"> ; nami: DefaultWalletApi<"nami"> ; nufi: DefaultWalletApi<"nufi"> ; typhoncip30: DefaultWalletApi<"typhoncip30"> }> : Partial<{ eternl: DefaultWalletApi<"eternl"> ; flint: DefaultWalletApi<"flint"> ; gerowallet: DefaultWalletApi<"gerowallet"> ; lace: DefaultWalletApi<"lace"> ; nami: DefaultWalletApi<"nami"> ; nufi: DefaultWalletApi<"nufi"> ; typhoncip30: DefaultWalletApi<"typhoncip30"> }>[NonNullable<Attr>] |
Parameters
| Name | Type |
|---|---|
attr? | Attr |
Returns
Promise<null | Resp>
getDisabledExtensionNames
▸ getDisabledExtensionNames(): Promise<("nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace")[]>
Returns
Promise<("nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace")[]>
getEnabledExtensionNames
▸ getEnabledExtensionNames(): Promise<("nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace")[]>
Returns
Promise<("nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace")[]>
getWalletExtensionNames
▸ getWalletExtensionNames(): Promise<("nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace")[]>
Returns
Promise<("nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace")[]>
getWalletExtensions
▸ getWalletExtensions(): Promise<WalletInfo<"nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace"> & { enable: () => Promise<EnabledWalletApi> ; isEnabled: () => Promise<boolean> } & { key: string }[]>
Returns
Promise<WalletInfo<"nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace"> & { enable: () => Promise<EnabledWalletApi> ; isEnabled: () => Promise<boolean> } & { key: string }[]>