Catalog npm
PACKAGE EXPLORERView in registry

@0xshogun/sdk

npm

Shogun SDK

apibridgesdkshoguntypescript
Versions collected67
Direct dependencies29From release 1.1.52
Last observed21 Oct, 11:29 UTC

README

Current package documentation

Shogun SDK Integration

Overview

The Shogun SDK is a TypeScript library that enables cross-chain swaps and transfers between EVM chains and Solana. It provides quote fetching, transaction execution, and fee management capabilities.

Installation

npm install @0xshogun/sdk

or

yarn add @0xshogun/sdk

Features

  • Cross-chain token swaps between EVM chains and Solana
  • Quote fetching for optimal swap rates
  • Transaction execution management
  • Fee estimation and management
  • Balance tracking across chains

Supported Chains

  • Ethereum
  • Base
  • Arbitrum
  • Binance Smart Chain
  • Berachain
  • Sonic
  • Solana

Requirements

  • Node.js 16 or higher
  • TypeScript 4.5 or higher

Quick Start

import { ShogunQuoteApiClient } from '@0xshogun/sdk';

// Initialize the client

const client = new ShogunQuoteApiClient(
  'YOUR_API_KEY', // Dextra API key
  'https://api.shogun.com' // Dextra API endpoint
);

// Fetch a quote

const quoteParams: QuoteParams = {
  srcChain: 1, // Token IN chain ID
  destChain: 8453, // Token Out chain ID
  srcToken: '0x...', // Source token address
  destToken: '...', // Destination token address
  amount: '1000000000000000000', // Amount in smallest unit (e.g. wei)
  senderAddress: '0x...', // Sender's wallet address
  affiliateWallet: '0x...', // Affiliate EVM or Solana wallet address
  affiliateFee: '1', // Affiliate fee in percent as 1%
  slippage: 0.5, // Slippage percentage
  destinationAddress: '...', // Destination wallet address
  dstChainOrderAuthorityAddress: '...' // Destination chain order authority address
  dynamicSlippage: true // Or false, only for Solana transactions
};

const quote = await client.fetchQuote(quoteParams);

Balance Checking

The SDK provides balance checking capabilities for both EVM and Solana chains through the ShogunBalancesApiClient.

import { ShogunBalancesApiClient } from '@0xshogun/sdk';

// Initialize the balances client
const balancesClient = new ShogunBalancesApiClient('YOUR_API_KEY'); // YOUR_API_KEY is CODEX API key

// Check EVM wallet balances
const evmBalances = await balancesClient.getEvmWalletBalance('0x...');

// Get token info including prices
const tokenInfo = await balancesClient.getTokenInfo(
  evmBalances,
  '0x...', // wallet address
);

// Check Solana token balances
const solanaBalances = await balancesClient.getSolanaTokenBalances('...');

// Get USD price for a specific token
const tokenPrice = await balancesClient.getTokenUSDPrice(
  '0x...', // token address
  1 // chain ID
);

// Validate addresses
const isValid = balancesClient.isValidAddress('0x...');

Development

Install dependencies

npm install

Build the package

npm run build

Run tests

npm test

Format code

npm run format

Lint code

npm run lint

Contributing Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 67

Collected releases
VersionPublishedDirect dependenciesOpen version
1.1.52Registry latest28 Mar 202529
1.1.51-beta26 Mar 202529
1.1.50-beta26 Mar 202529
1.1.4925 Mar 202529
1.1.4825 Mar 202529
1.1.4725 Mar 202529
1.1.4621 Mar 202529
1.1.4521 Mar 202529
1.1.4421 Mar 202529
1.1.4319 Mar 202529
1.1.4218 Mar 202529
1.1.4117 Mar 202529
1.1.4017 Mar 202529
1.1.3914 Mar 202531
1.1.3814 Mar 202531
1.1.3713 Mar 202531
1.1.3613 Mar 202531
1.1.3512 Mar 202536
1.1.3412 Mar 202536
1.1.3312 Mar 202537

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
shogun-network/shogun-sdk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:27 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:332128a4d67a0a72b5d77f46ae7438c70c4e8b2796743bcd486c8bbca89e64c9