@arkade-os/sdk 0.4.58 → 0.4.59
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/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{ark-ClaVUg4e.d.cts → ark-C9DsPSm8.d.cts} +72 -3
- package/dist/{ark-ClaVUg4e.d.ts → ark-C9DsPSm8.d.ts} +72 -3
- package/dist/{asyncStorageTaskQueue-Bgau-mvD.d.ts → asyncStorageTaskQueue-BwuWQ1Qc.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-CnYrhpS-.d.cts → asyncStorageTaskQueue-CYHXFfvn.d.cts} +1 -1
- package/dist/{chunk-COLJARV4.cjs → chunk-2XO43UHI.cjs} +40 -40
- package/dist/{chunk-COLJARV4.cjs.map → chunk-2XO43UHI.cjs.map} +1 -1
- package/dist/{chunk-I4YEGI2R.cjs → chunk-7FA36NOA.cjs} +17 -17
- package/dist/{chunk-I4YEGI2R.cjs.map → chunk-7FA36NOA.cjs.map} +1 -1
- package/dist/{chunk-D6RGHPZ5.cjs → chunk-DSTYXT2D.cjs} +45 -10
- package/dist/chunk-DSTYXT2D.cjs.map +1 -0
- package/dist/{chunk-6PY4WYXI.cjs → chunk-DYNB6POO.cjs} +419 -390
- package/dist/chunk-DYNB6POO.cjs.map +1 -0
- package/dist/{chunk-VROHHJL4.js → chunk-FIMOVH25.js} +41 -11
- package/dist/chunk-FIMOVH25.js.map +1 -0
- package/dist/{chunk-SGWMB4W2.js → chunk-H342JPPZ.js} +4 -4
- package/dist/{chunk-SGWMB4W2.js.map → chunk-H342JPPZ.js.map} +1 -1
- package/dist/{chunk-SYZEQF5D.cjs → chunk-IPFGYVF3.cjs} +9 -9
- package/dist/{chunk-SYZEQF5D.cjs.map → chunk-IPFGYVF3.cjs.map} +1 -1
- package/dist/{chunk-S3BFUTC5.js → chunk-OVSNY3HC.js} +44 -17
- package/dist/chunk-OVSNY3HC.js.map +1 -0
- package/dist/{chunk-IPPASJE5.js → chunk-PN5RD7ZI.js} +3 -3
- package/dist/{chunk-IPPASJE5.js.map → chunk-PN5RD7ZI.js.map} +1 -1
- package/dist/{chunk-F4C67JYB.cjs → chunk-V2KENVN6.cjs} +15 -15
- package/dist/{chunk-F4C67JYB.cjs.map → chunk-V2KENVN6.cjs.map} +1 -1
- package/dist/{chunk-AGWZXGG2.js → chunk-VSHY5TBY.js} +4 -4
- package/dist/{chunk-AGWZXGG2.js.map → chunk-VSHY5TBY.js.map} +1 -1
- package/dist/{chunk-TV2RLVOB.js → chunk-YEHGCHIL.js} +3 -3
- package/dist/{chunk-TV2RLVOB.js.map → chunk-YEHGCHIL.js.map} +1 -1
- package/dist/contracts/handlers/index.cjs +8 -8
- 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-YDYq1El_.d.ts → delegate-B_oKWm1k.d.ts} +1 -1
- package/dist/{delegate-CVrkEepn.d.cts → delegate-D0eGaz3J.d.cts} +1 -1
- package/dist/{index-BmqkJBAf.d.cts → index-BG2AL2Ie.d.cts} +2 -2
- package/dist/{index-CuSHBkq7.d.ts → index-BmK6tEqf.d.ts} +2 -2
- package/dist/index.cjs +251 -223
- package/dist/index.d.cts +33 -11
- package/dist/index.d.ts +33 -11
- 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 +18 -18
- 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-CFkGkD85.d.cts → taskRunner-CBvKIttE.d.cts} +1 -1
- package/dist/{taskRunner-CFN61bBM.d.ts → taskRunner-Cy4Gh8n7.d.ts} +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-DnK09TtT.d.ts → wallet-DlXemAzP.d.cts} +24 -3
- package/dist/{wallet-hQp2qC_M.d.cts → wallet-EyVDhqzP.d.ts} +24 -3
- 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 +6 -1
- package/dist/chunk-6PY4WYXI.cjs.map +0 -1
- package/dist/chunk-D6RGHPZ5.cjs.map +0 -1
- package/dist/chunk-S3BFUTC5.js.map +0 -1
- package/dist/chunk-VROHHJL4.js.map +0 -1
package/dist/adapters/expo.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunk7FA36NOA_cjs = require('../chunk-7FA36NOA.cjs');
|
|
4
|
+
require('../chunk-V2KENVN6.cjs');
|
|
5
|
+
require('../chunk-DSTYXT2D.cjs');
|
|
6
6
|
require('../chunk-5BLDMQED.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ExpoArkProvider", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk7FA36NOA_cjs.ExpoArkProvider; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "ExpoIndexerProvider", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk7FA36NOA_cjs.ExpoIndexerProvider; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=expo.cjs.map
|
|
19
19
|
//# sourceMappingURL=expo.cjs.map
|
package/dist/adapters/expo.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-
|
|
2
|
-
export { n as ArkProvider, o as IndexerProvider } from '../ark-
|
|
1
|
+
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-C9DsPSm8.cjs';
|
|
2
|
+
export { n as ArkProvider, o as IndexerProvider } from '../ark-C9DsPSm8.cjs';
|
|
3
3
|
import '@scure/btc-signer/transaction.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
package/dist/adapters/expo.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-
|
|
2
|
-
export { n as ArkProvider, o as IndexerProvider } from '../ark-
|
|
1
|
+
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-C9DsPSm8.js';
|
|
2
|
+
export { n as ArkProvider, o as IndexerProvider } from '../ark-C9DsPSm8.js';
|
|
3
3
|
import '@scure/btc-signer/transaction.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
package/dist/adapters/expo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-VSHY5TBY.js';
|
|
2
|
+
import '../chunk-YEHGCHIL.js';
|
|
3
|
+
import '../chunk-FIMOVH25.js';
|
|
4
4
|
import '../chunk-NSBPE2FW.js';
|
|
5
5
|
//# sourceMappingURL=expo.js.map
|
|
6
6
|
//# sourceMappingURL=expo.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkDYNB6POO_cjs = require('../chunk-DYNB6POO.cjs');
|
|
4
|
+
require('../chunk-V2KENVN6.cjs');
|
|
5
|
+
require('../chunk-2XO43UHI.cjs');
|
|
6
|
+
require('../chunk-DSTYXT2D.cjs');
|
|
7
7
|
require('../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
9
9
|
// src/storage/indexedDB.ts
|
|
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
|
|
|
11
11
|
dbName;
|
|
12
12
|
version;
|
|
13
13
|
db = null;
|
|
14
|
-
constructor(dbName, version =
|
|
14
|
+
constructor(dbName, version = chunkDYNB6POO_cjs.DB_VERSION) {
|
|
15
15
|
this.dbName = dbName;
|
|
16
16
|
this.version = version;
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DB_VERSION } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
import { DB_VERSION } from '../chunk-OVSNY3HC.js';
|
|
2
|
+
import '../chunk-YEHGCHIL.js';
|
|
3
|
+
import '../chunk-PN5RD7ZI.js';
|
|
4
|
+
import '../chunk-FIMOVH25.js';
|
|
5
5
|
import '../chunk-NSBPE2FW.js';
|
|
6
6
|
|
|
7
7
|
// src/storage/indexedDB.ts
|
|
@@ -532,6 +532,17 @@ interface Network {
|
|
|
532
532
|
pubKeyHash: number;
|
|
533
533
|
scriptHash: number;
|
|
534
534
|
wif: number;
|
|
535
|
+
/**
|
|
536
|
+
* Canonical name this network was resolved from, when known.
|
|
537
|
+
*
|
|
538
|
+
* `bech32` cannot separate the tb-family — testnet, signet and mutinynet
|
|
539
|
+
* share every field above — so anything that has to tell them apart (a
|
|
540
|
+
* per-network timelock floor, for one) has no other handle. Optional
|
|
541
|
+
* because a hand-built `Network` carries no name: consumers must read a
|
|
542
|
+
* missing one as "unknown" and fall back to their strictest branch rather
|
|
543
|
+
* than guess at one.
|
|
544
|
+
*/
|
|
545
|
+
name?: NetworkName;
|
|
535
546
|
}
|
|
536
547
|
declare const getNetwork: (network: NetworkName) => Network;
|
|
537
548
|
declare const networks: {
|
|
@@ -541,6 +552,62 @@ declare const networks: {
|
|
|
541
552
|
mutinynet: Network;
|
|
542
553
|
regtest: Network;
|
|
543
554
|
};
|
|
555
|
+
/** Covenant co-signer ("emulator") for the mainnet Arkade deployment. */
|
|
556
|
+
declare const BITCOIN_EMULATOR_PUBKEY: "0239c196415da47b26456a101daaa12ba9e445bfe153197f1e2b750bf40e52092e";
|
|
557
|
+
/** Covenant co-signer ("emulator") for the hosted mutinynet Arkade deployment. */
|
|
558
|
+
declare const MUTINYNET_EMULATOR_PUBKEY: "03f823b9b2febc81f4af967e77aed2f541cbd3397c6d8f5a72e32eb7b471af889a";
|
|
559
|
+
/** Covenant co-signer ("emulator") shipped with the `arkade-regtest` stack. */
|
|
560
|
+
declare const REGTEST_EMULATOR_PUBKEY: "02999413c46fa10ada5cbc4bcc79a1d09160c2ba3cfc812705d7a13e5e545fb2a9";
|
|
561
|
+
/**
|
|
562
|
+
* The pinned co-signer key for `network`, as 33-byte compressed lowercase hex.
|
|
563
|
+
*
|
|
564
|
+
* @throws if the network carries no name, or names one with no deployed
|
|
565
|
+
* emulator. Fail closed on both counts: the return value ends up in a
|
|
566
|
+
* covenant leaf that decides who can move the funds, so there is no
|
|
567
|
+
* defensible fallback. Guessing a neighbour's key (the tb-family share every
|
|
568
|
+
* other field on {@link Network}) would build a leaf co-signed by a service
|
|
569
|
+
* that will never sign for it — funds locked to a key nobody holds — and
|
|
570
|
+
* returning an empty string just moves the same failure somewhere harder to
|
|
571
|
+
* read. A hand-assembled `Network` carries no `name` and lands here too,
|
|
572
|
+
* matching how the per-network timelock floors treat an unnamed network.
|
|
573
|
+
*
|
|
574
|
+
* Deliberately NOT falling back to whatever key the emulator reports about
|
|
575
|
+
* itself: that is the self-report this pin exists to stop trusting, and doing
|
|
576
|
+
* it only on unpinned networks would make the guarantee depend on
|
|
577
|
+
* `network.name` with no signal to the caller that it had lapsed. The
|
|
578
|
+
* unnamed case is the sharp one — a hand-built `Network` can carry
|
|
579
|
+
* bitcoin-equivalent parameters, so a silent fallback would drop to
|
|
580
|
+
* "trust the endpoint" on exactly the input that looks most like mainnet.
|
|
581
|
+
* Callers who mean it pass {@link resolveEmulatorPubkey}'s override, which
|
|
582
|
+
* the thrown message names.
|
|
583
|
+
*/
|
|
584
|
+
declare function defaultEmulatorPubkey(network: Network): string;
|
|
585
|
+
/**
|
|
586
|
+
* Resolve the co-signer key for `network`, letting a caller substitute its own.
|
|
587
|
+
*
|
|
588
|
+
* The override is the escape hatch for three situations, and the first is the
|
|
589
|
+
* one that matters operationally:
|
|
590
|
+
*
|
|
591
|
+
* 1. **A network rotated its emulator key and this SDK has not shipped the new
|
|
592
|
+
* constant yet.** Since `Arkade.connect` no longer asks the service which
|
|
593
|
+
* key it signs with, a rotation is invisible here until the constant is
|
|
594
|
+
* updated — covenants keep building against the retired key and fail only
|
|
595
|
+
* when a claim is attempted. Passing the new key restores service without
|
|
596
|
+
* waiting for a release, so a rotation is a config change rather than an
|
|
597
|
+
* outage.
|
|
598
|
+
* 2. A private or self-hosted emulator, including on a network with no pinned
|
|
599
|
+
* key at all (signet, testnet, a hand-built `Network`).
|
|
600
|
+
* 3. Tests and local stacks.
|
|
601
|
+
*
|
|
602
|
+
* Supplying it means co-signing with a different service: every covenant built
|
|
603
|
+
* from the returned key can be completed by whoever holds it and by no one
|
|
604
|
+
* else, so it is a statement that you trust that operator in place of the
|
|
605
|
+
* network's. Prefer {@link defaultEmulatorPubkey} unless that is deliberate.
|
|
606
|
+
*
|
|
607
|
+
* A malformed override throws rather than being passed through — a typo here
|
|
608
|
+
* would otherwise surface as an unspendable contract long after the fact.
|
|
609
|
+
*/
|
|
610
|
+
declare function resolveEmulatorPubkey(network: Network, override?: string): string;
|
|
544
611
|
|
|
545
612
|
/**
|
|
546
613
|
* The default base URLs for esplora API providers.
|
|
@@ -3675,8 +3742,10 @@ interface BaseWalletConfig {
|
|
|
3675
3742
|
/**
|
|
3676
3743
|
* Minimum accepted checkpoint exit delay decoded from `ArkInfo.checkpointTapscript`,
|
|
3677
3744
|
* as wall-clock seconds. Defaults per network — see
|
|
3678
|
-
* `defaultCheckpointExitDelayPolicy
|
|
3679
|
-
*
|
|
3745
|
+
* `defaultCheckpointExitDelayPolicy`, which already carries the value the
|
|
3746
|
+
* hosted signet and mutinynet Arkade Services advertise, so neither needs
|
|
3747
|
+
* this set. Lowering it below the default relaxes a fund-safety bound;
|
|
3748
|
+
* intended for local testing.
|
|
3680
3749
|
*/
|
|
3681
3750
|
minCheckpointExitDelaySeconds?: bigint;
|
|
3682
3751
|
/**
|
|
@@ -5234,4 +5303,4 @@ declare namespace ProtoTypes {
|
|
|
5234
5303
|
export { };
|
|
5235
5304
|
}
|
|
5236
5305
|
|
|
5237
|
-
export { type TreeSignatureEvent as $, type ArkTransaction as A, type VirtualTxRepository as B, type ContractRepository as C, type VirtualTx as D, type ExtendedCoin as E, type VtxoBranch as F, type GetVtxosFilter as G, ChainedTxType as H, type IWallet as I, type Network as J, CSVMultisigTapscript as K, type SignerSet as L, type BatchStartedEvent as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type TreeSigningStartedEvent as P, TxTree as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type TreeNoncesEvent as U, VtxoScript as V, type WalletRepository as W, type BatchFinalizationEvent as X, type BatchFinalizedEvent as Y, type BatchFailedEvent as Z, type TreeTxEvent as _, type Identity as a, type
|
|
5306
|
+
export { type TreeSignatureEvent as $, type ArkTransaction as A, type VirtualTxRepository as B, type ContractRepository as C, type VirtualTx as D, type ExtendedCoin as E, type VtxoBranch as F, type GetVtxosFilter as G, ChainedTxType as H, type IWallet as I, type Network as J, CSVMultisigTapscript as K, type SignerSet as L, type BatchStartedEvent as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type TreeSigningStartedEvent as P, TxTree as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type TreeNoncesEvent as U, VtxoScript as V, type WalletRepository as W, type BatchFinalizationEvent as X, type BatchFinalizedEvent as Y, type BatchFailedEvent as Z, type TreeTxEvent as _, type Identity as a, type BatchInfo as a$, type DescriptorProvider as a0, type IReadonlyWallet as a1, type ReadonlyIdentity as a2, type OnchainProvider as a3, type DelegateProvider as a4, type ReadonlyWalletConfig as a5, type ExitCaptureMode as a6, type ExitDataSource as a7, type IReadonlyAssetManager as a8, type ContractSyncState as a9, type IssuanceParams as aA, type ReissuanceParams as aB, type BurnParams as aC, type RenewVtxosOptions as aD, type ContractWithVtxos as aE, type PathSelection as aF, type ContractEvent as aG, type AssetDetails as aH, type IssuanceResult as aI, type DelegateInfo as aJ, type MigrationGlobalSkipReason as aK, type MigrationLegSkipReason as aL, type SignerStatus as aM, type StorageConfig as aN, type IVtxoManager as aO, type ExplorerTransaction as aP, type EncodedVtxoScript as aQ, type Status as aR, type ChainTx as aS, type PathContext as aT, type ActivityIntent as aU, type ActivityResolver as aV, type ArkIntentState as aW, type ArkTapscript as aX, type AssetMetadata as aY, BITCOIN_EMULATOR_PUBKEY as aZ, type BaseWalletConfig as a_, type NetworkName as aa, type ArkInfo as ab, ArkAddress as ac, type Coin as ad, ContractManager as ae, type ContractManagerConfig as af, type SettlementConfig as ag, VtxoManager as ah, type SignerSession as ai, type SignedIntent as aj, Intent as ak, type TimeHeight as al, type DescriptorSigningRequest as am, Transaction as an, type IntentFeeConfig as ao, type OffchainInput as ap, FeeAmount as aq, type OnchainInput as ar, type FeeOutput as as, type ContractWatcherConfig as at, type Asset as au, type FeeInfo as av, type CreateContractParams as aw, type GetContractsFilter as ax, type GetSpendablePathsOptions as ay, type GetAllSpendingPathsOptions as az, type WalletConfig as b, type TxTag as b$, type BatchSignableIdentity as b0, CLTVMultisigTapscript as b1, type CandidateDeps as b2, ChainTxType as b3, type CommitmentTx as b4, ConditionCSVMultisigTapscript as b5, ConditionMultisigTapscript as b6, type ContractBalance as b7, type ContractEventCallback as b8, type ContractHandler as b9, type MigrationVtxoRef as bA, MultisigTapscript as bB, type Nonces as bC, type Output as bD, type PageResponse as bE, type PaginationOptions as bF, PartialSig as bG, type ProviderClass as bH, REGTEST_EMULATOR_PUBKEY as bI, RestDelegateProvider as bJ, RestDelegatorProvider as bK, type ScanContractsOptions as bL, type ScanResult as bM, type ScheduledSession as bN, SettlementEventType as bO, type SignRequest as bP, type SignerClassification as bQ, type SubscriptionEvent as bR, type SubscriptionHeartbeat as bS, type TapLeaves as bT, TapTreeCoder as bU, TapscriptType as bV, type TreeNonces as bW, type TreePartialSigs as bX, type Tx as bY, type TxHistoryRecord as bZ, type TxKey as b_, type ContractState as ba, type ContractVtxo as bb, ContractWatcher as bc, DelegateManagerImpl as bd, type DelegateOptions as be, DelegatorManagerImpl as bf, type DelegatorProvider as bg, type DeprecatedSignerMigrationReport as bh, type DeprecatedSignerReport as bi, DigestMismatchError as bj, type Discoverable as bk, type DiscoveredContract as bl, type DiscoveryDeps as bm, ESPLORA_URL as bn, EsploraProvider as bo, type ExitChainResolver as bp, type ExtendedContractVtxo as bq, type GroupMembership as br, type HandlerError as bs, type IDelegatorManager as bt, INTENT_TERMINAL_STATES as bu, IndexerTxType as bv, type KnownMetadata as bw, MUTINYNET_EMULATOR_PUBKEY as bx, type MigrateDeprecatedSignerOptions as by, type MigrationLegReport as bz, type WalletBalance as c, type TxTreeNode as c0, TxType as c1, type VirtualStatus as c2, type Vtxo as c3, type VtxoChain as c4, type VtxoType as c5, type WalletMode as c6, assetMintResolver as c7, boardingResolver as c8, canRecoverOnchain as c9, signerSetFromInfo as cA, toXOnlySignerHex as cB, type TapscriptDeriving as cC, canSpendOffchain as ca, classifyAgainstSignerSet as cb, classifyContractSigner as cc, collabExitResolver as cd, createDefaultActivityRegistry as ce, createExitChainResolver as cf, decodeTapscript as cg, defaultEmulatorPubkey as ch, getNetwork as ci, getSequence as cj, hasCandidates as ck, hasTerminalSpend as cl, isBatchSignable as cm, isCooperativelyMigratable as cn, isDiscoverable as co, isExpired as cp, isPastExpiry as cq, isRecoverable as cr, isSpendable as cs, isSubdust as ct, isTerminalIntentState as cu, isVirtualCoin as cv, isVtxoExpiringSoon as cw, networks as cx, resolveEmulatorPubkey as cy, scriptFromTapLeafScript as cz, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type VtxoRepositoryKey as u, type WalletState as v, type ContractFilter as w, type IntentRepository as x, type ArkIntent as y, type IntentFilter as z };
|
|
@@ -532,6 +532,17 @@ interface Network {
|
|
|
532
532
|
pubKeyHash: number;
|
|
533
533
|
scriptHash: number;
|
|
534
534
|
wif: number;
|
|
535
|
+
/**
|
|
536
|
+
* Canonical name this network was resolved from, when known.
|
|
537
|
+
*
|
|
538
|
+
* `bech32` cannot separate the tb-family — testnet, signet and mutinynet
|
|
539
|
+
* share every field above — so anything that has to tell them apart (a
|
|
540
|
+
* per-network timelock floor, for one) has no other handle. Optional
|
|
541
|
+
* because a hand-built `Network` carries no name: consumers must read a
|
|
542
|
+
* missing one as "unknown" and fall back to their strictest branch rather
|
|
543
|
+
* than guess at one.
|
|
544
|
+
*/
|
|
545
|
+
name?: NetworkName;
|
|
535
546
|
}
|
|
536
547
|
declare const getNetwork: (network: NetworkName) => Network;
|
|
537
548
|
declare const networks: {
|
|
@@ -541,6 +552,62 @@ declare const networks: {
|
|
|
541
552
|
mutinynet: Network;
|
|
542
553
|
regtest: Network;
|
|
543
554
|
};
|
|
555
|
+
/** Covenant co-signer ("emulator") for the mainnet Arkade deployment. */
|
|
556
|
+
declare const BITCOIN_EMULATOR_PUBKEY: "0239c196415da47b26456a101daaa12ba9e445bfe153197f1e2b750bf40e52092e";
|
|
557
|
+
/** Covenant co-signer ("emulator") for the hosted mutinynet Arkade deployment. */
|
|
558
|
+
declare const MUTINYNET_EMULATOR_PUBKEY: "03f823b9b2febc81f4af967e77aed2f541cbd3397c6d8f5a72e32eb7b471af889a";
|
|
559
|
+
/** Covenant co-signer ("emulator") shipped with the `arkade-regtest` stack. */
|
|
560
|
+
declare const REGTEST_EMULATOR_PUBKEY: "02999413c46fa10ada5cbc4bcc79a1d09160c2ba3cfc812705d7a13e5e545fb2a9";
|
|
561
|
+
/**
|
|
562
|
+
* The pinned co-signer key for `network`, as 33-byte compressed lowercase hex.
|
|
563
|
+
*
|
|
564
|
+
* @throws if the network carries no name, or names one with no deployed
|
|
565
|
+
* emulator. Fail closed on both counts: the return value ends up in a
|
|
566
|
+
* covenant leaf that decides who can move the funds, so there is no
|
|
567
|
+
* defensible fallback. Guessing a neighbour's key (the tb-family share every
|
|
568
|
+
* other field on {@link Network}) would build a leaf co-signed by a service
|
|
569
|
+
* that will never sign for it — funds locked to a key nobody holds — and
|
|
570
|
+
* returning an empty string just moves the same failure somewhere harder to
|
|
571
|
+
* read. A hand-assembled `Network` carries no `name` and lands here too,
|
|
572
|
+
* matching how the per-network timelock floors treat an unnamed network.
|
|
573
|
+
*
|
|
574
|
+
* Deliberately NOT falling back to whatever key the emulator reports about
|
|
575
|
+
* itself: that is the self-report this pin exists to stop trusting, and doing
|
|
576
|
+
* it only on unpinned networks would make the guarantee depend on
|
|
577
|
+
* `network.name` with no signal to the caller that it had lapsed. The
|
|
578
|
+
* unnamed case is the sharp one — a hand-built `Network` can carry
|
|
579
|
+
* bitcoin-equivalent parameters, so a silent fallback would drop to
|
|
580
|
+
* "trust the endpoint" on exactly the input that looks most like mainnet.
|
|
581
|
+
* Callers who mean it pass {@link resolveEmulatorPubkey}'s override, which
|
|
582
|
+
* the thrown message names.
|
|
583
|
+
*/
|
|
584
|
+
declare function defaultEmulatorPubkey(network: Network): string;
|
|
585
|
+
/**
|
|
586
|
+
* Resolve the co-signer key for `network`, letting a caller substitute its own.
|
|
587
|
+
*
|
|
588
|
+
* The override is the escape hatch for three situations, and the first is the
|
|
589
|
+
* one that matters operationally:
|
|
590
|
+
*
|
|
591
|
+
* 1. **A network rotated its emulator key and this SDK has not shipped the new
|
|
592
|
+
* constant yet.** Since `Arkade.connect` no longer asks the service which
|
|
593
|
+
* key it signs with, a rotation is invisible here until the constant is
|
|
594
|
+
* updated — covenants keep building against the retired key and fail only
|
|
595
|
+
* when a claim is attempted. Passing the new key restores service without
|
|
596
|
+
* waiting for a release, so a rotation is a config change rather than an
|
|
597
|
+
* outage.
|
|
598
|
+
* 2. A private or self-hosted emulator, including on a network with no pinned
|
|
599
|
+
* key at all (signet, testnet, a hand-built `Network`).
|
|
600
|
+
* 3. Tests and local stacks.
|
|
601
|
+
*
|
|
602
|
+
* Supplying it means co-signing with a different service: every covenant built
|
|
603
|
+
* from the returned key can be completed by whoever holds it and by no one
|
|
604
|
+
* else, so it is a statement that you trust that operator in place of the
|
|
605
|
+
* network's. Prefer {@link defaultEmulatorPubkey} unless that is deliberate.
|
|
606
|
+
*
|
|
607
|
+
* A malformed override throws rather than being passed through — a typo here
|
|
608
|
+
* would otherwise surface as an unspendable contract long after the fact.
|
|
609
|
+
*/
|
|
610
|
+
declare function resolveEmulatorPubkey(network: Network, override?: string): string;
|
|
544
611
|
|
|
545
612
|
/**
|
|
546
613
|
* The default base URLs for esplora API providers.
|
|
@@ -3675,8 +3742,10 @@ interface BaseWalletConfig {
|
|
|
3675
3742
|
/**
|
|
3676
3743
|
* Minimum accepted checkpoint exit delay decoded from `ArkInfo.checkpointTapscript`,
|
|
3677
3744
|
* as wall-clock seconds. Defaults per network — see
|
|
3678
|
-
* `defaultCheckpointExitDelayPolicy
|
|
3679
|
-
*
|
|
3745
|
+
* `defaultCheckpointExitDelayPolicy`, which already carries the value the
|
|
3746
|
+
* hosted signet and mutinynet Arkade Services advertise, so neither needs
|
|
3747
|
+
* this set. Lowering it below the default relaxes a fund-safety bound;
|
|
3748
|
+
* intended for local testing.
|
|
3680
3749
|
*/
|
|
3681
3750
|
minCheckpointExitDelaySeconds?: bigint;
|
|
3682
3751
|
/**
|
|
@@ -5234,4 +5303,4 @@ declare namespace ProtoTypes {
|
|
|
5234
5303
|
export { };
|
|
5235
5304
|
}
|
|
5236
5305
|
|
|
5237
|
-
export { type TreeSignatureEvent as $, type ArkTransaction as A, type VirtualTxRepository as B, type ContractRepository as C, type VirtualTx as D, type ExtendedCoin as E, type VtxoBranch as F, type GetVtxosFilter as G, ChainedTxType as H, type IWallet as I, type Network as J, CSVMultisigTapscript as K, type SignerSet as L, type BatchStartedEvent as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type TreeSigningStartedEvent as P, TxTree as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type TreeNoncesEvent as U, VtxoScript as V, type WalletRepository as W, type BatchFinalizationEvent as X, type BatchFinalizedEvent as Y, type BatchFailedEvent as Z, type TreeTxEvent as _, type Identity as a, type
|
|
5306
|
+
export { type TreeSignatureEvent as $, type ArkTransaction as A, type VirtualTxRepository as B, type ContractRepository as C, type VirtualTx as D, type ExtendedCoin as E, type VtxoBranch as F, type GetVtxosFilter as G, ChainedTxType as H, type IWallet as I, type Network as J, CSVMultisigTapscript as K, type SignerSet as L, type BatchStartedEvent as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type TreeSigningStartedEvent as P, TxTree as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type TreeNoncesEvent as U, VtxoScript as V, type WalletRepository as W, type BatchFinalizationEvent as X, type BatchFinalizedEvent as Y, type BatchFailedEvent as Z, type TreeTxEvent as _, type Identity as a, type BatchInfo as a$, type DescriptorProvider as a0, type IReadonlyWallet as a1, type ReadonlyIdentity as a2, type OnchainProvider as a3, type DelegateProvider as a4, type ReadonlyWalletConfig as a5, type ExitCaptureMode as a6, type ExitDataSource as a7, type IReadonlyAssetManager as a8, type ContractSyncState as a9, type IssuanceParams as aA, type ReissuanceParams as aB, type BurnParams as aC, type RenewVtxosOptions as aD, type ContractWithVtxos as aE, type PathSelection as aF, type ContractEvent as aG, type AssetDetails as aH, type IssuanceResult as aI, type DelegateInfo as aJ, type MigrationGlobalSkipReason as aK, type MigrationLegSkipReason as aL, type SignerStatus as aM, type StorageConfig as aN, type IVtxoManager as aO, type ExplorerTransaction as aP, type EncodedVtxoScript as aQ, type Status as aR, type ChainTx as aS, type PathContext as aT, type ActivityIntent as aU, type ActivityResolver as aV, type ArkIntentState as aW, type ArkTapscript as aX, type AssetMetadata as aY, BITCOIN_EMULATOR_PUBKEY as aZ, type BaseWalletConfig as a_, type NetworkName as aa, type ArkInfo as ab, ArkAddress as ac, type Coin as ad, ContractManager as ae, type ContractManagerConfig as af, type SettlementConfig as ag, VtxoManager as ah, type SignerSession as ai, type SignedIntent as aj, Intent as ak, type TimeHeight as al, type DescriptorSigningRequest as am, Transaction as an, type IntentFeeConfig as ao, type OffchainInput as ap, FeeAmount as aq, type OnchainInput as ar, type FeeOutput as as, type ContractWatcherConfig as at, type Asset as au, type FeeInfo as av, type CreateContractParams as aw, type GetContractsFilter as ax, type GetSpendablePathsOptions as ay, type GetAllSpendingPathsOptions as az, type WalletConfig as b, type TxTag as b$, type BatchSignableIdentity as b0, CLTVMultisigTapscript as b1, type CandidateDeps as b2, ChainTxType as b3, type CommitmentTx as b4, ConditionCSVMultisigTapscript as b5, ConditionMultisigTapscript as b6, type ContractBalance as b7, type ContractEventCallback as b8, type ContractHandler as b9, type MigrationVtxoRef as bA, MultisigTapscript as bB, type Nonces as bC, type Output as bD, type PageResponse as bE, type PaginationOptions as bF, PartialSig as bG, type ProviderClass as bH, REGTEST_EMULATOR_PUBKEY as bI, RestDelegateProvider as bJ, RestDelegatorProvider as bK, type ScanContractsOptions as bL, type ScanResult as bM, type ScheduledSession as bN, SettlementEventType as bO, type SignRequest as bP, type SignerClassification as bQ, type SubscriptionEvent as bR, type SubscriptionHeartbeat as bS, type TapLeaves as bT, TapTreeCoder as bU, TapscriptType as bV, type TreeNonces as bW, type TreePartialSigs as bX, type Tx as bY, type TxHistoryRecord as bZ, type TxKey as b_, type ContractState as ba, type ContractVtxo as bb, ContractWatcher as bc, DelegateManagerImpl as bd, type DelegateOptions as be, DelegatorManagerImpl as bf, type DelegatorProvider as bg, type DeprecatedSignerMigrationReport as bh, type DeprecatedSignerReport as bi, DigestMismatchError as bj, type Discoverable as bk, type DiscoveredContract as bl, type DiscoveryDeps as bm, ESPLORA_URL as bn, EsploraProvider as bo, type ExitChainResolver as bp, type ExtendedContractVtxo as bq, type GroupMembership as br, type HandlerError as bs, type IDelegatorManager as bt, INTENT_TERMINAL_STATES as bu, IndexerTxType as bv, type KnownMetadata as bw, MUTINYNET_EMULATOR_PUBKEY as bx, type MigrateDeprecatedSignerOptions as by, type MigrationLegReport as bz, type WalletBalance as c, type TxTreeNode as c0, TxType as c1, type VirtualStatus as c2, type Vtxo as c3, type VtxoChain as c4, type VtxoType as c5, type WalletMode as c6, assetMintResolver as c7, boardingResolver as c8, canRecoverOnchain as c9, signerSetFromInfo as cA, toXOnlySignerHex as cB, type TapscriptDeriving as cC, canSpendOffchain as ca, classifyAgainstSignerSet as cb, classifyContractSigner as cc, collabExitResolver as cd, createDefaultActivityRegistry as ce, createExitChainResolver as cf, decodeTapscript as cg, defaultEmulatorPubkey as ch, getNetwork as ci, getSequence as cj, hasCandidates as ck, hasTerminalSpend as cl, isBatchSignable as cm, isCooperativelyMigratable as cn, isDiscoverable as co, isExpired as cp, isPastExpiry as cq, isRecoverable as cr, isSpendable as cs, isSubdust as ct, isTerminalIntentState as cu, isVirtualCoin as cv, isVtxoExpiringSoon as cw, networks as cx, resolveEmulatorPubkey as cy, scriptFromTapLeafScript as cz, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type VtxoRepositoryKey as u, type WalletState as v, type ContractFilter as w, type IntentRepository as x, type ArkIntent as y, type IntentFilter as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDSTYXT2D_cjs = require('./chunk-DSTYXT2D.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 chunkDSTYXT2D_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 = chunkDSTYXT2D_cjs.MultisigTapscript.encode({
|
|
84
84
|
pubkeys: [pubKey, serverPubKey]
|
|
85
85
|
}).script;
|
|
86
|
-
const exitScript =
|
|
86
|
+
const exitScript = chunkDSTYXT2D_cjs.CSVMultisigTapscript.encode({
|
|
87
87
|
timelock: csvTimelock,
|
|
88
88
|
pubkeys: [pubKey]
|
|
89
89
|
}).script;
|
|
@@ -263,7 +263,7 @@ function extractPubKeyBytes(value) {
|
|
|
263
263
|
return base.hex.decode(extractPubKey(normalizeToDescriptor(value)));
|
|
264
264
|
}
|
|
265
265
|
function deserializeCsvTimelock(value) {
|
|
266
|
-
return value !== void 0 && value !== "" ?
|
|
266
|
+
return value !== void 0 && value !== "" ? chunkDSTYXT2D_cjs.sequenceToTimelock(Number(value)) : exports.DefaultVtxo.Script.DEFAULT_TIMELOCK;
|
|
267
267
|
}
|
|
268
268
|
var CLTV_HEIGHT_THRESHOLD = 500000000n;
|
|
269
269
|
function isCltvSatisfied(context, locktime) {
|
|
@@ -277,7 +277,7 @@ function isCltvSatisfied(context, locktime) {
|
|
|
277
277
|
function isCsvSpendable(context, sequence) {
|
|
278
278
|
if (sequence === void 0) return true;
|
|
279
279
|
if (!context.vtxo) return false;
|
|
280
|
-
const timelock =
|
|
280
|
+
const timelock = chunkDSTYXT2D_cjs.sequenceToTimelock(sequence);
|
|
281
281
|
if (timelock.type === "blocks") {
|
|
282
282
|
if (context.blockHeight === void 0 || context.vtxo.status.block_height === void 0) {
|
|
283
283
|
return false;
|
|
@@ -335,21 +335,21 @@ function forfeitExitSpendablePaths(script, contract, context) {
|
|
|
335
335
|
async function detectUsedScripts(indexerProvider, scriptHexes) {
|
|
336
336
|
const used = /* @__PURE__ */ new Set();
|
|
337
337
|
const unique = [...new Set(scriptHexes)];
|
|
338
|
-
for (let offset = 0; offset < unique.length; offset +=
|
|
339
|
-
const scripts = unique.slice(offset, offset +
|
|
338
|
+
for (let offset = 0; offset < unique.length; offset += chunkDSTYXT2D_cjs.SCRIPT_QUERY_CHUNK_SIZE) {
|
|
339
|
+
const scripts = unique.slice(offset, offset + chunkDSTYXT2D_cjs.SCRIPT_QUERY_CHUNK_SIZE);
|
|
340
340
|
const remaining = new Set(scripts);
|
|
341
341
|
let pageIndex = 0;
|
|
342
342
|
let hasMore = true;
|
|
343
343
|
while (hasMore && remaining.size > 0) {
|
|
344
|
-
const { vtxos, page } = await
|
|
344
|
+
const { vtxos, page } = await chunkDSTYXT2D_cjs.getNormalizedVtxos(indexerProvider, {
|
|
345
345
|
scripts,
|
|
346
346
|
pageIndex,
|
|
347
|
-
pageSize:
|
|
347
|
+
pageSize: chunkDSTYXT2D_cjs.DEFAULT_PAGE_SIZE
|
|
348
348
|
});
|
|
349
349
|
for (const vtxo of vtxos) {
|
|
350
350
|
if (remaining.delete(vtxo.script)) used.add(vtxo.script);
|
|
351
351
|
}
|
|
352
|
-
hasMore = page ? vtxos.length ===
|
|
352
|
+
hasMore = page ? vtxos.length === chunkDSTYXT2D_cjs.DEFAULT_PAGE_SIZE : false;
|
|
353
353
|
pageIndex++;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
@@ -410,7 +410,7 @@ var DefaultContractHandler = {
|
|
|
410
410
|
return {
|
|
411
411
|
pubKey: base.hex.encode(params.pubKey),
|
|
412
412
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
413
|
-
csvTimelock:
|
|
413
|
+
csvTimelock: chunkDSTYXT2D_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
414
414
|
};
|
|
415
415
|
},
|
|
416
416
|
deserializeParams(params) {
|
|
@@ -443,7 +443,7 @@ function defaultCandidatesAt(_index, descriptor, deps) {
|
|
|
443
443
|
params: {
|
|
444
444
|
pubKey: base.hex.encode(c.pubKey),
|
|
445
445
|
serverPubKey: base.hex.encode(c.serverPubKey),
|
|
446
|
-
csvTimelock:
|
|
446
|
+
csvTimelock: chunkDSTYXT2D_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
447
447
|
},
|
|
448
448
|
script: c.scriptHex,
|
|
449
449
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -459,12 +459,12 @@ function discoverDefaultRange(entries, deps) {
|
|
|
459
459
|
}
|
|
460
460
|
exports.DelegateVtxo = void 0;
|
|
461
461
|
((DelegateVtxo2) => {
|
|
462
|
-
class Script3 extends
|
|
462
|
+
class Script3 extends chunkDSTYXT2D_cjs.VtxoScript {
|
|
463
463
|
/** Create a delegated virtual output script with forfeit, exit, and delegate paths. */
|
|
464
464
|
constructor(options) {
|
|
465
465
|
const defaultVtxo = new exports.DefaultVtxo.Script(options);
|
|
466
466
|
const { delegatePubKey, pubKey, serverPubKey } = options;
|
|
467
|
-
const delegateScript =
|
|
467
|
+
const delegateScript = chunkDSTYXT2D_cjs.MultisigTapscript.encode({
|
|
468
468
|
pubkeys: [pubKey, delegatePubKey, serverPubKey]
|
|
469
469
|
}).script;
|
|
470
470
|
super([...defaultVtxo.scripts, delegateScript]);
|
|
@@ -503,7 +503,7 @@ var DelegateContractHandler = {
|
|
|
503
503
|
pubKey: base.hex.encode(params.pubKey),
|
|
504
504
|
serverPubKey: base.hex.encode(params.serverPubKey),
|
|
505
505
|
delegatePubKey: base.hex.encode(params.delegatePubKey),
|
|
506
|
-
csvTimelock:
|
|
506
|
+
csvTimelock: chunkDSTYXT2D_cjs.timelockToSequence(params.csvTimelock).toString()
|
|
507
507
|
};
|
|
508
508
|
},
|
|
509
509
|
deserializeParams(params) {
|
|
@@ -545,7 +545,7 @@ function delegateCandidatesAt(_index, descriptor, deps) {
|
|
|
545
545
|
pubKey: base.hex.encode(c.pubKey),
|
|
546
546
|
serverPubKey: base.hex.encode(c.serverPubKey),
|
|
547
547
|
delegatePubKey: base.hex.encode(delegatePubKey),
|
|
548
|
-
csvTimelock:
|
|
548
|
+
csvTimelock: chunkDSTYXT2D_cjs.timelockToSequence(c.csvTimelock).toString()
|
|
549
549
|
},
|
|
550
550
|
script: c.scriptHex,
|
|
551
551
|
address: c.script.address(deps.network.hrp, c.serverPubKey).encode()
|
|
@@ -564,7 +564,7 @@ function discoverDelegateRange(entries, deps) {
|
|
|
564
564
|
}
|
|
565
565
|
exports.VHTLC = void 0;
|
|
566
566
|
((VHTLC2) => {
|
|
567
|
-
class Script3 extends
|
|
567
|
+
class Script3 extends chunkDSTYXT2D_cjs.VtxoScript {
|
|
568
568
|
/** Create a VHTLC script from the supplied participant keys, hash, and timelocks. */
|
|
569
569
|
constructor(options) {
|
|
570
570
|
validateOptions(options);
|
|
@@ -579,27 +579,27 @@ exports.VHTLC = void 0;
|
|
|
579
579
|
unilateralRefundWithoutReceiverDelay
|
|
580
580
|
} = options;
|
|
581
581
|
const conditionScript = preimageConditionScript(preimageHash);
|
|
582
|
-
const claimScript =
|
|
582
|
+
const claimScript = chunkDSTYXT2D_cjs.ConditionMultisigTapscript.encode({
|
|
583
583
|
conditionScript,
|
|
584
584
|
pubkeys: [receiver, server]
|
|
585
585
|
}).script;
|
|
586
|
-
const refundScript =
|
|
586
|
+
const refundScript = chunkDSTYXT2D_cjs.MultisigTapscript.encode({
|
|
587
587
|
pubkeys: [sender, receiver, server]
|
|
588
588
|
}).script;
|
|
589
|
-
const refundWithoutReceiverScript =
|
|
589
|
+
const refundWithoutReceiverScript = chunkDSTYXT2D_cjs.CLTVMultisigTapscript.encode({
|
|
590
590
|
absoluteTimelock: refundLocktime,
|
|
591
591
|
pubkeys: [sender, server]
|
|
592
592
|
}).script;
|
|
593
|
-
const unilateralClaimScript =
|
|
593
|
+
const unilateralClaimScript = chunkDSTYXT2D_cjs.ConditionCSVMultisigTapscript.encode({
|
|
594
594
|
conditionScript,
|
|
595
595
|
timelock: unilateralClaimDelay,
|
|
596
596
|
pubkeys: [receiver]
|
|
597
597
|
}).script;
|
|
598
|
-
const unilateralRefundScript =
|
|
598
|
+
const unilateralRefundScript = chunkDSTYXT2D_cjs.CSVMultisigTapscript.encode({
|
|
599
599
|
timelock: unilateralRefundDelay,
|
|
600
600
|
pubkeys: [sender, receiver]
|
|
601
601
|
}).script;
|
|
602
|
-
const unilateralRefundWithoutReceiverScript =
|
|
602
|
+
const unilateralRefundWithoutReceiverScript = chunkDSTYXT2D_cjs.CSVMultisigTapscript.encode({
|
|
603
603
|
timelock: unilateralRefundWithoutReceiverDelay,
|
|
604
604
|
pubkeys: [sender]
|
|
605
605
|
}).script;
|
|
@@ -727,9 +727,9 @@ var VHTLCContractHandler = {
|
|
|
727
727
|
server: base.hex.encode(params.server),
|
|
728
728
|
hash: base.hex.encode(params.preimageHash),
|
|
729
729
|
refundLocktime: params.refundLocktime.toString(),
|
|
730
|
-
claimDelay:
|
|
731
|
-
refundDelay:
|
|
732
|
-
refundNoReceiverDelay:
|
|
730
|
+
claimDelay: chunkDSTYXT2D_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
|
|
731
|
+
refundDelay: chunkDSTYXT2D_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
|
|
732
|
+
refundNoReceiverDelay: chunkDSTYXT2D_cjs.timelockToSequence(
|
|
733
733
|
params.unilateralRefundWithoutReceiverDelay
|
|
734
734
|
).toString()
|
|
735
735
|
};
|
|
@@ -741,9 +741,9 @@ var VHTLCContractHandler = {
|
|
|
741
741
|
server: base.hex.decode(params.server),
|
|
742
742
|
preimageHash: base.hex.decode(params.hash),
|
|
743
743
|
refundLocktime: BigInt(params.refundLocktime),
|
|
744
|
-
unilateralClaimDelay:
|
|
745
|
-
unilateralRefundDelay:
|
|
746
|
-
unilateralRefundWithoutReceiverDelay:
|
|
744
|
+
unilateralClaimDelay: chunkDSTYXT2D_cjs.sequenceToTimelock(Number(params.claimDelay)),
|
|
745
|
+
unilateralRefundDelay: chunkDSTYXT2D_cjs.sequenceToTimelock(Number(params.refundDelay)),
|
|
746
|
+
unilateralRefundWithoutReceiverDelay: chunkDSTYXT2D_cjs.sequenceToTimelock(
|
|
747
747
|
Number(params.refundNoReceiverDelay)
|
|
748
748
|
)
|
|
749
749
|
};
|
|
@@ -936,7 +936,7 @@ var BoardingContractHandler = {
|
|
|
936
936
|
const coins = await deps.onchainProvider.getCoins(onchainAddress);
|
|
937
937
|
if (coins.length === 0) return [];
|
|
938
938
|
const scriptHex = base.hex.encode(script.pkScript);
|
|
939
|
-
const boardingSeq =
|
|
939
|
+
const boardingSeq = chunkDSTYXT2D_cjs.timelockToSequence(deps.boardingTimelock);
|
|
940
940
|
return [
|
|
941
941
|
{
|
|
942
942
|
type: "boarding",
|
|
@@ -1917,27 +1917,27 @@ function encodeTapscriptSegment(seg, pubkeys, args) {
|
|
|
1917
1917
|
if (seg.csv) {
|
|
1918
1918
|
const timelock = { type: seg.csv.type, value: resolveTimelockValue(seg.csv.value, args) };
|
|
1919
1919
|
if (seg.asm) {
|
|
1920
|
-
return
|
|
1920
|
+
return chunkDSTYXT2D_cjs.ConditionCSVMultisigTapscript.encode({
|
|
1921
1921
|
conditionScript: resolveAsm(seg.asm, args),
|
|
1922
1922
|
timelock,
|
|
1923
1923
|
pubkeys
|
|
1924
1924
|
});
|
|
1925
1925
|
}
|
|
1926
|
-
return
|
|
1926
|
+
return chunkDSTYXT2D_cjs.CSVMultisigTapscript.encode({ timelock, pubkeys });
|
|
1927
1927
|
}
|
|
1928
1928
|
if (seg.cltv !== void 0) {
|
|
1929
|
-
return
|
|
1929
|
+
return chunkDSTYXT2D_cjs.CLTVMultisigTapscript.encode({
|
|
1930
1930
|
absoluteTimelock: resolveTimelockValue(seg.cltv, args),
|
|
1931
1931
|
pubkeys
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
1934
|
if (seg.asm) {
|
|
1935
|
-
return
|
|
1935
|
+
return chunkDSTYXT2D_cjs.ConditionMultisigTapscript.encode({
|
|
1936
1936
|
conditionScript: resolveAsm(seg.asm, args),
|
|
1937
1937
|
pubkeys
|
|
1938
1938
|
});
|
|
1939
1939
|
}
|
|
1940
|
-
return
|
|
1940
|
+
return chunkDSTYXT2D_cjs.MultisigTapscript.encode({ pubkeys });
|
|
1941
1941
|
}
|
|
1942
1942
|
function compileFunctions(program, args, keys) {
|
|
1943
1943
|
if (program.version !== SUPPORTED_PROGRAM_VERSION) {
|
|
@@ -1967,7 +1967,7 @@ function compileFunctions(program, args, keys) {
|
|
|
1967
1967
|
return { name: names[i], def, leafScript, arkadeScript, signerKeys: pubkeys };
|
|
1968
1968
|
});
|
|
1969
1969
|
}
|
|
1970
|
-
var ArkadeProgramScript = class extends
|
|
1970
|
+
var ArkadeProgramScript = class extends chunkDSTYXT2D_cjs.VtxoScript {
|
|
1971
1971
|
constructor(program, args, keys) {
|
|
1972
1972
|
const partial = compileFunctions(program, args, keys);
|
|
1973
1973
|
super(partial.map((p) => p.leafScript));
|
|
@@ -2180,7 +2180,7 @@ function pathsFor(script, context, opts) {
|
|
|
2180
2180
|
continue;
|
|
2181
2181
|
}
|
|
2182
2182
|
if (requiresServer) continue;
|
|
2183
|
-
const sequence = csv ? Number(
|
|
2183
|
+
const sequence = csv ? Number(chunkDSTYXT2D_cjs.timelockToSequence(csv)) : void 0;
|
|
2184
2184
|
if (opts.checkTimelocks && csv && !isCsvSpendable(context, sequence)) continue;
|
|
2185
2185
|
if (opts.checkTimelocks && cltv !== void 0 && !isCltvSatisfied(context, cltv)) {
|
|
2186
2186
|
continue;
|
|
@@ -2291,5 +2291,5 @@ exports.stringifyArtifact = stringifyArtifact;
|
|
|
2291
2291
|
exports.toASM = toASM;
|
|
2292
2292
|
exports.validateProgram = validateProgram;
|
|
2293
2293
|
exports.witnessRefToBytes = witnessRefToBytes;
|
|
2294
|
-
//# sourceMappingURL=chunk-
|
|
2295
|
-
//# sourceMappingURL=chunk-
|
|
2294
|
+
//# sourceMappingURL=chunk-2XO43UHI.cjs.map
|
|
2295
|
+
//# sourceMappingURL=chunk-2XO43UHI.cjs.map
|