@arkade-os/sdk 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-CdWheMqT.d.ts → asyncStorageTaskQueue-B3U5gQ-i.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-DFt5LgW5.d.cts → asyncStorageTaskQueue-C9PkPcW_.d.cts} +1 -1
- package/dist/{chunk-JJ6QKTFZ.cjs → chunk-5WRA66RV.cjs} +10 -10
- package/dist/{chunk-JJ6QKTFZ.cjs.map → chunk-5WRA66RV.cjs.map} +1 -1
- package/dist/{chunk-6MIGYYWB.js → chunk-6FL4N4S2.js} +3 -3
- package/dist/{chunk-6MIGYYWB.js.map → chunk-6FL4N4S2.js.map} +1 -1
- package/dist/{chunk-GW42FS2X.cjs → chunk-BYPBVHVA.cjs} +48 -48
- package/dist/{chunk-GW42FS2X.cjs.map → chunk-BYPBVHVA.cjs.map} +1 -1
- package/dist/{chunk-NKKJEA3Z.js → chunk-HAQAWBYG.js} +739 -392
- package/dist/chunk-HAQAWBYG.js.map +1 -0
- package/dist/{chunk-XLHUGP3G.cjs → chunk-KW7ZEWYS.cjs} +6 -3
- package/dist/chunk-KW7ZEWYS.cjs.map +1 -0
- package/dist/{chunk-QFB55EOZ.js → chunk-OPX2HRWM.js} +6 -3
- package/dist/chunk-OPX2HRWM.js.map +1 -0
- package/dist/{chunk-QKNSMVBW.cjs → chunk-OUTWUYJ4.cjs} +1222 -875
- package/dist/chunk-OUTWUYJ4.cjs.map +1 -0
- package/dist/{chunk-3M22PJVB.js → chunk-P7B4LQ3H.js} +3 -3
- package/dist/{chunk-3M22PJVB.js.map → chunk-P7B4LQ3H.js.map} +1 -1
- package/dist/{chunk-FXVEOEYB.js → chunk-T7C3E2HL.js} +4 -4
- package/dist/{chunk-FXVEOEYB.js.map → chunk-T7C3E2HL.js.map} +1 -1
- package/dist/{chunk-XQRIY5K5.js → chunk-Y4BL3YYX.js} +4 -4
- package/dist/{chunk-XQRIY5K5.js.map → chunk-Y4BL3YYX.js.map} +1 -1
- package/dist/{chunk-HQNQ3CLQ.cjs → chunk-ZMSM3NOH.cjs} +18 -18
- package/dist/{chunk-HQNQ3CLQ.cjs.map → chunk-ZMSM3NOH.cjs.map} +1 -1
- package/dist/{chunk-GQUFPTN7.cjs → chunk-ZPF4I3K2.cjs} +16 -16
- package/dist/{chunk-GQUFPTN7.cjs.map → chunk-ZPF4I3K2.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-CFCfrReG.d.cts → delegate-ByfKszb6.d.cts} +1 -1
- package/dist/{delegate-BSbGQabI.d.ts → delegate-Cd28gxpM.d.ts} +1 -1
- package/dist/{index-CzUVvIxA.d.ts → index-B6X2E7W_.d.ts} +2 -2
- package/dist/{index-B3fRWO5i.d.cts → index-BURzbRup.d.cts} +38 -16
- package/dist/{index-B3fRWO5i.d.ts → index-BURzbRup.d.ts} +38 -16
- package/dist/{index-Fpf4mQZr.d.cts → index-DgH_0j14.d.cts} +2 -2
- package/dist/index.cjs +313 -313
- package/dist/index.d.cts +107 -27
- package/dist/index.d.ts +107 -27
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +33 -33
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-CdfoCMaw.d.ts → taskRunner-BaNCSxqK.d.ts} +1 -1
- package/dist/{taskRunner-Dk6oDAtd.d.cts → taskRunner-i56-drQV.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +18 -15
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +5 -4
- package/dist/wallet/expo/index.d.ts +5 -4
- package/dist/wallet/expo/index.js +8 -5
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-D9dvXu-K.d.cts → wallet-BjQugVUt.d.cts} +11 -6
- package/dist/{wallet-BQHNgc_v.d.ts → wallet-BnmhohgZ.d.ts} +11 -6
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-NKKJEA3Z.js.map +0 -1
- package/dist/chunk-QFB55EOZ.js.map +0 -1
- package/dist/chunk-QKNSMVBW.cjs.map +0 -1
- package/dist/chunk-XLHUGP3G.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ah as ReadonlyIdentity, a as Identity, a4 as DescriptorSigningRequest, a5 as Transaction, aB as SignerSession, a3 as DescriptorProvider, aF as IntentFeeConfig, aG as OffchainInput, aH as FeeAmount, aI as OnchainInput, aJ as FeeOutput, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, P as PageRequest, F as PageResult, O as Outpoint, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch, W as WalletRepository, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, B as Contract, C as ContractRepository, X as ContractFilter, I as IWallet, v as ArkProvider, ar as NetworkName, ai as OnchainProvider, az as SettlementConfig, aK as ContractWatcherConfig, aL as Asset, R as Recipient, aM as FeeInfo, o as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetArkadeInfoOptions, aN as GetVtxosOptions, aO as PaginationOptions, f as GetVtxosFilter, g as GetSpendableVtxosFilter, aP as CreateContractParams, aQ as GetContractsFilter, z as VirtualCoin, aR as GetSpendablePathsOptions, aS as GetAllSpendingPathsOptions, l as GetNewAddressesOptions, aT as InputExpiryFloor, aU as IssuanceParams, aV as ReissuanceParams, aW as BurnParams, aX as RenewVtxosOptions, A as ArkadeInfo, aY as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ao as ContractSyncState, at as ContractWithVtxos, aZ as WatchedScript, a_ as PathSelection, m as NewAddress, a$ as ContractEvent, b0 as AssetDetails, b1 as IssuanceResult, b2 as DelegateInfo, b3 as MigrationGlobalSkipReason, b4 as MigrationLegSkipReason, b5 as SignerStatus, ag as IReadonlyWallet, i as ActivityRegistry, an as IReadonlyAssetManager, b6 as StorageConfig, j as Activity, k as IContractManager, q as IAssetManager, p as SendParams, n as IDelegateManager, b7 as IVtxoManager, a6 as Network, av as Coin, b8 as SendBitcoinParams, b9 as ExplorerTransaction, aC as SignedIntent, aD as Intent, ba as TreeNonces, bb as TreePartialSigs, T as TxNotificationEvent, bc as PendingTx, y as TapLeafScript, bd as EncodedVtxoScript, ay as CSVMultisigTapscript, x as RelativeTimelock, be as EmulatorProvider, V as VtxoScript, bf as Status, as as ArkAddress, bg as ChainTx, w as IndexerProvider, a9 as TxTree, bh as ArkadeService, bi as ContractVtxoEvent, bj as ExtendedContractVtxo, bk as ResolvedArkadeService, bl as resolveArkadeService, bm as PathContext } from './index-
|
|
2
|
-
export { bn as ActivityIntent, bo as ActivityResolver, bp as ArkIntentState, bq as ArkTapscript, br as AssetMetadata, bs as BITCOIN_EMULATOR_PUBKEY, bt as BaseWalletConfig, ad as BatchFailedEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, bu as BatchInfo, bv as BatchSignableIdentity, a7 as BatchStartedEvent, bw as CLTVMultisigTapscript, bx as CandidateDeps, by as ChainTxType, a2 as ChainedTxType, bz as CommitmentTx, bA as ConditionCSVMultisigTapscript, bB as ConditionMultisigTapscript, bC as ConnectorTreeNode, bD as ContractBalance, bE as ContractEventCallback, bF as ContractHandler, aw as ContractManager, ax as ContractManagerConfig, bG as ContractState, bH as ContractVtxo, bI as ContractWatcher, bJ as ContractWatcherEventCallback, bK as DEFAULT_ARKADE_EMULATOR_URL, bL as DEFAULT_VTXO_PAGE_SIZE, bM as DelegateManagerImpl, bN as DelegateOptions, aj as DelegateProvider, bO as DeprecatedSignerMigrationReport, bP as DeprecatedSignerReport, bQ as DigestMismatchError, bR as Discoverable, bS as DiscoveredContract, bT as DiscoveryDeps, bU as ESPLORA_URL, bV as EmulatorInfo, aq as EsploraProvider, bW as EventSourceCapable, bX as EventSourceFactory, bY as EventSourceLike, bZ as EventSourceUnavailableError, al as ExitCaptureMode, b_ as ExitChainResolver, am as ExitDataSource, b$ as GroupMembership, c0 as HandlerError, c1 as INTENT_TERMINAL_STATES, c2 as IndexerTxType, c3 as IntentCoin, c4 as IntentFilter, c5 as KnownMetadata, c6 as MAX_PAGE_SIZE, c7 as MUTINYNET_EMULATOR_PUBKEY, c8 as MigrateDeprecatedSignerOptions, c9 as MigrationLegReport, ca as MigrationVtxoRef, cb as MultisigTapscript, cc as NewAddressType, cd as Nonces, ce as Output, cf as PageResponse, cg as PartialSig, ch as PrevTxSource, ci as PrevTxUnavailableError, cj as ProviderClass, ck as REGTEST_EMULATOR_PUBKEY, cl as RawTxSource, ak as ReadonlyWalletConfig, ap as RecipientArkadeAddressContext, cm as RenewalSplit, cn as RenewalSplitContext, r as RestArkProvider, co as RestDelegateProvider, cp as RestEmulatorProvider, s as RestIndexerProvider, cq as ScanContractsOptions, cr as ScanResult, cs as ScheduledSession, ct as SettlementEventType, cu as SignRequest, cv as SignerClassification, cw as SignerSet, t as SubscriptionEvent, cx as SubscriptionFilter, u as SubscriptionHeartbeat, cy as SubscriptionResponse, cz as SweepTxNotification, cA as TapLeaves, cB as TapTreeCoder, cC as TapscriptType, aE as TimeHeight, aa as TreeNoncesEvent, af as TreeSignatureEvent, a8 as TreeSigningStartedEvent, ae as TreeTxEvent, cD as Tx, cE as TxHistoryRecord, cF as TxKey, cG as TxNotification, cH as TxTag, cI as TxTreeNode, cJ as TxType, cK as Vtxo, cL as VtxoChain, aA as VtxoManager, cM as VtxoType, b as WalletConfig, cN as WalletMode, cO as WithPrevTx, cP as assertAllowedSighashTypes, cQ as assertPageRequest, cR as assertRecipientArkadeAddress, cS as assetMintResolver, cT as attachPrevArkTxs, cU as attachPrevoutTxs, cV as boardingResolver, cW as canRecoverOnchain, cX as canSpendOffchain, cY as canSweepOnchain, cZ as classifyAgainstSignerSet, c_ as classifyContractSigner, c$ as collabExitResolver, d0 as collectContracts, d1 as collectIntents, d2 as collectPages, d3 as collectScriptVtxos, d4 as collectTransactionHistory, d5 as collectUtxos, d6 as collectVtxos, d7 as configureEventSource, d8 as createDefaultActivityRegistry, d9 as createExitChainResolver, da as decodeTapscript, db as defaultEmulatorPubkey, dc as getAllNormalizedVtxos, dd as getConfiguredEventSource, de as getNetwork, df as getNormalizedVtxos, dg as getRandomId, dh as getSequence, di as hasCandidates, dj as isBatchSignable, dk as isContractVtxoEvent, dl as isCooperativelyMigratable, dm as isDiscoverable, dn as isEventSourceUnavailableError, dp as isPastExpiry, dq as isSigningIdentity, dr as isSubdust, ds as isTerminalIntentState, dt as isVirtualCoin, du as isVtxoExpiringSoon, dv as isVtxoSpent, dw as iteratePages, dx as networkFromArkadeInfo, dy as networks, dz as pageResult, dA as resolveEmulatorPubkey, dB as resolveEventSource, dC as resolvePrevTxs, dD as scriptFromTapLeafScript, dE as signerSetFromInfo, dF as toOffchainInputFeeParams, dG as toXOnlySignerHex, dH as withPrevTxs } from './index-
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './wallet-
|
|
4
|
-
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveDescriptorSigner, O as selectVirtualCoins, Q as signingDescriptorIndex, T as strictSigningDescriptorIndex, U as waitForIncomingFunds } from './wallet-
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue,
|
|
6
|
-
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { ah as ReadonlyIdentity, a as Identity, a4 as DescriptorSigningRequest, a5 as Transaction, aB as SignerSession, a3 as DescriptorProvider, aF as IntentFeeConfig, aG as OffchainInput, aH as FeeAmount, aI as OnchainInput, aJ as FeeOutput, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, P as PageRequest, F as PageResult, O as Outpoint, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch, W as WalletRepository, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, B as Contract, C as ContractRepository, X as ContractFilter, I as IWallet, v as ArkProvider, ar as NetworkName, ai as OnchainProvider, az as SettlementConfig, aK as ContractWatcherConfig, aL as Asset, R as Recipient, aM as FeeInfo, o as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetArkadeInfoOptions, aN as GetVtxosOptions, aO as PaginationOptions, f as GetVtxosFilter, g as GetSpendableVtxosFilter, aP as CreateContractParams, aQ as GetContractsFilter, z as VirtualCoin, aR as GetSpendablePathsOptions, aS as GetAllSpendingPathsOptions, l as GetNewAddressesOptions, aT as InputExpiryFloor, aU as IssuanceParams, aV as ReissuanceParams, aW as BurnParams, aX as RenewVtxosOptions, A as ArkadeInfo, aY as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ao as ContractSyncState, at as ContractWithVtxos, aZ as WatchedScript, a_ as PathSelection, m as NewAddress, a$ as ContractEvent, b0 as AssetDetails, b1 as IssuanceResult, b2 as DelegateInfo, b3 as MigrationGlobalSkipReason, b4 as MigrationLegSkipReason, b5 as SignerStatus, ag as IReadonlyWallet, i as ActivityRegistry, an as IReadonlyAssetManager, b6 as StorageConfig, j as Activity, k as IContractManager, q as IAssetManager, p as SendParams, n as IDelegateManager, b7 as IVtxoManager, a6 as Network, av as Coin, b8 as SendBitcoinParams, b9 as ExplorerTransaction, aC as SignedIntent, aD as Intent, ba as TreeNonces, bb as TreePartialSigs, T as TxNotificationEvent, bc as PendingTx, y as TapLeafScript, bd as EncodedVtxoScript, ay as CSVMultisigTapscript, x as RelativeTimelock, be as EmulatorProvider, V as VtxoScript, bf as Status, as as ArkAddress, bg as ChainTx, w as IndexerProvider, a9 as TxTree, bh as ArkadeService, bi as ContractVtxoEvent, bj as ExtendedContractVtxo, bk as ResolvedArkadeService, bl as resolveArkadeService, bm as PathContext } from './index-BURzbRup.js';
|
|
2
|
+
export { bn as ActivityIntent, bo as ActivityResolver, bp as ArkIntentState, bq as ArkTapscript, br as AssetMetadata, bs as BITCOIN_EMULATOR_PUBKEY, bt as BaseWalletConfig, ad as BatchFailedEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, bu as BatchInfo, bv as BatchSignableIdentity, a7 as BatchStartedEvent, bw as CLTVMultisigTapscript, bx as CandidateDeps, by as ChainTxType, a2 as ChainedTxType, bz as CommitmentTx, bA as ConditionCSVMultisigTapscript, bB as ConditionMultisigTapscript, bC as ConnectorTreeNode, bD as ContractBalance, bE as ContractEventCallback, bF as ContractHandler, aw as ContractManager, ax as ContractManagerConfig, bG as ContractState, bH as ContractVtxo, bI as ContractWatcher, bJ as ContractWatcherEventCallback, bK as DEFAULT_ARKADE_EMULATOR_URL, bL as DEFAULT_VTXO_PAGE_SIZE, bM as DelegateManagerImpl, bN as DelegateOptions, aj as DelegateProvider, bO as DeprecatedSignerMigrationReport, bP as DeprecatedSignerReport, bQ as DigestMismatchError, bR as Discoverable, bS as DiscoveredContract, bT as DiscoveryDeps, bU as ESPLORA_URL, bV as EmulatorInfo, aq as EsploraProvider, bW as EventSourceCapable, bX as EventSourceFactory, bY as EventSourceLike, bZ as EventSourceUnavailableError, al as ExitCaptureMode, b_ as ExitChainResolver, am as ExitDataSource, b$ as GroupMembership, c0 as HandlerError, c1 as INTENT_TERMINAL_STATES, c2 as IndexerTxType, c3 as IntentCoin, c4 as IntentFilter, c5 as KnownMetadata, c6 as MAX_PAGE_SIZE, c7 as MUTINYNET_EMULATOR_PUBKEY, c8 as MigrateDeprecatedSignerOptions, c9 as MigrationLegReport, ca as MigrationVtxoRef, cb as MultisigTapscript, cc as NewAddressType, cd as Nonces, ce as Output, cf as PageResponse, cg as PartialSig, ch as PrevTxSource, ci as PrevTxUnavailableError, cj as ProviderClass, ck as REGTEST_EMULATOR_PUBKEY, cl as RawTxSource, ak as ReadonlyWalletConfig, ap as RecipientArkadeAddressContext, cm as RenewalSplit, cn as RenewalSplitContext, r as RestArkProvider, co as RestDelegateProvider, cp as RestEmulatorProvider, s as RestIndexerProvider, cq as ScanContractsOptions, cr as ScanResult, cs as ScheduledSession, ct as SettlementEventType, cu as SignRequest, cv as SignerClassification, cw as SignerSet, t as SubscriptionEvent, cx as SubscriptionFilter, u as SubscriptionHeartbeat, cy as SubscriptionResponse, cz as SweepTxNotification, cA as TapLeaves, cB as TapTreeCoder, cC as TapscriptType, aE as TimeHeight, aa as TreeNoncesEvent, af as TreeSignatureEvent, a8 as TreeSigningStartedEvent, ae as TreeTxEvent, cD as Tx, cE as TxHistoryRecord, cF as TxKey, cG as TxNotification, cH as TxTag, cI as TxTreeNode, cJ as TxType, cK as Vtxo, cL as VtxoChain, aA as VtxoManager, cM as VtxoType, b as WalletConfig, cN as WalletMode, cO as WithPrevTx, cP as assertAllowedSighashTypes, cQ as assertPageRequest, cR as assertRecipientArkadeAddress, cS as assetMintResolver, cT as attachPrevArkTxs, cU as attachPrevoutTxs, cV as boardingResolver, cW as canRecoverOnchain, cX as canSpendOffchain, cY as canSweepOnchain, cZ as classifyAgainstSignerSet, c_ as classifyContractSigner, c$ as collabExitResolver, d0 as collectContracts, d1 as collectIntents, d2 as collectPages, d3 as collectScriptVtxos, d4 as collectTransactionHistory, d5 as collectUtxos, d6 as collectVtxos, d7 as configureEventSource, d8 as createDefaultActivityRegistry, d9 as createExitChainResolver, da as decodeTapscript, db as defaultEmulatorPubkey, dc as getAllNormalizedVtxos, dd as getConfiguredEventSource, de as getNetwork, df as getNormalizedVtxos, dg as getRandomId, dh as getSequence, di as hasCandidates, dj as isBatchSignable, dk as isContractVtxoEvent, dl as isCooperativelyMigratable, dm as isDiscoverable, dn as isEventSourceUnavailableError, dp as isPastExpiry, dq as isSigningIdentity, dr as isSubdust, ds as isTerminalIntentState, dt as isVirtualCoin, du as isVtxoExpiringSoon, dv as isVtxoSpent, dw as iteratePages, dx as networkFromArkadeInfo, dy as networks, dz as pageResult, dA as resolveEmulatorPubkey, dB as resolveEventSource, dC as resolvePrevTxs, dD as scriptFromTapLeafScript, dE as signerSetFromInfo, dF as toOffchainInputFeeParams, dG as toXOnlySignerHex, dH as withPrevTxs } from './index-BURzbRup.js';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './wallet-BnmhohgZ.js';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveDescriptorSigner, O as selectVirtualCoins, Q as signingDescriptorIndex, T as strictSigningDescriptorIndex, U as waitForIncomingFunds } from './wallet-BnmhohgZ.js';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, d as ArkadeFunction, I as InputDef, e as ArkadeValueType, C as CompiledProgramFunction, f as ArkadeArgType, g as ArkadeContractParams, h as ArkadeSegment, i as AsmToken, j as InputRef, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, l as TweakedSigner, U as UnsupportedProgramVersionError, W as WitnessRef, m as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, n as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-B6X2E7W_.js';
|
|
6
|
+
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-B6X2E7W_.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-Cd28gxpM.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-Cd28gxpM.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';
|
|
@@ -1066,6 +1066,8 @@ type Initialize = {
|
|
|
1066
1066
|
watcherConfig?: Partial<Omit<ContractWatcherConfig, "indexerProvider">>;
|
|
1067
1067
|
/** @see WalletConfig.lookAheadWindow */
|
|
1068
1068
|
lookAheadWindow?: number;
|
|
1069
|
+
/** @see WalletConfig.oneShotSubmit */
|
|
1070
|
+
oneShotSubmit?: boolean;
|
|
1069
1071
|
/** @see WalletConfig.minBatchExpirySeconds */
|
|
1070
1072
|
minBatchExpirySeconds?: bigint;
|
|
1071
1073
|
/**
|
|
@@ -2788,10 +2790,16 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2788
2790
|
private indexerProvider;
|
|
2789
2791
|
private walletRepository;
|
|
2790
2792
|
private incomingFundsSubscription;
|
|
2793
|
+
private incomingFundsRegistrations;
|
|
2791
2794
|
private contractEventsSubscription;
|
|
2792
2795
|
private onNextTick;
|
|
2793
2796
|
private channel;
|
|
2794
2797
|
private incomingFundsEpoch;
|
|
2798
|
+
/**
|
|
2799
|
+
* Supersedes older initializers without touching `incomingFundsEpoch`, so a
|
|
2800
|
+
* re-init that fails before registering leaves the live subscription delivering.
|
|
2801
|
+
*/
|
|
2802
|
+
private initEpoch;
|
|
2795
2803
|
private contractEventsEpoch;
|
|
2796
2804
|
private boardingEpoch;
|
|
2797
2805
|
/** Per-request progress callbacks: ends with the handler, not with a re-init. */
|
|
@@ -2835,6 +2843,7 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2835
2843
|
private handleGetBalance;
|
|
2836
2844
|
private getBoardingUtxosForBalance;
|
|
2837
2845
|
private onWalletInitialized;
|
|
2846
|
+
private registerIncomingFunds;
|
|
2838
2847
|
/**
|
|
2839
2848
|
* Refresh boarding inputs and transaction history. The virtual outputs come
|
|
2840
2849
|
* from the contract manager, which runs before this. Shared by
|
|
@@ -2845,8 +2854,9 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2845
2854
|
* off the caller's path. @see RequestInitWallet.payload.lazyBoarding
|
|
2846
2855
|
*/
|
|
2847
2856
|
private refreshCachedData;
|
|
2848
|
-
/**
|
|
2849
|
-
private
|
|
2857
|
+
/** History rows plus the address they are stored under. Does not write. */
|
|
2858
|
+
private loadHistoryCache;
|
|
2859
|
+
private storeHistoryCache;
|
|
2850
2860
|
/**
|
|
2851
2861
|
* @param gen - set by a background caller; each write here is skipped once it goes stale.
|
|
2852
2862
|
* The fetch saves the fetched rows itself, before control returns, so that one write is
|
|
@@ -2994,6 +3004,8 @@ interface ServiceWorkerWalletOptions {
|
|
|
2994
3004
|
* @see WalletConfig.lookAheadWindow
|
|
2995
3005
|
*/
|
|
2996
3006
|
lookAheadWindow?: number;
|
|
3007
|
+
/** @see WalletConfig.oneShotSubmit */
|
|
3008
|
+
oneShotSubmit?: boolean;
|
|
2997
3009
|
/**
|
|
2998
3010
|
* Batch expiry floor forwarded to the worker wallet. Lowering it below its
|
|
2999
3011
|
* per-network default relaxes a fund-safety bound; intended for local
|
|
@@ -3044,6 +3056,7 @@ type MessageBusInitConfig = {
|
|
|
3044
3056
|
walletMode?: ServiceWorkerWalletMode;
|
|
3045
3057
|
watcherConfig?: Partial<Omit<ContractWatcherConfig, "indexerProvider">>;
|
|
3046
3058
|
lookAheadWindow?: number;
|
|
3059
|
+
oneShotSubmit?: boolean;
|
|
3047
3060
|
minBatchExpirySeconds?: bigint;
|
|
3048
3061
|
messageTimeouts?: Record<string, number>;
|
|
3049
3062
|
};
|
|
@@ -3167,6 +3180,7 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
|
|
|
3167
3180
|
}
|
|
3168
3181
|
declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements IWallet, HDWalletCapable, HDAllocationCapable, AddressAllocationCapable {
|
|
3169
3182
|
readonly serviceWorker: ServiceWorker;
|
|
3183
|
+
readonly oneShotSubmit?: boolean | undefined;
|
|
3170
3184
|
readonly walletRepository: WalletRepository;
|
|
3171
3185
|
readonly contractRepository: ContractRepository;
|
|
3172
3186
|
readonly identity: Identity;
|
|
@@ -3176,7 +3190,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3176
3190
|
private _concurrentSpending;
|
|
3177
3191
|
/** @see WalletConfig.concurrentSpending */
|
|
3178
3192
|
get concurrentSpending(): boolean;
|
|
3179
|
-
protected constructor(serviceWorker: ServiceWorker, identity: Identity, walletRepository: WalletRepository, contractRepository: ContractRepository, messageTag: string, hasDelegate: boolean);
|
|
3193
|
+
protected constructor(serviceWorker: ServiceWorker, identity: Identity, walletRepository: WalletRepository, contractRepository: ContractRepository, messageTag: string, hasDelegate: boolean, oneShotSubmit?: boolean | undefined);
|
|
3180
3194
|
get assetManager(): IAssetManager;
|
|
3181
3195
|
static create(options: ServiceWorkerWalletCreateOptions): Promise<ServiceWorkerWallet>;
|
|
3182
3196
|
/**
|
|
@@ -3886,6 +3900,8 @@ declare function assertSubmittedArkTxid(response: {
|
|
|
3886
3900
|
* server at `submitTx`, before any of this runs. What it buys is a loud,
|
|
3887
3901
|
* immediate failure instead of a caller reporting success, watching nothing
|
|
3888
3902
|
* confirm, and learning the truth when the counterparty's refund lands.
|
|
3903
|
+
* Under one-shot submit the server has already finalized when it runs, so it
|
|
3904
|
+
* reports a bad response rather than preventing one.
|
|
3889
3905
|
*/
|
|
3890
3906
|
interface VerifyServerSignatures {
|
|
3891
3907
|
/** The Ark server's key; x-only or compressed, both accepted. */
|
|
@@ -3916,6 +3932,7 @@ declare function signAndSubmitOffchainTx(params: {
|
|
|
3916
3932
|
serverUnrollScript: CSVMultisigTapscript.Type;
|
|
3917
3933
|
/** Forwarded to {@link submitOffchainTx}; omitted, nothing is checked. */
|
|
3918
3934
|
verifyServerSignatures?: VerifyServerSignatures;
|
|
3935
|
+
oneShot?: boolean;
|
|
3919
3936
|
}): Promise<string>;
|
|
3920
3937
|
/**
|
|
3921
3938
|
* Sign the caller's inputs of a pre-built offchain tx and submit it through the emulator, which
|
|
@@ -5437,25 +5454,60 @@ type ArgsTuple<I extends readonly InputDef[]> = {
|
|
|
5437
5454
|
type FnArgs<F extends ArkadeFunction> = F extends {
|
|
5438
5455
|
inputs: infer I extends readonly InputDef[];
|
|
5439
5456
|
} ? ArgsTuple<I> : [];
|
|
5457
|
+
/** A contract's functions returning `R`: typed per function for a literal program, else loose. */
|
|
5458
|
+
type FunctionMap<P extends Program, R> = string extends keyof P["functions"] ? Record<string, (...args: ArkadeArgValue[]) => R> : {
|
|
5459
|
+
[K in keyof P["functions"]]: (...args: FnArgs<P["functions"][K]>) => R;
|
|
5460
|
+
};
|
|
5440
5461
|
/**
|
|
5441
5462
|
* The statically-typed `functions` map of a contract: precisely typed per function for a literal
|
|
5442
5463
|
* program, the loose {@link CallableFunctions} for the widened {@link Program}.
|
|
5443
5464
|
*/
|
|
5444
|
-
type ContractFunctions<P extends Program> =
|
|
5445
|
-
|
|
5446
|
-
|
|
5465
|
+
type ContractFunctions<P extends Program> = FunctionMap<P, ArkadeTransactionBuilder>;
|
|
5466
|
+
/** The statically-typed `unlock` map of a contract, typed like {@link ContractFunctions}. */
|
|
5467
|
+
type ContractUnlockers<P extends Program> = FunctionMap<P, ArkadeUnlocker>;
|
|
5447
5468
|
/** A spendable coin (VTXO) — outpoint + value. */
|
|
5448
5469
|
interface Utxo {
|
|
5449
5470
|
txid: string;
|
|
5450
5471
|
vout: number;
|
|
5451
5472
|
value: number;
|
|
5452
5473
|
/**
|
|
5453
|
-
*
|
|
5474
|
+
* The coin's scriptPubKey (hex), as {@link ArkadeContract.getUtxos} returns it. When set,
|
|
5475
|
+
* `.from()` refuses the coin unless it matches the contract spending it.
|
|
5476
|
+
*/
|
|
5477
|
+
script?: string;
|
|
5478
|
+
/**
|
|
5479
|
+
* Whether the server swept the coin's batch, as {@link ArkadeContract.getUtxos} reports it. A
|
|
5480
|
+
* swept coin can't be spent offchain, so `.from()` refuses it; recover it into a batch instead.
|
|
5481
|
+
*/
|
|
5482
|
+
isSwept?: boolean;
|
|
5483
|
+
/**
|
|
5484
|
+
* When a virtual coin's batch expires, as {@link ArkadeContract.getUtxos} reports it. From that
|
|
5485
|
+
* moment on, `.from()` refuses the coin. A coin without it, such as an onchain one, is never
|
|
5486
|
+
* refused for expiry; height-based expiry isn't checked, since that needs the chain tip.
|
|
5487
|
+
*/
|
|
5488
|
+
expiresAt?: Date;
|
|
5489
|
+
/**
|
|
5490
|
+
* Assets the coin carries, as {@link ArkadeContract.getUtxos} reports them. arkd refuses an
|
|
5491
|
+
* input whose assets the spend does not route, so `send()` needs a `.withAsset()` input or a
|
|
5492
|
+
* caller's asset packet for such a coin, and selection without `.from()` skips it otherwise.
|
|
5493
|
+
*/
|
|
5494
|
+
assets?: readonly Asset[];
|
|
5495
|
+
/**
|
|
5496
|
+
* Raw bytes of the ark tx that created this VTXO, attached as its input's PrevArkTx. Overrides
|
|
5454
5497
|
* the indexer-resolved value; supply it when the tx isn't indexable yet (a recursive covenant
|
|
5455
5498
|
* spending an ark tx the caller just built).
|
|
5456
5499
|
*/
|
|
5457
5500
|
sourceTx?: Uint8Array;
|
|
5458
5501
|
}
|
|
5502
|
+
/**
|
|
5503
|
+
* A contract function bound to its call arguments, from `contract.unlock.<name>(...args)`.
|
|
5504
|
+
* Pass it to {@link ArkadeTransactionBuilder.from} to spend coins through that function.
|
|
5505
|
+
*/
|
|
5506
|
+
interface ArkadeUnlocker {
|
|
5507
|
+
readonly contract: ArkadeContract<any>;
|
|
5508
|
+
readonly fn: CompiledProgramFunction;
|
|
5509
|
+
readonly args: Record<string, ArkadeArgValue>;
|
|
5510
|
+
}
|
|
5459
5511
|
/**
|
|
5460
5512
|
* An asset-group transfer attached to a spend: which inputs supply the asset and
|
|
5461
5513
|
* which outputs receive it. Encoded into the asset Packet alongside the emulator
|
|
@@ -5515,6 +5567,9 @@ interface ArkadeConnectCommonOptions {
|
|
|
5515
5567
|
* instead of the indexer. Never disposed by {@link Arkade.dispose}.
|
|
5516
5568
|
*/
|
|
5517
5569
|
contractManager?: IContractManager;
|
|
5570
|
+
/** For pure-tapscript spends; a client built for a wallet passes `wallet.oneShotSubmit`.
|
|
5571
|
+
* @see WalletConfig.oneShotSubmit */
|
|
5572
|
+
oneShotSubmit?: boolean;
|
|
5518
5573
|
}
|
|
5519
5574
|
/**
|
|
5520
5575
|
* The one-liner form: name the deployment, and `connect` resolves the providers (and, for
|
|
@@ -5602,6 +5657,7 @@ declare class Arkade {
|
|
|
5602
5657
|
readonly userKey?: Uint8Array;
|
|
5603
5658
|
/** The contract manager, when contract persistence is wired up (passed in or owned). */
|
|
5604
5659
|
readonly contractManager?: IContractManager;
|
|
5660
|
+
readonly oneShotSubmit?: boolean;
|
|
5605
5661
|
/** Whether {@link connect} built {@link contractManager}, so {@link dispose} must stop it. */
|
|
5606
5662
|
private readonly ownsContractManager;
|
|
5607
5663
|
/** {@link ArkadeContract.on} handles by contract script (hex). */
|
|
@@ -5642,6 +5698,11 @@ declare class Arkade {
|
|
|
5642
5698
|
* artifacts reserve the server key and exit delay to the connected server.
|
|
5643
5699
|
*/
|
|
5644
5700
|
contract<const P extends Program>(program: P, args?: Record<string, ArkadeParamValue>): ArkadeContract<P>;
|
|
5701
|
+
/**
|
|
5702
|
+
* Start a spend with no function of its own: each `.from(coins, contract.unlock.<name>(...))`
|
|
5703
|
+
* names the function its coins are spent through.
|
|
5704
|
+
*/
|
|
5705
|
+
transaction(): ArkadeTransactionBuilder;
|
|
5645
5706
|
}
|
|
5646
5707
|
/** A resolved, instantiated Arkade contract. */
|
|
5647
5708
|
declare class ArkadeContract<P extends Program = Program> {
|
|
@@ -5670,6 +5731,8 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5670
5731
|
get pkScript(): Uint8Array;
|
|
5671
5732
|
/** Callable spending paths: `functions.<name>(...args)` (see {@link ContractFunctions}). */
|
|
5672
5733
|
get functions(): ContractFunctions<P>;
|
|
5734
|
+
/** Spending paths bound to their arguments, for `.from(coins, contract.unlock.<name>(...))`. */
|
|
5735
|
+
get unlock(): ContractUnlockers<P>;
|
|
5673
5736
|
/**
|
|
5674
5737
|
* The `createContract` payload (serialized program, args, keys, script, address), for
|
|
5675
5738
|
* registering through a manager the client does not hold.
|
|
@@ -5723,25 +5786,33 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5723
5786
|
getBalance(): Promise<bigint>;
|
|
5724
5787
|
}
|
|
5725
5788
|
/**
|
|
5726
|
-
* Fluent builder for a single spend. Obtained from `contract.functions.<name>(...)
|
|
5727
|
-
* chain `.from()`/`.to()` then `.send()`
|
|
5789
|
+
* Fluent builder for a single spend. Obtained from `contract.functions.<name>(...)`, or from
|
|
5790
|
+
* `ark.transaction()` with no function of its own; chain `.from()`/`.to()` then `.send()`
|
|
5791
|
+
* (broadcast) or `.build()` (assemble only).
|
|
5728
5792
|
*/
|
|
5729
5793
|
declare class ArkadeTransactionBuilder {
|
|
5730
|
-
private readonly
|
|
5731
|
-
private readonly
|
|
5732
|
-
private readonly args;
|
|
5794
|
+
private readonly client;
|
|
5795
|
+
private readonly unlocker?;
|
|
5733
5796
|
private readonly outputs;
|
|
5734
5797
|
private readonly fundingCoins;
|
|
5735
5798
|
private readonly assetSpecs;
|
|
5736
5799
|
private readonly extraPackets;
|
|
5737
|
-
private
|
|
5800
|
+
private readonly inputs;
|
|
5738
5801
|
private changeScript?;
|
|
5739
5802
|
/** @internal */
|
|
5740
|
-
constructor(
|
|
5741
|
-
|
|
5803
|
+
constructor(client: Arkade, unlocker?: ArkadeUnlocker | undefined);
|
|
5804
|
+
/**
|
|
5805
|
+
* Spend coins through this builder's function, or through `unlocker`
|
|
5806
|
+
* (`other.unlock.<name>(...args)`, same client), which `ark.transaction()` requires. Calls add
|
|
5807
|
+
* up; contract coins come first, in call order, then `.fund()` inputs.
|
|
5808
|
+
*
|
|
5809
|
+
* Every coin's script sees the same outputs: "output 0 pays X" passes once for all of them.
|
|
5810
|
+
* For one payment per coin, the contract must check `INSPECTNUMINPUTS` or `PUSHCURRENTINPUTINDEX`.
|
|
5811
|
+
*/
|
|
5812
|
+
from(coins: Utxo | Utxo[], unlocker?: ArkadeUnlocker | undefined): this;
|
|
5742
5813
|
/**
|
|
5743
5814
|
* Add extra inputs the caller funds (e.g. a taker's own coins in a swap).
|
|
5744
|
-
* These
|
|
5815
|
+
* These come after the contract coins and are signed with the client identity.
|
|
5745
5816
|
*/
|
|
5746
5817
|
fund(coins: ArkTxInput[]): this;
|
|
5747
5818
|
/** Transfer an asset group: which inputs supply it and which outputs receive it. */
|
|
@@ -5758,15 +5829,22 @@ declare class ArkadeTransactionBuilder {
|
|
|
5758
5829
|
arkTx: Transaction;
|
|
5759
5830
|
checkpoints: Transaction[];
|
|
5760
5831
|
}>;
|
|
5832
|
+
private assemble;
|
|
5761
5833
|
/** Build, submit and return the finalized transaction. */
|
|
5762
5834
|
send(): Promise<ArkadeSpendResult>;
|
|
5763
5835
|
/** Sign the client-owned inputs of the ark tx (no-op when there are none). */
|
|
5764
5836
|
private signArk;
|
|
5765
|
-
/**
|
|
5837
|
+
/** The functions this spend goes through: the `.from()` ones, else this builder's own. */
|
|
5838
|
+
private unlockers;
|
|
5839
|
+
/** Indexes of inputs the client owns and must sign (contract inputs + funded inputs). */
|
|
5766
5840
|
private userInputIndexes;
|
|
5767
5841
|
private selectCoin;
|
|
5842
|
+
/**
|
|
5843
|
+
* Whether input `vin`'s assets are routed: by a `.withAsset()` input, or a caller's asset packet.
|
|
5844
|
+
* A caller's packet counts for every input, unread; arkd checks what it actually routes.
|
|
5845
|
+
*/
|
|
5846
|
+
private routesAssetsFrom;
|
|
5768
5847
|
private buildAssetPacket;
|
|
5769
|
-
private witnessBytes;
|
|
5770
5848
|
}
|
|
5771
5849
|
|
|
5772
5850
|
/**
|
|
@@ -5818,12 +5896,14 @@ declare const index_ArkadeService: typeof ArkadeService;
|
|
|
5818
5896
|
type index_ArkadeSpendResult = ArkadeSpendResult;
|
|
5819
5897
|
type index_ArkadeTransactionBuilder = ArkadeTransactionBuilder;
|
|
5820
5898
|
declare const index_ArkadeTransactionBuilder: typeof ArkadeTransactionBuilder;
|
|
5899
|
+
type index_ArkadeUnlocker = ArkadeUnlocker;
|
|
5821
5900
|
declare const index_AsmToken: typeof AsmToken;
|
|
5822
5901
|
type index_AssetSpec = AssetSpec;
|
|
5823
5902
|
type index_CallableFunctions = CallableFunctions;
|
|
5824
5903
|
declare const index_CompiledProgramFunction: typeof CompiledProgramFunction;
|
|
5825
5904
|
type index_ContractArtifact = ContractArtifact;
|
|
5826
5905
|
type index_ContractFunctions<P extends Program> = ContractFunctions<P>;
|
|
5906
|
+
type index_ContractUnlockers<P extends Program> = ContractUnlockers<P>;
|
|
5827
5907
|
declare const index_InputDef: typeof InputDef;
|
|
5828
5908
|
declare const index_InputRef: typeof InputRef;
|
|
5829
5909
|
declare const index_OP: typeof OP;
|
|
@@ -5862,7 +5942,7 @@ declare const index_toASM: typeof toASM;
|
|
|
5862
5942
|
declare const index_validateProgram: typeof validateProgram;
|
|
5863
5943
|
declare const index_witnessRefToBytes: typeof witnessRefToBytes;
|
|
5864
5944
|
declare namespace index {
|
|
5865
|
-
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5945
|
+
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, type index_ArkadeUnlocker as ArkadeUnlocker, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, type index_ContractUnlockers as ContractUnlockers, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5866
5946
|
}
|
|
5867
5947
|
|
|
5868
5948
|
/** Known BIP21 parameters including Arkade-specific extensions. */
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, Arkade, ArkadeCash, ArkadeCashCreateError, ArkadeCashOperatorMismatchError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, KeyringDescriptorProvider, MAX_PAGE_SIZE, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, OversizedChangeError, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, logExcludedVtxos, makeHandle, matchServerCheckpoints, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-
|
|
2
|
-
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-
|
|
3
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, UnsupportedProgramVersionError, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-
|
|
4
|
-
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DEFAULT_ARKADE_EMULATOR_URL, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, READ_TIMEOUT_MS, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, isVtxoSpent, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence, toOffchainInputFeeParams } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, Arkade, ArkadeCash, ArkadeCashCreateError, ArkadeCashOperatorMismatchError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, KeyringDescriptorProvider, MAX_PAGE_SIZE, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, OversizedChangeError, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, logExcludedVtxos, makeHandle, matchServerCheckpoints, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-HAQAWBYG.js';
|
|
2
|
+
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-6FL4N4S2.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, UnsupportedProgramVersionError, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-P7B4LQ3H.js';
|
|
4
|
+
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DEFAULT_ARKADE_EMULATOR_URL, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, READ_TIMEOUT_MS, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, isVtxoSpent, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence, toOffchainInputFeeParams } from './chunk-OPX2HRWM.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
var
|
|
3
|
+
var chunkOUTWUYJ4_cjs = require('../../chunk-OUTWUYJ4.cjs');
|
|
4
|
+
require('../../chunk-ZMSM3NOH.cjs');
|
|
5
|
+
require('../../chunk-BYPBVHVA.cjs');
|
|
6
|
+
var chunkKW7ZEWYS_cjs = require('../../chunk-KW7ZEWYS.cjs');
|
|
7
7
|
|
|
8
8
|
// src/repositories/realm/walletRepository.ts
|
|
9
9
|
var RealmWalletRepository = class {
|
|
@@ -35,7 +35,7 @@ var RealmWalletRepository = class {
|
|
|
35
35
|
await this.ensureInit();
|
|
36
36
|
this.realm.write(() => {
|
|
37
37
|
for (const vtxo of vtxos) {
|
|
38
|
-
const s =
|
|
38
|
+
const s = chunkOUTWUYJ4_cjs.serializeVtxo(vtxo);
|
|
39
39
|
this.realm.create(
|
|
40
40
|
"ArkVtxo",
|
|
41
41
|
{
|
|
@@ -50,7 +50,7 @@ var RealmWalletRepository = class {
|
|
|
50
50
|
intentCb: s.intentTapLeafScript.cb,
|
|
51
51
|
intentS: s.intentTapLeafScript.s,
|
|
52
52
|
statusJson: JSON.stringify(s.status),
|
|
53
|
-
createdAt:
|
|
53
|
+
createdAt: chunkOUTWUYJ4_cjs.createdAtToIso(s.createdAt),
|
|
54
54
|
isUnrolled: s.isUnrolled ?? false,
|
|
55
55
|
isSpent: s.isSpent === void 0 ? null : s.isSpent,
|
|
56
56
|
isSwept: s.isSwept === void 0 ? null : s.isSwept,
|
|
@@ -74,7 +74,7 @@ var RealmWalletRepository = class {
|
|
|
74
74
|
return this.deleteWhere("ArkVtxo", "address", address);
|
|
75
75
|
}
|
|
76
76
|
async getVtxosForScriptPage(script, page, options) {
|
|
77
|
-
|
|
77
|
+
chunkOUTWUYJ4_cjs.assertPageRequest(page);
|
|
78
78
|
await this.ensureInit();
|
|
79
79
|
let results = this.realm.objects("ArkVtxo").filtered("script == $0", script);
|
|
80
80
|
if (options?.unspentOnly) {
|
|
@@ -101,15 +101,15 @@ var RealmWalletRepository = class {
|
|
|
101
101
|
rows.push({ address: row.address, vtxo: vtxoObjectToDomain(row) });
|
|
102
102
|
if (rows.length > page.limit) break;
|
|
103
103
|
}
|
|
104
|
-
const result =
|
|
104
|
+
const result = chunkOUTWUYJ4_cjs.pageResult(rows, page.limit, (row) => ({
|
|
105
105
|
address: row.address,
|
|
106
106
|
txid: row.vtxo.txid,
|
|
107
107
|
vout: row.vtxo.vout
|
|
108
108
|
}));
|
|
109
|
-
return options?.unspentOnly ? { ...result, items: result.items.filter((row) => !
|
|
109
|
+
return options?.unspentOnly ? { ...result, items: result.items.filter((row) => !chunkKW7ZEWYS_cjs.isVtxoSpent(row.vtxo)) } : result;
|
|
110
110
|
}
|
|
111
111
|
async saveVtxosForScript(key, vtxos) {
|
|
112
|
-
return this.saveVtxos(
|
|
112
|
+
return this.saveVtxos(chunkOUTWUYJ4_cjs.checkSaveVtxosForScript("RealmWalletRepository", key, vtxos), vtxos);
|
|
113
113
|
}
|
|
114
114
|
async deleteVtxosForScript(script) {
|
|
115
115
|
return this.deleteWhere("ArkVtxo", "script", script);
|
|
@@ -119,7 +119,7 @@ var RealmWalletRepository = class {
|
|
|
119
119
|
return this.pageByAddress("ArkUtxo", address, page, utxoObjectToDomain);
|
|
120
120
|
}
|
|
121
121
|
async pageByAddress(schema, address, page, deserialize) {
|
|
122
|
-
|
|
122
|
+
chunkOUTWUYJ4_cjs.assertPageRequest(page);
|
|
123
123
|
await this.ensureInit();
|
|
124
124
|
let results = this.realm.objects(schema).filtered("address == $0", address);
|
|
125
125
|
if (page.after) {
|
|
@@ -137,18 +137,18 @@ var RealmWalletRepository = class {
|
|
|
137
137
|
rows.push({ key: { txid: row.txid, vout: row.vout }, item: deserialize(row) });
|
|
138
138
|
if (rows.length > page.limit) break;
|
|
139
139
|
}
|
|
140
|
-
const result =
|
|
140
|
+
const result = chunkOUTWUYJ4_cjs.pageResult(rows, page.limit, (row) => row.key);
|
|
141
141
|
return { items: result.items.map((row) => row.item), nextCursor: result.nextCursor };
|
|
142
142
|
}
|
|
143
143
|
async saveUtxos(addressOrBatch, utxos) {
|
|
144
144
|
await this.ensureInit();
|
|
145
|
-
const rows =
|
|
145
|
+
const rows = chunkOUTWUYJ4_cjs.utxoEntries(addressOrBatch, utxos).flatMap(
|
|
146
146
|
([address, list]) => list.map((utxo) => ({ address, utxo }))
|
|
147
147
|
);
|
|
148
148
|
if (rows.length === 0) return;
|
|
149
149
|
this.realm.write(() => {
|
|
150
150
|
for (const { address, utxo } of rows) {
|
|
151
|
-
const s =
|
|
151
|
+
const s = chunkOUTWUYJ4_cjs.serializeUtxo(utxo);
|
|
152
152
|
this.realm.create(
|
|
153
153
|
"ArkUtxo",
|
|
154
154
|
{
|
|
@@ -175,8 +175,8 @@ var RealmWalletRepository = class {
|
|
|
175
175
|
}
|
|
176
176
|
// ── Transaction history ────────────────────────────────────────────
|
|
177
177
|
async getTransactionHistoryPage(filter, page) {
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
chunkOUTWUYJ4_cjs.assertPageRequest(page);
|
|
179
|
+
chunkOUTWUYJ4_cjs.assertHistoryPageFilter(filter);
|
|
180
180
|
let results = this.realm.objects("ArkTransaction").filtered("address == $0", filter.address);
|
|
181
181
|
results = results.filtered(
|
|
182
182
|
"createdAt >= $0",
|
|
@@ -190,12 +190,12 @@ var RealmWalletRepository = class {
|
|
|
190
190
|
["arkTxid", false]
|
|
191
191
|
])) {
|
|
192
192
|
const tx = txObjectToDomain(row);
|
|
193
|
-
if (page.after !== void 0 &&
|
|
193
|
+
if (page.after !== void 0 && chunkOUTWUYJ4_cjs.compareHistoryCursors({ createdAt: tx.createdAt, key: tx.key }, page.after) <= 0)
|
|
194
194
|
continue;
|
|
195
195
|
rows.push(tx);
|
|
196
196
|
if (rows.length > page.limit) break;
|
|
197
197
|
}
|
|
198
|
-
return
|
|
198
|
+
return chunkOUTWUYJ4_cjs.pageResult(rows, page.limit, (tx) => ({ createdAt: tx.createdAt, key: tx.key }));
|
|
199
199
|
}
|
|
200
200
|
async saveTransactions(address, txs) {
|
|
201
201
|
await this.ensureInit();
|
|
@@ -213,7 +213,7 @@ var RealmWalletRepository = class {
|
|
|
213
213
|
amount: tx.amount,
|
|
214
214
|
settled: tx.settled,
|
|
215
215
|
createdAt: tx.createdAt,
|
|
216
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
216
|
+
assetsJson: tx.assets ? JSON.stringify(chunkOUTWUYJ4_cjs.serializeAssets(tx.assets)) : null
|
|
217
217
|
},
|
|
218
218
|
"modified"
|
|
219
219
|
);
|
|
@@ -290,9 +290,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
290
290
|
// Post-migration every row has `script`, but the backfill is
|
|
291
291
|
// idempotent: derive from `address` if the legacy column is still
|
|
292
292
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
293
|
-
script: obj.script ??
|
|
293
|
+
script: obj.script ?? chunkOUTWUYJ4_cjs.scriptFromArkAddress(obj.address)
|
|
294
294
|
};
|
|
295
|
-
return
|
|
295
|
+
return chunkOUTWUYJ4_cjs.deserializeVtxo(serialized);
|
|
296
296
|
}
|
|
297
297
|
function utxoObjectToDomain(obj) {
|
|
298
298
|
const serialized = {
|
|
@@ -311,7 +311,7 @@ function utxoObjectToDomain(obj) {
|
|
|
311
311
|
status: JSON.parse(obj.statusJson),
|
|
312
312
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
313
313
|
};
|
|
314
|
-
return
|
|
314
|
+
return chunkOUTWUYJ4_cjs.deserializeUtxo(serialized);
|
|
315
315
|
}
|
|
316
316
|
function txObjectToDomain(obj) {
|
|
317
317
|
const tx = {
|
|
@@ -326,7 +326,7 @@ function txObjectToDomain(obj) {
|
|
|
326
326
|
createdAt: obj.createdAt
|
|
327
327
|
};
|
|
328
328
|
if (obj.assetsJson) {
|
|
329
|
-
tx.assets =
|
|
329
|
+
tx.assets = chunkOUTWUYJ4_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
330
330
|
}
|
|
331
331
|
return tx;
|
|
332
332
|
}
|
|
@@ -352,9 +352,9 @@ var RealmContractRepository = class {
|
|
|
352
352
|
}
|
|
353
353
|
// ── Contract management ────────────────────────────────────────────
|
|
354
354
|
async getContractsPage(filter, page) {
|
|
355
|
-
|
|
356
|
-
if (
|
|
357
|
-
const toPage = (rows) =>
|
|
355
|
+
chunkOUTWUYJ4_cjs.assertPageRequest(page);
|
|
356
|
+
if (chunkOUTWUYJ4_cjs.contractFilterMatchesNothing(filter)) return { items: [] };
|
|
357
|
+
const toPage = (rows) => chunkOUTWUYJ4_cjs.pageResult(rows.map(contractObjectToDomain), page.limit, (contract) => contract.script);
|
|
358
358
|
if (filter?.watch === void 0 || filter.script !== void 0) {
|
|
359
359
|
return toPage(this.readRows(filter, page));
|
|
360
360
|
}
|
|
@@ -512,7 +512,7 @@ var RealmIntentRepository = class {
|
|
|
512
512
|
const clashes = [
|
|
513
513
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
|
|
514
514
|
].map(toIntent);
|
|
515
|
-
|
|
515
|
+
chunkOUTWUYJ4_cjs.assertIntentIdUnique(intent, clashes);
|
|
516
516
|
}
|
|
517
517
|
this.realm.create(
|
|
518
518
|
"ArkIntent",
|
|
@@ -540,22 +540,22 @@ var RealmIntentRepository = class {
|
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
542
|
async getIntentsPage(filter, page) {
|
|
543
|
-
|
|
543
|
+
chunkOUTWUYJ4_cjs.assertPageRequest(page);
|
|
544
544
|
let results = this.realm.objects("ArkIntent");
|
|
545
545
|
if (page.after !== void 0) results = results.filtered("intentTxId > $0", page.after);
|
|
546
546
|
const rows = [];
|
|
547
547
|
for (const row of results.sorted("intentTxId")) {
|
|
548
548
|
const intent = toIntent(row);
|
|
549
|
-
if (filter && !
|
|
549
|
+
if (filter && !chunkOUTWUYJ4_cjs.intentMatchesFilter(intent, filter)) continue;
|
|
550
550
|
rows.push(intent);
|
|
551
551
|
if (rows.length > page.limit) break;
|
|
552
552
|
}
|
|
553
|
-
return
|
|
553
|
+
return chunkOUTWUYJ4_cjs.pageResult(rows, page.limit, (intent) => intent.intentTxId);
|
|
554
554
|
}
|
|
555
555
|
async getLockedVtxoOutpoints() {
|
|
556
556
|
const out = [];
|
|
557
557
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
558
|
-
if (!
|
|
558
|
+
if (!chunkOUTWUYJ4_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
|
|
559
559
|
return out;
|
|
560
560
|
}
|
|
561
561
|
async [Symbol.asyncDispose]() {
|
|
@@ -597,7 +597,7 @@ var RealmVirtualTxRepository = class {
|
|
|
597
597
|
txid: t.txid,
|
|
598
598
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
599
599
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
600
|
-
type:
|
|
600
|
+
type: chunkOUTWUYJ4_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
601
601
|
},
|
|
602
602
|
"modified"
|
|
603
603
|
);
|
|
@@ -842,9 +842,9 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
842
842
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
843
843
|
const newVtxo = newVtxos[i];
|
|
844
844
|
if (!newVtxo.script) {
|
|
845
|
-
newVtxo.script =
|
|
845
|
+
newVtxo.script = chunkOUTWUYJ4_cjs.scriptFromArkAddress(newVtxo.address);
|
|
846
846
|
}
|
|
847
|
-
const facts =
|
|
847
|
+
const facts = chunkOUTWUYJ4_cjs.legacyVtxoFacts(legacyByPk.get(newVtxo.pk));
|
|
848
848
|
if (facts) {
|
|
849
849
|
if (newVtxo.isSpent == null) newVtxo.isSpent = facts.isSpent;
|
|
850
850
|
if (newVtxo.isSwept == null) newVtxo.isSwept = facts.isSwept;
|
|
@@ -874,7 +874,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
874
874
|
|
|
875
875
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
876
876
|
enumerable: true,
|
|
877
|
-
get: function () { return
|
|
877
|
+
get: function () { return chunkOUTWUYJ4_cjs.ChainedTxType; }
|
|
878
878
|
});
|
|
879
879
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
880
880
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, P as PageRequest, O as Outpoint, F as PageResult, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, C as ContractRepository, X as ContractFilter, B as Contract, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch } from '../../index-
|
|
2
|
-
export { a2 as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, P as PageRequest, O as Outpoint, F as PageResult, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, C as ContractRepository, X as ContractFilter, B as Contract, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch } from '../../index-BURzbRup.cjs';
|
|
2
|
+
export { a2 as ChainedTxType } from '../../index-BURzbRup.cjs';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/psbt.js';
|
|
5
5
|
import '@scure/btc-signer';
|