Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation/example of the BTC Builder APIs #240

Open
ShookLyngs opened this issue Jun 19, 2024 · 2 comments
Open

Improve documentation/example of the BTC Builder APIs #240

ShookLyngs opened this issue Jun 19, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation example P-Medium

Comments

@ShookLyngs
Copy link
Collaborator

ShookLyngs commented Jun 19, 2024

Currently, we provide several BTC Builder APIs:

  • sendBtc: Send BTC to one or more targets with ease
  • sendUtxos: Specify inputs and outputs of the transaction as you like
  • sendRgbppUtxos: Construct an isomorphic RGBPP transaction from a RGBPP_CKB_VIRTUAL_TX
  • sendRbf: Resend a BTC transaction, providing higher fee rate and total fee to replace the original transaction

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.
@Flouse Flouse added documentation Improvements or additions to documentation example labels Jun 19, 2024
@duanyytop
Copy link
Collaborator

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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation example P-Medium
Projects
None yet
Development

No branches or pull requests

3 participants