Options
All
  • Public
  • Public/Protected
  • All
Menu

TxBalanceBuilder provides the ability to build and execute a balance transaction

class

TxBalanceBuilder

Hierarchy

Index

Constructors

constructor

Properties

Protected client

client: undefined | RPCClient

The RPC client

type

{RPCClient}

memberof

TxBalanceBuilder

Protected data

data: Transaction

The transaction data

type

{Transaction}

memberof

TxBalanceBuilder

Methods

fee

Protected finalize

  • Performs final operations such computing and setting the transaction hash and signature as well as setting the sender public key and time.

    memberof

    TxBalanceBuilder

    Parameters

    • Optional sk: PrivateKey

      The sender's private key

    Returns Promise<string>

    Returns the transaction hash

from

getBytesNoHashAndSig

  • getBytesNoHashAndSig(tx: Transaction): Buffer
  • Returns the byte equivalent of a given transaction but does not include the transaction hash and sig fields

    memberof

    TxUtility

    Parameters

    • tx: Transaction

      The transaction

    Returns Buffer

hash

  • hash(tx: Transaction, prefix?: string): string
  • Compute and return the hash of a transaction

    memberof

    TxUtility

    Parameters

    • tx: Transaction

      The transaction

    • Default value prefix: string = "0x"

    Returns string

nonce

packed

payload

  • Returns the transaction data without sending it to the network. It will finalize the transaction if the sender's private key is provided.

    memberof

    TxBalanceBuilder

    Parameters

    Returns Promise<Transaction>

reset

  • reset(): void

send

sign

  • sign(tx: Transaction, sk: PrivateKey, prefix?: string): string
  • Sign and return a signature of the transaction.

    memberof

    TxUtility

    Parameters

    • tx: Transaction

      The transaction

    • sk: PrivateKey

      The private key to use for signing

    • Default value prefix: string = "0x"

    Returns string

    An hex string

to

value