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
| Type | Description | Gas Required | Use Case |
|---|---|---|---|
TRANSFER | Send native currency or ERC-20 tokens | Yes | Payments, settlements |
CONTRACT_WRITE | Execute state-changing contract function | Yes | DeFi, governance |
CONTRACT_READ | Query contract state (view/pure) | No | Balance checks, price feeds |
CONTRACT_DEPLOY | Deploy new smart contract | Yes | Token launches, protocols |
MINT | Create new tokens | Yes | Token issuance |
BURN | Destroy tokens | Yes | Token redemption |
RAW_SIGNING | Sign arbitrary data | No | Off-chain signatures |
Transaction Lifecycle
Understanding the transaction lifecycle helps you build robust integrations that handle all possible states.
Request Parameters
Common Fields
| Field | Type | Required | Description |
|---|---|---|---|
chainId | number | Yes | Network identifier (1=Ethereum, 137=Polygon, etc.) |
type | enum | No | Transaction type (defaults to TRANSFER) |
sender | object | Yes | Source vault information |
recipient | object | Varies | Destination (required for TRANSFER, CONTRACT_WRITE) |
Sender Object
The sender must be an internal vault owned by your organization. Provide either vaultId or address:
| Field | Type | Description |
|---|---|---|
vaultId | UUID | Internal vault identifier (recommended) |
address | string | Vault's blockchain address (alternative, must match a vault in your org) |
Recipient Object
The recipient can be internal (vault-to-vault) or external:
| Field | Type | Description |
|---|---|---|
vaultId | UUID | Internal vault (for vault-to-vault transfers) |
address | string | External blockchain address |
Note: Provide either vaultId OR address, not both.
Asset Object (Required for TRANSFER)
| Field | Type | Required | Description |
|---|---|---|---|
type | enum | Yes | native (ETH/MATIC) or token (ERC-20) |
address | string | If type=token | ERC-20 contract address |
symbol | string | No | Asset symbol (auto-fetched if omitted) |
decimals | number | No | Decimal places (auto-fetched if omitted) |
Contract Fields
| Field | Type | Required | Description |
|---|---|---|---|
contractAddress | string | For CONTRACT_READ | Target contract address |
data | string | For CONTRACT_WRITE | Hex-encoded function call (0x...) |
functionSignature | string | No | Human-readable signature for audit logs |
functionName | string | For CONTRACT_READ | Function name (e.g., balanceOf) |
parameters | array | For CONTRACT_READ | Function parameters with type/value |
Gas Parameters
| Field | Type | Description |
|---|---|---|
gasLimit | string | Maximum gas units (auto-estimated if omitted) |
maxFeePerGas | string | EIP-1559 max fee per gas in Gwei |
maxPriorityFeePerGas | string | EIP-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
| Practice | Description |
|---|---|
| Store workflow IDs | Track transactions through their lifecycle |
| Implement idempotency | Use unique identifiers to prevent duplicates |
| Use exponential backoff | Retry failed requests appropriately |
Compliance
| Practice | Description |
|---|---|
| Document purposes | Include metadata for audit trails |
| Review policies | Verify rules before high-value transfers |
| Maintain records | Keep transaction history for reporting |
Related Topics
- Vaults — Managing sender vaults
- Networks — Supported blockchain networks
API Reference
For complete API documentation including endpoints, request/response examples, and code samples:
→ Submit Transaction → Get Transaction Status → List Transactions
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
| Type | Description | Gas Required | Use Case |
|---|---|---|---|
TRANSFER | Send native currency or ERC-20 tokens | Yes | Payments, settlements |
CONTRACT_WRITE | Execute state-changing contract function | Yes | DeFi, governance |
CONTRACT_READ | Query contract state (view/pure) | No | Balance checks, price feeds |
CONTRACT_DEPLOY | Deploy new smart contract | Yes | Token launches, protocols |
MINT | Create new tokens | Yes | Token issuance |
BURN | Destroy tokens | Yes | Token redemption |
RAW_SIGNING | Sign arbitrary data | No | Off-chain signatures |
Transaction Lifecycle
Understanding the transaction lifecycle helps you build robust integrations that handle all possible states.
Request Parameters
Common Fields
| Field | Type | Required | Description |
|---|---|---|---|
chainId | number | Yes | Network identifier (1=Ethereum, 137=Polygon, etc.) |
type | enum | No | Transaction type (defaults to TRANSFER) |
sender | object | Yes | Source vault information |
recipient | object | Varies | Destination (required for TRANSFER, CONTRACT_WRITE) |
Sender Object
The sender must be an internal vault owned by your organization. Provide either vaultId or address:
| Field | Type | Description |
|---|---|---|
vaultId | UUID | Internal vault identifier (recommended) |
address | string | Vault's blockchain address (alternative, must match a vault in your org) |
Recipient Object
The recipient can be internal (vault-to-vault) or external:
| Field | Type | Description |
|---|---|---|
vaultId | UUID | Internal vault (for vault-to-vault transfers) |
address | string | External blockchain address |
Note: Provide either vaultId OR address, not both.
Asset Object (Required for TRANSFER)
| Field | Type | Required | Description |
|---|---|---|---|
type | enum | Yes | native (ETH/MATIC) or token (ERC-20) |
address | string | If type=token | ERC-20 contract address |
symbol | string | No | Asset symbol (auto-fetched if omitted) |
decimals | number | No | Decimal places (auto-fetched if omitted) |
Contract Fields
| Field | Type | Required | Description |
|---|---|---|---|
contractAddress | string | For CONTRACT_READ | Target contract address |
data | string | For CONTRACT_WRITE | Hex-encoded function call (0x...) |
functionSignature | string | No | Human-readable signature for audit logs |
functionName | string | For CONTRACT_READ | Function name (e.g., balanceOf) |
parameters | array | For CONTRACT_READ | Function parameters with type/value |
Gas Parameters
| Field | Type | Description |
|---|---|---|
gasLimit | string | Maximum gas units (auto-estimated if omitted) |
maxFeePerGas | string | EIP-1559 max fee per gas in Gwei |
maxPriorityFeePerGas | string | EIP-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
| Practice | Description |
|---|---|
| Store workflow IDs | Track transactions through their lifecycle |
| Implement idempotency | Use unique identifiers to prevent duplicates |
| Use exponential backoff | Retry failed requests appropriately |
Compliance
| Practice | Description |
|---|---|
| Document purposes | Include metadata for audit trails |
| Review policies | Verify rules before high-value transfers |
| Maintain records | Keep transaction history for reporting |
Related Topics
- Vaults — Managing sender vaults
- Networks — Supported blockchain networks
API Reference
For complete API documentation including endpoints, request/response examples, and code samples:
→ Submit Transaction → Get Transaction Status → List Transactions