Skip to content

AccountOperation

Offchain configurable account transaction and key authorization operation utilities.

Derives operation hashes, selects owner approvals, serializes transactions, validates operation state, and converts JSON-RPC representations.

Functions

NameDescription
AccountOperation.fromValidates and normalizes an account operation.
AccountOperation.fromRpcConverts a JSON-RPC account operation to its domain representation.
AccountOperation.getHashDerives the deterministic hash for an account operation.
AccountOperation.selectApprovalsValidates, deduplicates, and selects owner approvals for an operation.
AccountOperation.serializeKeyAuthorizationSerializes a key authorization with selected owner approvals.
AccountOperation.serializeTransactionSerializes an account transaction operation with selected owner approvals.
AccountOperation.toRpcConverts an account operation to its JSON-RPC representation.

Errors

NameDescription
AccountOperation.InvalidApprovalErrorThrown when an account operation owner approval is invalid.
AccountOperation.InvalidOperationErrorThrown when an account operation is malformed or internally inconsistent.

Types

NameDescription
AccountOperation.BaseFields shared by every account operation.
AccountOperation.KeyAuthorizationOperationAccount key authorization approval operation.
AccountOperation.KeyAuthorizationRpcJSON-RPC account key authorization operation.
AccountOperation.OperationTransaction or key authorization account operation.
AccountOperation.RpcJSON-RPC account operation.
AccountOperation.TransactionOperationAccount transaction approval operation.
AccountOperation.TransactionRpcJSON-RPC account transaction operation.