@arkade-os/sdk 0.4.77 → 0.4.78
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/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-MmJyAnu-.d.cts → asyncStorageTaskQueue-DiXxP-nQ.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-DTl0WM7E.d.ts → asyncStorageTaskQueue-YW2t31_o.d.ts} +2 -2
- package/dist/{chunk-52OA3UIC.js → chunk-7KIGEOYT.js} +8 -4
- package/dist/chunk-7KIGEOYT.js.map +1 -0
- package/dist/{chunk-HKOFYHZP.js → chunk-CTFYT24G.js} +3 -3
- package/dist/{chunk-HKOFYHZP.js.map → chunk-CTFYT24G.js.map} +1 -1
- package/dist/{chunk-4LP6XOMW.cjs → chunk-DFWLP3MD.cjs} +17 -17
- package/dist/{chunk-4LP6XOMW.cjs.map → chunk-DFWLP3MD.cjs.map} +1 -1
- package/dist/{chunk-H62OOAS4.cjs → chunk-IAM5IEVT.cjs} +17 -17
- package/dist/{chunk-H62OOAS4.cjs.map → chunk-IAM5IEVT.cjs.map} +1 -1
- package/dist/{chunk-Y4YK44IM.cjs → chunk-KEEZSFLI.cjs} +10 -10
- package/dist/{chunk-Y4YK44IM.cjs.map → chunk-KEEZSFLI.cjs.map} +1 -1
- package/dist/{chunk-MLOZHTBN.js → chunk-LKAASQTL.js} +87 -40
- package/dist/chunk-LKAASQTL.js.map +1 -0
- package/dist/{chunk-YKNTUOUG.js → chunk-OUHUC26M.js} +4 -4
- package/dist/{chunk-YKNTUOUG.js.map → chunk-OUHUC26M.js.map} +1 -1
- package/dist/{chunk-T6MGH4V4.js → chunk-P766MOPU.js} +4 -4
- package/dist/{chunk-T6MGH4V4.js.map → chunk-P766MOPU.js.map} +1 -1
- package/dist/{chunk-CJN4CUEU.cjs → chunk-PWIESIO6.cjs} +8 -3
- package/dist/chunk-PWIESIO6.cjs.map +1 -0
- package/dist/{chunk-YJEWWLOQ.cjs → chunk-VJ7M6WKB.cjs} +535 -488
- package/dist/chunk-VJ7M6WKB.cjs.map +1 -0
- package/dist/{chunk-LUWSY2QO.cjs → chunk-Y7BVR6SQ.cjs} +49 -49
- package/dist/{chunk-LUWSY2QO.cjs.map → chunk-Y7BVR6SQ.cjs.map} +1 -1
- package/dist/{chunk-ACPANSOX.js → chunk-ZOCJ7E6M.js} +3 -3
- package/dist/{chunk-ACPANSOX.js.map → chunk-ZOCJ7E6M.js.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-QPCGaD_z.d.cts → delegate-DaNNUI_B.d.cts} +1 -1
- package/dist/{delegate-CjcysR7s.d.ts → delegate-b2Wiymoj.d.ts} +1 -1
- package/dist/{hdWalletCapable--pMncWbC.d.ts → hdWalletCapable-B2XVTOvu.d.ts} +2 -2
- package/dist/{hdWalletCapable-Bp_p0WLj.d.cts → hdWalletCapable-D6PqWpuW.d.cts} +2 -2
- package/dist/{index-BMY272ns.d.cts → index-BlB97fYl.d.cts} +2 -2
- package/dist/{index-Ie_ak2zY.d.ts → index-CAS4GyN-.d.cts} +1 -0
- package/dist/{index-Ie_ak2zY.d.cts → index-CAS4GyN-.d.ts} +1 -0
- package/dist/{index-m-EM-e8D.d.ts → index-CYsKAXog.d.ts} +2 -2
- package/dist/index.cjs +304 -304
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +20 -20
- 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 +19 -19
- 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-CqrlrJEt.d.ts → taskRunner-BJj7xe35.d.ts} +2 -2
- package/dist/{taskRunner-BgRowCqB.d.cts → taskRunner-HS2d2oda.d.cts} +2 -2
- 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 +14 -14
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- 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-52OA3UIC.js.map +0 -1
- package/dist/chunk-CJN4CUEU.cjs.map +0 -1
- package/dist/chunk-MLOZHTBN.js.map +0 -1
- package/dist/chunk-YJEWWLOQ.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPWIESIO6_cjs = require('./chunk-PWIESIO6.cjs');
|
|
4
4
|
var chunk5BLDMQED_cjs = require('./chunk-5BLDMQED.cjs');
|
|
5
5
|
var base = require('@scure/base');
|
|
6
6
|
var descriptorsScure = require('@bitcoinerlab/descriptors-scure');
|
|
@@ -76,14 +76,14 @@ var ContractHandlerRegistry = class {
|
|
|
76
76
|
var contractHandlers = new ContractHandlerRegistry();
|
|
77
77
|
exports.DefaultVtxo = void 0;
|
|
78
78
|
((DefaultVtxo2) => {
|
|
79
|
-
class Script3 extends
|
|
79
|
+
class Script3 extends chunkPWIESIO6_cjs.VtxoScript {
|
|
80
80
|
/** Create the default virtual output script with one forfeit path and one exit path. */
|
|
81
81
|
constructor(options) {
|
|
82
82
|
const { pubKey, serverPubKey, csvTimelock } = options;
|
|
83
|
-
const forfeitScript =
|
|
83
|
+
const forfeitScript = chunkPWIESIO6_cjs.MultisigTapscript.encode({
|
|
84
84
|
pubkeys: [pubKey, serverPubKey]
|
|
85
85
|
}).script;
|
|
86
|
-
const exitScript =
|
|
86
|
+
const exitScript = chunkPWIESIO6_cjs.CSVMultisigTapscript.encode({
|
|
87
87
|
timelock: csvTimelock,
|
|
88
88
|
pubkeys: [pubKey]
|
|
89
89
|
}).script;
|
|
@@ -288,7 +288,7 @@ function extractPubKeyBytes(value) {
|
|
|
288
288
|
return base.hex.decode(extractPubKey(normalizeToDescriptor(value)));
|
|
289
289
|
}
|
|
290
290
|
function deserializeCsvTimelock(value) {
|
|
291
|
-
return value !== void 0 && value !== "" ?
|
|
291
|
+
return value !== void 0 && value !== "" ? chunkPWIESIO6_cjs.sequenceToTimelock(Number(value)) : exports.DefaultVtxo.Script.DEFAULT_TIMELOCK;
|
|
292
292
|
}
|
|
293
293
|
var CLTV_HEIGHT_THRESHOLD = 500000000n;
|
|
294
294
|
function isCltvSatisfied(context, locktime) {
|
|
@@ -330,7 +330,7 @@ function assertVhtlcSpendableNow(contract, context) {
|
|
|
330
330
|
function isCsvSpendable(context, sequence) {
|
|
331
331
|
if (sequence === void 0) return true;
|
|
332
332
|
if (!context.vtxo) return false;
|
|
333
|
-
const timelock =
|
|
333
|
+
const timelock = chunkPWIESIO6_cjs.sequenceToTimelock(sequence);
|
|
334
334
|
if (timelock.type === "blocks") {
|
|
335
335
|
if (context.blockHeight === void 0 || context.vtxo.status.block_height === void 0) {
|
|
336
336
|
return false;
|
|
@@ -388,21 +388,21 @@ function forfeitExitSpendablePaths(script, contract, context) {
|
|
|
388
388
|
async function detectUsedScripts(indexerProvider, scriptHexes) {
|
|
389
389
|
const used = /* @__PURE__ */ new Set();
|
|
390
390
|
const unique = [...new Set(scriptHexes)];
|
|
391
|
-
for (let offset = 0; offset < unique.length; offset +=
|
|
392
|
-
const scripts = unique.slice(offset, offset +
|
|
391
|
+
for (let offset = 0; offset < unique.length; offset += chunkPWIESIO6_cjs.SCRIPT_QUERY_CHUNK_SIZE) {
|
|
392
|
+
const scripts = unique.slice(offset, offset + chunkPWIESIO6_cjs.SCRIPT_QUERY_CHUNK_SIZE);
|
|
393
393
|
const remaining = new Set(scripts);
|
|
394
394
|
let pageIndex = 0;
|
|
395
395
|
let hasMore = true;
|
|
396
396
|
while (hasMore && remaining.size > 0) {
|
|
397
|
-
const { vtxos, page } = await
|
|
397
|
+
const { vtxos, page } = await chunkPWIESIO6_cjs.getNormalizedVtxos(indexerProvider, {
|
|
398
398
|
scripts,
|
|
399
399
|
pageIndex,
|
|
400
|
-
pageSize:
|
|
400
|
+
pageSize: chunkPWIESIO6_cjs.DEFAULT_PAGE_SIZE
|
|
401
401
|
});
|
|
402
402
|
for (const vtxo of vtxos) {
|
|
403
403
|
if (remaining.delete(vtxo.script)) used.add(vtxo.script);
|
|
404
404
|
}
|
|
405
|
-
hasMore = page ? vtxos.length ===
|
|
405
|
+
hasMore = page ? vtxos.length === chunkPWIESIO6_cjs.DEFAULT_PAGE_SIZE : false;
|
|
406
406
|
pageIndex++;
|
|
407
407
|
}
|
|
408
408
|
}
|
|
@@ -463,7 +463,7 @@ var DefaultContractHandler = {
|
|
|
463
463
|
return {
|
|
464
464
|
pubKey: base.hex.encode(params.pubKey),
|
|
465
465
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
466
|
-
csvTimelock:
|
|
466
|
+
csvTimelock: chunkPWIESIO6_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
467
467
|
};
|
|
468
468
|
},
|
|
469
469
|
deserializeParams(params) {
|
|
@@ -498,7 +498,7 @@ function defaultCandidatesAt(_index, descriptor, deps) {
|
|
|
498
498
|
params: {
|
|
499
499
|
pubKey: base.hex.encode(c.pubKey),
|
|
500
500
|
serverPubKey: base.hex.encode(c.serverPubKey),
|
|
501
|
-
csvTimelock:
|
|
501
|
+
csvTimelock: chunkPWIESIO6_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
502
502
|
},
|
|
503
503
|
script: c.scriptHex,
|
|
504
504
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -514,12 +514,12 @@ function discoverDefaultRange(entries, deps) {
|
|
|
514
514
|
}
|
|
515
515
|
exports.DelegateVtxo = void 0;
|
|
516
516
|
((DelegateVtxo2) => {
|
|
517
|
-
class Script3 extends
|
|
517
|
+
class Script3 extends chunkPWIESIO6_cjs.VtxoScript {
|
|
518
518
|
/** Create a delegated virtual output script with forfeit, exit, and delegate paths. */
|
|
519
519
|
constructor(options) {
|
|
520
520
|
const defaultVtxo = new exports.DefaultVtxo.Script(options);
|
|
521
521
|
const { delegatePubKey, pubKey, serverPubKey } = options;
|
|
522
|
-
const delegateScript =
|
|
522
|
+
const delegateScript = chunkPWIESIO6_cjs.MultisigTapscript.encode({
|
|
523
523
|
pubkeys: [pubKey, delegatePubKey, serverPubKey]
|
|
524
524
|
}).script;
|
|
525
525
|
super([...defaultVtxo.scripts, delegateScript]);
|
|
@@ -558,7 +558,7 @@ var DelegateContractHandler = {
|
|
|
558
558
|
pubKey: base.hex.encode(params.pubKey),
|
|
559
559
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
560
560
|
delegatePubKey: base.hex.encode(params.delegatePubKey),
|
|
561
|
-
csvTimelock:
|
|
561
|
+
csvTimelock: chunkPWIESIO6_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
562
562
|
};
|
|
563
563
|
},
|
|
564
564
|
deserializeParams(params) {
|
|
@@ -602,7 +602,7 @@ function delegateCandidatesAt(_index, descriptor, deps) {
|
|
|
602
602
|
pubKey: base.hex.encode(c.pubKey),
|
|
603
603
|
serverPubKey: base.hex.encode(c.serverPubKey),
|
|
604
604
|
delegatePubKey: base.hex.encode(delegatePubKey),
|
|
605
|
-
csvTimelock:
|
|
605
|
+
csvTimelock: chunkPWIESIO6_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
606
606
|
},
|
|
607
607
|
script: c.scriptHex,
|
|
608
608
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -1451,7 +1451,7 @@ function computeArkadeScriptPublicKey(pubKey, script) {
|
|
|
1451
1451
|
// src/script/vhtlc.ts
|
|
1452
1452
|
exports.VHTLC = void 0;
|
|
1453
1453
|
((VHTLC2) => {
|
|
1454
|
-
class BaseScript extends
|
|
1454
|
+
class BaseScript extends chunkPWIESIO6_cjs.VtxoScript {
|
|
1455
1455
|
options;
|
|
1456
1456
|
claimScript;
|
|
1457
1457
|
refundScript;
|
|
@@ -1478,27 +1478,27 @@ exports.VHTLC = void 0;
|
|
|
1478
1478
|
unilateralRefundWithoutReceiverDelay
|
|
1479
1479
|
} = options;
|
|
1480
1480
|
const conditionScript = preimageCondition(preimageHash);
|
|
1481
|
-
const claimScript =
|
|
1481
|
+
const claimScript = chunkPWIESIO6_cjs.ConditionMultisigTapscript.encode({
|
|
1482
1482
|
conditionScript,
|
|
1483
1483
|
pubkeys: [receiver, server]
|
|
1484
1484
|
}).script;
|
|
1485
|
-
const refundScript =
|
|
1485
|
+
const refundScript = chunkPWIESIO6_cjs.MultisigTapscript.encode({
|
|
1486
1486
|
pubkeys: [sender, receiver, server]
|
|
1487
1487
|
}).script;
|
|
1488
|
-
const refundWithoutReceiverScript =
|
|
1488
|
+
const refundWithoutReceiverScript = chunkPWIESIO6_cjs.CLTVMultisigTapscript.encode({
|
|
1489
1489
|
absoluteTimelock: refundLocktime,
|
|
1490
1490
|
pubkeys: [sender, server]
|
|
1491
1491
|
}).script;
|
|
1492
|
-
const unilateralClaimScript =
|
|
1492
|
+
const unilateralClaimScript = chunkPWIESIO6_cjs.ConditionCSVMultisigTapscript.encode({
|
|
1493
1493
|
conditionScript,
|
|
1494
1494
|
timelock: unilateralClaimDelay,
|
|
1495
1495
|
pubkeys: [receiver]
|
|
1496
1496
|
}).script;
|
|
1497
|
-
const unilateralRefundScript =
|
|
1497
|
+
const unilateralRefundScript = chunkPWIESIO6_cjs.CSVMultisigTapscript.encode({
|
|
1498
1498
|
timelock: unilateralRefundDelay,
|
|
1499
1499
|
pubkeys: [sender, receiver]
|
|
1500
1500
|
}).script;
|
|
1501
|
-
const unilateralRefundWithoutReceiverScript =
|
|
1501
|
+
const unilateralRefundWithoutReceiverScript = chunkPWIESIO6_cjs.CSVMultisigTapscript.encode({
|
|
1502
1502
|
timelock: unilateralRefundWithoutReceiverDelay,
|
|
1503
1503
|
pubkeys: [sender]
|
|
1504
1504
|
}).script;
|
|
@@ -1518,7 +1518,7 @@ exports.VHTLC = void 0;
|
|
|
1518
1518
|
const covenants = options.nonInteractiveParameters;
|
|
1519
1519
|
if (covenants) {
|
|
1520
1520
|
arkadeScriptNic = enforcePayToMaybeAsset(covenants.receiverPkScript, options.asset);
|
|
1521
|
-
nonInteractiveClaimScript =
|
|
1521
|
+
nonInteractiveClaimScript = chunkPWIESIO6_cjs.ConditionMultisigTapscript.encode({
|
|
1522
1522
|
conditionScript,
|
|
1523
1523
|
pubkeys: [
|
|
1524
1524
|
server,
|
|
@@ -1531,12 +1531,12 @@ exports.VHTLC = void 0;
|
|
|
1531
1531
|
covenants.emulatorPubkey,
|
|
1532
1532
|
arkadeScriptNir
|
|
1533
1533
|
);
|
|
1534
|
-
nonInteractiveRefundScript =
|
|
1534
|
+
nonInteractiveRefundScript = chunkPWIESIO6_cjs.MultisigTapscript.encode({
|
|
1535
1535
|
pubkeys: [server, receiver, nirCosigner]
|
|
1536
1536
|
}).script;
|
|
1537
1537
|
scripts.push(nonInteractiveRefundScript);
|
|
1538
1538
|
if (covenants.legacy !== "preTimelockedRefund") {
|
|
1539
|
-
nonInteractiveRefundWithoutReceiverScript =
|
|
1539
|
+
nonInteractiveRefundWithoutReceiverScript = chunkPWIESIO6_cjs.CLTVMultisigTapscript.encode({
|
|
1540
1540
|
absoluteTimelock: refundLocktime,
|
|
1541
1541
|
pubkeys: [server, nirCosigner]
|
|
1542
1542
|
}).script;
|
|
@@ -1850,9 +1850,9 @@ var VHTLCContractHandler = {
|
|
|
1850
1850
|
server: base.hex.encode(params.server),
|
|
1851
1851
|
hash: base.hex.encode(params.preimageHash),
|
|
1852
1852
|
refundLocktime: params.refundLocktime.toString(),
|
|
1853
|
-
claimDelay:
|
|
1854
|
-
refundDelay:
|
|
1855
|
-
refundNoReceiverDelay:
|
|
1853
|
+
claimDelay: chunkPWIESIO6_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
1854
|
+
refundDelay: chunkPWIESIO6_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
1855
|
+
refundNoReceiverDelay: chunkPWIESIO6_cjs.timelockToSequence(
|
|
1856
1856
|
params.unilateralRefundWithoutReceiverDelay
|
|
1857
1857
|
).toString()
|
|
1858
1858
|
};
|
|
@@ -1864,9 +1864,9 @@ var VHTLCContractHandler = {
|
|
|
1864
1864
|
server: base.hex.decode(params.server),
|
|
1865
1865
|
preimageHash: base.hex.decode(params.hash),
|
|
1866
1866
|
refundLocktime: BigInt(params.refundLocktime),
|
|
1867
|
-
unilateralClaimDelay:
|
|
1868
|
-
unilateralRefundDelay:
|
|
1869
|
-
unilateralRefundWithoutReceiverDelay:
|
|
1867
|
+
unilateralClaimDelay: chunkPWIESIO6_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
1868
|
+
unilateralRefundDelay: chunkPWIESIO6_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
1869
|
+
unilateralRefundWithoutReceiverDelay: chunkPWIESIO6_cjs.sequenceToTimelock(
|
|
1870
1870
|
Number(params.refundNoReceiverDelay)
|
|
1871
1871
|
)
|
|
1872
1872
|
};
|
|
@@ -2112,9 +2112,9 @@ var VHTLCV2ContractHandler = {
|
|
|
2112
2112
|
server: base.hex.encode(params.server),
|
|
2113
2113
|
hash: base.hex.encode(params.preimageHash),
|
|
2114
2114
|
refundLocktime: params.refundLocktime.toString(),
|
|
2115
|
-
claimDelay:
|
|
2116
|
-
refundDelay:
|
|
2117
|
-
refundNoReceiverDelay:
|
|
2115
|
+
claimDelay: chunkPWIESIO6_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
2116
|
+
refundDelay: chunkPWIESIO6_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
2117
|
+
refundNoReceiverDelay: chunkPWIESIO6_cjs.timelockToSequence(
|
|
2118
2118
|
params.unilateralRefundWithoutReceiverDelay
|
|
2119
2119
|
).toString(),
|
|
2120
2120
|
// The on-disk keys keep their per-leaf names even though the typed
|
|
@@ -2214,9 +2214,9 @@ var VHTLCV2ContractHandler = {
|
|
|
2214
2214
|
preimageHash: base.hex.decode(params.hash),
|
|
2215
2215
|
refundLocktime: BigInt(params.refundLocktime),
|
|
2216
2216
|
...asset && { asset },
|
|
2217
|
-
unilateralClaimDelay:
|
|
2218
|
-
unilateralRefundDelay:
|
|
2219
|
-
unilateralRefundWithoutReceiverDelay:
|
|
2217
|
+
unilateralClaimDelay: chunkPWIESIO6_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
2218
|
+
unilateralRefundDelay: chunkPWIESIO6_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
2219
|
+
unilateralRefundWithoutReceiverDelay: chunkPWIESIO6_cjs.sequenceToTimelock(
|
|
2220
2220
|
Number(params.refundNoReceiverDelay)
|
|
2221
2221
|
),
|
|
2222
2222
|
...claim && refund && {
|
|
@@ -2489,7 +2489,7 @@ var BoardingContractHandler = {
|
|
|
2489
2489
|
const coins = await deps.onchainProvider.getCoins(onchainAddress);
|
|
2490
2490
|
if (coins.length === 0) return [];
|
|
2491
2491
|
const scriptHex = base.hex.encode(script.pkScript);
|
|
2492
|
-
const boardingSeq =
|
|
2492
|
+
const boardingSeq = chunkPWIESIO6_cjs.timelockToSequence(deps.boardingTimelock);
|
|
2493
2493
|
return [
|
|
2494
2494
|
{
|
|
2495
2495
|
type: "boarding",
|
|
@@ -2656,27 +2656,27 @@ function encodeTapscriptSegment(seg, pubkeys, args) {
|
|
|
2656
2656
|
if (seg.csv) {
|
|
2657
2657
|
const timelock = { type: seg.csv.type, value: resolveTimelockValue(seg.csv.value, args) };
|
|
2658
2658
|
if (seg.asm) {
|
|
2659
|
-
return
|
|
2659
|
+
return chunkPWIESIO6_cjs.ConditionCSVMultisigTapscript.encode({
|
|
2660
2660
|
conditionScript: resolveAsm(seg.asm, args),
|
|
2661
2661
|
timelock,
|
|
2662
2662
|
pubkeys
|
|
2663
2663
|
});
|
|
2664
2664
|
}
|
|
2665
|
-
return
|
|
2665
|
+
return chunkPWIESIO6_cjs.CSVMultisigTapscript.encode({ timelock, pubkeys });
|
|
2666
2666
|
}
|
|
2667
2667
|
if (seg.cltv !== void 0) {
|
|
2668
|
-
return
|
|
2668
|
+
return chunkPWIESIO6_cjs.CLTVMultisigTapscript.encode({
|
|
2669
2669
|
absoluteTimelock: resolveTimelockValue(seg.cltv, args),
|
|
2670
2670
|
pubkeys
|
|
2671
2671
|
});
|
|
2672
2672
|
}
|
|
2673
2673
|
if (seg.asm) {
|
|
2674
|
-
return
|
|
2674
|
+
return chunkPWIESIO6_cjs.ConditionMultisigTapscript.encode({
|
|
2675
2675
|
conditionScript: resolveAsm(seg.asm, args),
|
|
2676
2676
|
pubkeys
|
|
2677
2677
|
});
|
|
2678
2678
|
}
|
|
2679
|
-
return
|
|
2679
|
+
return chunkPWIESIO6_cjs.MultisigTapscript.encode({ pubkeys });
|
|
2680
2680
|
}
|
|
2681
2681
|
function compileFunctions(program, args, keys) {
|
|
2682
2682
|
if (program.version !== SUPPORTED_PROGRAM_VERSION) {
|
|
@@ -2718,7 +2718,7 @@ function compileFunctions(program, args, keys) {
|
|
|
2718
2718
|
return { name: names[i], def, leafScript, arkadeScript, signerKeys: pubkeys };
|
|
2719
2719
|
});
|
|
2720
2720
|
}
|
|
2721
|
-
var ArkadeProgramScript = class extends
|
|
2721
|
+
var ArkadeProgramScript = class extends chunkPWIESIO6_cjs.VtxoScript {
|
|
2722
2722
|
constructor(program, args, keys) {
|
|
2723
2723
|
const partial = compileFunctions(program, args, keys);
|
|
2724
2724
|
super(partial.map((p) => p.leafScript));
|
|
@@ -2946,7 +2946,7 @@ function pathsFor(script, context, opts) {
|
|
|
2946
2946
|
continue;
|
|
2947
2947
|
}
|
|
2948
2948
|
if (requiresServer) continue;
|
|
2949
|
-
const sequence = csv ? Number(
|
|
2949
|
+
const sequence = csv ? Number(chunkPWIESIO6_cjs.timelockToSequence(csv)) : void 0;
|
|
2950
2950
|
if (opts.checkTimelocks && csv && !isCsvSpendable(context, sequence)) continue;
|
|
2951
2951
|
if (opts.checkTimelocks && cltv !== void 0 && !isCltvSatisfied(context, cltv)) {
|
|
2952
2952
|
continue;
|
|
@@ -3075,5 +3075,5 @@ exports.toASM = toASM;
|
|
|
3075
3075
|
exports.toXOnly = toXOnly;
|
|
3076
3076
|
exports.validateProgram = validateProgram;
|
|
3077
3077
|
exports.witnessRefToBytes = witnessRefToBytes;
|
|
3078
|
-
//# sourceMappingURL=chunk-
|
|
3079
|
-
//# sourceMappingURL=chunk-
|
|
3078
|
+
//# sourceMappingURL=chunk-Y7BVR6SQ.cjs.map
|
|
3079
|
+
//# sourceMappingURL=chunk-Y7BVR6SQ.cjs.map
|