Type-safe client library for the Supra blockchain (MoveVM)
supra-ts-sdk is a lightweight, modern TypeScript SDK for building applications on the Supra Layer-1 blockchain (MoveVM-based).
It provides strongly-typed helpers for:
- Connecting to Supra nodes (Mainnet / Testnet)
- Reading account balances & resources
- Submitting transactions
- Calling view / entry functions on Move modules
- Working with Move structs and ABIs
- Full TypeScript support with excellent type inference
- Native Move function calling (entry & view)
- Clean builder-style transaction creation
- Automatic BCS serialization / deserialization
- Built-in support for Supra Mainnet & Testnet
- Minimal dependencies
# Recommended (fastest + best disk usage)
pnpm add supra-ts-sdk
# or with npm
npm install supra-ts-sdk
# or with Yarn
yarn add supra-ts-sdk- Node.js ≥ 18
- TypeScript ≥ 4.9 (5.x strongly recommended)
import { SupraClient, Network } from 'supra-ts-sdk';
(async () => {
const supra = new SupraClient({ network: Network.TESTNET });
console.log("Connected to Supra Testnet (Chain ID 6)");
})();import { SupraClient, Network } from 'supra-ts-sdk';
(async () => {
const supra = new SupraClient({ network: Network.TESTNET });
const accountAddress = "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1c55";
const exists = await supra.account.isAccountExists({ accountAddress });
console.log(`Account ${accountAddress.slice(0, 8)}... exists:`, exists);
})();Note: Accounts on Supra only exist after receiving a transaction or resource. This is a fast, gas-free check.
import { SupraClient, Network } from 'supra-ts-sdk';
(async () => {
const supra = new SupraClient({ network: Network.TESTNET });
const rootAddress = "0x0000000000000000000000000000000000000000000000000000000000000001";
const accountData = await supra.account.getAccountInfo({ accountAddress: rootAddress });
console.log("Framework (0x1) account info:", accountData);
// Expected fields: sequence_number, authentication_key, etc.
})();- Account
- Faucet
- Coin
- Fungible Asset
- Transaction
- Build Transaction
- Simulate Transaction
- Submit Transaction
- Contract
- Event
- Methods
- Table
- Block
Contributions are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feat/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feat/your-feature) - Open a Pull Request
Please:
- Follow existing code style & add tests where possible
- Update README/examples if behavior changes
- Report bugs via Issues with reproduction steps
MIT License
See the LICENSE file for full details.
Built with ❤️ for the Supra ecosystem. Happy coding! 🚀