Skip to main content

Non-custodial, headless SDK to control a wallet vault: balances, fee-transparent quotes, swaps and on-chain withdrawals over a co-signed 2-of-2 vault.

Project description

paymos — Python SDK

Non-custodial, headless control of a wallet vault. Your process holds one half of the signing key; our server holds the other. Neither side alone can move funds — every swap and withdrawal is co-signed, and we never receive your half.

You talk to it in plain asset terms (USDC@base, ETH@arb); the SDK hides the routing and the 2-of-2 FROST signing. Amounts you pass are human decimal strings (e.g. "100", "0.5") — never a float; the server scales them to raw, and amounts in responses/dataclasses come back as raw integer strings. The native signing core ships inside the wheel as a compiled extension, so an end user needs no Rust toolchain.

Install

Wheels are self-contained (the native paymos._core extension is bundled), one per platform, tagged cp311-abi3 — a single wheel serves CPython 3.11 / 3.12 / 3.13+:

# Windows
pip install paymos-0.1.0-cp311-abi3-win_amd64.whl
# Linux (x86-64)
pip install paymos-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

…or, once it's published:

pip install paymos

Only dependency is httpx (pulled automatically). Requires Python ≥ 3.11.

Get a vault secret

The SDK is driven by one vs_live_… vault secret. You create it in the wallet Mini App → Settings → Vault API:

  • a read key — view balances and get quotes (no share; cannot sign), and
  • a full key — everything a read key does, plus swap and withdraw (carries your co-signing share).

The secret bundles the API key and, for a full key, your FROST share. The share never leaves your process and never reaches our server. There is no CLI provisioner — the key is minted in the Mini App (the share is decrypted on your device).

Point the SDK at it with an environment variable:

$env:PAYMOS_VAULT_SECRET = "vs_live_…"
# optional — defaults to https://wallet.paymos.io
# $env:PAYMOS_BASE_URL = "https://wallet.paymos.io"

1-minute usage

import asyncio
from paymos import Wallet

async def main():
    w = Wallet.from_env()                       # reads PAYMOS_VAULT_SECRET

    # Balances — per-asset, raw amount strings + a nullable USD value.
    for b in await w.balances():
        print(b.asset, b.amount_raw, b.usd)

    # Preview a withdraw: a dry, money-safe quote. The headline is the fee breakdown.
    q = await w.quote_withdraw(asset="USDC@base", amount="25", to="0xRecipient…")
    print(q.fees.platform, q.fees.network, q.fees.route, q.fees.total)

    # Move money (full-scope secret only). Amounts are human decimal strings.
    mv = await w.swap(send="USDC@base", receive="ETH@arb", amount="100")
    print(await w.wait(mv.id))                   # poll to a terminal status

    await w.aclose()

asyncio.run(main())

Read-only building blocks: assets(), balances(), quote_swap(...), quote_withdraw(...), movement(id), movements(...). Money moves (need a full key): swap(...), withdraw(...), and wait(id) to poll a movement to completed | failed | refunded | expired | cancelled.

The fee breakdown

quote_swap / quote_withdraw always return a dry Quote (nothing is persisted) whose .fees is the headline: a Fees with platform, network, total (raw integer strings), route (a RouteFee with .amount + .estimate, or None when there's no route leg), and a nullable usd dict. Preview it before you ever sign. swap / withdraw create the real movement under a fresh idempotency key and drive the co-sign; swap also takes an optional min_receive (human decimal) and raises SlippageExceeded — signing nothing — if the guaranteed receive is below it.

Security

  • A leaked API key alone cannot move funds — no share, no signature (and we can revoke the key).
  • A leaked share alone cannot move funds — no server co-sign.
  • Both are needed, on purpose. Treat a full secret like a private key; back up the share.

Examples

See examples/ for a clickable local web demo (FastAPI, prod-pointed) that loads balances, shows the fee breakdown, and — behind a confirm box — does a real swap, plus a minimal demo.py CLI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paymos-0.1.2.tar.gz (37.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

paymos-0.1.2-cp311-abi3-win_amd64.whl (362.4 kB view details)

Uploaded CPython 3.11+Windows x86-64

paymos-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (513.7 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

File details

Details for the file paymos-0.1.2.tar.gz.

File metadata

  • Download URL: paymos-0.1.2.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for paymos-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3c8daa8ffd552ff26280793e67548615487498dcc2590c0900418c5dd25ff659
MD5 99b56f0250267df55659ebed3abc2201
BLAKE2b-256 0c39852aed85103812d54a1eadbf5d55327de25c756eccbfaf50074198e70ff5

See more details on using hashes here.

Provenance

The following attestation bundles were made for paymos-0.1.2.tar.gz:

Publisher: wheels.yml on shockk73/intents-vault

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file paymos-0.1.2-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: paymos-0.1.2-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 362.4 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for paymos-0.1.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d2fc052617c2b66580824af5f25cf5d5aaeb3f363fce91de3b4d08dda11fca78
MD5 779536b720f0a2e1de9fef4ae367d1d7
BLAKE2b-256 c5114b2f7b6a52281181e35bbd1ac7f2051bac744a84a28a4ced02cf377bec52

See more details on using hashes here.

Provenance

The following attestation bundles were made for paymos-0.1.2-cp311-abi3-win_amd64.whl:

Publisher: wheels.yml on shockk73/intents-vault

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file paymos-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for paymos-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b09a5d0cf233a699fe25e1d2e643dfb19389f1329cca5bfc4d526a463e1769ad
MD5 a26510560e3892c2a3ca9f816d380091
BLAKE2b-256 6db29dfdc44ae0ce9a52a6876b0345ca5151c50e817fcde3ba699764767a7060

See more details on using hashes here.

Provenance

The following attestation bundles were made for paymos-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on shockk73/intents-vault

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page