npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xchainjs/xchain-sui

v0.2.1

Published

Sui client for XChainJS

Readme

@xchainjs/xchain-sui

Modules

  • client - Custom client for communicating with the Sui blockchain using @mysten/sui

Installation

yarn add @xchainjs/xchain-sui

Following peer dependencies have to be installed into your project. These are not included in @xchainjs/xchain-sui.

yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util

Network access (JSON-RPC deprecation)

Sui Foundation disabled JSON-RPC on public fullnodes (week of 2026-07-27). Full decommission is planned mid-October 2026.

See the JSON-RPC migration guide.

This package defaults to:

| Role | Transport | Default mainnet URL | | ---- | --------- | ------------------- | | Balances, fees, coins, transfer execution | gRPC | https://fullnode.mainnet.sui.io:443 | | Transaction history / archival lookups | GraphQL | https://graphql.mainnet.sui.io/graphql |

clientUrls pointing at fullnode.*.sui.io still work: those hosts remain valid as gRPC base URLs. They no longer serve public JSON-RPC.

Migration for apps (e.g. Asgardex)

// Before: JSON-RPC against Foundation fullnodes (broken on public mainnet)
clientUrls: {
  mainnet: 'https://fullnode.mainnet.sui.io',
  testnet: 'https://fullnode.testnet.sui.io',
}

// After: same URLs work with the default transport ('grpc').
// No URL change required if you only used Foundation fullnodes.
new Client({
  ...defaultSuiParams,
  clientUrls, // optional; defaults already use Foundation fullnode gRPC
  phrase,
})

// Optional: explicit GraphQL endpoint for history
new Client({
  ...defaultSuiParams,
  graphqlUrls: {
    mainnet: 'https://graphql.mainnet.sui.io/graphql',
    testnet: 'https://graphql.testnet.sui.io/graphql',
    stagenet: 'https://graphql.mainnet.sui.io/graphql',
  },
  phrase,
})

// Optional: private node that still enables JSON-RPC
new Client({
  ...defaultSuiParams,
  transport: 'jsonRpc',
  clientUrls: {
    mainnet: 'https://my-private-node.example/json-rpc',
    // ...
  },
  phrase,
})

Public Foundation endpoints are rate-limited and intended for development. Production apps should use a dedicated provider or self-hosted node.

Usage

Read-only (no phrase):

import { Client } from '@xchainjs/xchain-sui'

const client = new Client()
const balances = await client.getBalance('0x...')

Sign and transfer:

import { Client, defaultSuiParams, SUIAsset } from '@xchainjs/xchain-sui'
import { Network } from '@xchainjs/xchain-client'
import { assetToBase, assetAmount } from '@xchainjs/xchain-util'

const client = new Client({
  ...defaultSuiParams,
  network: Network.Mainnet,
  phrase: 'your mnemonic phrase',
})

const address = await client.getAddressAsync()
const balances = await client.getBalance(address)

const txHash = await client.transfer({
  asset: SUIAsset,
  recipient: '0x...',
  amount: assetToBase(assetAmount('1', 9)), // 1 SUI (9 decimals)
})

Default parameters

const defaultSuiParams = {
  network: Network.Mainnet,
  transport: 'grpc',
  rootDerivationPaths: {
    [Network.Mainnet]: "m/44'/784'/",
    [Network.Testnet]: "m/44'/784'/",
    [Network.Stagenet]: "m/44'/784'/",
  },
  // clientUrls / grpcUrls → Foundation fullnode gRPC
  // graphqlUrls → Foundation GraphQL
}

Features

With the Sui client you can:

  • Get native SUI and coin/token balances for an address
  • Generate addresses from a secret phrase (SLIP-10, coin type 784)
  • Transfer SUI and coins/tokens to another address
  • Get transaction details by digest (GraphQL, with fullnode fallback)
  • Get address transaction history (GraphQL affectedAddress)
  • Estimate fees (gas-based model)

Note: Memos are not supported for SUI transfers.

Explorer

| Network | Explorer | | -------- | -------- | | Mainnet | https://suiscan.xyz/mainnet | | Testnet | https://suiscan.xyz/testnet | | Stagenet | https://suiscan.xyz/mainnet (uses Mainnet explorer) |

Documentation

More information about XChainJS clients can be found on documentation