bsv2 2.3.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/bsv2.cjs +7 -7
- package/dist/bsv2.cjs.map +1 -1
- package/dist/bsv2.mjs +7245 -6690
- package/dist/bsv2.mjs.map +1 -1
- package/dist/bsv2.umd.js +7 -7
- package/dist/bsv2.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ of the `bsv` 2.x codebase: same class-based API, published on npm as
|
|
|
18
18
|
pre-Genesis and Chronicle policy modes.
|
|
19
19
|
- Keys, addresses, BIP32 hierarchical deterministic wallets and BIP39 mnemonics
|
|
20
20
|
(English, Spanish and Japanese wordlists).
|
|
21
|
-
- Block and block-header serialization,
|
|
21
|
+
- Block and block-header serialization, mining utilities, and BEEF/BUMP SPV proofs.
|
|
22
22
|
- ECIES and AES encryption helpers.
|
|
23
23
|
- Web Worker support for cryptography-heavy operations.
|
|
24
24
|
- Dependency-light, auditable source under `lib/`.
|
|
@@ -193,6 +193,8 @@ All symbols below are exported from the package root (`entry.js`).
|
|
|
193
193
|
| Cryptography and math | `Bn`, `Point`, `Ecdsa`, `Hash`, `Random`, `Aes`, `Aescbc`, `Cbc`, `Ecies`, `Ach` |
|
|
194
194
|
| Serialization / utilities | `Struct`, `Br`, `Bw`, `Bsm`, `VarInt`, `Base58`, `Base58Check`, `cmp`, `Constants` |
|
|
195
195
|
| Workers | `Workers`, `WorkersResult` |
|
|
196
|
+
| BRC helpers | `P2PKH`, `RPuzzle`, `PushDrop`, `AesGcm`, `SafeRecord`, `Reader`, `Writer`, `Beef`, `Bump` |
|
|
197
|
+
| Fees and sizing | `FeeModel`, `SatoshisPerKilobyte`, `varUintSize`, `transactionInputSize`, `transactionOutputSize`, `transactionSize` |
|
|
196
198
|
| Package | `deps`, `version` |
|
|
197
199
|
|
|
198
200
|
Additional modules under `lib/` (for example `Msg`, `Version`, `Merkle` and
|
|
@@ -263,6 +265,21 @@ For BRC-100 integrations use the BSV Association reference implementations in
|
|
|
263
265
|
|
|
264
266
|
See [BRC-100](https://bsv.brc.dev/wallet/0100.md) for the normative interface.
|
|
265
267
|
|
|
268
|
+
## BRC helpers
|
|
269
|
+
|
|
270
|
+
- `P2PKH`, `RPuzzle` and `PushDrop` build locking/unlocking scripts from
|
|
271
|
+
BRC-16, BRC-17 and BRC-48.
|
|
272
|
+
- `AesGcm` implements AES-256-GCM with BRC-2 framing
|
|
273
|
+
(`IV || ciphertext || tag`, with a 32-byte IV).
|
|
274
|
+
- `SatoshisPerKilobyte` computes a fee from the exact serialized size; the
|
|
275
|
+
`transactionSize` helpers can estimate it before signing.
|
|
276
|
+
- `Reader`/`Writer` are bounds-checked byte helpers with canonical varint
|
|
277
|
+
decoding; `SafeRecord` rejects prototype-polluting keys in untrusted JSON.
|
|
278
|
+
|
|
279
|
+
BEEF (BRC-62) and BUMP (BRC-74) can be parsed/serialized with `Beef` and
|
|
280
|
+
`Bump`; `Bump.computeRoot()` verifies inclusion proofs. SPV header lookup is
|
|
281
|
+
left to the caller (`ChainTracker`-style service).
|
|
282
|
+
|
|
266
283
|
## Known differences from the C++ reference
|
|
267
284
|
|
|
268
285
|
- Activation is expressed with `SCRIPT_VERIFY_CHRONICLE` or a transaction
|