A collection of 1inch Protocol SDKs, managed as a pnpm workspace with Nx. TypeScript SDKs are available today; Rust and Python SDKs are planned.
| Package | Source | Description |
|---|---|---|
@1inch/aqua-sdk |
typescript/aqua |
SDK for the Aqua Protocol — encoding/decoding ship/dock operations and parsing protocol events |
@1inch/swap-vm-sdk |
typescript/swap-vm |
SDK for the Swap VM Protocol — building quote/swap transactions, instruction system, maker/taker traits |
@1inch/sdk-core |
typescript/sdk-core |
Shared core utilities and types used by all SDKs |
Each package is versioned and published independently to npm and GitHub Packages.
pnpm add @1inch/aqua-sdk # or npm install / yarn add
pnpm add @1inch/swap-vm-sdkSee the per-package READMEs for quick-start examples and API documentation:
sdks/
├── typescript/ # TypeScript SDKs (see typescript/README.md)
│ ├── aqua/ # @1inch/aqua-sdk
│ ├── sdk-core/ # @1inch/sdk-core — shared core among all SDKs
│ └── swap-vm/ # @1inch/swap-vm-sdk
├── contracts/ # Solidity test contracts compiled with Foundry
├── scripts/ # Helper scripts (Nx dependency graph)
└── .github/workflows/ # CI: PR validation and release/publishing
- Node.js >= 22.0.0
- pnpm >= 10.0.0
- Foundry (
forge— for contract compilation) - Docker (only for e2e tests)
# Install dependencies
pnpm install
# Build Solidity contracts (required before build, lint, type-check and tests)
pnpm build:contractsNote:
pnpm build:contracts(forge build) generates contract ABIs intodist/contracts, which the TypeScript sources import via the@contracts/*alias. The output is gitignored, so re-run it on a fresh clone and after pulling contract changes.
Common workspace commands (run from the repo root):
pnpm build # Build all SDKs
pnpm test # Run unit tests for all SDKs
pnpm lint # Lint all SDKs (pnpm lint:fix to auto-fix)
pnpm lint:types # Type-check all SDKs
pnpm format # Format code (pnpm format:check to verify)Work with a single SDK using Nx (project names: aqua, swap-vm, sdk-core):
pnpm nx build aqua
pnpm nx test swap-vmCI runs only against changed packages via pnpm affected:build, affected:test and affected:lint.
See typescript/README.md for the full command reference, release process and tooling configuration.
# Unit tests
pnpm test
# End-to-end tests (require Docker)
pnpm test:e2eThe e2e suites use testcontainers to launch an Anvil node forked from Ethereum mainnet, then execute real swaps against it. The fork RPC endpoint can be overridden with environment variables:
FORK_URL=https://ethereum-rpc.publicnode.com pnpm test:e2eFORK_URL— mainnet RPC endpoint to fork from (recommended: the default endpoint is not always reliable)FORK_HEADER— optional extra HTTP header for the fork RPC request
Releases are triggered manually from GitHub Actions ("Release typescript" workflow): pick the SDK and semver bump, and the workflow versions, tags (e.g. aqua/v1.0.0), generates the changelog and publishes to npmjs and GitHub Packages. Details in typescript/README.md.
Each package is licensed separately — see the LICENSE file in the package directory: