Skip to content

Latest commit

 

History

History

README.md

ChainSig.js Examples

This directory contains examples demonstrating how to use ChainSig.js for multi-chain transactions using NEAR's Chain Signatures (MPC).

Setup

  1. Copy the environment template:

    cp .env.example .env
  2. Edit the .env file with your NEAR account credentials:

    • Replace ACCOUNT_ID with your NEAR testnet account (e.g., yourname.testnet)
    • Replace PRIVATE_KEY with your actual ed25519 private key
  3. Install dependencies:

    npm install

Available Examples

Aptos Example

npm run send-apt

Demonstrates sending APT tokens using NEAR Chain Signatures on Aptos testnet.

Bitcoin Example

npm run send-btc

Demonstrates sending BTC using NEAR Chain Signatures on Bitcoin testnet.

Ethereum Example

npm run send-eth

Demonstrates sending ETH using NEAR Chain Signatures on Ethereum Sepolia testnet.

Solana Example

npm run send-sol

Demonstrates sending SOL tokens using NEAR Chain Signatures on Solana devnet.

Sui Example

npm run send-sui

Demonstrates sending SUI tokens using NEAR Chain Signatures on Sui testnet.

XRP Example

npm run send-xrp

Demonstrates sending XRP using NEAR Chain Signatures on XRP Ledger testnet.

Important Notes

  • Funding Required: The derived addresses need to be funded with native tokens for gas fees
  • Testnet Only: These examples are configured for testnet networks
  • NEAR Account: You need a NEAR testnet account with some NEAR tokens for MPC signing fees