@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 +1 -0
- package/dist/utils/transactions/v3.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/utils/transactions/v3.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -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
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
|