This repository contains official client libraries for the 1Shot API in various programming languages.
First-party integrator skills live in 1Shot-API/skills (not in this repo). Install the SDK skill globally for local Cursor:
npm run skills:install
# or: npx skills add 1Shot-API/skills --skill 1shot-api -g -a cursor -yWhen public SDK/API surfaces change, update 1shot-api in 1Shot-API/skills in the same effort.
- TypeScript/JavaScript - Published to NPM
- Python - Published to PyPI
- Go - Published as a Go module
- C# (Coming soon)
Each client follows its own versioning scheme appropriate for its ecosystem:
- Versioned through
package.json - Published to NPM
- Follows semantic versioning
- Versioned through
setup.py/pyproject.toml - Published to PyPI
- Follows semantic versioning
- Versioned through Git tags in the format
clients/go/vX.Y.Z - Published as a Go module
- Follows semantic versioning
- Example:
clients/go/v0.1.0
The Go client's versioning is managed through Git tags that are specific to the Go module path. This allows the Go client to be versioned independently of other clients in this monorepo.
- Node.js (for TypeScript/JavaScript client)
- Python 3.8+ (for Python client)
- Go 1.21+ (for Go client)
m2mGatewaySpec.yaml is a copy of the authoritative spec in the 1Shot API monorepo (packages/m2mGateway/m2mGatewaySpec.yaml). Copy it over when the API changes, then update the clients by hand:
- Node (
clients/node) and Python (clients/python) are hand-written from the spec: Zod schemas, types and categories in Node (seeclients/node/AGENTS.md), pydantic models and categories in Python. Do not run a code generator into these directories; it would overwrite them. - Go (
clients/go) is a hand-written wrapper overclients/go/gen, which was originally produced by swagger-codegen v3. Raw swagger-codegen output no longer compiles against this spec (enum constants such asEChainwould start with digits or collide), sogen/is now edited by hand. Keepgen/model_e_chain.goin sync with the spec'sEChainenum (negative Solana ids areChainNeg1/ChainNeg2). - PHP and C# are placeholders.
npx @redocly/cli lint m2mGatewaySpec.yamlThis project is licensed under the MIT License - see the LICENSE file for details.