bsv2 2.3.1 → 2.4.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 +15 -0
- package/dist/bsv2.cjs +7 -7
- package/dist/bsv2.cjs.map +1 -1
- package/dist/bsv2.mjs +5631 -5268
- 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
|
@@ -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` |
|
|
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,19 @@ 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) are not yet implemented.
|
|
280
|
+
|
|
266
281
|
## Known differences from the C++ reference
|
|
267
282
|
|
|
268
283
|
- Activation is expressed with `SCRIPT_VERIFY_CHRONICLE` or a transaction
|