Skip to main content
Version: Next

Class: KeypomWallet

Implements​

  • InstantLinkWalletBehaviour

Constructors​

constructor​

new KeypomWallet(Β«destructuredΒ»)

Parameters​

NameType
Β«destructuredΒ»Object
β€ΊΒ instantSignInSpecs?InstantSignInSpecs
β€ΊΒ networkIdstring
β€ΊΒ signInContractIdstring
β€ΊΒ trialAccountSpecs?TrialSignInSpecs

Defined in​

core/wallet.ts:33

Properties​

accountId​

Optional accountId: string

Defined in​

core/wallet.ts:19


instantSignInSpecs​

Optional instantSignInSpecs: InternalInstantSignInSpecs

Defined in​

core/wallet.ts:29


keyStore​

keyStore: BrowserLocalStorageKeyStore

Defined in​

core/wallet.ts:26


Optional modal: KeypomTrialModal

Defined in​

core/wallet.ts:31


moduleId​

Optional moduleId: string

Defined in​

core/wallet.ts:21


near​

near: Near

Defined in​

core/wallet.ts:25


secretKey​

Optional secretKey: string

Defined in​

core/wallet.ts:20


signInContractId​

signInContractId: string

Defined in​

core/wallet.ts:23


trialAccountSpecs​

Optional trialAccountSpecs: InternalTrialSignInSpecs

Defined in​

core/wallet.ts:28

Methods​

assertSignedIn​

Private assertSignedIn(): void

Returns​

void

Defined in​

core/wallet.ts:337


checkValidTrialInfo​

checkValidTrialInfo(): boolean

Returns​

boolean

Defined in​

core/wallet.ts:287


getAccountId​

getAccountId(): string

Returns​

string

Defined in​

core/wallet.ts:63


getAccounts​

getAccounts(): Promise<Account[]>

Returns​

Promise<Account[]>

Implementation of​

InstantLinkWalletBehaviour.getAccounts

Defined in​

core/wallet.ts:306


getAvailableBalance​

getAvailableBalance(id?): Promise<BN>

Parameters​

NameType
id?string

Returns​

Promise<BN>

Defined in​

core/wallet.ts:301


getContractId​

getContractId(): string

Returns​

string

Implementation of​

InstantLinkWalletBehaviour.getContractId

Defined in​

core/wallet.ts:59


internalSignIn​

Private internalSignIn(accountId, secretKey, moduleId): Promise<Account[]>

Parameters​

NameType
accountIdany
secretKeyany
moduleIdany

Returns​

Promise<Account[]>

Defined in​

core/wallet.ts:319


isSignedIn​

isSignedIn(): Promise<boolean>

Returns​

Promise<boolean>

Defined in​

core/wallet.ts:68


setSpecsFromKeypomParams​

Private setSpecsFromKeypomParams(Β«destructuredΒ»): void

Parameters​

NameType
Β«destructuredΒ»Object
β€ΊΒ instantSignInSpecs?InstantSignInSpecs
β€ΊΒ shouldSetupModalboolean
β€ΊΒ trialAccountSpecs?TrialSignInSpecs

Returns​

void

Defined in​

core/wallet.ts:343


showModal​

showModal(modalType?): void

Parameters​

NameTypeDefault value
modalTypeObjectundefined
modalType.idstringMODAL_TYPE_IDS.TRIAL_OVER

Returns​

void

Defined in​

core/wallet.ts:282


signAndSendTransaction​

signAndSendTransaction(params): Promise<FinalExecutionOutcome>

Parameters​

NameType
paramsany

Returns​

Promise<FinalExecutionOutcome>

Implementation of​

InstantLinkWalletBehaviour.signAndSendTransaction

Defined in​

core/wallet.ts:201


signAndSendTransactions​

signAndSendTransactions(params): Promise<FinalExecutionOutcome[]>

Parameters​

NameType
paramsObject
params.transactionsTransaction[]

Returns​

Promise<FinalExecutionOutcome[]>

Implementation of​

InstantLinkWalletBehaviour.signAndSendTransactions

Defined in​

core/wallet.ts:225


signIn​

signIn(): Promise<Account[]>

Returns​

Promise<Account[]>

Implementation of​

InstantLinkWalletBehaviour.signIn

Defined in​

core/wallet.ts:147


signInInstantAccount​

signInInstantAccount(accountId, secretKey, moduleId): Promise<Account[]>

Parameters​

NameType
accountIdany
secretKeyany
moduleIdany

Returns​

Promise<Account[]>

Defined in​

core/wallet.ts:128


signInTrialAccount​

signInTrialAccount(accountId, secretKey): Promise<Account[]>

Parameters​

NameType
accountIdany
secretKeyany

Returns​

Promise<Account[]>

Defined in​

core/wallet.ts:72


signOut​

signOut(): Promise<void>

Returns​

Promise<void>

Implementation of​

InstantLinkWalletBehaviour.signOut

Defined in​

core/wallet.ts:191


switchAccount​

switchAccount(id): Promise<void>

Parameters​

NameType
idstring

Returns​

Promise<void>

Defined in​

core/wallet.ts:315


verifyOwner​

verifyOwner(): Promise<void>

Returns​

Promise<void>

Implementation of​

InstantLinkWalletBehaviour.verifyOwner

Defined in​

core/wallet.ts:295