Active development and maintenance have continued in a fork, which can be found here: RGBPlusPlus/rgbpp-sdk.
We encourage users and contributors to refer to the forked repository for the latest updates, issue tracking, and further contributions.
Thank you for your understanding and continued support.
This repository offers utilities for Bitcoin and RGB++ asset integration.
- @rgbpp-sdk/btc: Bitcoin part of the SDK
- @rgbpp-sdk/ckb: Nervos CKB part of the SDK
- @rgbpp-sdk/service: Wrapped interfaces of Bitcoin/RGB++ Assets Service
- Find code examples at https://github.com/ckb-cell/rgbpp-sdk/tree/develop/examples/rgbpp
- 
CKB Bitcoin SPV Type Script: A type script for Bitcoin SPV clients which synchronize Bitcoin state into CKB 
- 
RGB++ scripts/contracts: RgbppLockScript and BtcTimeLockScript - design docs: https://github.com/ckb-cell/RGBPlusPlus-design/blob/main/docs/lockscript-design-prd-en.md
- testnet deployment: https://pudge.explorer.nervos.org/scripts#RGB++
- mainnet deployment: https://explorer.nervos.org/scripts#RGB++
 
- Creation of rgbpp_ckb_tx_virtualusing @rgbpp-sdk/ckb
- 
xUDT 
- 
Spore 
Important
It's recommended to save the rgbpp_ckb_tx_virtual locally in case you need it in the future.
- 
Creation of rgbpp_btc_txthrough @rgbpp-sdk/btc- construct isomorphic rgbpp_btc_txbased onrgbpp_ckb_tx_virtualand rgbpp commitment
- sign and broadcast rgbpp_btc_txto obtainrgbpp_btc_txid
 
- construct isomorphic 
- 
JoyID or dApp sends rgbpp_btc_txidandrgbpp_ckb_tx_virtualto RGB++ CKB transaction Queue (API Endpoint:/rgbpp/v1/transaction/ckb-tx)
- 
RGB++ CKB transaction Queuewill process the following things:- 
verify the received requests 
- 
continuously fetch request from the queue through a cron job 
- 
check whether the confirmations of req.rgbpp_btc_txidis sufficient
- 
generate the witnesses for RgbppLocks in the rgbpp_ckb_tx_virtual
- 
add a paymaster cell into rgbpp_ckb_tx_virtualinputs if the CKB capacity is insufficient- need to verify the existence of paymaster UTXO in the rgbpp_btc_tx
based on the exchange rates of BTC and CKB, the paymaster BTC UTXO's value required to subsidize a paymaster CKB cell is approximately: paymaster_utxo_sats ~= 316 * ${ckb_price} / ${btc_price} * 100000000
- sign the paymaster cell and the entire transaction if needed
 
- need to verify the existence of paymaster UTXO in the rgbpp_btc_tx
- 
finalize the rgbpp_ckb_tx_virtualto argbpp_ckb_tx
- 
broadcast rgbpp_ckb_txand mark the job as completed upon tx-confirmation
 
- 
- Bitcoin/RGB++ Assets Serviceis an open-source project designed to streamline the transaction workflow for Bitcoin and RGB++ Assets. Developers have the option to enhance it by implementing its features by themselves without limitations.
- For those who prefer to deploy their own Bitcoin/RGB++ Assets Service, please follow the instructions at the Deployment section in the btc-assets-api repository.
See Generate a JSON Web Token (JWT) for Bitcoin/RGB++ Assets Service
See RGB++ Lock Script Error Codes
ISC License