The 1inch Aqua SDK is the official TypeScript toolkit for 1inch Aqua, the shared liquidity layer. It builds typed call data for the registry's core maker operations — ship and dock — decodes the registry events (Shipped, Pushed, Pulled, Docked), and bundles pre-configured contract addresses for all supported networks.
- Repository: github.com/1inch/sdks (
typescript/aqua) - npm: @1inch/aqua-sdk
- Language: TypeScript
- Best for: funding, closing, and tracking Aqua strategies from a dApp or backend.
Install
pnpm add @1inch/aqua-sdk
The SDK produces ready-to-send transaction objects; the end-to-end examples in the package README send them with viem, but any EVM client works.
Ship and dock a strategy
AquaProtocolContract encodes the maker calls against the Aqua registry. ship() opens a strategy by setting its virtual token balances; dock() closes it and withdraws whatever remains. Strategy bytes are defined by the target AquaApp — each app declares its own schema, so encode them to match the app's contract (see Build an AquaApp).
import {
AquaProtocolContract,
AQUA_CONTRACT_ADDRESSES,
Address,
HexString,
NetworkEnum,
} from '@1inch/aqua-sdk';
const aqua = new AquaProtocolContract(
AQUA_CONTRACT_ADDRESSES[NetworkEnum.ETHEREUM],
);
// Open the strategy with maker funding
const shipTx = aqua.ship({
app: new Address('0x...'), // your AquaApp contract
strategy: new HexString('0x...'), // strategy bytes, encoded per the app's schema
amountsAndTokens: [
{ token: new Address('0x...'), amount: 1000000000000000000n },
],
});
// shipTx is { to, data, value } — sign and send it with your wallet client
// Close the strategy and withdraw remaining balances
const dockTx = aqua.dock({
app: new Address('0x...'),
strategyHash: AquaProtocolContract.calculateStrategyHash(
new HexString('0x...'),
),
tokens: [new Address('0x...'), new Address('0x...')],
});
AQUA_CONTRACT_ADDRESSES resolves to the same registry address — 0x1111113ccf1426a8e30e2bff5e005d929bf6a90a — on every supported network (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, and more).
Decode registry events
Every registry event has a decoder class — ShippedEvent, PushedEvent, PulledEvent, DockedEvent — with a fromLog() factory, so you can track strategy activity from raw logs (or discover strategies through the Aqua API):
import { PushedEvent, ShippedEvent } from '@1inch/aqua-sdk';
const pushed = PushedEvent.fromLog({ data: log.data, topics: log.topics });
pushed.maker; // Address
pushed.app; // Address
pushed.strategyHash; // HexString
pushed.token; // Address
pushed.amount; // bigint
const shipped = ShippedEvent.fromLog(log);