Home Reference Source Test
public class | source

Wallet

Direct Subclass:

LocalWallet, PKWallet

Constructor Summary

Public Constructor
public

constructor(signingConfirmation: *)

Base class for libsimba Wallet implementations

Member Summary

Public Members
public

Method Summary

Public Methods
public abstract
public abstract
public abstract
public abstract
public abstract
Protected Methods
protected abstract

sign(payload: Object): Promise<string>

Public Constructors

public constructor(signingConfirmation: *) source

Base class for libsimba Wallet implementations

Params:

NameTypeAttributeDescription
signingConfirmation *

{function} - an optional callback for requesting user permission to sign a transaction. Should resolve a promise with true for accept, and false (or reject) for reject.

Public Members

public signingConfirmation: * source

Public Methods

public abstract deleteWallet() source

public abstract generateWallet(passkey: string): Promise source

Params:

NameTypeAttributeDescription
passkey string

The pass key to lock the wallet

Return:

Promise

Returns a promise resolving when the wallet is created

public abstract getAddress(): Promise<string> source

Return:

Promise<string>

Returns a promise resolving to the wallets address

public abstract unlockWallet(passkey: string): Promise source

Params:

NameTypeAttributeDescription
passkey string

The pass key to unlock the wallet

Return:

Promise

Returns a promise resolving when the wallet is unlocked

public abstract walletExists(): boolean source

Return:

boolean

does the wallet exist

Protected Methods

protected abstract sign(payload: Object): Promise<string> source

Params:

NameTypeAttributeDescription
payload Object

The transaction to sign

Return:

Promise<string>

Returns a promise resolving to the signed transaction