SDKs & Tools
We are dedicated to providing developers with robust Software Development Kits (SDKs) and command-line interface (CLI) tools to make integration with VSD smart contracts and the VSD Network seamless and efficient.
A JavaScript/TypeScript SDK (e.g., using Ethers.js or Web3.js) is available to simplify interaction with VSD smart contracts from Node.js or browser environments (dApps). Easily query token balances, interact with vault functionalities, and build transactions.
Key Features:
- Query VSD token balance, total supply, etc.
- Interact with Vault/CDP management functions (mint, repay, deposit/withdraw collateral).
- Helper utilities for formatting data and preparing transactions.
- Subscribe to smart contract events.
// Installation
npm install @vsdnetwork/sdk ethers # Example
// or
yarn add @vsdnetwork/sdk ethers
// Basic Usage (Illustrative)
import { VSDSDK, Networks, ethers } from '@vsdnetwork/sdk'; // Assuming ethers for provider/signer
async function getVsdBalance(userAddress, rpcUrl) {
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
// For read-only: const sdk = new VSDSDK({ network: Networks.Mainnet, provider });
// For write transactions, a signer is needed:
// const signer = provider.getSigner(userAddress); // Or from wallet connection
// const sdk = new VSDSDK({ network: Networks.Mainnet, signer });
const sdk = new VSDSDK({ provider }); // Simplified for example
const balance = await sdk.vsdToken.balanceOf(userAddress);
console.log('VSD Balance:', ethers.utils.formatUnits(balance, await sdk.vsdToken.decimals()));
}
getVsdBalance('0xYourAccountAddress', 'YOUR_ETHEREUM_RPC_URL');
Refer to the main documentation for more examples on interacting with specific smart contracts.
A Python SDK (e.g., using Web3.py) is planned to cater to backend developers and data scientists looking to interact with VSD smart contracts. It will offer similar functionalities to the JS SDK, tailored for Pythonic environments.
Expected Features: Smart contract interaction, event listening, transaction building, data analysis helpers.
Stay tuned for updates on its development progress.
For developers working with Go, we plan to release a Go SDK. This will be beneficial for building high-performance backend services, indexers, and tools that interface with VSD smart contracts on the blockchain.
Expected Features: Core protocol interactions, type-safe smart contract bindings, transaction management.
Follow our announcements for availability.
Command-Line Interface (CLI) tools are on our roadmap to provide quick and easy ways to perform common tasks with VSD smart contracts, query on-chain information, and manage VSD-related operations directly from your terminal.
Potential Uses: Checking balances, querying vault status, interacting with governance proposals, deploying test contracts.
Development will commence after core SDKs are stable.
Stay Updated & Contribute
Follow our progress on GitHub (for smart contracts and SDKs) and join our developer community for the latest announcements on SDKs, tools, and other developer resources.
Developer Community & GitHub