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

gorb-sdk

v1.0.0

Published

A modular SDK for Solana-based blockchain operations, supporting Gorbchain and other Solana forks

Readme

Solana SDK

A modular, type-safe SDK for Solana-based blockchain operations. This SDK supports Gorbchain, Solana mainnet, devnet, and any other Solana fork by providing configurable blockchain settings.

Features

  • 🚀 Modular Design: Separate transaction building, signing, and submission
  • 🔧 Multi-Blockchain Support: Works with Solana, Gorbchain, and custom Solana forks
  • 🔐 Flexible Signing: Support for keypairs, wallet adapters, and custom signing methods
  • 📦 TypeScript First: Fully typed with comprehensive interfaces
  • 🛡️ Error Handling: Robust error handling with specific error types
  • Transaction Simulation: Built-in transaction simulation before submission
  • 🔄 Batch Operations: Support for multiple transaction operations

Installation

npm install @gorbchain/gorb-sdk

Quick Start

Basic Usage

import { createGorbchainSDK, Keypair } from '@gorbchain/gorb-sdk';

// Create SDK instance
const sdk = createGorbchainSDK();

// Create token parameters
const tokenParams = {
  name: "My Token",
  symbol: "MTK",
  supply: 1000000,
  decimals: 6,
  uri: "https://my-metadata-uri.com/token.json",
};

// Build complete transaction (includes create mint, metadata, ATA, and minting)
const payer = new PublicKey("your-payer-public-key");
const result = await sdk.createTokenTransaction(tokenParams, payer);

// Sign the complete transaction (only needs to be signed once!)
const keypair = Keypair.generate();
const signedTx = await sdk.signWithKeypair(result.transaction, keypair);

// Submit transaction
const submitResult = await sdk.submitTransaction(signedTx);
console.log("Token created:", submitResult.signature);

Using Wallet Adapter

import { createGorbchainSDK } from '@gorbchain/gorb-sdk';

const sdk = createGorbchainSDK();

// Build transaction
const result = await sdk.createTokenTransaction({
  name: "Wallet Token",
  symbol: "WKT",
  supply: 1000000,
  decimals: 6,
  uri: "https://wallet-metadata.com/token.json",
});

// Update transaction with actual payer
const updatedTx = sdk.updateTransactionPayer(result.transaction, wallet.publicKey);

// Sign with wallet and mint keypair
const signedTx = await sdk.signWithWalletAndKeypair(updatedTx, wallet, result.mintKeypair);

// Submit
const submitResult = await sdk.submitTransaction(signedTx);

Node.js import examples

  • CommonJS:
const { createGorbchainSDK } = require('@gorbchain/solana-sdk');
  • ESM/TypeScript:
import { createGorbchainSDK } from '@gorbchain/solana-sdk';

Supported Blockchains

Gorbchain

import { createGorbchainSDK } from '@gorbchain/solana-sdk';

const sdk = createGorbchainSDK();
// or with custom RPC
const sdk = createGorbchainSDK("https://custom-gorbchain-rpc.com");

Solana

import { createSolanaSDK } from '@gorbchain/solana-sdk';

// Mainnet
const sdk = createSolanaSDK("mainnet-beta");

// Devnet
const sdk = createSolanaSDK("devnet");

Custom Blockchain

import { createSDK, createBlockchainConfig } from '@gorbchain/solana-sdk';

const customConfig = createBlockchainConfig(
  "YourTokenProgramId",
  "YourAssociatedTokenProgramId", 
  "https://your-rpc.com"
);

const sdk = createSDK({ blockchain: customConfig });

API Reference

Core Functions

createTokenTransaction(params)

Creates a token creation transaction.

Parameters:

  • name: string - Token name
  • symbol: string - Token symbol
  • supply: string | number - Token supply
  • decimals: string | number - Token decimals
  • uri: string - Metadata URI
  • freezeAuthority?: PublicKey | null - Optional freeze authority
  • mintKeypair?: Keypair - Optional mint keypair (generated if not provided)

Returns: TransactionResult

createNFTTransaction(params)

Creates an NFT minting transaction.

Parameters:

  • name: string - NFT name
  • symbol: string - NFT symbol
  • uri: string - Metadata URI
  • description: string - NFT description
  • mintKeypair?: Keypair - Optional mint keypair (generated if not provided)

Returns: TransactionResult

Signing Functions

signWithKeypair(transaction, keypair)

Signs a transaction with a keypair.

signWithWalletAdapter(transaction, wallet)

Signs a transaction with wallet adapter.

signWithWalletAndKeypair(transaction, wallet, mintKeypair)

Signs a transaction with both wallet and mint keypair.

Submission Functions

submitTransaction(transaction, options?)

Submits a signed transaction.

simulateTransaction(transaction)

Simulates a transaction before submission.

waitForConfirmation(signature, commitment?, timeout?)

Waits for transaction confirmation.

Configuration

GORB Object (Backward Compatibility)

import { GORB } from '@gorbchain/solana-sdk';

console.log(GORB.TOKEN22_PROGRAM);
console.log(GORB.ASSOCIATED_TOKEN_PROGRAM);
console.log(GORB.SYSTEM_PROGRAM);
console.log(GORB.CONFIG);

Custom Configuration

import { createBlockchainConfig } from '@gorbchain/solana-sdk';

const config = createBlockchainConfig(
  "TokenProgramId",
  "AssociatedTokenProgramId",
  "https://rpc.example.com",
  {
    wsUrl: "wss://ws.example.com",
    commitment: "confirmed",
    name: "custom-chain"
  }
);

Error Handling

The SDK provides specific error types for better error handling:

import { SDKError, TransactionError, SigningError } from '@gorbchain/solana-sdk';

try {
  const result = await sdk.createTokenTransaction(params);
} catch (error) {
  if (error instanceof SDKError) {
    console.error("SDK Error:", error.message);
  } else if (error instanceof TransactionError) {
    console.error("Transaction Error:", error.message);
  } else if (error instanceof SigningError) {
    console.error("Signing Error:", error.message);
  }
}

Examples

See src/examples in the repository for comprehensive usage examples including:

  • Basic token creation
  • NFT minting
  • Wallet adapter integration
  • Custom blockchain configuration
  • Error handling
  • Batch operations

Development

Building

npm run build

Development Mode

npm run dev

Type Checking

The SDK is built with strict TypeScript configuration for maximum type safety.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.