Skip to main content

Class: ExtensionsService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ExtensionsService(_maxRetryCount?)

Parameters

NameTypeDescription
_maxRetryCount?numberDescription 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

NameType
Nameextends "nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace"

Parameters

NameType
defaultApiDefaultWalletApi<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

NameType
Attrextends undefined | "nami" | "eternl" | "flint" | "gerowallet" | "typhoncip30" | "nufi" | "lace" = undefined
RespAttr 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

NameType
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 }[]>