SDK Reference

Complete API reference for the VORT SDK, enabling developers to integrate VORT's intent-centric execution into their applications.

Core Classes

VORT

Main SDK class for interacting with the VORT protocol.

Constructor

new VORT(options: VORTOptions)

Parameters:

  • options.apiKey (string, optional): API key for authenticated access

  • options.network ('mainnet' | 'devnet', required): Network to connect to

  • options.rpcUrl (string, optional): Custom Solana RPC URL

  • options.apiUrl (string, optional): Custom VORT API URL

Example:

const vort = new VORT({
  network: 'mainnet',
  apiKey: 'your-api-key'
});

Methods

submitIntent

Submit an intent to the VORT Agent Exchange.

Parameters:

  • intent (Intent): The intent to submit (see Intent Types)

  • options.wallet (Wallet): User's Solana wallet

  • options.signMessage (function): Function to sign messages with user's wallet

Returns: Promise resolving to SubmitResult:

  • intentId (string): Unique identifier for the intent

  • status (string): Initial status ('pending' | 'submitted')

  • estimatedCost (number): Estimated execution cost in SOL

  • estimatedTime (number): Estimated execution time in seconds

Example:

getIntentStatus

Get the current status of an intent.

Returns: Promise resolving to IntentStatus:

  • intentId (string): Intent identifier

  • status (string): Current status

  • progress (number): Execution progress (0-1)

  • currentState (object): Current on-chain state

  • actionsCompleted (number): Number of actions completed

  • totalActions (number): Total number of actions

Example:

monitorIntent

Monitor an intent's execution in real-time using events.

Returns: Promise resolving to IntentMonitor with event methods:

  • on(event, callback): Register event listener

  • off(event, callback): Remove event listener

  • once(event, callback): Register one-time event listener

Events:

  • 'submitted': Intent submitted to Agent Exchange

  • 'auction': Auction in progress (callback receives auction details)

  • 'executing': Execution in progress (callback receives progress update)

  • 'complete': Execution complete (callback receives receipt)

  • 'error': Error occurred (callback receives error)

Example:

getExecutionReceipt

Get the execution receipt for a completed intent.

Returns: Promise resolving to ExecutionReceipt:

  • intentId (string): Intent identifier

  • status (string): Final status ('completed' | 'failed')

  • finalState (object): Final on-chain state

  • proof (object): Cryptographic proof of execution

  • transactions (array): On-chain transaction hashes

  • costs (object): Execution cost breakdown

  • metrics (object): Execution quality metrics

Example:

verifyProof

Verify an execution proof independently.

Returns: Promise resolving to VerificationResult:

  • valid (boolean): Whether the proof is valid

  • details (object): Verification details

  • errors (array): Any verification errors

Example:

getUserPolicies

Get user's current policies.

Returns: Promise resolving to UserPolicies object containing policy definitions.

updateUserPolicies

Update user's policies.

Intent Types

SwapIntent

Intent to swap one token for another.

Example:

RebalanceIntent

Intent to rebalance portfolio allocation.

Example:

YieldOptimizeIntent

Intent to optimize yield across protocols.

Example:

RiskManageIntent

Intent to set up risk management rules.

Example:

Types and Interfaces

IntentStatus

ExecutionReceipt

Proof

UserPolicies

Error Handling

Error Types

Example:

Advanced Features

Batch Intent Submission

Submit multiple intents in a single operation:

Intent Scheduling

Schedule intents for future execution:

Custom Agent Selection

Specify preferred agents or agent requirements:

This SDK reference provides comprehensive coverage of VORT's programmatic interface. For integration examples and best practices, see the Integration Guide. For proof verification details, see the Proof Verification guide.

Last updated