Skip to main content
The ITransaction interface provides methods for building, signing, and managing blockchain transactions. It supports both simple inline operations and complex operation builders.

Creating transactions

Transactions are created using WAX instance methods:

Adding operations

pushOperation

Pushes an operation to the transaction. Supports both inline operations and complex operation builders.
operation | OperationBase
required
Operation to add. Can be:
  • Inline operation object
  • Complex operation class instance (BlogPostOperation, ReplyOperation, etc.)
ITransaction
Returns the transaction instance for method chaining

Inline operation example

Complex operation example

Transaction properties

id

Generates the transaction ID (HF26 serialization).
string
Transaction ID in hex form (20 bytes)

legacy_id

Generates the transaction ID (legacy serialization).

sigDigest

Generates the digest for signing (HF26 serialization).
string
Transaction digest in hex form for signature generation

legacy_sigDigest

Generates the digest for signing (legacy serialization).

transaction

Returns the underlying protobuf transaction object.

impactedAccounts

Retrieves account names impacted by the transaction.
Set<string>
Set of account names impacted by all operations in the transaction

signatureKeys

Returns public keys from the transaction signatures.
Array<string>
List of all public keys that were used to sign the transaction

requiredAuthorities

Returns required authority accounts from the transaction.
TTransactionRequiredAuthorities

binaryViewMetadata

Retrieves transaction binary view packed AST data.
IBinaryViewOutputData

Signing

addSignature

Adds a signature to the transaction.
THexString
required
Signature in hexadecimal format
ITransaction
Returns the transaction instance for method chaining

Usage with signature providers

isSigned

Checks if the transaction has been signed.
boolean
Returns true if at least one signature is present

Validation

validate

Validates the current transaction.
Throws WaxError on validation error.

Usage example

Serialization

toApi

Converts the transaction to Hive API-form string (HF26).
string
Transaction in Hive API-form JSON string

toApiJson

Converts the transaction to Hive API-form JSON object (HF26).
ApiTransaction
Transaction in Hive API-form JSON object

toLegacyApi

Converts the transaction to legacy Hive API-form string.
Note: Legacy form is deprecated. It produces larger binary serialization output and is more error-prone.

toString

Converts the transaction to protobuf JSON string.

toBinaryForm

Converts the transaction to HF26 binary form.
boolean
Optional flag to strip signatures from the binary output
string
Transaction in hexadecimal binary form

Encryption

startEncrypt

Starts encryption chain for operations.
TPublicKey
required
First key to encrypt operations
TPublicKey
Optional second key to encrypt operations
IEncryptingTransaction
Returns the transaction with encryption capabilities

Supported encrypted fields

  • body in comment operation
  • json in custom_json operation
  • memo in transfer operation
  • memo in transfer_to_savings operation
  • memo in transfer_from_savings operation
  • memo in recurrent_transfer operation

Usage example

stopEncrypt

Stops the encryption chain.
ITransaction
Returns the transaction instance
Note: This call is optional if you’re not pushing any more unencrypted operations.

decrypt

Decrypts all underlying encrypted operations.
ISignatureProvider
required
Unlocked wallet with decryption keys
transaction
Protobuf transaction object with decrypted operations

TypeScript types

transaction (protobuf)

ApiTransaction

TTransactionRequiredAuthorities

Complete example

See also