@kaspacom/kcc20-tx-builder 0.6.2 → 0.6.3
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/engine.js +22 -22
- package/dist/cjs/engine.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +22 -22
- package/dist/engine.js.map +1 -1
- package/package.json +2 -2
- package/src/engine.ts +42 -2
package/dist/engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAwErD,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,cAAc,CAAC,EAAE;QACf,mBAAmB,CAAC,IAAI,EAAE;YAAE,SAAS,EAAE,MAAM,EAAE,CAAA;SAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;KACtE,CAAC;IACF,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,GAAG,CAAC;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yBAAyB,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IACjE,gFAAgF;IAChF,oBAAoB,CAAC,EAAE;QAAE,QAAQ,EAAE,oBAAoB,CAAC;QAAC,MAAM,EAAE,MAAM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8BAA8B,CAAC,CAAC;IAC5C,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,6BAA6B,GACrC,sBAAsB,CA0kaxB"}
|
package/dist/engine.js
CHANGED
|
@@ -424,7 +424,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
424
424
|
}
|
|
425
425
|
requireMatchingCovenantId(rootEntry, rootId, "active FeeTicket root UTXO");
|
|
426
426
|
const rootOutputIndex = 0;
|
|
427
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n);
|
|
427
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n, [], request.params?.fundingOutpoint);
|
|
428
428
|
const fundingInputIndex = 1;
|
|
429
429
|
const fundingChangeOutputIndex = 1;
|
|
430
430
|
const fundingChange = utxoAmountSompi(fundingEntry) - priorityFee;
|
|
@@ -616,7 +616,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
616
616
|
utilityInputSompi +
|
|
617
617
|
10000n
|
|
618
618
|
: priorityFee + 10000n;
|
|
619
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
619
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
620
620
|
const fundingInputIndex = 2;
|
|
621
621
|
const change = rootInputSompi +
|
|
622
622
|
utilityInputSompi +
|
|
@@ -794,7 +794,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
794
794
|
return entry;
|
|
795
795
|
});
|
|
796
796
|
const outputs = entries.map((entry, index) => new TransactionOutput(utxoAmountSompi(entry), p2pkScriptPubKey(kw, bytesToHex(states[index].ownerIdentifier))));
|
|
797
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n);
|
|
797
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n, [], request.params?.fundingOutpoint);
|
|
798
798
|
const fundingInputIndex = entries.length;
|
|
799
799
|
const fundingChangeOutputIndex = outputs.length;
|
|
800
800
|
const fundingChange = utxoAmountSompi(fundingEntry) - priorityFee;
|
|
@@ -944,7 +944,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
944
944
|
ownerIdentifier: hexToBytes(recipientOwner),
|
|
945
945
|
}));
|
|
946
946
|
const outputs = entries.map((entry, index) => new TransactionOutput(utxoAmountSompi(entry), payToScriptHashScript(buildKcc20FeeTicketScriptForState(artifactInfos[index].artifact.script, recipientStates[index])), new CovenantBinding(index, new Hash(ticketId))));
|
|
947
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n);
|
|
947
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n, [], request.params?.fundingOutpoint);
|
|
948
948
|
const fundingInputIndex = entries.length;
|
|
949
949
|
const fundingChangeOutputIndex = outputs.length;
|
|
950
950
|
const fundingChange = utxoAmountSompi(fundingEntry) - priorityFee;
|
|
@@ -1746,7 +1746,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
1746
1746
|
evidence.address)
|
|
1747
1747
|
throw new Error("token evidence script does not match RPC");
|
|
1748
1748
|
const utxos = await getUtxosByAddresses(rpc, [walletAddress]);
|
|
1749
|
-
const fundingEntry = selectFundingEntry(utxos.entries, deploySompi * 2n + priorityFee + 10000000n);
|
|
1749
|
+
const fundingEntry = selectFundingEntry(utxos.entries, deploySompi * 2n + priorityFee + 10000000n, [], request.params?.fundingOutpoint);
|
|
1750
1750
|
const fundingChangeOutputIndex = 2;
|
|
1751
1751
|
const change = utxoAmountSompi(fundingEntry) - deploySompi * 2n - priorityFee;
|
|
1752
1752
|
if (change <= 10000n) {
|
|
@@ -2034,7 +2034,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
2034
2034
|
const requiredFunding = outputSompi + priorityFee > covenantInputSompi
|
|
2035
2035
|
? outputSompi + priorityFee - covenantInputSompi + 10000n
|
|
2036
2036
|
: priorityFee + 10000n;
|
|
2037
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
2037
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
2038
2038
|
const fundingInputIndex = 2;
|
|
2039
2039
|
const change = covenantInputSompi +
|
|
2040
2040
|
utxoAmountSompi(fundingEntry) -
|
|
@@ -2329,7 +2329,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
2329
2329
|
const requiredFunding = outputSompi + priorityFee > covenantInputSompi
|
|
2330
2330
|
? outputSompi + priorityFee - covenantInputSompi + 10000n
|
|
2331
2331
|
: priorityFee + 10000n;
|
|
2332
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
2332
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
2333
2333
|
const fundingInputIndex = 3;
|
|
2334
2334
|
const change = covenantInputSompi +
|
|
2335
2335
|
utxoAmountSompi(fundingEntry) -
|
|
@@ -2605,7 +2605,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
2605
2605
|
const requiredFunding = outputSompi + priorityFee > covenantInputSompi
|
|
2606
2606
|
? outputSompi + priorityFee - covenantInputSompi + 10000n
|
|
2607
2607
|
: priorityFee + 10000n;
|
|
2608
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
2608
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
2609
2609
|
const fundingInputIndex = 1;
|
|
2610
2610
|
const change = covenantInputSompi +
|
|
2611
2611
|
utxoAmountSompi(fundingEntry) -
|
|
@@ -2887,7 +2887,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
2887
2887
|
const requiredFunding = outputSompi + priorityFee > covenantInputSompi
|
|
2888
2888
|
? outputSompi + priorityFee - covenantInputSompi + 10000n
|
|
2889
2889
|
: priorityFee + 10000n;
|
|
2890
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
2890
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
2891
2891
|
const ticketInputIndex = ticketEntry ? 1 : -1;
|
|
2892
2892
|
const fundingInputIndex = ticketEntry ? 2 : 1;
|
|
2893
2893
|
const change = covenantInputSompi +
|
|
@@ -3244,7 +3244,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
3244
3244
|
const requiredFunding = outputSompi + priorityFee > covenantInputSompi
|
|
3245
3245
|
? outputSompi + priorityFee - covenantInputSompi + 10000n
|
|
3246
3246
|
: priorityFee + 10000n;
|
|
3247
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
3247
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
3248
3248
|
const ticketInputIndex = ticketEntry ? 2 : -1;
|
|
3249
3249
|
const fundingInputIndex = ticketEntry ? 3 : 2;
|
|
3250
3250
|
const change = covenantInputSompi +
|
|
@@ -3625,7 +3625,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
3625
3625
|
covenantInputSompi +
|
|
3626
3626
|
MIN_FUNDING_CHANGE_SOMPI
|
|
3627
3627
|
: priorityFee + MIN_FUNDING_CHANGE_SOMPI;
|
|
3628
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
3628
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
3629
3629
|
const fundingInputIndex = resolvedLegs.length + (sharedTicketEntry ? 1 : 0);
|
|
3630
3630
|
const change = covenantInputSompi +
|
|
3631
3631
|
utxoAmountSompi(fundingEntry) -
|
|
@@ -4079,7 +4079,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
4079
4079
|
: priorityFee + 10000n;
|
|
4080
4080
|
let fundingEntry;
|
|
4081
4081
|
try {
|
|
4082
|
-
fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
4082
|
+
fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
4083
4083
|
}
|
|
4084
4084
|
catch (error) {
|
|
4085
4085
|
if (totalSellerFundedHolderTopUpSompi > 0n) {
|
|
@@ -4565,7 +4565,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
4565
4565
|
: priorityFee + 10000n;
|
|
4566
4566
|
let fundingEntry;
|
|
4567
4567
|
try {
|
|
4568
|
-
fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
4568
|
+
fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
4569
4569
|
}
|
|
4570
4570
|
catch (error) {
|
|
4571
4571
|
if (totalSellerFundedHolderTopUpSompi > 0n) {
|
|
@@ -4888,7 +4888,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
4888
4888
|
new TransactionOutput(refundSompi, payToAddressScript(walletAddress)),
|
|
4889
4889
|
];
|
|
4890
4890
|
const requiredFunding = priorityFee + MIN_FUNDING_CHANGE_SOMPI;
|
|
4891
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
4891
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
4892
4892
|
const fundingInputIndex = entries.length;
|
|
4893
4893
|
const change = utxoAmountSompi(fundingEntry) - priorityFee;
|
|
4894
4894
|
let fundingChangeOutputIndex = -1;
|
|
@@ -5264,7 +5264,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
5264
5264
|
const requiredFunding = outputSompi + transactionFeeReserve > covenantInputSompi
|
|
5265
5265
|
? outputSompi + transactionFeeReserve - covenantInputSompi + 10000n
|
|
5266
5266
|
: transactionFeeReserve + 10000n;
|
|
5267
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
5267
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
5268
5268
|
const ticketInputIndex = ticketEntry ? 2 : -1;
|
|
5269
5269
|
const fundingInputIndex = ticketEntry ? 3 : 2;
|
|
5270
5270
|
const change = covenantInputSompi +
|
|
@@ -5543,7 +5543,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
5543
5543
|
const requiredFunding = outputSompi + priorityFee > covenantInputSompi
|
|
5544
5544
|
? outputSompi + priorityFee - covenantInputSompi + 10000n
|
|
5545
5545
|
: priorityFee + 10000n;
|
|
5546
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
5546
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
5547
5547
|
const fundingInputIndex = 1;
|
|
5548
5548
|
const change = covenantInputSompi +
|
|
5549
5549
|
utxoAmountSompi(fundingEntry) -
|
|
@@ -5786,7 +5786,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
5786
5786
|
const requiredFunding = outputSompi + priorityFee > minterInputSompi
|
|
5787
5787
|
? outputSompi + priorityFee - minterInputSompi + 10000n
|
|
5788
5788
|
: priorityFee + 10000n;
|
|
5789
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
5789
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
5790
5790
|
const fundingInputIndex = 1;
|
|
5791
5791
|
const change = minterInputSompi +
|
|
5792
5792
|
BigInt(fundingEntry.amount) -
|
|
@@ -6061,7 +6061,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
6061
6061
|
minterInputSompi: BigInt(minterEntry.amount),
|
|
6062
6062
|
};
|
|
6063
6063
|
});
|
|
6064
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n);
|
|
6064
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, priorityFee + 10000n, [], request.params?.fundingOutpoint);
|
|
6065
6065
|
const fundingInputIndex = resolvedLanes.length;
|
|
6066
6066
|
const fundingChange = BigInt(fundingEntry.amount) - priorityFee;
|
|
6067
6067
|
const outputs = resolvedLanes.map((lane, laneIndex) => tokenOutput(kaspaWasm, lane.resolvedArtifact.artifact, lane.outputState, lane.minterInputSompi, lane.spendCovenantId, laneIndex));
|
|
@@ -6296,7 +6296,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
6296
6296
|
new TransactionOutput(refundSompi, payToAddressScript(walletAddress)),
|
|
6297
6297
|
];
|
|
6298
6298
|
const requiredFunding = priorityFee + MIN_FUNDING_CHANGE_SOMPI;
|
|
6299
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
6299
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
6300
6300
|
const fundingInputIndex = entries.length;
|
|
6301
6301
|
const change = utxoAmountSompi(fundingEntry) - priorityFee;
|
|
6302
6302
|
let fundingChangeOutputIndex = -1;
|
|
@@ -6437,7 +6437,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
6437
6437
|
tokenOutput(kw, artifact, inputState, tokenOutputSompi, spendCovenantId, 0),
|
|
6438
6438
|
];
|
|
6439
6439
|
const requiredFunding = priorityFee + 10000n;
|
|
6440
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
6440
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
6441
6441
|
const fundingInputIndex = 1;
|
|
6442
6442
|
const change = utxoAmountSompi(fundingEntry) - priorityFee;
|
|
6443
6443
|
let fundingChangeOutputIndex = -1;
|
|
@@ -6628,7 +6628,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
6628
6628
|
const requiredFunding = outputSompi + priorityFee > tokenInputSompi
|
|
6629
6629
|
? outputSompi + priorityFee - tokenInputSompi + 10000n
|
|
6630
6630
|
: priorityFee + 10000n;
|
|
6631
|
-
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding);
|
|
6631
|
+
const fundingEntry = selectFundingEntry(walletUtxos.entries, requiredFunding, [], request.params?.fundingOutpoint);
|
|
6632
6632
|
const fundingInputIndex = 1;
|
|
6633
6633
|
const change = tokenInputSompi +
|
|
6634
6634
|
utxoAmountSompi(fundingEntry) -
|
|
@@ -7023,7 +7023,7 @@ export function createKcc20PsktBuilderEngine(options) {
|
|
|
7023
7023
|
await rpc.connect();
|
|
7024
7024
|
try {
|
|
7025
7025
|
const utxos = await getUtxosByAddresses(rpc, [walletAddress]);
|
|
7026
|
-
const fundingEntry = selectFundingEntry(utxos.entries, deploySompi + priorityFee + 10000000n);
|
|
7026
|
+
const fundingEntry = selectFundingEntry(utxos.entries, deploySompi + priorityFee + 10000000n, [], request.params?.fundingOutpoint);
|
|
7027
7027
|
const created = await createTransactions({
|
|
7028
7028
|
entries: [fundingEntry],
|
|
7029
7029
|
outputs: [{ address: contractAddress, amount: deploySompi }],
|