Skip to content

docs: align Buffer wording with Uint8Array-first v7 APIs#2325

Open
lindsey-comet wants to merge 1 commit intobitcoinjs:masterfrom
lindsey-comet:fix/2321-docs-buffer-to-uint8array
Open

docs: align Buffer wording with Uint8Array-first v7 APIs#2325
lindsey-comet wants to merge 1 commit intobitcoinjs:masterfrom
lindsey-comet:fix/2321-docs-buffer-to-uint8array

Conversation

@lindsey-comet
Copy link
Copy Markdown

Summary

Updated README.md and JSDoc comments to reflect that v7 APIs are Uint8Array-first. The documentation now consistently describes Uint8Array as the canonical public type while keeping explicit compatibility notes where Buffer input is accepted.

Changes

  • README.md: Changed 'Node Buffer'''s throughout' to 'Uint8Array (with node Buffer supported as a Uint8Array subclass) throughout'
  • ts_src/address.ts: Updated JSDoc to show Uint8Array as primary type with Buffer compatibility note
  • ts_src/payments/bip341.ts: Updated 2 JSDoc @returns comments
  • ts_src/script.ts: Updated JSDoc to reference Uint8Array instead of Buffer
  • ts_src/psbt/psbtutils.ts: Updated JSDoc @returns comment
  • ts_src/psbt/bip371.ts: Updated JSDoc @returns comment
  • ts_src/types.ts: Updated JSDoc @param comments

Acceptance

  • Docs consistently describe Uint8Array as canonical public type
  • Compatibility statement remains explicit for existing Buffer-accepting paths
  • No runtime behavior changes
  • No API signature changes

Fixes #2321

Updated README.md and JSDoc comments to reflect that v7 APIs are
Uint8Array-first. Buffer input is still accepted (as it is a
Uint8Array subclass), but the canonical public type is now Uint8Array.

Changes:
- README.md: Updated project description to mention Uint8Array
- JSDoc comments: Changed 'as a Buffer' to 'as a Uint8Array' or
  clarified Buffer compatibility notes

Fixes bitcoinjs#2321
@jvgelder
Copy link
Copy Markdown

duplicate of #2322 ?

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.

Docs cleanup: align Buffer wording with Uint8Array-first v7 APIs

2 participants