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_sdkTransaction 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

  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/eventsExisting records, then live update payloads.

Guides

On this page