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 | — | Transaction dicts and metadata hashing/loading. |
Shared Facts
- Chain ID is
8453. - Token is native Base USDC.
- 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.
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 | Existing records, then live update payloads. |
