The Mobit SDK is a comprehensive toolkit designed for interacting with the CKB (Nervos Network) and Bitcoin networks. It provides a set of utilities for handling XUDT tokens and RGBPP assets, enabling developers to create, manage, and transfer assets across these networks with ease.
To install the Mobit SDK, run the following command:
npm install mobit-sdk
To start using the SDK, you need to initialize the RgbppSDK
class with the
appropriate network configuration. Here’s how you can do it:
import { RgbppSDK } from "mobit-sdk";
const isMainnet = true; // Set to false for testnet
const sdk = new RgbppSDK(isMainnet);
The CkbHelper
class provides a way to interact with the CKB network, depending
on whether you're on the mainnet or testnet.
import { CkbHelper } from "mobit-sdk";
const ckbHelper = new CkbHelper(true); // true for mainnet, false for testnet
The BtcHelper
class provides utilities for interacting with the Bitcoin
network.
import { BtcHelper, AbstractWallet } from "mobit-sdk";
const wallet: AbstractWallet = // Initialize your wallet instance
const networkType = "mainnet" || "testnet";
const btcTestnetType = "testnet" || undefined;
const btcHelper = new BtcHelper(wallet, networkType, btcTestnetType);
The SDK provides several functions to create different types of transactions. For detailed usage and parameters, refer to the API Documentation on GitHub.
- Burn XUDT Tokens: Documentation
- Issue XUDT Tokens: Documentation
- Merge XUDT Tokens: Documentation
- Transfer XUDT Tokens: Documentation
- Leap from CKB to BTC: Documentation
- Leap Spore from CKB to BTC: Documentation
- Leap from BTC to CKB: Documentation
- Leap Spore from BTC to CKB: Documentation
- Distribute RGBPP Assets: Documentation
- Launch RGBPP Assets: Documentation
- Transfer RGBPP Assets: Documentation
- Create Cluster: Documentation
- Create Spores: Documentation
- Transfer Spores: Documentation
The SDK also provides functions to prepare unsigned transactions and PSBTs (Partially Signed Bitcoin Transactions). For detailed usage and parameters, refer to the API Documentation on GitHub.
- Prepare Cluster Cell Transaction: Documentation
- Prepare Create Spore Unsigned PSBT: Documentation
- Prepare Create Spore Unsigned Transaction: Documentation
- Prepare Distribute Unsigned PSBT: Documentation
- Prepare Launch Cell Transaction: Documentation
- Prepare Launcher Unsigned PSBT: Documentation
- Prepare Leap Unsigned PSBT: Documentation
- Prepare Leap Spore Unsigned PSBT: Documentation
- Prepare Transfer Unsigned PSBT: Documentation
- Prepare Transfer Spore Unsigned PSBT: Documentation
Contributions are welcome! Please open an issue or submit a pull request for any changes.
This project is licensed under the MIT License. See the LICENSE file for details.