The Veritix Contract SDK provides a TypeScript/JavaScript client for interacting with Veritix smart contracts on the Stellar Soroban network. It abstracts low‑level Soroban RPC calls, offers type‑safe helpers, and includes utilities for handling payments, splitters, recurring modules, and more.
- Simplify contract interaction for developers.
- Provide client‑side validation utilities.
- Ensure compatibility with both testnet and mainnet environments.
- Offer clear error handling and mapping via
parseSorobanError.
- Installation
npm install @veritix/contract-sdk
- Configuration
Create a
.envfile (or use environment variables) with:NEXT_PUBLIC_SOROBAN_RPC_URL=https://testnet.soroban.network NEXT_PUBLIC_NETWORK_PASSPHRASE=Test S");
- Usage Example
import { VeritixClient } from "@veritix/contract-sdk"; const client = new VeritixClient({ rpcUrl: process.env.NEXT_PUBLIC_SOROBAN_RPC_URL!, networkPassphrase: process.env.NEXT_PUBLIC_NETWORK_PASSPHRASE!, }); // Example: creating a payment split const result = await client.splitter.createSplit({ recipients: [ { address: "G...", basisPoints: 5000 }, { address: "G...", basisPoints: 5000 }, ], }); console.log(result);
- RecurringModule – Manage recurring payments (create, cancel, pause, resume, query).
- SplitterModule – Validate and create payment splits, ensuring basis‑point constraints.
- Utility Functions – Validation helpers, error parsing, and ledger queries.
Run the test suite with:
npm testThe SDK includes comprehensive unit tests for each module under tests/.
- Fork the repository.
- Create a feature branch.
- Ensure all tests pass (
npm test). - Submit a pull request with a clear description.
MIT © Veritix