Transactions

Transactions are blockchain operations initiated from vaults. Cubewire supports multiple transaction types with policy enforcement, compliance screening, and reliable execution.

What is a Transaction?

A transaction represents:

  • Blockchain Operation — Transfer, contract call, deployment, etc.
  • Workflow Execution — Reliable orchestration with automatic retries
  • Policy Evaluation — Rules checked before execution
  • Audit Trail — Complete logging for compliance

Transaction Types

TypeDescriptionGas RequiredUse Case
TRANSFERSend native currency or ERC-20 tokensYesPayments, settlements
CONTRACT_WRITEExecute state-changing contract functionYesDeFi, governance
CONTRACT_READQuery contract state (view/pure)NoBalance checks, price feeds
CONTRACT_DEPLOYDeploy new smart contractYesToken launches, protocols
MINTCreate new tokensYesToken issuance
BURNDestroy tokensYesToken redemption
RAW_SIGNINGSign arbitrary dataNoOff-chain signatures

Transaction Lifecycle

Understanding the transaction lifecycle helps you build robust integrations that handle all possible states.

Request Parameters

Common Fields

FieldTypeRequiredDescription
chainIdnumberYesNetwork identifier (1=Ethereum, 137=Polygon, etc.)
typeenumNoTransaction type (defaults to TRANSFER)
senderobjectYesSource vault information
recipientobjectVariesDestination (required for TRANSFER, CONTRACT_WRITE)

Sender Object

The sender must be an internal vault owned by your organization. Provide either vaultId or address:

FieldTypeDescription
vaultIdUUIDInternal vault identifier (recommended)
addressstringVault's blockchain address (alternative, must match a vault in your org)

Recipient Object

The recipient can be internal (vault-to-vault) or external:

FieldTypeDescription
vaultIdUUIDInternal vault (for vault-to-vault transfers)
addressstringExternal blockchain address

Note: Provide either vaultId OR address, not both.

Asset Object (Required for TRANSFER)

FieldTypeRequiredDescription
typeenumYesnative (ETH/MATIC) or token (ERC-20)
addressstringIf type=tokenERC-20 contract address
symbolstringNoAsset symbol (auto-fetched if omitted)
decimalsnumberNoDecimal places (auto-fetched if omitted)

Contract Fields

FieldTypeRequiredDescription
contractAddressstringFor CONTRACT_READTarget contract address
datastringFor CONTRACT_WRITEHex-encoded function call (0x...)
functionSignaturestringNoHuman-readable signature for audit logs
functionNamestringFor CONTRACT_READFunction name (e.g., balanceOf)
parametersarrayFor CONTRACT_READFunction parameters with type/value

Gas Parameters

FieldTypeDescription
gasLimitstringMaximum gas units (auto-estimated if omitted)
maxFeePerGasstringEIP-1559 max fee per gas in Gwei
maxPriorityFeePerGasstringEIP-1559 priority fee in Gwei

Note: Cubewire uses EIP-1559 gas pricing. See Gas Fees for details.

Transaction Approvals

When policies require approval, transactions enter PENDING_APPROVAL status.

Approval Flow

Best Practices

Reliability

PracticeDescription
Store workflow IDsTrack transactions through their lifecycle
Implement idempotencyUse unique identifiers to prevent duplicates
Use exponential backoffRetry failed requests appropriately

Compliance

PracticeDescription
Document purposesInclude metadata for audit trails
Review policiesVerify rules before high-value transfers
Maintain recordsKeep transaction history for reporting
  • Vaults — Managing sender vaults
  • Networks — Supported blockchain networks

API Reference

For complete API documentation including endpoints, request/response examples, and code samples:

Submit TransactionGet Transaction StatusList Transactions