@arkade-os/sdk 0.5.1 → 0.5.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/README.md +9 -5
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-CdWheMqT.d.ts → asyncStorageTaskQueue-B3U5gQ-i.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-DFt5LgW5.d.cts → asyncStorageTaskQueue-C9PkPcW_.d.cts} +1 -1
- package/dist/{chunk-JJ6QKTFZ.cjs → chunk-5WRA66RV.cjs} +10 -10
- package/dist/{chunk-JJ6QKTFZ.cjs.map → chunk-5WRA66RV.cjs.map} +1 -1
- package/dist/{chunk-6MIGYYWB.js → chunk-6FL4N4S2.js} +3 -3
- package/dist/{chunk-6MIGYYWB.js.map → chunk-6FL4N4S2.js.map} +1 -1
- package/dist/{chunk-GW42FS2X.cjs → chunk-BYPBVHVA.cjs} +48 -48
- package/dist/{chunk-GW42FS2X.cjs.map → chunk-BYPBVHVA.cjs.map} +1 -1
- package/dist/{chunk-NKKJEA3Z.js → chunk-HAQAWBYG.js} +739 -392
- package/dist/chunk-HAQAWBYG.js.map +1 -0
- package/dist/{chunk-XLHUGP3G.cjs → chunk-KW7ZEWYS.cjs} +6 -3
- package/dist/chunk-KW7ZEWYS.cjs.map +1 -0
- package/dist/{chunk-QFB55EOZ.js → chunk-OPX2HRWM.js} +6 -3
- package/dist/chunk-OPX2HRWM.js.map +1 -0
- package/dist/{chunk-QKNSMVBW.cjs → chunk-OUTWUYJ4.cjs} +1222 -875
- package/dist/chunk-OUTWUYJ4.cjs.map +1 -0
- package/dist/{chunk-3M22PJVB.js → chunk-P7B4LQ3H.js} +3 -3
- package/dist/{chunk-3M22PJVB.js.map → chunk-P7B4LQ3H.js.map} +1 -1
- package/dist/{chunk-FXVEOEYB.js → chunk-T7C3E2HL.js} +4 -4
- package/dist/{chunk-FXVEOEYB.js.map → chunk-T7C3E2HL.js.map} +1 -1
- package/dist/{chunk-XQRIY5K5.js → chunk-Y4BL3YYX.js} +4 -4
- package/dist/{chunk-XQRIY5K5.js.map → chunk-Y4BL3YYX.js.map} +1 -1
- package/dist/{chunk-HQNQ3CLQ.cjs → chunk-ZMSM3NOH.cjs} +18 -18
- package/dist/{chunk-HQNQ3CLQ.cjs.map → chunk-ZMSM3NOH.cjs.map} +1 -1
- package/dist/{chunk-GQUFPTN7.cjs → chunk-ZPF4I3K2.cjs} +16 -16
- package/dist/{chunk-GQUFPTN7.cjs.map → chunk-ZPF4I3K2.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-CFCfrReG.d.cts → delegate-ByfKszb6.d.cts} +1 -1
- package/dist/{delegate-BSbGQabI.d.ts → delegate-Cd28gxpM.d.ts} +1 -1
- package/dist/{index-CzUVvIxA.d.ts → index-B6X2E7W_.d.ts} +2 -2
- package/dist/{index-B3fRWO5i.d.cts → index-BURzbRup.d.cts} +38 -16
- package/dist/{index-B3fRWO5i.d.ts → index-BURzbRup.d.ts} +38 -16
- package/dist/{index-Fpf4mQZr.d.cts → index-DgH_0j14.d.cts} +2 -2
- package/dist/index.cjs +313 -313
- package/dist/index.d.cts +107 -27
- package/dist/index.d.ts +107 -27
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +33 -33
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-CdfoCMaw.d.ts → taskRunner-BaNCSxqK.d.ts} +1 -1
- package/dist/{taskRunner-Dk6oDAtd.d.cts → taskRunner-i56-drQV.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +18 -15
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +5 -4
- package/dist/wallet/expo/index.d.ts +5 -4
- package/dist/wallet/expo/index.js +8 -5
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-D9dvXu-K.d.cts → wallet-BjQugVUt.d.cts} +11 -6
- package/dist/{wallet-BQHNgc_v.d.ts → wallet-BnmhohgZ.d.ts} +11 -6
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-NKKJEA3Z.js.map +0 -1
- package/dist/chunk-QFB55EOZ.js.map +0 -1
- package/dist/chunk-QKNSMVBW.cjs.map +0 -1
- package/dist/chunk-XLHUGP3G.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKW7ZEWYS_cjs = require('./chunk-KW7ZEWYS.cjs');
|
|
4
4
|
var base = require('@scure/base');
|
|
5
5
|
var descriptorsScure = require('@bitcoinerlab/descriptors-scure');
|
|
6
6
|
var btcSigner = require('@scure/btc-signer');
|
|
@@ -68,14 +68,14 @@ var ContractHandlerRegistry = class {
|
|
|
68
68
|
var contractHandlers = new ContractHandlerRegistry();
|
|
69
69
|
exports.DefaultVtxo = void 0;
|
|
70
70
|
((DefaultVtxo2) => {
|
|
71
|
-
class Script3 extends
|
|
71
|
+
class Script3 extends chunkKW7ZEWYS_cjs.VtxoScript {
|
|
72
72
|
/** Create the default virtual output script with one forfeit path and one exit path. */
|
|
73
73
|
constructor(options) {
|
|
74
74
|
const { pubKey, serverPubKey, csvTimelock } = options;
|
|
75
|
-
const forfeitScript =
|
|
75
|
+
const forfeitScript = chunkKW7ZEWYS_cjs.MultisigTapscript.encode({
|
|
76
76
|
pubkeys: [pubKey, serverPubKey]
|
|
77
77
|
}).script;
|
|
78
|
-
const exitScript =
|
|
78
|
+
const exitScript = chunkKW7ZEWYS_cjs.CSVMultisigTapscript.encode({
|
|
79
79
|
timelock: csvTimelock,
|
|
80
80
|
pubkeys: [pubKey]
|
|
81
81
|
}).script;
|
|
@@ -267,7 +267,7 @@ function extractPubKeyBytes(value) {
|
|
|
267
267
|
return base.hex.decode(extractPubKey(normalizeToDescriptor(value)));
|
|
268
268
|
}
|
|
269
269
|
function deserializeCsvTimelock(value) {
|
|
270
|
-
return value !== void 0 && value !== "" ?
|
|
270
|
+
return value !== void 0 && value !== "" ? chunkKW7ZEWYS_cjs.sequenceToTimelock(Number(value)) : exports.DefaultVtxo.Script.DEFAULT_TIMELOCK;
|
|
271
271
|
}
|
|
272
272
|
var CLTV_HEIGHT_THRESHOLD = 500000000n;
|
|
273
273
|
function isCltvSatisfied(context, locktime) {
|
|
@@ -438,7 +438,7 @@ function deriveVhtlcTapscripts(script) {
|
|
|
438
438
|
function isCsvSpendable(context, sequence) {
|
|
439
439
|
if (sequence === void 0) return true;
|
|
440
440
|
if (!context.vtxo) return false;
|
|
441
|
-
const timelock =
|
|
441
|
+
const timelock = chunkKW7ZEWYS_cjs.sequenceToTimelock(sequence);
|
|
442
442
|
if (timelock.type === "blocks") {
|
|
443
443
|
if (context.blockHeight === void 0 || context.vtxo.status.block_height === void 0) {
|
|
444
444
|
return false;
|
|
@@ -496,21 +496,21 @@ function forfeitExitSpendablePaths(script, contract, context) {
|
|
|
496
496
|
async function detectUsedScripts(indexerProvider, scriptHexes) {
|
|
497
497
|
const used = /* @__PURE__ */ new Set();
|
|
498
498
|
const unique = [...new Set(scriptHexes)];
|
|
499
|
-
for (let offset = 0; offset < unique.length; offset +=
|
|
500
|
-
const scripts = unique.slice(offset, offset +
|
|
499
|
+
for (let offset = 0; offset < unique.length; offset += chunkKW7ZEWYS_cjs.SCRIPT_QUERY_CHUNK_SIZE) {
|
|
500
|
+
const scripts = unique.slice(offset, offset + chunkKW7ZEWYS_cjs.SCRIPT_QUERY_CHUNK_SIZE);
|
|
501
501
|
const remaining = new Set(scripts);
|
|
502
502
|
let pageIndex = 0;
|
|
503
503
|
let hasMore = true;
|
|
504
504
|
while (hasMore && remaining.size > 0) {
|
|
505
|
-
const { vtxos, page } = await
|
|
505
|
+
const { vtxos, page } = await chunkKW7ZEWYS_cjs.getNormalizedVtxos(indexerProvider, {
|
|
506
506
|
scripts,
|
|
507
507
|
pageIndex,
|
|
508
|
-
pageSize:
|
|
508
|
+
pageSize: chunkKW7ZEWYS_cjs.DEFAULT_PAGE_SIZE
|
|
509
509
|
});
|
|
510
510
|
for (const vtxo of vtxos) {
|
|
511
511
|
if (remaining.delete(vtxo.script)) used.add(vtxo.script);
|
|
512
512
|
}
|
|
513
|
-
hasMore = page ? vtxos.length ===
|
|
513
|
+
hasMore = page ? vtxos.length === chunkKW7ZEWYS_cjs.DEFAULT_PAGE_SIZE : false;
|
|
514
514
|
pageIndex++;
|
|
515
515
|
}
|
|
516
516
|
}
|
|
@@ -571,7 +571,7 @@ var DefaultContractHandler = {
|
|
|
571
571
|
return {
|
|
572
572
|
pubKey: base.hex.encode(params.pubKey),
|
|
573
573
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
574
|
-
csvTimelock:
|
|
574
|
+
csvTimelock: chunkKW7ZEWYS_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
575
575
|
};
|
|
576
576
|
},
|
|
577
577
|
deserializeParams(params) {
|
|
@@ -618,12 +618,12 @@ function discoverDefaultRange(entries, deps) {
|
|
|
618
618
|
}
|
|
619
619
|
exports.DelegateVtxo = void 0;
|
|
620
620
|
((DelegateVtxo2) => {
|
|
621
|
-
class Script3 extends
|
|
621
|
+
class Script3 extends chunkKW7ZEWYS_cjs.VtxoScript {
|
|
622
622
|
/** Create a delegated virtual output script with forfeit, exit, and delegate paths. */
|
|
623
623
|
constructor(options) {
|
|
624
624
|
const defaultVtxo = new exports.DefaultVtxo.Script(options);
|
|
625
625
|
const { delegatePubKey, pubKey, serverPubKey } = options;
|
|
626
|
-
const delegateScript =
|
|
626
|
+
const delegateScript = chunkKW7ZEWYS_cjs.MultisigTapscript.encode({
|
|
627
627
|
pubkeys: [pubKey, delegatePubKey, serverPubKey]
|
|
628
628
|
}).script;
|
|
629
629
|
super([...defaultVtxo.scripts, delegateScript]);
|
|
@@ -662,7 +662,7 @@ var DelegateContractHandler = {
|
|
|
662
662
|
pubKey: base.hex.encode(params.pubKey),
|
|
663
663
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
664
664
|
delegatePubKey: base.hex.encode(params.delegatePubKey),
|
|
665
|
-
csvTimelock:
|
|
665
|
+
csvTimelock: chunkKW7ZEWYS_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
666
666
|
};
|
|
667
667
|
},
|
|
668
668
|
deserializeParams(params) {
|
|
@@ -856,7 +856,7 @@ function getOpcodeValue(name) {
|
|
|
856
856
|
|
|
857
857
|
// src/arkade/bignum.ts
|
|
858
858
|
var bignum_exports = {};
|
|
859
|
-
|
|
859
|
+
chunkKW7ZEWYS_cjs.__export(bignum_exports, {
|
|
860
860
|
BIGNUM_MAX_BYTES: () => BIGNUM_MAX_BYTES,
|
|
861
861
|
decode: () => decode,
|
|
862
862
|
encode: () => encode
|
|
@@ -1045,7 +1045,7 @@ function computeArkadeScriptPublicKey(pubKey, script) {
|
|
|
1045
1045
|
// src/script/vhtlc.ts
|
|
1046
1046
|
exports.VHTLC = void 0;
|
|
1047
1047
|
((VHTLC2) => {
|
|
1048
|
-
class BaseScript extends
|
|
1048
|
+
class BaseScript extends chunkKW7ZEWYS_cjs.VtxoScript {
|
|
1049
1049
|
options;
|
|
1050
1050
|
claimScript;
|
|
1051
1051
|
refundScript;
|
|
@@ -1072,27 +1072,27 @@ exports.VHTLC = void 0;
|
|
|
1072
1072
|
unilateralRefundWithoutReceiverDelay
|
|
1073
1073
|
} = options;
|
|
1074
1074
|
const conditionScript = preimageCondition(preimageHash);
|
|
1075
|
-
const claimScript =
|
|
1075
|
+
const claimScript = chunkKW7ZEWYS_cjs.ConditionMultisigTapscript.encode({
|
|
1076
1076
|
conditionScript,
|
|
1077
1077
|
pubkeys: [receiver, server]
|
|
1078
1078
|
}).script;
|
|
1079
|
-
const refundScript =
|
|
1079
|
+
const refundScript = chunkKW7ZEWYS_cjs.MultisigTapscript.encode({
|
|
1080
1080
|
pubkeys: [sender, receiver, server]
|
|
1081
1081
|
}).script;
|
|
1082
|
-
const refundWithoutReceiverScript =
|
|
1082
|
+
const refundWithoutReceiverScript = chunkKW7ZEWYS_cjs.CLTVMultisigTapscript.encode({
|
|
1083
1083
|
absoluteTimelock: refundLocktime,
|
|
1084
1084
|
pubkeys: [sender, server]
|
|
1085
1085
|
}).script;
|
|
1086
|
-
const unilateralClaimScript =
|
|
1086
|
+
const unilateralClaimScript = chunkKW7ZEWYS_cjs.ConditionCSVMultisigTapscript.encode({
|
|
1087
1087
|
conditionScript,
|
|
1088
1088
|
timelock: unilateralClaimDelay,
|
|
1089
1089
|
pubkeys: [receiver]
|
|
1090
1090
|
}).script;
|
|
1091
|
-
const unilateralRefundScript =
|
|
1091
|
+
const unilateralRefundScript = chunkKW7ZEWYS_cjs.CSVMultisigTapscript.encode({
|
|
1092
1092
|
timelock: unilateralRefundDelay,
|
|
1093
1093
|
pubkeys: [sender, receiver]
|
|
1094
1094
|
}).script;
|
|
1095
|
-
const unilateralRefundWithoutReceiverScript =
|
|
1095
|
+
const unilateralRefundWithoutReceiverScript = chunkKW7ZEWYS_cjs.CSVMultisigTapscript.encode({
|
|
1096
1096
|
timelock: unilateralRefundWithoutReceiverDelay,
|
|
1097
1097
|
pubkeys: [sender]
|
|
1098
1098
|
}).script;
|
|
@@ -1112,7 +1112,7 @@ exports.VHTLC = void 0;
|
|
|
1112
1112
|
const covenants = options.nonInteractiveParameters;
|
|
1113
1113
|
if (covenants) {
|
|
1114
1114
|
arkadeScriptNic = enforcePayToMaybeAsset(covenants.receiverPkScript, options.asset);
|
|
1115
|
-
nonInteractiveClaimScript =
|
|
1115
|
+
nonInteractiveClaimScript = chunkKW7ZEWYS_cjs.ConditionMultisigTapscript.encode({
|
|
1116
1116
|
conditionScript,
|
|
1117
1117
|
pubkeys: [
|
|
1118
1118
|
server,
|
|
@@ -1125,12 +1125,12 @@ exports.VHTLC = void 0;
|
|
|
1125
1125
|
covenants.emulatorPubkey,
|
|
1126
1126
|
arkadeScriptNir
|
|
1127
1127
|
);
|
|
1128
|
-
nonInteractiveRefundScript =
|
|
1128
|
+
nonInteractiveRefundScript = chunkKW7ZEWYS_cjs.MultisigTapscript.encode({
|
|
1129
1129
|
pubkeys: [server, receiver, nirCosigner]
|
|
1130
1130
|
}).script;
|
|
1131
1131
|
scripts.push(nonInteractiveRefundScript);
|
|
1132
1132
|
if (covenants.legacy !== "preTimelockedRefund") {
|
|
1133
|
-
nonInteractiveRefundWithoutReceiverScript =
|
|
1133
|
+
nonInteractiveRefundWithoutReceiverScript = chunkKW7ZEWYS_cjs.CLTVMultisigTapscript.encode({
|
|
1134
1134
|
absoluteTimelock: refundLocktime,
|
|
1135
1135
|
pubkeys: [server, nirCosigner]
|
|
1136
1136
|
}).script;
|
|
@@ -1406,9 +1406,9 @@ var VHTLCContractHandler = {
|
|
|
1406
1406
|
server: base.hex.encode(params.server),
|
|
1407
1407
|
hash: base.hex.encode(params.preimageHash),
|
|
1408
1408
|
refundLocktime: params.refundLocktime.toString(),
|
|
1409
|
-
claimDelay:
|
|
1410
|
-
refundDelay:
|
|
1411
|
-
refundNoReceiverDelay:
|
|
1409
|
+
claimDelay: chunkKW7ZEWYS_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
1410
|
+
refundDelay: chunkKW7ZEWYS_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
1411
|
+
refundNoReceiverDelay: chunkKW7ZEWYS_cjs.timelockToSequence(
|
|
1412
1412
|
params.unilateralRefundWithoutReceiverDelay
|
|
1413
1413
|
).toString()
|
|
1414
1414
|
};
|
|
@@ -1420,9 +1420,9 @@ var VHTLCContractHandler = {
|
|
|
1420
1420
|
server: base.hex.decode(params.server),
|
|
1421
1421
|
preimageHash: base.hex.decode(params.hash),
|
|
1422
1422
|
refundLocktime: BigInt(params.refundLocktime),
|
|
1423
|
-
unilateralClaimDelay:
|
|
1424
|
-
unilateralRefundDelay:
|
|
1425
|
-
unilateralRefundWithoutReceiverDelay:
|
|
1423
|
+
unilateralClaimDelay: chunkKW7ZEWYS_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
1424
|
+
unilateralRefundDelay: chunkKW7ZEWYS_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
1425
|
+
unilateralRefundWithoutReceiverDelay: chunkKW7ZEWYS_cjs.sequenceToTimelock(
|
|
1426
1426
|
Number(params.refundNoReceiverDelay)
|
|
1427
1427
|
)
|
|
1428
1428
|
};
|
|
@@ -1515,9 +1515,9 @@ var VHTLCV2ContractHandler = {
|
|
|
1515
1515
|
server: base.hex.encode(params.server),
|
|
1516
1516
|
hash: base.hex.encode(params.preimageHash),
|
|
1517
1517
|
refundLocktime: params.refundLocktime.toString(),
|
|
1518
|
-
claimDelay:
|
|
1519
|
-
refundDelay:
|
|
1520
|
-
refundNoReceiverDelay:
|
|
1518
|
+
claimDelay: chunkKW7ZEWYS_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
1519
|
+
refundDelay: chunkKW7ZEWYS_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
1520
|
+
refundNoReceiverDelay: chunkKW7ZEWYS_cjs.timelockToSequence(
|
|
1521
1521
|
params.unilateralRefundWithoutReceiverDelay
|
|
1522
1522
|
).toString(),
|
|
1523
1523
|
// Per-leaf on-disk keys predate the grouped param and older rows carry exactly these;
|
|
@@ -1595,9 +1595,9 @@ var VHTLCV2ContractHandler = {
|
|
|
1595
1595
|
preimageHash: base.hex.decode(params.hash),
|
|
1596
1596
|
refundLocktime: BigInt(params.refundLocktime),
|
|
1597
1597
|
...asset && { asset },
|
|
1598
|
-
unilateralClaimDelay:
|
|
1599
|
-
unilateralRefundDelay:
|
|
1600
|
-
unilateralRefundWithoutReceiverDelay:
|
|
1598
|
+
unilateralClaimDelay: chunkKW7ZEWYS_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
1599
|
+
unilateralRefundDelay: chunkKW7ZEWYS_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
1600
|
+
unilateralRefundWithoutReceiverDelay: chunkKW7ZEWYS_cjs.sequenceToTimelock(
|
|
1601
1601
|
Number(params.refundNoReceiverDelay)
|
|
1602
1602
|
),
|
|
1603
1603
|
...claim && refund && {
|
|
@@ -1758,7 +1758,7 @@ function resolveTimelockValue(value, args) {
|
|
|
1758
1758
|
function resolveCsvTimelock(csv, args) {
|
|
1759
1759
|
const value = resolveTimelockValue(csv.value, args);
|
|
1760
1760
|
if (csv.type !== "sequence") return { type: csv.type, value };
|
|
1761
|
-
const timelock =
|
|
1761
|
+
const timelock = chunkKW7ZEWYS_cjs.sequenceToCanonicalTimelock(value);
|
|
1762
1762
|
if (!timelock) {
|
|
1763
1763
|
throw new Error(
|
|
1764
1764
|
`csv '${csv.value}' resolved to ${value}, which is not a canonical BIP68 sequence`
|
|
@@ -1906,27 +1906,27 @@ function encodeTapscriptSegment(seg, pubkeys, args) {
|
|
|
1906
1906
|
if (seg.csv) {
|
|
1907
1907
|
const timelock = resolveCsvTimelock(seg.csv, args);
|
|
1908
1908
|
if (seg.asm) {
|
|
1909
|
-
return
|
|
1909
|
+
return chunkKW7ZEWYS_cjs.ConditionCSVMultisigTapscript.encode({
|
|
1910
1910
|
conditionScript: resolveAsm(seg.asm, args),
|
|
1911
1911
|
timelock,
|
|
1912
1912
|
pubkeys
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
|
-
return
|
|
1915
|
+
return chunkKW7ZEWYS_cjs.CSVMultisigTapscript.encode({ timelock, pubkeys });
|
|
1916
1916
|
}
|
|
1917
1917
|
if (seg.cltv !== void 0) {
|
|
1918
|
-
return
|
|
1918
|
+
return chunkKW7ZEWYS_cjs.CLTVMultisigTapscript.encode({
|
|
1919
1919
|
absoluteTimelock: resolveTimelockValue(seg.cltv, args),
|
|
1920
1920
|
pubkeys
|
|
1921
1921
|
});
|
|
1922
1922
|
}
|
|
1923
1923
|
if (seg.asm) {
|
|
1924
|
-
return
|
|
1924
|
+
return chunkKW7ZEWYS_cjs.ConditionMultisigTapscript.encode({
|
|
1925
1925
|
conditionScript: resolveAsm(seg.asm, args),
|
|
1926
1926
|
pubkeys
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
|
-
return
|
|
1929
|
+
return chunkKW7ZEWYS_cjs.MultisigTapscript.encode({ pubkeys });
|
|
1930
1930
|
}
|
|
1931
1931
|
function compileFunctions(program, args, keys) {
|
|
1932
1932
|
if (program.version !== SUPPORTED_PROGRAM_VERSION) {
|
|
@@ -2005,7 +2005,7 @@ function compileFunctions(program, args, keys) {
|
|
|
2005
2005
|
return { name: names[i], def, leafScript, arkadeScript, signerKeys: pubkeys };
|
|
2006
2006
|
});
|
|
2007
2007
|
}
|
|
2008
|
-
var ArkadeProgramScript = class extends
|
|
2008
|
+
var ArkadeProgramScript = class extends chunkKW7ZEWYS_cjs.VtxoScript {
|
|
2009
2009
|
constructor(program, args, keys) {
|
|
2010
2010
|
const partial = compileFunctions(program, args, keys);
|
|
2011
2011
|
super(partial.map((p) => p.leafScript));
|
|
@@ -2251,7 +2251,7 @@ function pathsFor(script, context, opts) {
|
|
|
2251
2251
|
continue;
|
|
2252
2252
|
}
|
|
2253
2253
|
if (requiresServer) continue;
|
|
2254
|
-
const sequence = csv ? Number(
|
|
2254
|
+
const sequence = csv ? Number(chunkKW7ZEWYS_cjs.timelockToSequence(csv)) : void 0;
|
|
2255
2255
|
if (opts.checkTimelocks && csv && !isCsvSpendable(context, sequence)) continue;
|
|
2256
2256
|
if (opts.checkTimelocks && cltv !== void 0 && !isCltvSatisfied(context, cltv)) {
|
|
2257
2257
|
continue;
|
|
@@ -2383,5 +2383,5 @@ exports.toXOnly = toXOnly;
|
|
|
2383
2383
|
exports.validateParamValue = validateParamValue;
|
|
2384
2384
|
exports.validateProgram = validateProgram;
|
|
2385
2385
|
exports.witnessRefToBytes = witnessRefToBytes;
|
|
2386
|
-
//# sourceMappingURL=chunk-
|
|
2387
|
-
//# sourceMappingURL=chunk-
|
|
2386
|
+
//# sourceMappingURL=chunk-BYPBVHVA.cjs.map
|
|
2387
|
+
//# sourceMappingURL=chunk-BYPBVHVA.cjs.map
|