Skip to main content

Overview

Transactions in Agentic Wallet follow a complete lifecycle from creation through confirmation. All transactions are created via intents - high-level instructions that the platform translates into protocol-specific on-chain operations.

Transaction Lifecycle

Every transaction moves through these states:
1

pending

Transaction created and queued for processing
2

simulating

Transaction simulated on-chain to estimate costs and catch errors
3

policy_eval

Policy engine evaluates rules (spending limits, allowlists, etc.)
4

approval_gate

Transaction paused for manual approval (if required by policy)
5

signing

Wallet engine signs the transaction
6

submitting

Transaction submitted to Solana network
7

confirmed | failed

Final state after on-chain confirmation or failure

Creating Transactions

Basic Transfer (SOL)

SPL Token Transfer

Token Swap

Intent Structure

All transactions require these fields:

Supported Transaction Types

  • transfer_sol - Transfer native SOL
  • transfer_spl - Transfer SPL tokens
  • x402_pay - HTTP 402 payment flow
  • swap - Token swaps (Jupiter, Orca, Raydium)
  • stake - Stake SOL (Marinade)
  • unstake - Unstake SOL
  • lend_supply - Supply assets to lending (Solend)
  • lend_borrow - Borrow assets from lending
  • create_mint - Create new SPL token mint
  • mint_token - Mint tokens to address
  • create_escrow - Create new escrow
  • accept_escrow - Accept escrow as counterparty
  • release_escrow - Release funds to recipient
  • refund_escrow - Refund to creator
  • dispute_escrow - Initiate dispute
  • resolve_dispute - Resolve dispute
  • create_milestone_escrow - Multi-milestone escrow
  • release_milestone - Release specific milestone
  • query_balance - Check wallet balance
  • query_positions - Get DeFi positions
  • flash_loan_bundle - Flash loan operations
  • cpi_call - Cross-program invocation
  • custom_instruction_bundle - Custom instruction set
  • treasury_allocate - Treasury allocation
  • treasury_rebalance - Treasury rebalancing
  • paper_trade - Paper trading (simulation)

Polling for Confirmation

Transactions are processed asynchronously. Poll the transaction status:
Response Structure:

Idempotency Keys

Prevent duplicate transaction execution with idempotency keys:
If you submit the same idempotencyKey again, the API returns the original transaction instead of creating a duplicate.

Approval Gate Workflow

If a policy requires approval, the transaction pauses at approval_gate:
1

Transaction Paused

Transaction reaches approval_gate status and waits for operator action.
2

Review Transaction

Retrieve pending approvals:
3

Approve or Reject

4

Transaction Continues

After approval, transaction proceeds to signing → submitting → confirmed.

Transaction Proofs

Every transaction generates cryptographic proof artifacts:
Response:

Replay Data

Get full execution replay for auditing:
Returns complete transaction history including all state transitions and policy decisions.

Gasless Transactions

Enable gasless execution for supported protocols:
Gasless execution requires KORA_RPC_URL configured and protocol must have gaslessEligible: true in risk config.

Real Examples from Source

From scripts/devnet-smoke.ts

Next Steps

Setting Policies

Add spending limits and security rules to your transactions

Protocol Interactions

Execute DeFi operations across Jupiter, Marinade, Solend, and more