Skip to main content

Python SDK

Status: planned. A Python client for the Skia settlement API is in preparation (runtime build scripts already live in the repo under tests/), but it is not shipped and no package is published. This page records the contract it will honor, so integrators can plan against it.

What it will cover

  • The /api settlement primitives: wallets, faucet, quote, commit, reveal.
  • The /v1 invoice surface: issue, ack/reject, dispute, credit notes, payment intents, order bind, receivable reads.
  • EIP-712 signing helpers with the byte-match discipline — the canonical InvoiceClaim encodeType, the D-INV-1 domain, and the pinned claimHash = keccak256(0x19 ‖ 0x01 ‖ domainSeparator ‖ structHash) digest.
  • The error envelope as typed exceptions, mapped 1:1 to the generated x-error-codes table (77 rows, six groups).
  • Idempotency (the per-invoice key scope and terminal-retry rule) and the single-fire reveal discipline, matching the TypeScript SDK’s semantics.

The parity contract

The Python client will be built against the same spec of record (docs/mvp-spec-v0.4.7.yaml) and the same live server contracts — not a parallel interpretation of them. The same honest-disclosure rules apply: simulated lanes surface txHash: null, custody is server-custodial in Phase 1, and the bearer is the testnet-simulated address token.

In the meantime

  • REST — everything the SDKs do is plain HTTP; any Python agent can call api.skia.money directly today. Start with the Quickstart and the API Reference.
  • MCP — a Python MCP client can drive the sixteen-tool surface through mcp.skia.money with no SDK at all.
Track the TypeScript SDK for the current reference implementation — the Python client follows its semantics, not its code.