@ckbfs/api 2.0.17 → 2.0.18

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/index.js CHANGED
@@ -530,6 +530,7 @@ class CKBFS {
530
530
  previousTxHash: ckbfsCell.outPoint.txHash,
531
531
  previousWitnessIndex: ckbfsCell.data.index,
532
532
  previousChecksum: ckbfsCell.data.checksum,
533
+ witnessStartIndex: options.witnessStartIndex,
533
534
  });
534
535
  }
535
536
  else {
@@ -357,7 +357,7 @@ async function createAppendV3Transaction(signer, options) {
357
357
  witnesses.push("0x");
358
358
  }
359
359
  // add ckbfs witnesses (skip the first witness which is for signing)
360
- witnesses.push(...preTx.witnesses.slice(1));
360
+ witnesses.push(...preTx.witnesses.slice(options.witnessStartIndex || 1));
361
361
  // Add empty witnesses for additional signer inputs
362
362
  // This is to ensure that the transaction is valid and can be signed
363
363
  for (let i = inputsBefore; i < preTx.inputs.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckbfs/api",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "description": "SDK for CKBFS protocol on CKB",
5
5
  "license": "MIT",
6
6
  "author": "Code Monad<code@lab-11.org>",
package/src/index.ts CHANGED
@@ -721,6 +721,7 @@ export class CKBFS {
721
721
  previousTxHash: ckbfsCell.outPoint.txHash,
722
722
  previousWitnessIndex: ckbfsCell.data.index,
723
723
  previousChecksum: ckbfsCell.data.checksum,
724
+ witnessStartIndex: options.witnessStartIndex,
724
725
  });
725
726
  } else {
726
727
  // Legacy V1/V2 behavior or when V3 backlink params are missing
@@ -526,7 +526,7 @@ export async function createAppendV3Transaction(
526
526
  witnesses.push("0x");
527
527
  }
528
528
  // add ckbfs witnesses (skip the first witness which is for signing)
529
- witnesses.push(...preTx.witnesses.slice(1));
529
+ witnesses.push(...preTx.witnesses.slice(options.witnessStartIndex || 1));
530
530
 
531
531
  // Add empty witnesses for additional signer inputs
532
532
  // This is to ensure that the transaction is valid and can be signed