@bsv/sdk 1.2.15 → 1.2.17
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/dist/cjs/package.json +2 -2
- package/dist/cjs/src/transaction/Beef.js +41 -15
- package/dist/cjs/src/transaction/Beef.js.map +1 -1
- package/dist/cjs/src/transaction/MerklePath.js +4 -4
- package/dist/cjs/src/transaction/MerklePath.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/transaction/Beef.js +41 -15
- package/dist/esm/src/transaction/Beef.js.map +1 -1
- package/dist/esm/src/transaction/MerklePath.js +4 -4
- package/dist/esm/src/transaction/MerklePath.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/transaction/Beef.d.ts +8 -2
- package/dist/types/src/transaction/Beef.d.ts.map +1 -1
- package/dist/types/src/transaction/MerklePath.d.ts +2 -2
- package/dist/types/src/transaction/MerklePath.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/transaction.md +15 -4
- package/docs/wallet-substrates.md +1410 -1
- package/package.json +2 -2
- package/src/transaction/Beef.ts +49 -8
- package/src/transaction/MerklePath.ts +4 -4
- package/src/transaction/__tests/Beef.test.ts +24 -5
package/docs/transaction.md
CHANGED
|
@@ -624,6 +624,7 @@ export class Beef {
|
|
|
624
624
|
trimKnownTxids(knownTxids: string[])
|
|
625
625
|
getValidTxids(): string[]
|
|
626
626
|
toLogString(): string
|
|
627
|
+
addComputedLeaves()
|
|
627
628
|
}
|
|
628
629
|
```
|
|
629
630
|
|
|
@@ -633,6 +634,15 @@ See also: [BeefTx](#class-beeftx), [BeefVersion](#type-beefversion), [ChainTrack
|
|
|
633
634
|
|
|
634
635
|
<summary>Class Beef Details</summary>
|
|
635
636
|
|
|
637
|
+
#### Method addComputedLeaves
|
|
638
|
+
|
|
639
|
+
In some circumstances it may be helpful for the BUMP MerkePaths to include
|
|
640
|
+
leaves that can be computed from row zero.
|
|
641
|
+
|
|
642
|
+
```ts
|
|
643
|
+
addComputedLeaves()
|
|
644
|
+
```
|
|
645
|
+
|
|
636
646
|
#### Method clone
|
|
637
647
|
|
|
638
648
|
```ts
|
|
@@ -902,8 +912,9 @@ A binary array representing the BEEF
|
|
|
902
912
|
|
|
903
913
|
Serialize this Beef as AtomicBEEF.
|
|
904
914
|
|
|
905
|
-
`txid` must exist
|
|
906
|
-
|
|
915
|
+
`txid` must exist
|
|
916
|
+
|
|
917
|
+
after sorting, if txid is not last txid, creates a clone and removes newer txs
|
|
907
918
|
|
|
908
919
|
```ts
|
|
909
920
|
toBinaryAtomic(txid: string)
|
|
@@ -1217,7 +1228,7 @@ export default class MerklePath {
|
|
|
1217
1228
|
duplicate?: boolean;
|
|
1218
1229
|
}>>;
|
|
1219
1230
|
static fromHex(hex: string): MerklePath
|
|
1220
|
-
static fromReader(reader: Reader): MerklePath
|
|
1231
|
+
static fromReader(reader: Reader, legalOffsetsOnly: boolean = true): MerklePath
|
|
1221
1232
|
static fromBinary(bump: number[]): MerklePath
|
|
1222
1233
|
static fromCoinbaseTxidAndHeight(txid: string, height: number): MerklePath
|
|
1223
1234
|
constructor(blockHeight: number, path: Array<Array<{
|
|
@@ -1225,7 +1236,7 @@ export default class MerklePath {
|
|
|
1225
1236
|
hash?: string;
|
|
1226
1237
|
txid?: boolean;
|
|
1227
1238
|
duplicate?: boolean;
|
|
1228
|
-
}
|
|
1239
|
+
}>>, legalOffsetsOnly: boolean = true)
|
|
1229
1240
|
toBinary(): number[]
|
|
1230
1241
|
toHex(): string
|
|
1231
1242
|
computeRoot(txid?: string): string
|