@arkade-os/sdk 0.4.57 → 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-CJgH_pmn.d.cts → ark-C9DsPSm8.d.cts} +83 -3
- package/dist/{ark-CJgH_pmn.d.ts → ark-C9DsPSm8.d.ts} +83 -3
- package/dist/{asyncStorageTaskQueue-BeeZbf-Q.d.ts → asyncStorageTaskQueue-BwuWQ1Qc.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-BlrsUUX_.d.cts → asyncStorageTaskQueue-CYHXFfvn.d.cts} +1 -1
- package/dist/{chunk-OWTKOMJZ.cjs → chunk-2XO43UHI.cjs} +40 -40
- package/dist/{chunk-OWTKOMJZ.cjs.map → chunk-2XO43UHI.cjs.map} +1 -1
- package/dist/{chunk-EZBKSWEL.cjs → chunk-7FA36NOA.cjs} +17 -17
- package/dist/{chunk-EZBKSWEL.cjs.map → chunk-7FA36NOA.cjs.map} +1 -1
- package/dist/{chunk-KUN5ZRMW.cjs → chunk-DSTYXT2D.cjs} +45 -10
- package/dist/chunk-DSTYXT2D.cjs.map +1 -0
- package/dist/{chunk-KEG4AAKX.cjs → chunk-DYNB6POO.cjs} +524 -404
- package/dist/chunk-DYNB6POO.cjs.map +1 -0
- package/dist/{chunk-PUNBWFIV.js → chunk-FIMOVH25.js} +41 -11
- package/dist/chunk-FIMOVH25.js.map +1 -0
- package/dist/{chunk-C4SVRVNM.js → chunk-H342JPPZ.js} +4 -4
- package/dist/{chunk-C4SVRVNM.js.map → chunk-H342JPPZ.js.map} +1 -1
- package/dist/{chunk-A7TOVUYG.cjs → chunk-IPFGYVF3.cjs} +9 -9
- package/dist/{chunk-A7TOVUYG.cjs.map → chunk-IPFGYVF3.cjs.map} +1 -1
- package/dist/{chunk-NIZPFPUM.js → chunk-OVSNY3HC.js} +151 -33
- package/dist/chunk-OVSNY3HC.js.map +1 -0
- package/dist/{chunk-P6L2W5IL.js → chunk-PN5RD7ZI.js} +3 -3
- package/dist/{chunk-P6L2W5IL.js.map → chunk-PN5RD7ZI.js.map} +1 -1
- package/dist/{chunk-YK6NP5KX.cjs → chunk-V2KENVN6.cjs} +15 -15
- package/dist/{chunk-YK6NP5KX.cjs.map → chunk-V2KENVN6.cjs.map} +1 -1
- package/dist/{chunk-CPS7V4A3.js → chunk-VSHY5TBY.js} +4 -4
- package/dist/{chunk-CPS7V4A3.js.map → chunk-VSHY5TBY.js.map} +1 -1
- package/dist/{chunk-ASUJNZ63.js → chunk-YEHGCHIL.js} +3 -3
- package/dist/{chunk-ASUJNZ63.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-DM3YECSY.d.ts → delegate-B_oKWm1k.d.ts} +1 -1
- package/dist/{delegate-Dk-OJVdf.d.cts → delegate-D0eGaz3J.d.cts} +1 -1
- package/dist/{index-Cig0RkTf.d.cts → index-BG2AL2Ie.d.cts} +2 -2
- package/dist/{index-CnE7Gnvb.d.ts → index-BmK6tEqf.d.ts} +2 -2
- package/dist/index.cjs +251 -223
- package/dist/index.d.cts +48 -9
- package/dist/index.d.ts +48 -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 +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-CnGSTaAJ.d.cts → taskRunner-CBvKIttE.d.cts} +1 -1
- package/dist/{taskRunner-F7tWzsrC.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-DvRIQBBY.d.cts → wallet-DlXemAzP.d.cts} +24 -3
- package/dist/{wallet-D6_S0n6B.d.ts → 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 +7 -2
- package/dist/chunk-KEG4AAKX.cjs.map +0 -1
- package/dist/chunk-KUN5ZRMW.cjs.map +0 -1
- package/dist/chunk-NIZPFPUM.js.map +0 -1
- package/dist/chunk-PUNBWFIV.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a2 as ReadonlyIdentity, a as Identity, am as DescriptorSigningRequest, an as Transaction, ai as SignerSession, a0 as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, ao as IntentFeeConfig, ap as OffchainInput, aq as FeeAmount, ar as OnchainInput, as as FeeOutput, n as ArkProvider, ag as SettlementConfig, at as ContractWatcherConfig, au as Asset, R as Recipient, I as IWallet, av as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aw as CreateContractParams, ax as GetContractsFilter, r as VirtualCoin, ay as GetSpendablePathsOptions, az as GetAllSpendingPathsOptions, aA as IssuanceParams, aB as ReissuanceParams, aC as BurnParams, aD as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, aE as ContractWithVtxos, aF as PathSelection, aG as ContractEvent, aH as AssetDetails, aI as IssuanceResult, aJ as DelegateInfo, aK as MigrationGlobalSkipReason, aL as MigrationLegSkipReason, aM as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aN as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aO as IVtxoManager, a3 as OnchainProvider, J as Network, aa as NetworkName, ad as Coin, aP as ExplorerTransaction, q as TapLeafScript, aQ as EncodedVtxoScript, K as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aR as Status, ac as ArkAddress, ak as Intent, aS as ChainTx, o as IndexerProvider, Q as TxTree, aT as PathContext } from './ark-
|
|
2
|
-
export { aU as ActivityIntent, aV as ActivityResolver, ab as ArkInfo, aW as ArkIntentState, aX as ArkTapscript, aY as AssetMetadata, aZ as BaseWalletConfig, Z as BatchFailedEvent, X as BatchFinalizationEvent, Y as BatchFinalizedEvent,
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as BatchExpiryPolicy, d as Batch } from './wallet-
|
|
4
|
-
export { A as ArkError, e as ArkErrorName, f as ArkadeCashClaimResult, g as ArkadeCashCreateError, h as ArkadeCashUnclaimedReason, i as ArkadeCashUnclaimedVtxo, j as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, k as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, H as HDWalletCapable, I as IncomingFunds, l as ProviderKind, m as ProviderUnavailableError, n as REGTEST_MIN_BATCH_EXPIRY_SECONDS, o as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-
|
|
6
|
-
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a2 as ReadonlyIdentity, a as Identity, am as DescriptorSigningRequest, an as Transaction, ai as SignerSession, a0 as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, ao as IntentFeeConfig, ap as OffchainInput, aq as FeeAmount, ar as OnchainInput, as as FeeOutput, n as ArkProvider, ag as SettlementConfig, at as ContractWatcherConfig, au as Asset, R as Recipient, I as IWallet, av as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aw as CreateContractParams, ax as GetContractsFilter, r as VirtualCoin, ay as GetSpendablePathsOptions, az as GetAllSpendingPathsOptions, aA as IssuanceParams, aB as ReissuanceParams, aC as BurnParams, aD as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, aE as ContractWithVtxos, aF as PathSelection, aG as ContractEvent, aH as AssetDetails, aI as IssuanceResult, aJ as DelegateInfo, aK as MigrationGlobalSkipReason, aL as MigrationLegSkipReason, aM as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aN as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aO as IVtxoManager, a3 as OnchainProvider, J as Network, aa as NetworkName, ad as Coin, aP as ExplorerTransaction, q as TapLeafScript, aQ as EncodedVtxoScript, K as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aR as Status, ac as ArkAddress, ak as Intent, aS as ChainTx, o as IndexerProvider, Q as TxTree, aT as PathContext } from './ark-C9DsPSm8.cjs';
|
|
2
|
+
export { aU as ActivityIntent, aV as ActivityResolver, ab as ArkInfo, aW as ArkIntentState, aX as ArkTapscript, aY as AssetMetadata, aZ as BITCOIN_EMULATOR_PUBKEY, a_ as BaseWalletConfig, Z as BatchFailedEvent, X as BatchFinalizationEvent, Y as BatchFinalizedEvent, a$ as BatchInfo, b0 as BatchSignableIdentity, M as BatchStartedEvent, b1 as CLTVMultisigTapscript, b2 as CandidateDeps, b3 as ChainTxType, H as ChainedTxType, b4 as CommitmentTx, b5 as ConditionCSVMultisigTapscript, b6 as ConditionMultisigTapscript, b7 as ContractBalance, b8 as ContractEventCallback, b9 as ContractHandler, ae as ContractManager, af as ContractManagerConfig, ba as ContractState, bb as ContractVtxo, bc as ContractWatcher, bd as DelegateManagerImpl, be as DelegateOptions, a4 as DelegateProvider, bf as DelegatorManagerImpl, bg as DelegatorProvider, bh as DeprecatedSignerMigrationReport, bi as DeprecatedSignerReport, bj as DigestMismatchError, bk as Discoverable, bl as DiscoveredContract, bm as DiscoveryDeps, bn as ESPLORA_URL, bo as EsploraProvider, a6 as ExitCaptureMode, bp as ExitChainResolver, a7 as ExitDataSource, bq as ExtendedContractVtxo, br as GroupMembership, bs as HandlerError, bt as IDelegatorManager, bu as INTENT_TERMINAL_STATES, bv as IndexerTxType, bw as KnownMetadata, bx as MUTINYNET_EMULATOR_PUBKEY, by as MigrateDeprecatedSignerOptions, bz as MigrationLegReport, bA as MigrationVtxoRef, bB as MultisigTapscript, bC as Nonces, bD as Output, bE as PageResponse, bF as PaginationOptions, bG as PartialSig, bH as ProviderClass, bI as REGTEST_EMULATOR_PUBKEY, a5 as ReadonlyWalletConfig, k as RestArkProvider, bJ as RestDelegateProvider, bK as RestDelegatorProvider, l as RestIndexerProvider, bL as ScanContractsOptions, bM as ScanResult, bN as ScheduledSession, bO as SettlementEventType, bP as SignRequest, aj as SignedIntent, bQ as SignerClassification, L as SignerSet, bR as SubscriptionEvent, bS as SubscriptionHeartbeat, m as SubscriptionResponse, bT as TapLeaves, bU as TapTreeCoder, bV as TapscriptType, al as TimeHeight, bW as TreeNonces, U as TreeNoncesEvent, bX as TreePartialSigs, $ as TreeSignatureEvent, P as TreeSigningStartedEvent, _ as TreeTxEvent, bY as Tx, bZ as TxHistoryRecord, b_ as TxKey, T as TxNotification, b$ as TxTag, c0 as TxTreeNode, c1 as TxType, c2 as VirtualStatus, c3 as Vtxo, c4 as VtxoChain, ah as VtxoManager, c5 as VtxoType, b as WalletConfig, c6 as WalletMode, c7 as assetMintResolver, c8 as boardingResolver, c9 as canRecoverOnchain, ca as canSpendOffchain, cb as classifyAgainstSignerSet, cc as classifyContractSigner, cd as collabExitResolver, ce as createDefaultActivityRegistry, cf as createExitChainResolver, cg as decodeTapscript, ch as defaultEmulatorPubkey, ci as getNetwork, cj as getSequence, ck as hasCandidates, cl as hasTerminalSpend, cm as isBatchSignable, cn as isCooperativelyMigratable, co as isDiscoverable, cp as isExpired, cq as isPastExpiry, cr as isRecoverable, cs as isSpendable, ct as isSubdust, cu as isTerminalIntentState, cv as isVirtualCoin, cw as isVtxoExpiringSoon, cx as networks, cy as resolveEmulatorPubkey, cz as scriptFromTapLeafScript, cA as signerSetFromInfo, cB as toXOnlySignerHex } from './ark-C9DsPSm8.cjs';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as BatchExpiryPolicy, d as Batch } from './wallet-DlXemAzP.cjs';
|
|
4
|
+
export { A as ArkError, e as ArkErrorName, f as ArkadeCashClaimResult, g as ArkadeCashCreateError, h as ArkadeCashUnclaimedReason, i as ArkadeCashUnclaimedVtxo, j as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, k as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, H as HDWalletCapable, I as IncomingFunds, M as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, l as ProviderKind, m as ProviderUnavailableError, n as REGTEST_MIN_BATCH_EXPIRY_SECONDS, o as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ServerInfoSource, q as ServerResponseMismatchError, r as assertValidBatchExpiry, s as assertValidServerUnrollScript, t as defaultBatchExpiryPolicy, u as defaultCheckpointExitDelayPolicy, v as getRandomId, w as isArkError, x as isHDWalletCapable, y as maybeArkError, z as resolveBatchExpiryPolicy, E as resolveCheckpointExitDelayPolicy, F as selectVirtualCoins, G as waitForIncomingFunds } from './wallet-DlXemAzP.cjs';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-BG2AL2Ie.cjs';
|
|
6
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as contractHandlers } from './index-BG2AL2Ie.cjs';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-D0eGaz3J.cjs';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-D0eGaz3J.cjs';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
10
10
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
11
11
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
@@ -977,6 +977,10 @@ type Initialize = {
|
|
|
977
977
|
watcherConfig?: Partial<Omit<ContractWatcherConfig, "indexerProvider">>;
|
|
978
978
|
/** @see WalletConfig.lookAheadWindow */
|
|
979
979
|
lookAheadWindow?: number;
|
|
980
|
+
/** @see WalletConfig.minBatchExpirySeconds */
|
|
981
|
+
minBatchExpirySeconds?: bigint;
|
|
982
|
+
/** @see WalletConfig.minCheckpointExitDelaySeconds */
|
|
983
|
+
minCheckpointExitDelaySeconds?: bigint;
|
|
980
984
|
/**
|
|
981
985
|
* Page-supplied per-operation timeout map. Keys are message types
|
|
982
986
|
* (e.g. "SETTLE"). Overrides constructor-supplied
|
|
@@ -2656,6 +2660,18 @@ interface ServiceWorkerWalletOptions {
|
|
|
2656
2660
|
* @see WalletConfig.lookAheadWindow
|
|
2657
2661
|
*/
|
|
2658
2662
|
lookAheadWindow?: number;
|
|
2663
|
+
/**
|
|
2664
|
+
* Timelock floors forwarded to the worker wallet. Lowering either below its
|
|
2665
|
+
* per-network default relaxes a fund-safety bound; intended for local
|
|
2666
|
+
* testing. The fast public test networks whose arkd runs below the
|
|
2667
|
+
* mainnet-grade checkpoint floor (signet, mutinynet) are defaulted to their
|
|
2668
|
+
* own advertised value, so neither needs these set.
|
|
2669
|
+
*
|
|
2670
|
+
* @see WalletConfig.minBatchExpirySeconds
|
|
2671
|
+
*/
|
|
2672
|
+
minBatchExpirySeconds?: bigint;
|
|
2673
|
+
/** @see WalletConfig.minCheckpointExitDelaySeconds */
|
|
2674
|
+
minCheckpointExitDelaySeconds?: bigint;
|
|
2659
2675
|
/**
|
|
2660
2676
|
* Per-request timeout overrides for wallet-updater messages.
|
|
2661
2677
|
* @see DEFAULT_MESSAGE_TIMEOUTS
|
|
@@ -2700,6 +2716,8 @@ type MessageBusInitConfig = {
|
|
|
2700
2716
|
walletMode?: ServiceWorkerWalletMode;
|
|
2701
2717
|
watcherConfig?: Partial<Omit<ContractWatcherConfig, "indexerProvider">>;
|
|
2702
2718
|
lookAheadWindow?: number;
|
|
2719
|
+
minBatchExpirySeconds?: bigint;
|
|
2720
|
+
minCheckpointExitDelaySeconds?: bigint;
|
|
2703
2721
|
messageTimeouts?: Record<string, number>;
|
|
2704
2722
|
};
|
|
2705
2723
|
declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
|
|
@@ -4860,6 +4878,18 @@ interface ArkadeConnectOptions {
|
|
|
4860
4878
|
identity?: Identity;
|
|
4861
4879
|
/** Network for address derivation; defaults to the SDK default. */
|
|
4862
4880
|
network?: Network;
|
|
4881
|
+
/**
|
|
4882
|
+
* Co-sign with this emulator key (33-byte compressed hex) instead of the
|
|
4883
|
+
* one pinned for `network`.
|
|
4884
|
+
*
|
|
4885
|
+
* Needed when a network's emulator key has rotated ahead of this SDK, for a
|
|
4886
|
+
* self-hosted emulator, or on a network with no pinned key at all (signet,
|
|
4887
|
+
* testnet, a hand-built `Network` — those throw without it). Setting it
|
|
4888
|
+
* means trusting that operator as co-signer in place of the network's.
|
|
4889
|
+
*
|
|
4890
|
+
* @see resolveEmulatorPubkey
|
|
4891
|
+
*/
|
|
4892
|
+
emulatorPubkey?: string;
|
|
4863
4893
|
/**
|
|
4864
4894
|
* The wallet's contract manager. When set, contracts created from this
|
|
4865
4895
|
* client can {@link ArkadeContract.register} themselves into the standard
|
|
@@ -4881,7 +4911,16 @@ declare class Arkade {
|
|
|
4881
4911
|
readonly emulator: EmulatorProvider | undefined;
|
|
4882
4912
|
readonly network: Network;
|
|
4883
4913
|
readonly serverKey: Uint8Array;
|
|
4884
|
-
/**
|
|
4914
|
+
/**
|
|
4915
|
+
* The co-signer key covenants are built against (33-byte compressed),
|
|
4916
|
+
* present only when an emulator is configured.
|
|
4917
|
+
*
|
|
4918
|
+
* Resolved from the network — or from `emulatorPubkey` — never from the
|
|
4919
|
+
* emulator's own report. When a claim is refused because the co-signer
|
|
4920
|
+
* disagrees, compare `hex.encode(arkade.emulatorKey)` against the
|
|
4921
|
+
* `signerPubkey` your emulator serves on `/v1/info`: if they differ, the
|
|
4922
|
+
* network rotated and this SDK's pin is stale.
|
|
4923
|
+
*/
|
|
4885
4924
|
readonly emulatorKey: Uint8Array | undefined;
|
|
4886
4925
|
readonly checkpoint: CSVMultisigTapscript.Type;
|
|
4887
4926
|
readonly indexer?: Pick<IndexerProvider, "getVtxos">;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a2 as ReadonlyIdentity, a as Identity, am as DescriptorSigningRequest, an as Transaction, ai as SignerSession, a0 as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, ao as IntentFeeConfig, ap as OffchainInput, aq as FeeAmount, ar as OnchainInput, as as FeeOutput, n as ArkProvider, ag as SettlementConfig, at as ContractWatcherConfig, au as Asset, R as Recipient, I as IWallet, av as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aw as CreateContractParams, ax as GetContractsFilter, r as VirtualCoin, ay as GetSpendablePathsOptions, az as GetAllSpendingPathsOptions, aA as IssuanceParams, aB as ReissuanceParams, aC as BurnParams, aD as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, aE as ContractWithVtxos, aF as PathSelection, aG as ContractEvent, aH as AssetDetails, aI as IssuanceResult, aJ as DelegateInfo, aK as MigrationGlobalSkipReason, aL as MigrationLegSkipReason, aM as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aN as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aO as IVtxoManager, a3 as OnchainProvider, J as Network, aa as NetworkName, ad as Coin, aP as ExplorerTransaction, q as TapLeafScript, aQ as EncodedVtxoScript, K as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aR as Status, ac as ArkAddress, ak as Intent, aS as ChainTx, o as IndexerProvider, Q as TxTree, aT as PathContext } from './ark-
|
|
2
|
-
export { aU as ActivityIntent, aV as ActivityResolver, ab as ArkInfo, aW as ArkIntentState, aX as ArkTapscript, aY as AssetMetadata, aZ as BaseWalletConfig, Z as BatchFailedEvent, X as BatchFinalizationEvent, Y as BatchFinalizedEvent,
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as BatchExpiryPolicy, d as Batch } from './wallet-
|
|
4
|
-
export { A as ArkError, e as ArkErrorName, f as ArkadeCashClaimResult, g as ArkadeCashCreateError, h as ArkadeCashUnclaimedReason, i as ArkadeCashUnclaimedVtxo, j as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, k as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, H as HDWalletCapable, I as IncomingFunds, l as ProviderKind, m as ProviderUnavailableError, n as REGTEST_MIN_BATCH_EXPIRY_SECONDS, o as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-
|
|
6
|
-
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a2 as ReadonlyIdentity, a as Identity, am as DescriptorSigningRequest, an as Transaction, ai as SignerSession, a0 as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, ao as IntentFeeConfig, ap as OffchainInput, aq as FeeAmount, ar as OnchainInput, as as FeeOutput, n as ArkProvider, ag as SettlementConfig, at as ContractWatcherConfig, au as Asset, R as Recipient, I as IWallet, av as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aw as CreateContractParams, ax as GetContractsFilter, r as VirtualCoin, ay as GetSpendablePathsOptions, az as GetAllSpendingPathsOptions, aA as IssuanceParams, aB as ReissuanceParams, aC as BurnParams, aD as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, aE as ContractWithVtxos, aF as PathSelection, aG as ContractEvent, aH as AssetDetails, aI as IssuanceResult, aJ as DelegateInfo, aK as MigrationGlobalSkipReason, aL as MigrationLegSkipReason, aM as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aN as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aO as IVtxoManager, a3 as OnchainProvider, J as Network, aa as NetworkName, ad as Coin, aP as ExplorerTransaction, q as TapLeafScript, aQ as EncodedVtxoScript, K as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aR as Status, ac as ArkAddress, ak as Intent, aS as ChainTx, o as IndexerProvider, Q as TxTree, aT as PathContext } from './ark-C9DsPSm8.js';
|
|
2
|
+
export { aU as ActivityIntent, aV as ActivityResolver, ab as ArkInfo, aW as ArkIntentState, aX as ArkTapscript, aY as AssetMetadata, aZ as BITCOIN_EMULATOR_PUBKEY, a_ as BaseWalletConfig, Z as BatchFailedEvent, X as BatchFinalizationEvent, Y as BatchFinalizedEvent, a$ as BatchInfo, b0 as BatchSignableIdentity, M as BatchStartedEvent, b1 as CLTVMultisigTapscript, b2 as CandidateDeps, b3 as ChainTxType, H as ChainedTxType, b4 as CommitmentTx, b5 as ConditionCSVMultisigTapscript, b6 as ConditionMultisigTapscript, b7 as ContractBalance, b8 as ContractEventCallback, b9 as ContractHandler, ae as ContractManager, af as ContractManagerConfig, ba as ContractState, bb as ContractVtxo, bc as ContractWatcher, bd as DelegateManagerImpl, be as DelegateOptions, a4 as DelegateProvider, bf as DelegatorManagerImpl, bg as DelegatorProvider, bh as DeprecatedSignerMigrationReport, bi as DeprecatedSignerReport, bj as DigestMismatchError, bk as Discoverable, bl as DiscoveredContract, bm as DiscoveryDeps, bn as ESPLORA_URL, bo as EsploraProvider, a6 as ExitCaptureMode, bp as ExitChainResolver, a7 as ExitDataSource, bq as ExtendedContractVtxo, br as GroupMembership, bs as HandlerError, bt as IDelegatorManager, bu as INTENT_TERMINAL_STATES, bv as IndexerTxType, bw as KnownMetadata, bx as MUTINYNET_EMULATOR_PUBKEY, by as MigrateDeprecatedSignerOptions, bz as MigrationLegReport, bA as MigrationVtxoRef, bB as MultisigTapscript, bC as Nonces, bD as Output, bE as PageResponse, bF as PaginationOptions, bG as PartialSig, bH as ProviderClass, bI as REGTEST_EMULATOR_PUBKEY, a5 as ReadonlyWalletConfig, k as RestArkProvider, bJ as RestDelegateProvider, bK as RestDelegatorProvider, l as RestIndexerProvider, bL as ScanContractsOptions, bM as ScanResult, bN as ScheduledSession, bO as SettlementEventType, bP as SignRequest, aj as SignedIntent, bQ as SignerClassification, L as SignerSet, bR as SubscriptionEvent, bS as SubscriptionHeartbeat, m as SubscriptionResponse, bT as TapLeaves, bU as TapTreeCoder, bV as TapscriptType, al as TimeHeight, bW as TreeNonces, U as TreeNoncesEvent, bX as TreePartialSigs, $ as TreeSignatureEvent, P as TreeSigningStartedEvent, _ as TreeTxEvent, bY as Tx, bZ as TxHistoryRecord, b_ as TxKey, T as TxNotification, b$ as TxTag, c0 as TxTreeNode, c1 as TxType, c2 as VirtualStatus, c3 as Vtxo, c4 as VtxoChain, ah as VtxoManager, c5 as VtxoType, b as WalletConfig, c6 as WalletMode, c7 as assetMintResolver, c8 as boardingResolver, c9 as canRecoverOnchain, ca as canSpendOffchain, cb as classifyAgainstSignerSet, cc as classifyContractSigner, cd as collabExitResolver, ce as createDefaultActivityRegistry, cf as createExitChainResolver, cg as decodeTapscript, ch as defaultEmulatorPubkey, ci as getNetwork, cj as getSequence, ck as hasCandidates, cl as hasTerminalSpend, cm as isBatchSignable, cn as isCooperativelyMigratable, co as isDiscoverable, cp as isExpired, cq as isPastExpiry, cr as isRecoverable, cs as isSpendable, ct as isSubdust, cu as isTerminalIntentState, cv as isVirtualCoin, cw as isVtxoExpiringSoon, cx as networks, cy as resolveEmulatorPubkey, cz as scriptFromTapLeafScript, cA as signerSetFromInfo, cB as toXOnlySignerHex } from './ark-C9DsPSm8.js';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as BatchExpiryPolicy, d as Batch } from './wallet-EyVDhqzP.js';
|
|
4
|
+
export { A as ArkError, e as ArkErrorName, f as ArkadeCashClaimResult, g as ArkadeCashCreateError, h as ArkadeCashUnclaimedReason, i as ArkadeCashUnclaimedVtxo, j as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, k as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, H as HDWalletCapable, I as IncomingFunds, M as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, l as ProviderKind, m as ProviderUnavailableError, n as REGTEST_MIN_BATCH_EXPIRY_SECONDS, o as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ServerInfoSource, q as ServerResponseMismatchError, r as assertValidBatchExpiry, s as assertValidServerUnrollScript, t as defaultBatchExpiryPolicy, u as defaultCheckpointExitDelayPolicy, v as getRandomId, w as isArkError, x as isHDWalletCapable, y as maybeArkError, z as resolveBatchExpiryPolicy, E as resolveCheckpointExitDelayPolicy, F as selectVirtualCoins, G as waitForIncomingFunds } from './wallet-EyVDhqzP.js';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-BmK6tEqf.js';
|
|
6
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as contractHandlers } from './index-BmK6tEqf.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-B_oKWm1k.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-B_oKWm1k.js';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
10
10
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
11
11
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
@@ -977,6 +977,10 @@ type Initialize = {
|
|
|
977
977
|
watcherConfig?: Partial<Omit<ContractWatcherConfig, "indexerProvider">>;
|
|
978
978
|
/** @see WalletConfig.lookAheadWindow */
|
|
979
979
|
lookAheadWindow?: number;
|
|
980
|
+
/** @see WalletConfig.minBatchExpirySeconds */
|
|
981
|
+
minBatchExpirySeconds?: bigint;
|
|
982
|
+
/** @see WalletConfig.minCheckpointExitDelaySeconds */
|
|
983
|
+
minCheckpointExitDelaySeconds?: bigint;
|
|
980
984
|
/**
|
|
981
985
|
* Page-supplied per-operation timeout map. Keys are message types
|
|
982
986
|
* (e.g. "SETTLE"). Overrides constructor-supplied
|
|
@@ -2656,6 +2660,18 @@ interface ServiceWorkerWalletOptions {
|
|
|
2656
2660
|
* @see WalletConfig.lookAheadWindow
|
|
2657
2661
|
*/
|
|
2658
2662
|
lookAheadWindow?: number;
|
|
2663
|
+
/**
|
|
2664
|
+
* Timelock floors forwarded to the worker wallet. Lowering either below its
|
|
2665
|
+
* per-network default relaxes a fund-safety bound; intended for local
|
|
2666
|
+
* testing. The fast public test networks whose arkd runs below the
|
|
2667
|
+
* mainnet-grade checkpoint floor (signet, mutinynet) are defaulted to their
|
|
2668
|
+
* own advertised value, so neither needs these set.
|
|
2669
|
+
*
|
|
2670
|
+
* @see WalletConfig.minBatchExpirySeconds
|
|
2671
|
+
*/
|
|
2672
|
+
minBatchExpirySeconds?: bigint;
|
|
2673
|
+
/** @see WalletConfig.minCheckpointExitDelaySeconds */
|
|
2674
|
+
minCheckpointExitDelaySeconds?: bigint;
|
|
2659
2675
|
/**
|
|
2660
2676
|
* Per-request timeout overrides for wallet-updater messages.
|
|
2661
2677
|
* @see DEFAULT_MESSAGE_TIMEOUTS
|
|
@@ -2700,6 +2716,8 @@ type MessageBusInitConfig = {
|
|
|
2700
2716
|
walletMode?: ServiceWorkerWalletMode;
|
|
2701
2717
|
watcherConfig?: Partial<Omit<ContractWatcherConfig, "indexerProvider">>;
|
|
2702
2718
|
lookAheadWindow?: number;
|
|
2719
|
+
minBatchExpirySeconds?: bigint;
|
|
2720
|
+
minCheckpointExitDelaySeconds?: bigint;
|
|
2703
2721
|
messageTimeouts?: Record<string, number>;
|
|
2704
2722
|
};
|
|
2705
2723
|
declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
|
|
@@ -4860,6 +4878,18 @@ interface ArkadeConnectOptions {
|
|
|
4860
4878
|
identity?: Identity;
|
|
4861
4879
|
/** Network for address derivation; defaults to the SDK default. */
|
|
4862
4880
|
network?: Network;
|
|
4881
|
+
/**
|
|
4882
|
+
* Co-sign with this emulator key (33-byte compressed hex) instead of the
|
|
4883
|
+
* one pinned for `network`.
|
|
4884
|
+
*
|
|
4885
|
+
* Needed when a network's emulator key has rotated ahead of this SDK, for a
|
|
4886
|
+
* self-hosted emulator, or on a network with no pinned key at all (signet,
|
|
4887
|
+
* testnet, a hand-built `Network` — those throw without it). Setting it
|
|
4888
|
+
* means trusting that operator as co-signer in place of the network's.
|
|
4889
|
+
*
|
|
4890
|
+
* @see resolveEmulatorPubkey
|
|
4891
|
+
*/
|
|
4892
|
+
emulatorPubkey?: string;
|
|
4863
4893
|
/**
|
|
4864
4894
|
* The wallet's contract manager. When set, contracts created from this
|
|
4865
4895
|
* client can {@link ArkadeContract.register} themselves into the standard
|
|
@@ -4881,7 +4911,16 @@ declare class Arkade {
|
|
|
4881
4911
|
readonly emulator: EmulatorProvider | undefined;
|
|
4882
4912
|
readonly network: Network;
|
|
4883
4913
|
readonly serverKey: Uint8Array;
|
|
4884
|
-
/**
|
|
4914
|
+
/**
|
|
4915
|
+
* The co-signer key covenants are built against (33-byte compressed),
|
|
4916
|
+
* present only when an emulator is configured.
|
|
4917
|
+
*
|
|
4918
|
+
* Resolved from the network — or from `emulatorPubkey` — never from the
|
|
4919
|
+
* emulator's own report. When a claim is refused because the co-signer
|
|
4920
|
+
* disagrees, compare `hex.encode(arkade.emulatorKey)` against the
|
|
4921
|
+
* `signerPubkey` your emulator serves on `/v1/info`: if they differ, the
|
|
4922
|
+
* network rotated and this SDK's pin is stale.
|
|
4923
|
+
*/
|
|
4885
4924
|
readonly emulatorKey: Uint8Array | undefined;
|
|
4886
4925
|
readonly checkpoint: CSVMultisigTapscript.Type;
|
|
4887
4926
|
readonly indexer?: Pick<IndexerProvider, "getVtxos">;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deserializeExitPackage, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-
|
|
2
|
-
export { ChainTxType, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-
|
|
3
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, isCltvSatisfied, isCsvSpendable } from './chunk-
|
|
4
|
-
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, Intent, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, buildVersion, canRecoverOnchain, canSpendOffchain, decodeTapscript, getArkPsbtFields, getNetwork, getSequence, hasTerminalSpend, isArkError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deserializeExitPackage, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-OVSNY3HC.js';
|
|
2
|
+
export { ChainTxType, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-YEHGCHIL.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, isCltvSatisfied, isCsvSpendable } from './chunk-PN5RD7ZI.js';
|
|
4
|
+
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, buildVersion, canRecoverOnchain, canSpendOffchain, decodeTapscript, defaultEmulatorPubkey, getArkPsbtFields, getNetwork, getSequence, hasTerminalSpend, isArkError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, resolveEmulatorPubkey, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-FIMOVH25.js';
|
|
5
5
|
import './chunk-NSBPE2FW.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.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/repositories/realm/walletRepository.ts
|
|
@@ -38,7 +38,7 @@ var RealmWalletRepository = class {
|
|
|
38
38
|
await this.ensureInit();
|
|
39
39
|
this.realm.write(() => {
|
|
40
40
|
for (const vtxo of vtxos) {
|
|
41
|
-
const s =
|
|
41
|
+
const s = chunkDYNB6POO_cjs.serializeVtxo(vtxo);
|
|
42
42
|
this.realm.create(
|
|
43
43
|
"ArkVtxo",
|
|
44
44
|
{
|
|
@@ -86,7 +86,7 @@ var RealmWalletRepository = class {
|
|
|
86
86
|
throw new Error("RealmWalletRepository requires an address");
|
|
87
87
|
}
|
|
88
88
|
for (const vtxo of vtxos) {
|
|
89
|
-
if (!
|
|
89
|
+
if (!chunkDYNB6POO_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
90
90
|
throw new Error(
|
|
91
91
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
92
92
|
);
|
|
@@ -111,7 +111,7 @@ var RealmWalletRepository = class {
|
|
|
111
111
|
await this.ensureInit();
|
|
112
112
|
this.realm.write(() => {
|
|
113
113
|
for (const utxo of utxos) {
|
|
114
|
-
const s =
|
|
114
|
+
const s = chunkDYNB6POO_cjs.serializeUtxo(utxo);
|
|
115
115
|
this.realm.create(
|
|
116
116
|
"ArkUtxo",
|
|
117
117
|
{
|
|
@@ -164,7 +164,7 @@ var RealmWalletRepository = class {
|
|
|
164
164
|
amount: tx.amount,
|
|
165
165
|
settled: tx.settled,
|
|
166
166
|
createdAt: tx.createdAt,
|
|
167
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
167
|
+
assetsJson: tx.assets ? JSON.stringify(chunkDYNB6POO_cjs.serializeAssets(tx.assets)) : null
|
|
168
168
|
},
|
|
169
169
|
"modified"
|
|
170
170
|
);
|
|
@@ -234,9 +234,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
234
234
|
// Post-migration every row has `script`, but the backfill is
|
|
235
235
|
// idempotent: derive from `address` if the legacy column is still
|
|
236
236
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
237
|
-
script: obj.script ??
|
|
237
|
+
script: obj.script ?? chunkDYNB6POO_cjs.scriptFromArkAddress(obj.address)
|
|
238
238
|
};
|
|
239
|
-
return
|
|
239
|
+
return chunkDYNB6POO_cjs.deserializeVtxo(serialized);
|
|
240
240
|
}
|
|
241
241
|
function utxoObjectToDomain(obj) {
|
|
242
242
|
const serialized = {
|
|
@@ -255,7 +255,7 @@ function utxoObjectToDomain(obj) {
|
|
|
255
255
|
status: JSON.parse(obj.statusJson),
|
|
256
256
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
257
257
|
};
|
|
258
|
-
return
|
|
258
|
+
return chunkDYNB6POO_cjs.deserializeUtxo(serialized);
|
|
259
259
|
}
|
|
260
260
|
function txObjectToDomain(obj) {
|
|
261
261
|
const tx = {
|
|
@@ -270,7 +270,7 @@ function txObjectToDomain(obj) {
|
|
|
270
270
|
createdAt: obj.createdAt
|
|
271
271
|
};
|
|
272
272
|
if (obj.assetsJson) {
|
|
273
|
-
tx.assets =
|
|
273
|
+
tx.assets = chunkDYNB6POO_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
274
274
|
}
|
|
275
275
|
return tx;
|
|
276
276
|
}
|
|
@@ -431,7 +431,7 @@ var RealmIntentRepository = class {
|
|
|
431
431
|
const clashes = [
|
|
432
432
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
|
|
433
433
|
].map(toIntent);
|
|
434
|
-
|
|
434
|
+
chunkDYNB6POO_cjs.assertIntentIdUnique(intent, clashes);
|
|
435
435
|
}
|
|
436
436
|
this.realm.create(
|
|
437
437
|
"ArkIntent",
|
|
@@ -460,14 +460,14 @@ var RealmIntentRepository = class {
|
|
|
460
460
|
}
|
|
461
461
|
async getIntents(filter) {
|
|
462
462
|
const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
|
|
463
|
-
const out = filter ? all.filter((i) =>
|
|
464
|
-
const { skip, end } =
|
|
463
|
+
const out = filter ? all.filter((i) => chunkDYNB6POO_cjs.intentMatchesFilter(i, filter)) : all;
|
|
464
|
+
const { skip, end } = chunkDYNB6POO_cjs.intentPageBounds(filter, out.length);
|
|
465
465
|
return out.slice(skip, end);
|
|
466
466
|
}
|
|
467
467
|
async getLockedVtxoOutpoints() {
|
|
468
468
|
const out = [];
|
|
469
469
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
470
|
-
if (!
|
|
470
|
+
if (!chunkDYNB6POO_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
|
|
471
471
|
return out;
|
|
472
472
|
}
|
|
473
473
|
async [Symbol.asyncDispose]() {
|
|
@@ -509,7 +509,7 @@ var RealmVirtualTxRepository = class {
|
|
|
509
509
|
txid: t.txid,
|
|
510
510
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
511
511
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
512
|
-
type:
|
|
512
|
+
type: chunkDYNB6POO_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
513
513
|
},
|
|
514
514
|
"modified"
|
|
515
515
|
);
|
|
@@ -742,7 +742,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
742
742
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
743
743
|
const newVtxo = newVtxos[i];
|
|
744
744
|
if (!newVtxo.script) {
|
|
745
|
-
newVtxo.script =
|
|
745
|
+
newVtxo.script = chunkDYNB6POO_cjs.scriptFromArkAddress(newVtxo.address);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
const oldHasVirtualTx = Array.isArray(oldRealm?.schema) && oldRealm.schema.some((s) => s.name === "ArkVirtualTx");
|
|
@@ -759,7 +759,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
759
759
|
|
|
760
760
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
761
761
|
enumerable: true,
|
|
762
|
-
get: function () { return
|
|
762
|
+
get: function () { return chunkDYNB6POO_cjs.ChainedTxType; }
|
|
763
763
|
});
|
|
764
764
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
765
765
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-
|
|
2
|
-
export { H as ChainedTxType } from '../../ark-
|
|
1
|
+
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-C9DsPSm8.cjs';
|
|
2
|
+
export { H as ChainedTxType } 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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-
|
|
2
|
-
export { H as ChainedTxType } from '../../ark-
|
|
1
|
+
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-C9DsPSm8.js';
|
|
2
|
+
export { H as ChainedTxType } 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';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-
|
|
2
|
-
export { ChainedTxType } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-OVSNY3HC.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-OVSNY3HC.js';
|
|
3
|
+
import '../../chunk-YEHGCHIL.js';
|
|
4
|
+
import '../../chunk-PN5RD7ZI.js';
|
|
5
|
+
import '../../chunk-FIMOVH25.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/repositories/realm/walletRepository.ts
|
|
@@ -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/repositories/sqlite/transaction.ts
|
|
@@ -154,7 +154,7 @@ var SQLiteWalletRepository = class {
|
|
|
154
154
|
for (const row of nullRows) {
|
|
155
155
|
await this.db.run(
|
|
156
156
|
`UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
|
|
157
|
-
[
|
|
157
|
+
[chunkDYNB6POO_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
160
|
const tempName = `${this.tables.vtxos}__migrate_tmp`;
|
|
@@ -225,7 +225,7 @@ var SQLiteWalletRepository = class {
|
|
|
225
225
|
async saveVtxos(address, vtxos) {
|
|
226
226
|
await this.ensureInit();
|
|
227
227
|
for (const vtxo of vtxos) {
|
|
228
|
-
const s =
|
|
228
|
+
const s = chunkDYNB6POO_cjs.serializeVtxo(vtxo);
|
|
229
229
|
await this.db.run(
|
|
230
230
|
`INSERT OR REPLACE INTO ${this.tables.vtxos}
|
|
231
231
|
(txid, vout, value, address,
|
|
@@ -280,7 +280,7 @@ var SQLiteWalletRepository = class {
|
|
|
280
280
|
throw new Error("SQLiteWalletRepository requires an address");
|
|
281
281
|
}
|
|
282
282
|
for (const vtxo of vtxos) {
|
|
283
|
-
if (!
|
|
283
|
+
if (!chunkDYNB6POO_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
284
284
|
throw new Error(
|
|
285
285
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
286
286
|
);
|
|
@@ -304,7 +304,7 @@ var SQLiteWalletRepository = class {
|
|
|
304
304
|
async saveUtxos(address, utxos) {
|
|
305
305
|
await this.ensureInit();
|
|
306
306
|
for (const utxo of utxos) {
|
|
307
|
-
const s =
|
|
307
|
+
const s = chunkDYNB6POO_cjs.serializeUtxo(utxo);
|
|
308
308
|
await this.db.run(
|
|
309
309
|
`INSERT OR REPLACE INTO ${this.tables.utxos}
|
|
310
310
|
(txid, vout, value, address,
|
|
@@ -360,7 +360,7 @@ var SQLiteWalletRepository = class {
|
|
|
360
360
|
tx.amount,
|
|
361
361
|
tx.settled ? 1 : 0,
|
|
362
362
|
tx.createdAt,
|
|
363
|
-
tx.assets ? JSON.stringify(
|
|
363
|
+
tx.assets ? JSON.stringify(chunkDYNB6POO_cjs.serializeAssets(tx.assets)) : null
|
|
364
364
|
]
|
|
365
365
|
);
|
|
366
366
|
}
|
|
@@ -434,9 +434,9 @@ function vtxoRowToDomain(row) {
|
|
|
434
434
|
// Post-migration every row has `script`, but the backfill is
|
|
435
435
|
// idempotent: derive from `address` if the legacy column is still
|
|
436
436
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
437
|
-
script: row.script ??
|
|
437
|
+
script: row.script ?? chunkDYNB6POO_cjs.scriptFromArkAddress(row.address)
|
|
438
438
|
};
|
|
439
|
-
return
|
|
439
|
+
return chunkDYNB6POO_cjs.deserializeVtxo(serialized);
|
|
440
440
|
}
|
|
441
441
|
function utxoRowToDomain(row) {
|
|
442
442
|
const serialized = {
|
|
@@ -455,7 +455,7 @@ function utxoRowToDomain(row) {
|
|
|
455
455
|
status: JSON.parse(row.status_json),
|
|
456
456
|
extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
|
|
457
457
|
};
|
|
458
|
-
return
|
|
458
|
+
return chunkDYNB6POO_cjs.deserializeUtxo(serialized);
|
|
459
459
|
}
|
|
460
460
|
function txRowToDomain(row) {
|
|
461
461
|
const tx = {
|
|
@@ -470,7 +470,7 @@ function txRowToDomain(row) {
|
|
|
470
470
|
createdAt: row.created_at
|
|
471
471
|
};
|
|
472
472
|
if (row.assets_json) {
|
|
473
|
-
tx.assets =
|
|
473
|
+
tx.assets = chunkDYNB6POO_cjs.deserializeAssets(JSON.parse(row.assets_json));
|
|
474
474
|
}
|
|
475
475
|
return tx;
|
|
476
476
|
}
|
|
@@ -718,8 +718,8 @@ var SQLiteIntentRepository = class {
|
|
|
718
718
|
`SELECT * FROM ${this.t} ORDER BY created_at ASC, intent_tx_id ASC`
|
|
719
719
|
);
|
|
720
720
|
let out = rows.map(rowToIntent);
|
|
721
|
-
if (filter) out = out.filter((i) =>
|
|
722
|
-
const { skip, end } =
|
|
721
|
+
if (filter) out = out.filter((i) => chunkDYNB6POO_cjs.intentMatchesFilter(i, filter));
|
|
722
|
+
const { skip, end } = chunkDYNB6POO_cjs.intentPageBounds(filter, out.length);
|
|
723
723
|
return out.slice(skip, end);
|
|
724
724
|
}
|
|
725
725
|
async getLockedVtxoOutpoints() {
|
|
@@ -727,7 +727,7 @@ var SQLiteIntentRepository = class {
|
|
|
727
727
|
const rows = await this.db.all(`SELECT * FROM ${this.t}`);
|
|
728
728
|
const out = [];
|
|
729
729
|
for (const r of rows) {
|
|
730
|
-
if (
|
|
730
|
+
if (chunkDYNB6POO_cjs.isTerminalIntentState(r.state)) continue;
|
|
731
731
|
for (const o of JSON.parse(r.intent_vtxos_json)) out.push(o);
|
|
732
732
|
}
|
|
733
733
|
return out;
|
|
@@ -822,7 +822,7 @@ var SQLiteVirtualTxRepository = class {
|
|
|
822
822
|
const prev = prevByTxid.get(t.txid);
|
|
823
823
|
const psbt = t.psbt ?? prev?.psbt ?? null;
|
|
824
824
|
const expires = t.expiresAt ?? prev?.expires_at ?? null;
|
|
825
|
-
const type =
|
|
825
|
+
const type = chunkDYNB6POO_cjs.mergeChainedTxType(t.type, prev?.type);
|
|
826
826
|
await this.db.run(
|
|
827
827
|
`INSERT OR REPLACE INTO ${this.tTx} (txid, psbt, expires_at, type) VALUES (?, ?, ?, ?)`,
|
|
828
828
|
[t.txid, psbt, expires, type]
|
|
@@ -908,7 +908,7 @@ function rowToTx(r) {
|
|
|
908
908
|
|
|
909
909
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
910
910
|
enumerable: true,
|
|
911
|
-
get: function () { return
|
|
911
|
+
get: function () { return chunkDYNB6POO_cjs.ChainedTxType; }
|
|
912
912
|
});
|
|
913
913
|
exports.SQLiteContractRepository = SQLiteContractRepository;
|
|
914
914
|
exports.SQLiteIntentRepository = SQLiteIntentRepository;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-
|
|
2
|
-
export { H as ChainedTxType } from '../../ark-
|
|
1
|
+
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-C9DsPSm8.cjs';
|
|
2
|
+
export { H as ChainedTxType } 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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-
|
|
2
|
-
export { H as ChainedTxType } from '../../ark-
|
|
1
|
+
import { W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, C as ContractRepository, w as ContractFilter, s as Contract, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch } from '../../ark-C9DsPSm8.js';
|
|
2
|
+
export { H as ChainedTxType } 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';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-
|
|
2
|
-
export { ChainedTxType } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-OVSNY3HC.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-OVSNY3HC.js';
|
|
3
|
+
import '../../chunk-YEHGCHIL.js';
|
|
4
|
+
import '../../chunk-PN5RD7ZI.js';
|
|
5
|
+
import '../../chunk-FIMOVH25.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/repositories/sqlite/transaction.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, C as ContractRepository, o as IndexerProvider, n as ArkProvider, r as VirtualCoin, s as Contract, t as ExtendedVirtualCoin } from './ark-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository, o as IndexerProvider, n as ArkProvider, r as VirtualCoin, s as Contract, t as ExtendedVirtualCoin } from './ark-C9DsPSm8.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A task item represents a unit of work in the inbox.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, C as ContractRepository, o as IndexerProvider, n as ArkProvider, r as VirtualCoin, s as Contract, t as ExtendedVirtualCoin } from './ark-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository, o as IndexerProvider, n as ArkProvider, r as VirtualCoin, s as Contract, t as ExtendedVirtualCoin } from './ark-C9DsPSm8.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A task item represents a unit of work in the inbox.
|