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

@robertprp/intents-sdk

v3.1.2

Published

Shogun Network Intent-based cross-chain swaps SDK

Readme

Intents SDK for Cross-Chain Swaps

A TypeScript SDK for facilitating cross-chain token swaps across multiple blockchain ecosystems. This SDK helps developers easily integrate with Intents Protocol to enable seamless cross-chain transfers and swaps.

Installation (To be defined and published)

npm install @shogun-sdk/intents-sdk
pnpm install @shogun-sdk/intents-sdk
yarn add @shogun-sdk/intents-sdk

Architecture

The SDK uses a modular architecture with chain-specific implementations:

  • EVMSDK: Implementation for Ethereum Virtual Machine chains
  • SolanaSDK: Implementation for Solana blockchain
  • SuiSDK: Implementation for Sui blockchain

Usage

Basic Usage

import { ChainID, EVMSDK, SolanaSDK, SuiSDK } from "@shogun-sdk/intents-sdk";

// For EVM chains (Arbitrum, Optimism, Base)
const evmSdk = new EVMSDK({
  chainId: ChainID.Arbitrum,
  privateKey: '0x...', // Your private key
  rpcProviderUrl: 'https://arbitrum-mainnet.public.blastapi.io', // Optional: Default RPC will be used if not provided
});

// For Solana
const solanaSdk = new SolanaSDK({
  privateKey: '...', // Your private key
  commitment: 'finalized', // Or 'confirmed'
  rpcProviderUrl: 'https://api.mainnet-beta.solana.com', // Optional
});

// For Sui
const suiSdk = new SuiSDK({
  privateKey: '...', // Your private key
});

Creating and Submitting Orders

// Create and prepare a cross-chain order
const preparedOrder = await sdk.createOrder({
  sourceChainId: ChainID.Arbitrum,
  sourceTokenAddress: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
  sourceTokenAmount: BigInt(12000),
  destinationChainId: ChainID.Solana,
  destinationTokenAddress: 'So11111111111111111111111111111111111111112',
  destinationTokenMinAmount: BigInt(10000),
  destinationAddress: '3Kiz4oBXpR9YuPNsVfvE5XnNzgwjrM9m2CbRzyyEVkpQ',
  minStablecoinAmount: BigInt(11000),
  deadline: Math.floor(Date.now() / 1000) + 3600, // 1 hour from now
});

// Or Send the order to the auctioneer
const response = await sdk.createAndSendOrder({
  sourceChainId: ChainID.Arbitrum,
  sourceTokenAddress: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
  sourceTokenAmount: BigInt(12000),
  destinationChainId: ChainID.Solana,
  destinationTokenAddress: 'So11111111111111111111111111111111111111112',
  destinationTokenMinAmount: BigInt(10000),
  destinationAddress: '3Kiz4oBXpR9YuPNsVfvE5XnNzgwjrM9m2CbRzyyEVkpQ',
  minStablecoinAmount: BigInt(11000),
  deadline: Math.floor(Date.now() / 1000) + 3600, // 1 hour from now
});

Supported Chains

| Chain | Chain ID | Status | |-------|----------|--------| | Arbitrum | 42161 | ✅ Supported | | Optimism | 10 | ✅ Supported | | Base | 8453 | ✅ Supported | | Solana | 7565164 | ✅ Supported | | Sui | 101 | ✅ Supported |

Example Implementation

Here's a complete example of creating an order from Arbitrum to Solana:

import { ChainID, EVMSDK, ValidationError } from "@shogun-sdk/intents-sdk";

async function createCrossChainOrder() {
  try {
    const sdk = new EVMSDK({
      chainId: ChainID.Arbitrum,
      privateKey: process.env.PRIVATE_KEY as `0x${string}`,
    });

    const response = await sdk.createAndSendOrder({
      sourceChainId: ChainID.Arbitrum,
      sourceTokenAddress: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9', // USDT on Arbitrum
      sourceTokenAmount: BigInt(10_000_000), // 10 USDT with 6 decimals
      destinationChainId: ChainID.Solana,
      destinationTokenAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', // USDT on Solana
      destinationTokenMinAmount: BigInt(9_500_000), // 9.5 USDT minimum to receive
      destinationAddress: '3Kiz4oBXpR9YuPNsVfvE5XnNzgwjrM9m2CbRzyyEVkpQ', // Solana destination address
      minStablecoinAmount: BigInt(9_800_000), // Minimum stablecoin amount for protocol
      deadline: Math.floor(Date.now() / 1000) + 3600, // 1 hour from now
    });

    return response;
  } catch (error) {
    if (error instanceof ValidationError) {
      console.error("Invalid order parameters:", error.message);
    } else {
      console.error("Failed to create and send order:", error);
    }
    throw error;
  }
}