ClientKeystore

ClientKeystore

Extends client_1.Client

Custom Bitcoin client

getAddress

Parameters

  • index (optional, default 0)

Meta

  • deprecated: this function eventually will be removed use getAddressAsync instead

getAddressAsync

Get the current address.

Generates a network-specific key-pair by first converting the buffer to a Wallet-Import-Format (WIF) The address is then decoded into type P2WPKH and returned.

Parameters

  • index (optional, default 0)

  • Throws "Phrase must be provided" Thrown if phrase has not been set before.
  • Throws "Address not defined" Thrown if failed creating account from phrase.

Returns Address The current address.

transfer

Transfer BTC.

Parameters

  • params TxParams&FeeRate The transfer options.

  • Throws "memo too long" Thrown if memo longer than 80 chars.

Returns TxHash The transaction hash.