TypeScript SDK for interacting with the SoroSave smart contracts on Soroban.
npm install @sorosave/sdkimport { SoroSaveClient } from "@sorosave/sdk";
const client = new SoroSaveClient({
rpcUrl: "https://soroban-testnet.stellar.org",
contractId: "YOUR_CONTRACT_ID",
networkPassphrase: "Test SDF Network ; September 2015",
});
const tx = await client.createGroup({
admin: "G...",
name: "My Savings Group",
token: "TOKEN_ADDRESS",
contributionAmount: 1000000n,
cycleLength: 86400,
maxMembers: 5,
}, sourcePublicKey);
const group = await client.getGroup(1);createGroup()— Create a new savings groupjoinGroup()— Join an existing groupleaveGroup()— Leave a group (while forming)startGroup()— Start the group (admin only)contribute()— Contribute to the current rounddistributePayout()— Distribute pot to recipientpauseGroup()/resumeGroup()— Admin controlsraiseDispute()— Raise a disputegetGroup()— Get group detailsgetRoundStatus()— Get round infogetMemberGroups()— Get all groups for a member
- ARCHITECTURE.md — Protocol architecture
- CONTRIBUTING.md — How to contribute
MIT