@arkade-os/sdk 0.4.62 → 0.4.64
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 +20 -0
- 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/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-B53mOTCw.d.cts → asyncStorageTaskQueue-Chwe60Ce.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-Df-CTfTE.d.ts → asyncStorageTaskQueue-Dq_UcvDx.d.ts} +1 -1
- package/dist/{chunk-PWWA4DBL.cjs → chunk-35YIP6OA.cjs} +10 -10
- package/dist/{chunk-PWWA4DBL.cjs.map → chunk-35YIP6OA.cjs.map} +1 -1
- package/dist/{chunk-QRSR4HV4.cjs → chunk-4N45WCSJ.cjs} +17 -17
- package/dist/{chunk-QRSR4HV4.cjs.map → chunk-4N45WCSJ.cjs.map} +1 -1
- package/dist/{chunk-OH2XLTXE.cjs → chunk-FZFSGOTZ.cjs} +3 -3
- package/dist/{chunk-OH2XLTXE.cjs.map → chunk-FZFSGOTZ.cjs.map} +1 -1
- package/dist/{chunk-RMBI6P4N.js → chunk-HQ2DDMQN.js} +3 -3
- package/dist/{chunk-RMBI6P4N.js.map → chunk-HQ2DDMQN.js.map} +1 -1
- package/dist/{chunk-L7S5KC5B.js → chunk-LN2VZP63.js} +3 -3
- package/dist/{chunk-L7S5KC5B.js.map → chunk-LN2VZP63.js.map} +1 -1
- package/dist/{chunk-Z2OZMKFV.cjs → chunk-LPEE2H2M.cjs} +405 -400
- package/dist/chunk-LPEE2H2M.cjs.map +1 -0
- package/dist/{chunk-I6EDUE75.cjs → chunk-RXITDAV4.cjs} +17 -17
- package/dist/{chunk-I6EDUE75.cjs.map → chunk-RXITDAV4.cjs.map} +1 -1
- package/dist/{chunk-I7RLG6VX.js → chunk-USXWE2EJ.js} +4 -4
- package/dist/{chunk-I7RLG6VX.js.map → chunk-USXWE2EJ.js.map} +1 -1
- package/dist/{chunk-2IZW6AEK.js → chunk-WJN2BLEI.js} +10 -5
- package/dist/chunk-WJN2BLEI.js.map +1 -0
- package/dist/{chunk-G53HASDV.cjs → chunk-WXCVS6PD.cjs} +48 -48
- package/dist/{chunk-G53HASDV.cjs.map → chunk-WXCVS6PD.cjs.map} +1 -1
- package/dist/{chunk-URT2RVGB.js → chunk-XJCBV4AA.js} +3 -3
- package/dist/{chunk-URT2RVGB.js.map → chunk-XJCBV4AA.js.map} +1 -1
- package/dist/{chunk-H2ZAJOQA.js → chunk-ZUEGFM3T.js} +4 -4
- package/dist/{chunk-H2ZAJOQA.js.map → chunk-ZUEGFM3T.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-CC1gcvuC.d.cts → delegate-BBQW61ym.d.cts} +1 -1
- package/dist/{delegate-BjYJJsml.d.ts → delegate-Dv_9OVHv.d.ts} +1 -1
- package/dist/{index-C888wFEV.d.ts → index-Bxe9kBFs.d.ts} +2 -2
- package/dist/{index-CwBr7qzV.d.ts → index-CFOMyVMt.d.cts} +19 -2
- package/dist/{index-CwBr7qzV.d.cts → index-CFOMyVMt.d.ts} +19 -2
- package/dist/{index-Cz5_WaQP.d.cts → index-aZycGEsQ.d.cts} +2 -2
- package/dist/index.cjs +268 -268
- package/dist/index.d.cts +19 -9
- package/dist/index.d.ts +19 -9
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- 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 +27 -18
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +20 -3
- package/dist/repositories/sqlite/index.d.ts +20 -3
- package/dist/repositories/sqlite/index.js +13 -6
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-DZWUsSzA.d.ts → taskRunner-BDzWbpct.d.ts} +1 -1
- package/dist/{taskRunner-BMUndClz.d.cts → taskRunner-CIKOS2OO.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 +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/{wallet-H3f14est.d.cts → wallet-C2NvHjWB.d.cts} +2 -2
- package/dist/{wallet-Dpjx6CJ7.d.ts → wallet-DJUnN939.d.ts} +2 -2
- 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-2IZW6AEK.js.map +0 -1
- package/dist/chunk-Z2OZMKFV.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFZFSGOTZ_cjs = require('./chunk-FZFSGOTZ.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 chunkFZFSGOTZ_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 = chunkFZFSGOTZ_cjs.MultisigTapscript.encode({
|
|
84
84
|
pubkeys: [pubKey, serverPubKey]
|
|
85
85
|
}).script;
|
|
86
|
-
const exitScript =
|
|
86
|
+
const exitScript = chunkFZFSGOTZ_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 !== "" ? chunkFZFSGOTZ_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 = chunkFZFSGOTZ_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 += chunkFZFSGOTZ_cjs.SCRIPT_QUERY_CHUNK_SIZE) {
|
|
392
|
+
const scripts = unique.slice(offset, offset + chunkFZFSGOTZ_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 chunkFZFSGOTZ_cjs.getNormalizedVtxos(indexerProvider, {
|
|
398
398
|
scripts,
|
|
399
399
|
pageIndex,
|
|
400
|
-
pageSize:
|
|
400
|
+
pageSize: chunkFZFSGOTZ_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 === chunkFZFSGOTZ_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: chunkFZFSGOTZ_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: chunkFZFSGOTZ_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 chunkFZFSGOTZ_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 = chunkFZFSGOTZ_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: chunkFZFSGOTZ_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: chunkFZFSGOTZ_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
606
606
|
},
|
|
607
607
|
script: c.scriptHex,
|
|
608
608
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -1437,7 +1437,7 @@ function computeArkadeScriptPublicKey(pubKey, script) {
|
|
|
1437
1437
|
// src/script/vhtlc.ts
|
|
1438
1438
|
exports.VHTLC = void 0;
|
|
1439
1439
|
((VHTLC2) => {
|
|
1440
|
-
class BaseScript extends
|
|
1440
|
+
class BaseScript extends chunkFZFSGOTZ_cjs.VtxoScript {
|
|
1441
1441
|
options;
|
|
1442
1442
|
claimScript;
|
|
1443
1443
|
refundScript;
|
|
@@ -1462,27 +1462,27 @@ exports.VHTLC = void 0;
|
|
|
1462
1462
|
unilateralRefundWithoutReceiverDelay
|
|
1463
1463
|
} = options;
|
|
1464
1464
|
const conditionScript = preimageCondition(preimageHash);
|
|
1465
|
-
const claimScript =
|
|
1465
|
+
const claimScript = chunkFZFSGOTZ_cjs.ConditionMultisigTapscript.encode({
|
|
1466
1466
|
conditionScript,
|
|
1467
1467
|
pubkeys: [receiver, server]
|
|
1468
1468
|
}).script;
|
|
1469
|
-
const refundScript =
|
|
1469
|
+
const refundScript = chunkFZFSGOTZ_cjs.MultisigTapscript.encode({
|
|
1470
1470
|
pubkeys: [sender, receiver, server]
|
|
1471
1471
|
}).script;
|
|
1472
|
-
const refundWithoutReceiverScript =
|
|
1472
|
+
const refundWithoutReceiverScript = chunkFZFSGOTZ_cjs.CLTVMultisigTapscript.encode({
|
|
1473
1473
|
absoluteTimelock: refundLocktime,
|
|
1474
1474
|
pubkeys: [sender, server]
|
|
1475
1475
|
}).script;
|
|
1476
|
-
const unilateralClaimScript =
|
|
1476
|
+
const unilateralClaimScript = chunkFZFSGOTZ_cjs.ConditionCSVMultisigTapscript.encode({
|
|
1477
1477
|
conditionScript,
|
|
1478
1478
|
timelock: unilateralClaimDelay,
|
|
1479
1479
|
pubkeys: [receiver]
|
|
1480
1480
|
}).script;
|
|
1481
|
-
const unilateralRefundScript =
|
|
1481
|
+
const unilateralRefundScript = chunkFZFSGOTZ_cjs.CSVMultisigTapscript.encode({
|
|
1482
1482
|
timelock: unilateralRefundDelay,
|
|
1483
1483
|
pubkeys: [sender, receiver]
|
|
1484
1484
|
}).script;
|
|
1485
|
-
const unilateralRefundWithoutReceiverScript =
|
|
1485
|
+
const unilateralRefundWithoutReceiverScript = chunkFZFSGOTZ_cjs.CSVMultisigTapscript.encode({
|
|
1486
1486
|
timelock: unilateralRefundWithoutReceiverDelay,
|
|
1487
1487
|
pubkeys: [sender]
|
|
1488
1488
|
}).script;
|
|
@@ -1498,7 +1498,7 @@ exports.VHTLC = void 0;
|
|
|
1498
1498
|
let nonInteractiveClaimScript;
|
|
1499
1499
|
if (options.nonInteractiveClaim) {
|
|
1500
1500
|
arkadeScriptNic = enforcePayTo(options.nonInteractiveClaim.receiverPkScript);
|
|
1501
|
-
nonInteractiveClaimScript =
|
|
1501
|
+
nonInteractiveClaimScript = chunkFZFSGOTZ_cjs.ConditionMultisigTapscript.encode({
|
|
1502
1502
|
conditionScript,
|
|
1503
1503
|
pubkeys: [
|
|
1504
1504
|
server,
|
|
@@ -1514,7 +1514,7 @@ exports.VHTLC = void 0;
|
|
|
1514
1514
|
let nonInteractiveRefundScript;
|
|
1515
1515
|
if (options.nonInteractiveRefund) {
|
|
1516
1516
|
arkadeScriptNir = enforcePayTo(options.nonInteractiveRefund.senderPkScript);
|
|
1517
|
-
nonInteractiveRefundScript =
|
|
1517
|
+
nonInteractiveRefundScript = chunkFZFSGOTZ_cjs.MultisigTapscript.encode({
|
|
1518
1518
|
pubkeys: [
|
|
1519
1519
|
server,
|
|
1520
1520
|
receiver,
|
|
@@ -1717,9 +1717,9 @@ var VHTLCContractHandler = {
|
|
|
1717
1717
|
server: base.hex.encode(params.server),
|
|
1718
1718
|
hash: base.hex.encode(params.preimageHash),
|
|
1719
1719
|
refundLocktime: params.refundLocktime.toString(),
|
|
1720
|
-
claimDelay:
|
|
1721
|
-
refundDelay:
|
|
1722
|
-
refundNoReceiverDelay:
|
|
1720
|
+
claimDelay: chunkFZFSGOTZ_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
1721
|
+
refundDelay: chunkFZFSGOTZ_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
1722
|
+
refundNoReceiverDelay: chunkFZFSGOTZ_cjs.timelockToSequence(
|
|
1723
1723
|
params.unilateralRefundWithoutReceiverDelay
|
|
1724
1724
|
).toString()
|
|
1725
1725
|
};
|
|
@@ -1731,9 +1731,9 @@ var VHTLCContractHandler = {
|
|
|
1731
1731
|
server: base.hex.decode(params.server),
|
|
1732
1732
|
preimageHash: base.hex.decode(params.hash),
|
|
1733
1733
|
refundLocktime: BigInt(params.refundLocktime),
|
|
1734
|
-
unilateralClaimDelay:
|
|
1735
|
-
unilateralRefundDelay:
|
|
1736
|
-
unilateralRefundWithoutReceiverDelay:
|
|
1734
|
+
unilateralClaimDelay: chunkFZFSGOTZ_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
1735
|
+
unilateralRefundDelay: chunkFZFSGOTZ_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
1736
|
+
unilateralRefundWithoutReceiverDelay: chunkFZFSGOTZ_cjs.sequenceToTimelock(
|
|
1737
1737
|
Number(params.refundNoReceiverDelay)
|
|
1738
1738
|
)
|
|
1739
1739
|
};
|
|
@@ -1970,9 +1970,9 @@ var VHTLCV2ContractHandler = {
|
|
|
1970
1970
|
server: base.hex.encode(params.server),
|
|
1971
1971
|
hash: base.hex.encode(params.preimageHash),
|
|
1972
1972
|
refundLocktime: params.refundLocktime.toString(),
|
|
1973
|
-
claimDelay:
|
|
1974
|
-
refundDelay:
|
|
1975
|
-
refundNoReceiverDelay:
|
|
1973
|
+
claimDelay: chunkFZFSGOTZ_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
1974
|
+
refundDelay: chunkFZFSGOTZ_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
1975
|
+
refundNoReceiverDelay: chunkFZFSGOTZ_cjs.timelockToSequence(
|
|
1976
1976
|
params.unilateralRefundWithoutReceiverDelay
|
|
1977
1977
|
).toString(),
|
|
1978
1978
|
// Spread rather than written as `undefined`: a `Record<string,
|
|
@@ -2015,9 +2015,9 @@ var VHTLCV2ContractHandler = {
|
|
|
2015
2015
|
server: base.hex.decode(params.server),
|
|
2016
2016
|
preimageHash: base.hex.decode(params.hash),
|
|
2017
2017
|
refundLocktime: BigInt(params.refundLocktime),
|
|
2018
|
-
unilateralClaimDelay:
|
|
2019
|
-
unilateralRefundDelay:
|
|
2020
|
-
unilateralRefundWithoutReceiverDelay:
|
|
2018
|
+
unilateralClaimDelay: chunkFZFSGOTZ_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
2019
|
+
unilateralRefundDelay: chunkFZFSGOTZ_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
2020
|
+
unilateralRefundWithoutReceiverDelay: chunkFZFSGOTZ_cjs.sequenceToTimelock(
|
|
2021
2021
|
Number(params.refundNoReceiverDelay)
|
|
2022
2022
|
),
|
|
2023
2023
|
...claim && {
|
|
@@ -2290,7 +2290,7 @@ var BoardingContractHandler = {
|
|
|
2290
2290
|
const coins = await deps.onchainProvider.getCoins(onchainAddress);
|
|
2291
2291
|
if (coins.length === 0) return [];
|
|
2292
2292
|
const scriptHex = base.hex.encode(script.pkScript);
|
|
2293
|
-
const boardingSeq =
|
|
2293
|
+
const boardingSeq = chunkFZFSGOTZ_cjs.timelockToSequence(deps.boardingTimelock);
|
|
2294
2294
|
return [
|
|
2295
2295
|
{
|
|
2296
2296
|
type: "boarding",
|
|
@@ -2451,27 +2451,27 @@ function encodeTapscriptSegment(seg, pubkeys, args) {
|
|
|
2451
2451
|
if (seg.csv) {
|
|
2452
2452
|
const timelock = { type: seg.csv.type, value: resolveTimelockValue(seg.csv.value, args) };
|
|
2453
2453
|
if (seg.asm) {
|
|
2454
|
-
return
|
|
2454
|
+
return chunkFZFSGOTZ_cjs.ConditionCSVMultisigTapscript.encode({
|
|
2455
2455
|
conditionScript: resolveAsm(seg.asm, args),
|
|
2456
2456
|
timelock,
|
|
2457
2457
|
pubkeys
|
|
2458
2458
|
});
|
|
2459
2459
|
}
|
|
2460
|
-
return
|
|
2460
|
+
return chunkFZFSGOTZ_cjs.CSVMultisigTapscript.encode({ timelock, pubkeys });
|
|
2461
2461
|
}
|
|
2462
2462
|
if (seg.cltv !== void 0) {
|
|
2463
|
-
return
|
|
2463
|
+
return chunkFZFSGOTZ_cjs.CLTVMultisigTapscript.encode({
|
|
2464
2464
|
absoluteTimelock: resolveTimelockValue(seg.cltv, args),
|
|
2465
2465
|
pubkeys
|
|
2466
2466
|
});
|
|
2467
2467
|
}
|
|
2468
2468
|
if (seg.asm) {
|
|
2469
|
-
return
|
|
2469
|
+
return chunkFZFSGOTZ_cjs.ConditionMultisigTapscript.encode({
|
|
2470
2470
|
conditionScript: resolveAsm(seg.asm, args),
|
|
2471
2471
|
pubkeys
|
|
2472
2472
|
});
|
|
2473
2473
|
}
|
|
2474
|
-
return
|
|
2474
|
+
return chunkFZFSGOTZ_cjs.MultisigTapscript.encode({ pubkeys });
|
|
2475
2475
|
}
|
|
2476
2476
|
function compileFunctions(program, args, keys) {
|
|
2477
2477
|
if (program.version !== SUPPORTED_PROGRAM_VERSION) {
|
|
@@ -2501,7 +2501,7 @@ function compileFunctions(program, args, keys) {
|
|
|
2501
2501
|
return { name: names[i], def, leafScript, arkadeScript, signerKeys: pubkeys };
|
|
2502
2502
|
});
|
|
2503
2503
|
}
|
|
2504
|
-
var ArkadeProgramScript = class extends
|
|
2504
|
+
var ArkadeProgramScript = class extends chunkFZFSGOTZ_cjs.VtxoScript {
|
|
2505
2505
|
constructor(program, args, keys) {
|
|
2506
2506
|
const partial = compileFunctions(program, args, keys);
|
|
2507
2507
|
super(partial.map((p) => p.leafScript));
|
|
@@ -2714,7 +2714,7 @@ function pathsFor(script, context, opts) {
|
|
|
2714
2714
|
continue;
|
|
2715
2715
|
}
|
|
2716
2716
|
if (requiresServer) continue;
|
|
2717
|
-
const sequence = csv ? Number(
|
|
2717
|
+
const sequence = csv ? Number(chunkFZFSGOTZ_cjs.timelockToSequence(csv)) : void 0;
|
|
2718
2718
|
if (opts.checkTimelocks && csv && !isCsvSpendable(context, sequence)) continue;
|
|
2719
2719
|
if (opts.checkTimelocks && cltv !== void 0 && !isCltvSatisfied(context, cltv)) {
|
|
2720
2720
|
continue;
|
|
@@ -2842,5 +2842,5 @@ exports.stringifyArtifact = stringifyArtifact;
|
|
|
2842
2842
|
exports.toASM = toASM;
|
|
2843
2843
|
exports.validateProgram = validateProgram;
|
|
2844
2844
|
exports.witnessRefToBytes = witnessRefToBytes;
|
|
2845
|
-
//# sourceMappingURL=chunk-
|
|
2846
|
-
//# sourceMappingURL=chunk-
|
|
2845
|
+
//# sourceMappingURL=chunk-WXCVS6PD.cjs.map
|
|
2846
|
+
//# sourceMappingURL=chunk-WXCVS6PD.cjs.map
|