TokenTip
SDKs

Official client libraries.

Typed, MIT-licensed, and generated from the same contract the server implements. Each one covers the whole surface — creator reads, webhook management, the operator endpoints, the live stream, and signature verification.

Install

pip install git+https://github.com/copyleftdev/tokentip-python
go get github.com/copyleftdev/tokentip-go
npm install github:copyleftdev/tokentip-js

Usage

from tokentip import TokenTip

with TokenTip("tt_your_token") as tt:
    me = tt.me()
    tips = tt.tips.list(status="settled", limit=20)

    for tip in tips.data:
        print(tip.id, tip.net_to_tokens)

    hook = tt.webhooks.create("https://you.example/hook",
                              events=["tip.settled"])
    print(hook.secret)          # shown once
tt := tokentip.New("tt_your_token")
ctx := context.Background()

me, _ := tt.Me(ctx)
tips, _ := tt.ListTips(ctx, &tokentip.ListOptions{Status: "settled", Limit: 20})

for _, tip := range tips.Data {
    fmt.Println(tip.ID, tip.NetToTokens)
}

if tokentip.IsNotFound(err) {
    // typed error helpers for 401/403/404/409/502
}
import { TokenTip, NotFoundError } from "@copyleftdev/tokentip";

const tt = new TokenTip("tt_your_token");

const me = await tt.me();
const tips = await tt.tips.list({ status: "settled", limit: 20 });

try {
  await tt.tips.get("does-not-exist");
} catch (e) {
  if (e instanceof NotFoundError) { /* 404 */ }
}

What every SDK gives you

CapabilityPythonGoTypeScript
Creator + operator endpoints
Webhook management
Token list + revoke
Signature verification
Live event stream
Typed errors from problem+json
Exact-decimal moneyDecimalMoneyMoney
AsyncAsyncTokenTipcontext-nativepromise-native
Runtime dependencieshttpxnonenone

Source

The SDKs are generated from the contract and published as read-only mirrors; the source of truth is the TokenTip monorepo. Found a bug? Open an issue on the mirror for your language.