JSPM

  • Created
  • Published
  • Downloads 526
  • Score
    100M100P100Q108423F
  • License Apache-2.0

Hyperlane TypeScript SDK for the Radix Hyperlane SDK module

Package Exports

  • @hyperlane-xyz/radix-sdk
  • @hyperlane-xyz/radix-sdk/testing

Readme

Hyperlane Radix SDK

The Hyperlane Radix SDK is a fully typed TypeScript SDK for the Radix Implementation. It can be used as a standalone SDK for frontend or in backend applications which want to connect to a Radix chain which has the Hyperlane blueprint installed.

Install

# Install with NPM
npm install @hyperlane-xyz/radix-sdk

# Or with pnpm
pnpm add @hyperlane-xyz/radix-sdk

Usage

import { RadixSDK, RadixSigningSDK } from "@hyperlane-xyz/radix-sdk";

const signingSdk = await RadixSigningSDK.fromPrivateKey(
  PRIV_KEY,
  {
    networkId: NetworkId.Stokenet,
  },
);

const mailboxAddress = await signingSdk.tx.createMailbox({ domain_id: 75898670 });

const mailbox = await signingSdk.query.getMailbox({ mailbox: mailboxAddress });
...

// performing queries without signer
const sdk = new RadixSDK({
  networkId: NetworkId.Stokenet,
})

const mailbox = await signingSdk.query.getMailbox({ mailbox: mailboxAddress });

Setup

Node 18 or newer is required.