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 accessoptions.network('mainnet' | 'devnet', required): Network to connect tooptions.rpcUrl(string, optional): Custom Solana RPC URLoptions.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 walletoptions.signMessage(function): Function to sign messages with user's wallet
Returns: Promise resolving to SubmitResult:
intentId(string): Unique identifier for the intentstatus(string): Initial status ('pending' | 'submitted')estimatedCost(number): Estimated execution cost in SOLestimatedTime(number): Estimated execution time in seconds
Example:
getIntentStatus
Get the current status of an intent.
Returns: Promise resolving to IntentStatus:
intentId(string): Intent identifierstatus(string): Current statusprogress(number): Execution progress (0-1)currentState(object): Current on-chain stateactionsCompleted(number): Number of actions completedtotalActions(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 listeneroff(event, callback): Remove event listeneronce(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 identifierstatus(string): Final status ('completed' | 'failed')finalState(object): Final on-chain stateproof(object): Cryptographic proof of executiontransactions(array): On-chain transaction hashescosts(object): Execution cost breakdownmetrics(object): Execution quality metrics
Example:
verifyProof
Verify an execution proof independently.
Returns: Promise resolving to VerificationResult:
valid(boolean): Whether the proof is validdetails(object): Verification detailserrors(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
