Legacy packages for Hydration chain integration. This monorepo contains the stable, @polkadot/api-based trading SDK and cross-chain transfer toolkit. These packages are maintained for existing consumers but are not recommended for new projects.
- Overview
- Getting Started
- SDK — trade router & pool utilities
- XCM (Cross-Chain) — xcm-core, xcm-cfg, xcm-sdk
- Examples
- Contributing
┌────────────────────────────────────────────────────────────┐
│ Your dApp │
├────────────────────────────────┬───────────────────────────┤
│ « sdk » │ « xcm-sdk » │
│ ·········· │ ············ │
│ Trade routing │ Cross-chain │
│ Pool queries │ Transfers │
├────────────────────────────────┴───────────────────────────┤
│ @polkadot/api — Substrate SDK │
└────────────────────────────────────────────────────────────┘
- Node.js 23+
- npm 10+
Pick the packages you need:
# Trading SDK
npm i @galacticcouncil/sdk
# Cross-chain transfers
npm i @galacticcouncil/xcm-sdk @galacticcouncil/xcm-cfgTrade router and pool utilities for Hydration, built on @polkadot/api.
| Package | Version | Changelog | Description |
|---|---|---|---|
@galacticcouncil/sdk |
changelog | Trade router & pool utilities (@polkadot/api) |
Stable cross-chain transfer toolkit built on @polkadot/api. Production-proven with extensive route coverage.
| Package | Version | Changelog | Description |
|---|---|---|---|
@galacticcouncil/xcm-core |
changelog | Core types, chain & asset definitions | |
@galacticcouncil/xcm-cfg |
changelog | Pre-built route configs & DEX integrations | |
@galacticcouncil/xcm-sdk |
changelog | Wallet interface for cross-chain transfers |
@galacticcouncil/xcm-sdk ← Wallet, transfers, fee swaps
@galacticcouncil/xcm-cfg ← Route configs, DEX implementations
@galacticcouncil/xcm-core ← Core types, chain & asset definitions
Ready-to-run examples are available in the examples/ directory:
| Example | Description |
|---|---|
sdk-cjs |
SDK usage with CommonJS |
sdk-esm |
SDK usage with ES Modules |
xcm-transfer |
XCM cross-chain transfer |
Everything about building, setting up development environment & releasing can be found in CONTRIBUTING.md.
In case of unexpected SDK behaviour, please create a well-written issue here. It makes it easier to find & fix the problem accordingly.
This file is part of https://github.com/galacticcouncil/*
$$$$$$$ Licensed under the Apache License, Version 2.0 (the "License")
$$$$$$$$$$$$$ you may only use this file in compliance with the License
$$$$$$$$$$$$$$$$$$$
$$$$$$$$$ Copyright (C) 2021-2024 Intergalactic, Limited (GIB)
$$$$$$$$$$$ $$$$$$$$$$ SPDX-License-Identifier: Apache-2.0
$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$ $ Built with <3 for decentralisation
$$$$$$$$$$$$$$$$$$$ $$$$$$$
$$$$$$$ $$$$$$$$$$$$$$$$$$ Unless required by applicable law or agreed to in
$ $$$$$$$$$$$$$$$$$$$$$$$ writing, software distributed under the License is
$$$$$$$$$$$$$$$$$$$$$$$$$$ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
$$$$$$$$$ $$$$$$$$$$$ OR CONDITIONS OF ANY KIND, either express or implied.
$$$$$$$$
$$$$$$$$$$$$$$$$$$ See the License for the specific language governing
$$$$$$$$$$$$$ permissions and limitations under the License.
$$$$$$$
$$
$$$$$ $$$$$ $$ $$
$$$ $$$ $$$ $$ $$$$$ $$ $$$ $$$$ $$$$$$$ $$$$ $$$ $$$$$$ $$ $$$$$$
$$$ $$$ $$$ $$ $$$ $$$ $$$ $ $$ $$ $$ $$ $$ $$$ $$$ $$$
$$$$$$$$$$$ $$ $$ $$$ $$ $$ $$$$$$$ $$ $$ $$ $$$ $$ $$
$$$ $$$ $$$$ $$$ $$ $$ $$$ $$ $$ $$ $$$ $$ $$ $$
$$$$$ $$$$$ $$ $$$ $$$ $$ $$$$ $$$ $$ $$ $$$ $$ $$ $$$
$$ $$$$$ $$$$$ $$ $$$$
$$$
For more details read LICENSE.md