Skip to content

AxLabs/bridge-examples-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Examples for Bridge Contracts

This directory contains TypeScript scripts demonstrating how to interact with various bridge contracts on Neo using the bridge-sdk-ts library.

Prerequisites

  • Node.js v18 or newer
  • npm
  • Access to a running Neo node (local or remote)
  • A valid Neo wallet file (JSON format)
  • Contract hashes for the deployed bridge contracts

Setup

  1. Install dependencies:
    npm install
  2. Copy env-template to .env and fill in the required variables:
    cp env-template .env
    Edit .env and set values for:
    • Contract hashes for deployed bridge contracts (e.g., MESSAGE_BRIDGE_CONTRACT_HASH, NATIVE_BRIDGE_CONTRACT_HASH, etc.)
    • NEO_NODE_URL (RPC URL)
    • WALLET_PATH (path to your Neo wallet JSON)
    • WALLET_PASSWORD (if your wallet is encrypted)
    • Other variables as needed for specific scripts

Usage

Scripts are organized by bridge component. See the subdirectories below for specific usage instructions and npm scripts.

Environment Variables

See env-template for all required and optional variables. Key variables include:

  • NEO_NODE_URL
  • WALLET_PATH
  • WALLET_PASSWORD
  • Contract-specific hashes (e.g., MESSAGE_BRIDGE_CONTRACT_HASH, NATIVE_BRIDGE_CONTRACT_HASH)
  • Operation-specific variables (see subdirectory READMEs for details)

Bridge Components

Notes

  • Ensure your .env file does not use quotes or semicolons around values.
  • Wallet file paths should be relative to this directory or absolute.
  • Scripts are modular; you can add or modify npm scripts in package.json as needed.

For more details, see the comments in each script file.

About

Examples on how to interact with Neo's MessageBridge using the bridge-sdk-ts library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published