JSPM

@moonbeam-network/xcm-sdk

1.0.0-dev.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2922
  • Score
    100M100P100Q120996F
  • License MIT

The Moonbeam XCM SDK enables developers to easily deposit and withdraw assets to Moonbeam/Moonriver from the relay chain and other parachains in the Polkadot/Kusama ecosystem

Package Exports

  • @moonbeam-network/xcm-sdk

Readme

Moonbeam

The Moonbeam XCM SDK enables developers to easily deposit and withdraw assets to Moonbeam/Moonriver from the relay chain and other parachains in the Polkadot/Kusama ecosystem. With the SDK, you don't need to worry about determining the multilocation of the origin or destination assets or which extrinsics are used on which networks to send XCM transfers. To deposit or withdraw assets, you simply define the asset and origin chain you want to deposit from or withdraw back to, along with the sending account's signer, and the amount to send.

Documentation

v1 (current)

  • TODO: (coming soon)

v0 (previous)

Installation

npm i @moonbeam-network/xcm-sdk

⚠️ You need to have peer dependencies of SDK installed as well.

npm i @polkadot/api @polkadot/api-augment @polkadot/types @polkadot/util @polkadot/util-crypto @polkadot/apps-config ethers

Usage

  • TODO: (coming soon) - in the meantime, see examples below

Examples

git clone git@github.com:PureStake/xcm-sdk.git
cd xcm-sdk
npm i
cd examples/sdk-simple

# edit index.ts by adding your accounts

npm start

Contributing

git clone git@github.com:PureStake/xcm-sdk.git
npm i
npm run dev

Tests

Unit tests

npm run test

Acceptance tests

cp .env.example .env
# add private key and suri to .env file

npm run test:acc