@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.
@@ -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 and be the last transaction
906
- in sorted (dependency) order.
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