Documentation

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.

PackageImportLinksMain Surface
@usemosiac/ts-sdk@usemosiac/ts-sdknpm · GitHubUnsigned wallet transactions, quote math, metadata helpers, read API client.
mosaic-sdkmosaic_sdkGIWA 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

  1. Prepare metadata URI and metadata hash.
  2. Approve the required USDC amount.
  3. Build the Mosaic transaction.
  4. Sign and send through a wallet or signer.
  5. Read settlement state or API records after confirmation.

Required approvals:

ActionApproval
Create bountyReward plus post fee.
Submit workSubmission bond.
Dispute workDispute bond.

Indexed Reads

The read API serves Mosaic records from mortar.

RouteReturn
GET /bountiesBounty records or paged bounty records.
GET /bounties/{bounty_id}One bounty record.
GET /bounties/{bounty_id}/overviewOne bounty, its submissions, and their disputes.
GET /submissionsSubmission records or paged submission records.
GET /submissions?bounty_id=...Submission records for one bounty.
GET /submissions/{submission_id}/overviewOne submission, its bounty, and its disputes.
GET /disputesDispute 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}/overviewOne dispute, its submission, its bounty, and sibling disputes.
WS /ws/eventsActive-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.

Guides

On this page