Wallet

walletDelete

walletDelete (address: string): Promise<void>

Deletes an address from the wallet.

Parameters:

  • address: string

Returns:

Promise<void>

Source: index.d.ts, line 784, character 14

walletExport

walletExport (address: string): Promise<KeyInfo>

Returns the private key of an address in the wallet.

Parameters:

  • address: string

Returns:

Promise<KeyInfo>

Source: index.d.ts, line 788, character 14

walletHas

walletHas (address: string): Promise<boolean>

Indicates whether the given address is in the wallet.

Parameters:

  • address: string

Returns:

Promise<boolean>

Source: index.d.ts, line 792, character 11

walletImport

walletImport (keyInfo: KeyInfo): Promise<string>

Receives a KeyInfo, which includes a private key, and imports it into the wallet.

Parameters:

Returns:

Promise<string>

Source: index.d.ts, line 796, character 14

walletList

walletList (): Promise<Array<string>>

Lists all the addresses in the wallet.

Returns:

Promise<Array<string>>

Source: index.d.ts, line 800, character 12

walletNew

walletNew (keyType: string): Promise<string>

Creates a new address in the wallet with the given sigType. Available key types: bls, secp256k1, secp256k1-ledger Support for numerical types: 1 - secp256k1, 2 - BLS is deprecated

Parameters:

  • keyType: string

Returns:

Promise<string>

Source: index.d.ts, line 806, character 11

walletSign

walletSign (address: string, bytes: string): Promise<Signature>

Signs the given bytes using the given address.

Parameters:

  • address: string
  • bytes: string

Returns:

Promise<Signature>

Source: index.d.ts, line 814, character 12