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

Edited blockchain README.md #19

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Edited blockchain README.md #19

merged 2 commits into from
Jul 30, 2024

Conversation

koushikmaturi
Copy link
Contributor

@koushikmaturi koushikmaturi commented Jul 3, 2024

Summary by CodeRabbit

  • Documentation
    • Clarified package import instructions for the blockchain package.
    • Enhanced descriptions for fee estimation APIs, streamlining content for better readability.
    • Reformatted parameters for the BuildTransaction function into clearer categories: General, Inputs, and Outputs.
    • Updated examples to focus on functionality rather than specific addresses.
    • Clarified descriptions of Bitcoin scripts like MultisigScript and HtlcScript.

Copy link
Contributor

coderabbitai bot commented Jul 3, 2024

Walkthrough

The changes in the README.md for the blockchain package focus on enhancing documentation clarity for developers. Key improvements include streamlined import instructions, concise explanations of fee estimation APIs, clearer descriptions of transaction parameters, and refined details about Bitcoin scripts such as MultisigScript and HtlcScript.

Changes

File Change Summary
README.md Updated import instructions, streamlined fee estimation explanations, clarified transaction parameters, and refined Bitcoin script descriptions. Removed verbose comments in examples for enhanced clarity.

Sequence Diagram(s)

N/A

Poem

In the code's bright warren, changes take flight,
The blockchain's wisdom shines ever so bright.
With clearer paths and scripts that sing,
Let’s hop along and code with spring!
Fees and transactions, now easy to wield,
A joyful journey, our fate is sealed!

🚀🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Outside diff range and nitpick comments (1)
README.md (1)

64-64: Clarify the fee estimator description.

The description "The fee estimator estimates network fees using various APIs." could be more specific by listing the APIs used.

- The fee estimator estimates network fees using various APIs.
+ The fee estimator estimates network fees using the Mempool API, Blockstream API, and a fixed fee rate.
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9f054eb and 1f7fa27.

Files selected for processing (1)
  • README.md (6 hunks)
Additional context used
Markdownlint
README.md

14-14: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


13-13: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


92-92: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


96-96: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


112-112: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


96-96: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


97-97: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


100-100: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


101-101: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


105-105: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


106-106: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


111-111: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

LanguageTool
README.md

[uncategorized] ~98-~98: Loose punctuation mark.
Context: ...network for the transaction. - feeRate: Minimum fee rate; actual fee may be hig...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~102-~102: Loose punctuation mark.
Context: ...NewRawInputs() if unspecified. - utxos: Additional UTXOs if needed. Use nil i...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~103-~103: Loose punctuation mark.
Context: ...eded. Use nil if none. - sizeUpdater: Describes UTXO size impact. It assumes ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...s with specified amounts. - changeAddr: Address for the change, usually the sen...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~171-~171: Loose punctuation mark.
Context: ... ### Bitcoin scripts - MultisigScript: 2-of-2 multisig script for the [Guardia...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~172-~172: Loose punctuation mark.
Context: ...llet/guardian) component. - HtlcScript: HTLC script as described in [BIP-199](h...

(UNLIKELY_OPENING_PUNCTUATION)

Additional comments not posted (3)
README.md (3)

172-172: Fix loose punctuation mark.

LanguageTool suggests fixing the loose punctuation mark.

- - `HtlcScript`: HTLC script as described in [BIP-199](https://github.com/bitcoin/bips/blob/e643d247c8bc086745f3031cdee0899803edea2f/bip-0199.mediawiki#L22).
+ - `HtlcScript`: HTLC script as described in [BIP-199](https://github.com/bitcoin/bips/blob/e643d247c8bc086745f3031cdee0899803edea2f/bip-0199.mediawiki#L22).

Likely invalid or redundant comment.

Tools
LanguageTool

[uncategorized] ~172-~172: Loose punctuation mark.
Context: ...llet/guardian) component. - HtlcScript: HTLC script as described in [BIP-199](h...

(UNLIKELY_OPENING_PUNCTUATION)


171-171: Fix loose punctuation mark.

LanguageTool suggests fixing the loose punctuation mark.

- - `MultisigScript`: 2-of-2 multisig script for the [Guardian](https://docs.catalog.fi/catalog-accounts/instant-wallet/guardian) component.
+ - `MultisigScript`: 2-of-2 multisig script for the [Guardian](https://docs.catalog.fi/catalog-accounts/instant-wallet/guardian) component.

Likely invalid or redundant comment.

Tools
LanguageTool

[uncategorized] ~171-~171: Loose punctuation mark.
Context: ... ### Bitcoin scripts - MultisigScript: 2-of-2 multisig script for the [Guardia...

(UNLIKELY_OPENING_PUNCTUATION)


70-72: Ensure the comments align with the code.

The simplified comments are clear, but verify that the corresponding code accurately uses the described APIs.

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (7)
README.md (7)

12-12: Add a blank line before the code block.

Markdownlint suggests that fenced code blocks should be surrounded by blank lines.

- To import the `blockchain` package:
+ To import the `blockchain` package:

```shell
$ go get github.com/catalogfi/blockchain

---

`65-65`: **Clarify the fee estimator description.**

The description can be made more precise by specifying the unit of the result.

```diff
- The fee estimator estimates network fees using various APIs.
+ The fee estimator estimates network fees using various APIs. The result is in `sats/vB`.

95-95: Remove trailing spaces.

Markdownlint suggests removing trailing spaces.

- We use the `BuildTransaction` function with these parameters: 
+ We use the `BuildTransaction` function with these parameters:

97-106: Surround lists with blank lines.

Markdownlint suggests that lists should be surrounded by blank lines.

- 1. General
- - `network`: The network for the transaction.
- - `feeRate`: Minimum fee rate; actual fee may be higher.
+ 1. General

+ - `network`: The network for the transaction.
+ - `feeRate`: Minimum fee rate; actual fee may be higher.

- 2. Inputs
- - `inputs`: UTXOs to spend. Use NewRawInputs() if unspecified.
- - `utxos`: Additional UTXOs if needed. Use `nil` if none.
+ 2. Inputs

+ - `inputs`: UTXOs to spend. Use NewRawInputs() if unspecified.
+ - `utxos`: Additional UTXOs if needed. Use `nil` if none.

- 3. Outputs
- - `recipients`: Fund recipients with specified amounts.
- - `changeAddr`: Address for the change, usually the sender's address.
+ 3. Outputs

+ - `recipients`: Fund recipients with specified amounts.
+ - `changeAddr`: Address for the change, usually the sender's address.
Tools
LanguageTool

[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...se parameters: 1. General - network: The network for the transaction. - `fee...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...network for the transaction. - feeRate: Minimum fee rate; actual fee may be hig...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~104-~104: Loose punctuation mark.
Context: ... may be higher. 2. Inputs - inputs: UTXOs to spend. Use NewRawInputs() if u...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~105-~105: Loose punctuation mark.
Context: ...NewRawInputs() if unspecified. - utxos: Additional UTXOs if needed. Use nil i...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...eded. Use nil if none. - sizeUpdater: Describes UTXO size impact. It assumes ...

(UNLIKELY_OPENING_PUNCTUATION)


115-115: Add a blank line before the code block.

Markdownlint suggests that fenced code blocks should be surrounded by blank lines.

- 1. Transfer 0.1 btc
+ 1. Transfer 0.1 btc

```go
    // Fetch available utxos of the address 

---

`176-176`: **Remove trailing spaces.**

Markdownlint suggests removing trailing spaces.

```diff
- - `MultisigScript`: 2-of-2 multisig script for the [Guardian](https://docs.catalog.fi/catalog-accounts/instant-wallet/guardian) component.
+ - `MultisigScript`: 2-of-2 multisig script for the [Guardian](https://docs.catalog.fi/catalog-accounts/instant-wallet/guardian) component.
Tools
LanguageTool

[uncategorized] ~176-~176: Loose punctuation mark.
Context: ... ### Bitcoin scripts - MultisigScript: 2-of-2 multisig script for the [Guardia...

(UNLIKELY_OPENING_PUNCTUATION)


177-177: Remove trailing spaces.

Markdownlint suggests removing trailing spaces.

- - `HtlcScript`: HTLC script as described in [BIP-199](https://github.com/bitcoin/bips/blob/e643d247c8bc086745f3031cdee0899803edea2f/bip-0199.mediawiki#L22).
+ - `HtlcScript`: HTLC script as described in [BIP-199](https://github.com/bitcoin/bips/blob/e643d247c8bc086745f3031cdee0899803edea2f/bip-0199.mediawiki#L22).
Tools
LanguageTool

[uncategorized] ~177-~177: Loose punctuation mark.
Context: ...llet/guardian) component. - HtlcScript: HTLC script as described in [BIP-199](h...

(UNLIKELY_OPENING_PUNCTUATION)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1f7fa27 and 4537b38.

Files selected for processing (1)
  • README.md (6 hunks)
Additional context used
LanguageTool
README.md

[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...se parameters: 1. General - network: The network for the transaction. - `fee...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...network for the transaction. - feeRate: Minimum fee rate; actual fee may be hig...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~104-~104: Loose punctuation mark.
Context: ... may be higher. 2. Inputs - inputs: UTXOs to spend. Use NewRawInputs() if u...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~105-~105: Loose punctuation mark.
Context: ...NewRawInputs() if unspecified. - utxos: Additional UTXOs if needed. Use nil i...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...eded. Use nil if none. - sizeUpdater: Describes UTXO size impact. It assumes ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ... is empty. 3. Outputs - recipients: Fund recipients with specified amounts....

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...s with specified amounts. - changeAddr: Address for the change, usually the sen...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~176-~176: Loose punctuation mark.
Context: ... ### Bitcoin scripts - MultisigScript: 2-of-2 multisig script for the [Guardia...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~177-~177: Loose punctuation mark.
Context: ...llet/guardian) component. - HtlcScript: HTLC script as described in [BIP-199](h...

(UNLIKELY_OPENING_PUNCTUATION)

@Revantark Revantark merged commit 39974d9 into master Jul 30, 2024
1 check passed
@Revantark Revantark deleted the koushikmaturi-patch-1 branch July 30, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants