@beyond-tech/sdk

0.1.0 • Public • Published

Beyond SDK

A minimal SDK to interact with the Beyond protocol, for seamless Bitcoin interoperability.

The Beyond SDK enables developers to move tokens and assets between Bitcoin (L1 and L2s) and the 80+ chains supported by LayerZero. The SDK also provides tools for managing token inscriptions from all the major standards (BRC20, Runes, BTC), enabling seamless Bitcoin interoperability for your blockchain app.

Features

  • Token Management: Easily create, mint, and manage BRC20, CBRC20, and Runes tokens on Bitcoin Layer 1.
  • Wallet Integration: Securely manage wallet operations, including generating new wallets and signing transactions.
  • Transaction Handling: Craft, sign, and broadcast transactions with intuitive interfaces.
  • Network Compatibility: Seamlessly switch between Bitcoin's mainnet and testnet environments.

Installation

Install the Beyond SDK with npm:

npm install @beyond/sdk

Or with yarn:

yarn add @beyond/sdk

Quick Start

To get started with the Beyond SDK, you first need to import it into your project:

import { Wallet, BRC20, Runes } from '@beyond/sdk';

Usage

Here is a full example demonstrating how to use the Beyond SDK to create a wallet, and interact with BRC20 and Runes tokens:

import { Wallet, BRC20, Runes } from '@beyond/sdk';

// Initialize your wallet. In a real-world application, always keep your private keys secure.
const myWallet = new Wallet('your-private-key-here');

// Example of creating and using a BRC20 token
const myBRC20Token = new BRC20('token-address-here', myWallet);

// Mint 1000 BRC20 tokens to an address
myBRC20Token.mint('recipient-address-here', 1000)
  .then((transaction) => console.log(`BRC20 Mint Transaction Hash: ${transaction.txid}`))
  .catch((error) => console.error('Error minting BRC20 tokens:', error));

// Example of transferring Runes tokens
const myRunesToken = new Runes('token-address-here', myWallet);

// Transfer 500 Runes tokens to an address
myRunesToken.transfer('recipient-address-here', 500)
  .then((transaction) => console.log(`Runes Transfer Transaction Hash: ${transaction.txid}`))
  .catch((error) => console.error('Error transferring Runes tokens:', error));

Support

If you need help or have any questions, please submit an issue on this GitHub repository or get in touch.

/@beyond-tech/sdk/

    Package Sidebar

    Install

    npm i @beyond-tech/sdk

    Weekly Downloads

    55

    Version

    0.1.0

    License

    none

    Unpacked Size

    4.06 kB

    Total Files

    30

    Last publish

    Collaborators

    • theo-beyond
    • janus-beyond
    • magnus-beyond