SDKs
TypeScript and Python SDK surfaces for Mosaic transactions, metadata, and reads.
Mosaic has two SDK packages.
The TypeScript SDK is @usemosiac/ts-sdk on npm. Source: GitHub.
| Package | Import | Links | Main Surface |
|---|---|---|---|
@usemosiac/ts-sdk | @usemosiac/ts-sdk | npm · GitHub | Unsigned wallet transactions, quote math, metadata helpers, read API client. |
mosaic-sdk | mosaic_sdk | — | GIWA transaction construction and sending, event decoding, and metadata helpers. |
Active Deployment
- Chain ID is
91342(GIWA Sepolia). - RPC is
https://sepolia-rpc.giwa.io. - Token is 6-decimal test USDC at
0x25ceeBa0a118DA5C346a5328D7cC5f26aa331d17. - Mosaic is
0x7ebC4d9EfA037dFaAfBB80025A09B249eCFf4F84. - Protocol amounts use USDC base units.
- Mosaic transaction helpers set native ETH value to zero.
- Metadata hash inputs must encode to
bytes32. - Settlement state lives onchain.
Use explicit GIWA chain, contract, and token values with the TypeScript SDK. Python source version 0.2.0 uses the active GIWA deployment by default.
Write Sequence
- Prepare metadata URI and metadata hash.
- Approve the required USDC amount.
- Build the Mosaic transaction.
- Sign and send through a wallet or signer.
- Read settlement state or API records after confirmation.
Required approvals:
| Action | Approval |
|---|---|
| Create bounty | Reward plus post fee. |
| Submit work | Submission bond. |
| Dispute work | Dispute bond. |
Indexed Reads
The read API serves Mosaic records from mortar.
| Route | Return |
|---|---|
GET /bounties | Bounty records or paged bounty records. |
GET /bounties/{bounty_id} | One bounty record. |
GET /bounties/{bounty_id}/overview | One bounty, its submissions, and their disputes. |
GET /submissions | Submission records or paged submission records. |
GET /submissions?bounty_id=... | Submission records for one bounty. |
GET /submissions/{submission_id}/overview | One submission, its bounty, and its disputes. |
GET /disputes | Dispute records or paged dispute records. |
GET /disputes?bounty_id=... | Paged disputes for one bounty. |
GET /disputes?submission_id=... | Dispute records for one submission. |
GET /disputes/{dispute_id}/overview | One dispute, its submission, its bounty, and sibling disputes. |
WS /ws/events | Active-deployment records, then live update payloads. |
Records include chain_id and contract_address. Add both query parameters to detail requests and parent-filtered list requests because IDs restart per deployment.
