Client

Extends xchain_utxo_1.Client

Custom Dogecoin client

Parameters

  • params DogecoinClientParams (optional, default exports.defaultDogeParams)

buildTx

Build transcation.

Parameters

  • params BuildParams The transaction build options.
    • params.amount
    • params.recipient
    • params.memo
    • params.feeRate
    • params.sender

Returns Transaction

Meta

  • deprecated: This is deprecated.

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.

getAssetInfo

Returns any Doge asset info

validateAddress

Validate the given address.

Parameters

  • address Address

Returns boolean true or false

transfer

Transfer Doge.

Parameters

  • params TxParams&FeeRate The transfer options.

Returns TxHash The transaction hash.

createTxInfo

Create transaction info.

Parameters

  • params LedgerTxInfoParams The transaction build options.

Returns LedgerTxInfo The transaction info used for ledger sign.

Meta

  • deprecated: This is deprecated.

prepareTx

Prepare transfer.

Parameters

  • params TxParams&Address&FeeRate&boolean The transfer options.
    • params.sender
    • params.memo
    • params.amount
    • params.recipient
    • params.feeRate

Returns PreparedTx The raw unsigned transaction.

compileMemo

Compile memo.

Parameters

  • memo string The memo to be compiled.

Returns Buffer The compiled memo.

getFeeFromUtxos

Get the transaction fee.

Parameters

  • inputs Array<UTXO> The UTXOs.
  • feeRate FeeRate The fee rate.
  • data Buffer The compiled memo (Optional). (optional, default null)

Returns number The fee amount.