Skip to content

About

Clients for communicating with the 1Shot API

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

178 Commits

Folders and files

Repository files navigation

1Shot API Clients

This repository contains official client libraries for the 1Shot API in various programming languages.

Agent Skills

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

When public SDK/API surfaces change, update 1shot-api in 1Shot-API/skills in the same effort.

Available Clients

Versioning

Each client follows its own versioning scheme appropriate for its ecosystem:

TypeScript/JavaScript Client

  • Versioned through package.json
  • Published to NPM
  • Follows semantic versioning

Python Client

  • Versioned through setup.py/pyproject.toml
  • Published to PyPI
  • Follows semantic versioning

Go Client

  • 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.

Development

Prerequisites

  • Node.js (for TypeScript/JavaScript client)
  • Python 3.8+ (for Python client)
  • Go 1.21+ (for Go client)

Maintaining the Clients

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 (see clients/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 over clients/go/gen, which was originally produced by swagger-codegen v3. Raw swagger-codegen output no longer compiles against this spec (enum constants such as EChain would start with digits or collide), so gen/ is now edited by hand. Keep gen/model_e_chain.go in sync with the spec's EChain enum (negative Solana ids are ChainNeg1 / ChainNeg2).
  • PHP and C# are placeholders.

Validating the OpenAPI Spec

npx @redocly/cli lint m2mGatewaySpec.yaml

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Clients for communicating with the 1Shot API

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages