ckb-cell / rgbpp-sdk

Utilities for Bitcoin and RGB++ asset integration
ISC License
53 stars 15 forks source link

Improve documentation/example of the BTC Builder APIs #240

Open ShookLyngs opened 3 weeks ago

ShookLyngs commented 3 weeks ago

Currently, we provide several BTC Builder APIs:

These APIs are designed to construct BTC transactions for various purposes, and each one is unique. However, the documentation for each API is still missing, and the examples shown in the README are not sufficiently detailed.

To improve this, we can possibly make the following changes:

  1. Write .md documentation for each BTC Builder API, describing each property's purpose, default value, and more.
  2. Rewrite the examples provided in the btc README to improve the readability of the example code.
duanyytop commented 3 weeks ago

I am confused that the sendXXX functions give the first impression that they will build BTC transactions and broadcast them, but they only build transactions.

Does anyone else have similar confusion?

ShookLyngs commented 3 weeks ago

I am confused that the sendXXX functions give the first impression that they will build BTC transactions and broadcast them, but they only build transactions.

Does anyone else have similar confusion?

We have sendX and createSendXBuilder APIs in pairs, so maybe createSendXPsbt is a more appropriate naming pattern.