@ckbfs/api 2.0.15 → 2.0.16
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.
|
@@ -288,7 +288,7 @@ async function prepareAppendV3Transaction(options) {
|
|
|
288
288
|
],
|
|
289
289
|
witnesses: from.witnesses.length === 0
|
|
290
290
|
? [
|
|
291
|
-
|
|
291
|
+
`0x`, // Empty secp witnesses for signing if not provided
|
|
292
292
|
...ckbfsWitnesses.map((w) => `0x${Buffer.from(w).toString("hex")}`),
|
|
293
293
|
]
|
|
294
294
|
: [
|
|
@@ -313,7 +313,7 @@ async function prepareAppendV3Transaction(options) {
|
|
|
313
313
|
},
|
|
314
314
|
],
|
|
315
315
|
witnesses: [
|
|
316
|
-
|
|
316
|
+
`0x`, // Empty secp witnesses for signing if not provided
|
|
317
317
|
...ckbfsWitnesses.map((w) => `0x${Buffer.from(w).toString("hex")}`),
|
|
318
318
|
],
|
|
319
319
|
outputsData: [outputData],
|
|
@@ -354,10 +354,10 @@ async function createAppendV3Transaction(signer, options) {
|
|
|
354
354
|
// var witnessOffsetIndex = 1;
|
|
355
355
|
// // add empty witness for signer if ckbfs's lock is the same as signer's lock
|
|
356
356
|
//if (address.script.hash() === lock.hash()) {
|
|
357
|
-
witnesses.push("0x");
|
|
357
|
+
// witnesses.push("0x");
|
|
358
358
|
//}
|
|
359
359
|
// add ckbfs witnesses (skip the first witness which is for signing)
|
|
360
|
-
witnesses.push(...preTx.witnesses
|
|
360
|
+
witnesses.push(...preTx.witnesses);
|
|
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
|
@@ -442,7 +442,7 @@ export async function prepareAppendV3Transaction(
|
|
|
442
442
|
],
|
|
443
443
|
witnesses: from.witnesses.length === 0
|
|
444
444
|
? [
|
|
445
|
-
|
|
445
|
+
`0x`, // Empty secp witnesses for signing if not provided
|
|
446
446
|
...ckbfsWitnesses.map((w) => `0x${Buffer.from(w).toString("hex")}`),
|
|
447
447
|
]
|
|
448
448
|
: [
|
|
@@ -466,7 +466,7 @@ export async function prepareAppendV3Transaction(
|
|
|
466
466
|
},
|
|
467
467
|
],
|
|
468
468
|
witnesses: [
|
|
469
|
-
|
|
469
|
+
`0x`, // Empty secp witnesses for signing if not provided
|
|
470
470
|
...ckbfsWitnesses.map((w) => `0x${Buffer.from(w).toString("hex")}`),
|
|
471
471
|
],
|
|
472
472
|
outputsData: [outputData],
|
|
@@ -523,10 +523,10 @@ export async function createAppendV3Transaction(
|
|
|
523
523
|
// var witnessOffsetIndex = 1;
|
|
524
524
|
// // add empty witness for signer if ckbfs's lock is the same as signer's lock
|
|
525
525
|
//if (address.script.hash() === lock.hash()) {
|
|
526
|
-
witnesses.push("0x");
|
|
526
|
+
// witnesses.push("0x");
|
|
527
527
|
//}
|
|
528
528
|
// add ckbfs witnesses (skip the first witness which is for signing)
|
|
529
|
-
witnesses.push(...preTx.witnesses
|
|
529
|
+
witnesses.push(...preTx.witnesses);
|
|
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
|