universalsettle-api
The High-Velocity Settlement Standard for the Solana Agentic Economy.
universalsettle-api is the official Rust SDK for interacting with the UniversalSettle program on Solana. Designed for the machine-to-machine (M2M) economy, it enables autonomous agents to perform instant, trustless settlement for any SPL token or Native SOL.
🏗️ Architecture
UniversalSettle implements a Commission-First settlement model. It acts as a stateless payment bridge that ensures:
- Facilitator Fees: Automatically routed to the protocol treasury on every transaction.
- Deterministic Settlement: Using Program Derived Addresses (PDAs) to manage seller vaults.
- Institutional Transparency: On-chain configuration of fee basis points (bps) and destinations.
🚀 Quick Start
1. Add Dependency
Add this to your Cargo.toml:
[]
= "0.1.2"
= "2.1"
2. Build a Settlement Instruction
As a seller or facilitator, you can easily build instructions for the blockchain:
use sdk;
use Pubkey;
let = split_vault_pda;
// Build a sweep instruction to settle funds from a vault
let ix = sweep;
🛠️ Key Features
- SplitVault PDAs: Every seller gets a unique vault that partitions revenue from protocol fees.
- Support for All Assets: Native SOL and all SPL Token/Token-2022 assets.
- Developer-First SDK: High-level helper functions for
Initialize,UpdateConfig,CreateVault, andSweep.
📜 Standard Alignment
This crate is the reference implementation for the x402 Protocol v2. It works perfectly with the pr402 Facilitator and the spl-token-balance-serverless reference project.
⚖️ License
Licensed under the Apache License, Version 2.0.