Tx

class Tx(data)

exported from models/tx

Class for converting transaction data to and from network representation. You usually don’t need to interact with this class manually, you can pass simple JSON objects. This class is used when passing transaction data to client methods.

Arguments:
  • data (Partial<models/tx.Tx>) –
Tx.amount

type: models/amount.Amount

Tx.chainIdHash

type: string

Tx.from

type: models/address.Address|string

Tx.hash

type: string

Tx.limit

type: number

Tx.nonce

type: number

Tx.payload

type: Uint8Array|string

Tx.price

type: models/amount.Amount

Tx.sign

type: string

Tx.to

type: models/address.Address|string

Tx.type

type: models/tx.TxTypeValue

Tx.encodeHash(buf)
Arguments:
  • buf (Uint8Array) –
Returns:

string

Tx.fromGrpc(grpcObject)
Arguments:
  • grpcObject (GrpcTx) –
Returns:

models/tx.Tx

Tx.inferType()

Infer a tx type based on body. Can be overriden by exlicitly passing type.

Returns:models/tx.TxTypeValue
Tx.toGrpc()
Returns:GrpcTx
Tx.Type

type: TxTypeMap

Map of tx types. Use as Tx.Type.NORMAL, Tx.Type.GOVERNANCE, Tx.Type.REDEPLOY, Tx.Type.FEEDELEGATION