@arkade-os/sdk 0.5.0-rc.7 → 0.5.0-rc.8
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 +29 -0
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/{asyncStorageTaskQueue-BHOhjFiF.d.cts → asyncStorageTaskQueue-Bn3FoNkc.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-BedBOEpT.d.ts → asyncStorageTaskQueue-CeYTmuGU.d.ts} +2 -2
- package/dist/{chunk-XOT73T36.cjs → chunk-2AWDPVZI.cjs} +18 -18
- package/dist/{chunk-XOT73T36.cjs.map → chunk-2AWDPVZI.cjs.map} +1 -1
- package/dist/{chunk-XIPWLWPU.cjs → chunk-56RCBKNF.cjs} +17 -17
- package/dist/{chunk-XIPWLWPU.cjs.map → chunk-56RCBKNF.cjs.map} +1 -1
- package/dist/{chunk-LFIORZO3.js → chunk-BIRUBLP3.js} +4 -4
- package/dist/{chunk-LFIORZO3.js.map → chunk-BIRUBLP3.js.map} +1 -1
- package/dist/{chunk-VUR6RP73.cjs → chunk-BMPGUGYZ.cjs} +10 -10
- package/dist/{chunk-VUR6RP73.cjs.map → chunk-BMPGUGYZ.cjs.map} +1 -1
- package/dist/{chunk-2JU54RGB.js → chunk-G6S4XSFI.js} +3 -3
- package/dist/{chunk-2JU54RGB.js.map → chunk-G6S4XSFI.js.map} +1 -1
- package/dist/{chunk-4MB3Z33G.js → chunk-INTEA7D3.js} +4 -4
- package/dist/{chunk-4MB3Z33G.js.map → chunk-INTEA7D3.js.map} +1 -1
- package/dist/{chunk-A2T3GGAK.cjs → chunk-K5RED5VE.cjs} +50 -50
- package/dist/{chunk-A2T3GGAK.cjs.map → chunk-K5RED5VE.cjs.map} +1 -1
- package/dist/{chunk-7B2QAHQU.js → chunk-LN4ZJZK4.js} +94 -11
- package/dist/chunk-LN4ZJZK4.js.map +1 -0
- package/dist/{chunk-H7KLBU6G.js → chunk-MTYQXZ2T.js} +4 -4
- package/dist/{chunk-H7KLBU6G.js.map → chunk-MTYQXZ2T.js.map} +1 -1
- package/dist/{chunk-GLLBSULU.cjs → chunk-NY5FN4VV.cjs} +3 -3
- package/dist/{chunk-GLLBSULU.cjs.map → chunk-NY5FN4VV.cjs.map} +1 -1
- package/dist/{chunk-L6MGV7ZA.js → chunk-XCNAGBFR.js} +3 -3
- package/dist/{chunk-L6MGV7ZA.js.map → chunk-XCNAGBFR.js.map} +1 -1
- package/dist/{chunk-EIMOVGBV.cjs → chunk-ZTCDT7KB.cjs} +523 -439
- package/dist/chunk-ZTCDT7KB.cjs.map +1 -0
- 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-Hl92NVgS.d.ts → delegate-CyBnNY9v.d.ts} +1 -1
- package/dist/{delegate-Dv8aEvSp.d.cts → delegate-Cyv2suFd.d.cts} +1 -1
- package/dist/{hdWalletCapable-QiCK1B9d.d.cts → hdWalletCapable-D1ImQqlu.d.cts} +3 -3
- package/dist/{hdWalletCapable-Bqcb-XtC.d.ts → hdWalletCapable-DvumVrKW.d.ts} +3 -3
- package/dist/{index-F-X4BWxi.d.cts → index-BIL9boGL.d.cts} +14 -1
- package/dist/{index-F-X4BWxi.d.ts → index-BIL9boGL.d.ts} +14 -1
- package/dist/{index-CeC9FiJt.d.cts → index-DleNQcz5.d.cts} +3 -3
- package/dist/{index-BwEO0Yb-.d.ts → index-QVhQgYvU.d.ts} +3 -3
- package/dist/index.cjs +294 -290
- package/dist/index.d.cts +17 -9
- package/dist/index.d.ts +17 -9
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +20 -20
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +19 -19
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BdU_d__J.d.ts → taskRunner-CRbuzUXR.d.ts} +2 -2
- package/dist/{taskRunner-CDCz7MTW.d.cts → taskRunner-z_BGID85.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-7B2QAHQU.js.map +0 -1
- package/dist/chunk-EIMOVGBV.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a7 as ReadonlyIdentity, a as Identity, at as DescriptorSigningRequest, au as Transaction, ap as SignerSession, a5 as DescriptorProvider, av as IntentFeeConfig, aw as OffchainInput, ax as FeeAmount, ay as OnchainInput, az as FeeOutput, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch, W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, y as Contract, C as ContractRepository, F as ContractFilter, I as IWallet, t as ArkProvider, an as SettlementConfig, aA as ContractWatcherConfig, aB as Asset, R as Recipient, aC as FeeInfo, n as SettlementEvent, S as SettleParams, G as GetArkadeInfoOptions, aD as GetVtxosOptions, aE as PaginationOptions, f as GetVtxosFilter, aF as CreateContractParams, aG as GetContractsFilter, x as VirtualCoin, aH as GetSpendablePathsOptions, aI as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aJ as IssuanceParams, aK as ReissuanceParams, aL as BurnParams, aM as RenewVtxosOptions, A as ArkadeInfo, aN as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ae as ContractSyncState, ai as ContractWithVtxos, aO as WatchedScript, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a6 as IReadonlyWallet, h as ActivityRegistry, ad as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, p as IAssetManager, o as SendParams, m as IDelegateManager, aY as IVtxoManager, a8 as OnchainProvider, U as Network, ag as NetworkName, ak as Coin, aZ as SendBitcoinParams, a_ as ExplorerTransaction, aq as SignedIntent, ar as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, w as TapLeafScript, b2 as EncodedVtxoScript, X as CSVMultisigTapscript, v as RelativeTimelock, V as VtxoScript, b3 as Status, ah as ArkAddress, b4 as ChainTx, u as IndexerProvider, _ as TxTree, b5 as PathContext } from './index-
|
|
2
|
-
export {
|
|
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 './hdWalletCapable-
|
|
4
|
-
export {
|
|
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 {
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a7 as ReadonlyIdentity, a as Identity, at as DescriptorSigningRequest, au as Transaction, ap as SignerSession, a5 as DescriptorProvider, av as IntentFeeConfig, aw as OffchainInput, ax as FeeAmount, ay as OnchainInput, az as FeeOutput, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch, W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, y as Contract, C as ContractRepository, F as ContractFilter, I as IWallet, t as ArkProvider, an as SettlementConfig, aA as ContractWatcherConfig, aB as Asset, R as Recipient, aC as FeeInfo, n as SettlementEvent, S as SettleParams, G as GetArkadeInfoOptions, aD as GetVtxosOptions, aE as PaginationOptions, f as GetVtxosFilter, aF as CreateContractParams, aG as GetContractsFilter, x as VirtualCoin, aH as GetSpendablePathsOptions, aI as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aJ as IssuanceParams, aK as ReissuanceParams, aL as BurnParams, aM as RenewVtxosOptions, A as ArkadeInfo, aN as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ae as ContractSyncState, ai as ContractWithVtxos, aO as WatchedScript, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a6 as IReadonlyWallet, h as ActivityRegistry, ad as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, p as IAssetManager, o as SendParams, m as IDelegateManager, aY as IVtxoManager, a8 as OnchainProvider, U as Network, ag as NetworkName, ak as Coin, aZ as SendBitcoinParams, a_ as ExplorerTransaction, aq as SignedIntent, ar as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, w as TapLeafScript, b2 as EncodedVtxoScript, X as CSVMultisigTapscript, v as RelativeTimelock, V as VtxoScript, b3 as Status, ah as ArkAddress, b4 as ChainTx, u as IndexerProvider, _ as TxTree, b5 as PathContext } from './index-BIL9boGL.cjs';
|
|
2
|
+
export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a2 as BatchFailedEvent, a0 as BatchFinalizationEvent, a1 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Y as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, Q as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, al as ContractManager, am as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractVtxoEvent, br as ContractWatcher, bs as DEFAULT_VTXO_PAGE_SIZE, bt as DelegateManagerImpl, bu as DelegateOptions, a9 as DelegateProvider, bv as DeprecatedSignerMigrationReport, bw as DeprecatedSignerReport, bx as DigestMismatchError, by as Discoverable, bz as DiscoveredContract, bA as DiscoveryDeps, bB as ESPLORA_URL, bC as EsploraProvider, bD as EventSourceCapable, bE as EventSourceFactory, bF as EventSourceLike, bG as EventSourceUnavailableError, ab as ExitCaptureMode, bH as ExitChainResolver, ac as ExitDataSource, bI as ExtendedContractVtxo, bJ as GroupMembership, bK as HandlerError, bL as INTENT_TERMINAL_STATES, bM as IndexerTxType, bN as IntentCoin, bO as KnownMetadata, bP as MUTINYNET_EMULATOR_PUBKEY, bQ as MigrateDeprecatedSignerOptions, bR as MigrationLegReport, bS as MigrationVtxoRef, bT as MultisigTapscript, bU as NewAddressType, bV as Nonces, bW as Output, bX as PageResponse, bY as PartialSig, bZ as PrevTxSource, b_ as PrevTxUnavailableError, b$ as ProviderClass, c0 as REGTEST_EMULATOR_PUBKEY, c1 as RawTxSource, aa as ReadonlyWalletConfig, af as RecipientArkadeAddressContext, q as RestArkProvider, c2 as RestDelegateProvider, r as RestIndexerProvider, c3 as ScanContractsOptions, c4 as ScanResult, c5 as ScheduledSession, c6 as SettlementEventType, c7 as SignRequest, c8 as SignerClassification, c9 as SignerSet, ca as SubscriptionEvent, cb as SubscriptionHeartbeat, s as SubscriptionResponse, cc as SweepTxNotification, cd as TapLeaves, ce as TapTreeCoder, cf as TapscriptType, as as TimeHeight, $ as TreeNoncesEvent, a4 as TreeSignatureEvent, Z as TreeSigningStartedEvent, a3 as TreeTxEvent, cg as Tx, ch as TxHistoryRecord, ci as TxKey, cj as TxNotification, ck as TxTag, cl as TxTreeNode, cm as TxType, cn as Vtxo, co as VtxoChain, ao as VtxoManager, cp as VtxoType, b as WalletConfig, cq as WalletMode, cr as WithPrevTx, cs as assertAllowedSighashTypes, ct as assertRecipientArkadeAddress, cu as assetMintResolver, cv as attachPrevArkTxs, cw as attachPrevoutTxs, cx as boardingResolver, cy as canRecoverOnchain, cz as canSpendOffchain, cA as canSweepOnchain, cB as classifyAgainstSignerSet, cC as classifyContractSigner, cD as collabExitResolver, cE as configureEventSource, cF as createDefaultActivityRegistry, cG as createExitChainResolver, cH as decodeTapscript, cI as defaultEmulatorPubkey, cJ as getAllNormalizedVtxos, cK as getConfiguredEventSource, cL as getNetwork, cM as getNormalizedVtxos, cN as getRandomId, cO as getSequence, cP as hasCandidates, cQ as hasTerminalSpend, cR as isBatchSignable, cS as isContractVtxoEvent, cT as isCooperativelyMigratable, cU as isDiscoverable, cV as isEventSourceUnavailableError, cW as isPastExpiry, cX as isSigningIdentity, cY as isSubdust, cZ as isTerminalIntentState, c_ as isVirtualCoin, c$ as isVtxoExpiringSoon, d0 as networkFromArkadeInfo, d1 as networks, d2 as resolveEmulatorPubkey, d3 as resolveEventSource, d4 as resolvePrevTxs, d5 as scriptFromTapLeafScript, d6 as signerSetFromInfo, d7 as toXOnlySignerHex, d8 as withPrevTxs } from './index-BIL9boGL.cjs';
|
|
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 './hdWalletCapable-D1ImQqlu.cjs';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-D1ImQqlu.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-DleNQcz5.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 VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-DleNQcz5.cjs';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-Cyv2suFd.cjs';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-Cyv2suFd.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';
|
|
@@ -902,6 +902,12 @@ declare class IndexedDBWalletRepository implements WalletRepository {
|
|
|
902
902
|
private getDB;
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
+
interface WalletRestoreHook {
|
|
906
|
+
id: string;
|
|
907
|
+
restore(wallet: IWallet): Promise<void>;
|
|
908
|
+
}
|
|
909
|
+
declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
|
|
910
|
+
|
|
905
911
|
/**
|
|
906
912
|
* Domain separator for the preimage derivation.
|
|
907
913
|
*
|
|
@@ -3370,6 +3376,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3370
3376
|
readonly identity: Identity;
|
|
3371
3377
|
private readonly _assetManager;
|
|
3372
3378
|
private readonly hasDelegate;
|
|
3379
|
+
private _restoreInFlight?;
|
|
3373
3380
|
protected constructor(serviceWorker: ServiceWorker, identity: Identity, walletRepository: WalletRepository, contractRepository: ContractRepository, messageTag: string, hasDelegate: boolean);
|
|
3374
3381
|
get assetManager(): IAssetManager;
|
|
3375
3382
|
protected serializeIdentity(): Promise<SerializedIdentity>;
|
|
@@ -3453,6 +3460,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3453
3460
|
restore(opts?: {
|
|
3454
3461
|
gapLimit?: number;
|
|
3455
3462
|
}): Promise<void>;
|
|
3463
|
+
private _restoreWorkerWallet;
|
|
3456
3464
|
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
3457
3465
|
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
3458
3466
|
getVtxoManager(): Promise<IVtxoManager>;
|
|
@@ -6616,4 +6624,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6616
6624
|
burn(params: BurnParams): Promise<string>;
|
|
6617
6625
|
}
|
|
6618
6626
|
|
|
6619
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|
|
6627
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, type WalletRestoreHook, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a7 as ReadonlyIdentity, a as Identity, at as DescriptorSigningRequest, au as Transaction, ap as SignerSession, a5 as DescriptorProvider, av as IntentFeeConfig, aw as OffchainInput, ax as FeeAmount, ay as OnchainInput, az as FeeOutput, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch, W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, y as Contract, C as ContractRepository, F as ContractFilter, I as IWallet, t as ArkProvider, an as SettlementConfig, aA as ContractWatcherConfig, aB as Asset, R as Recipient, aC as FeeInfo, n as SettlementEvent, S as SettleParams, G as GetArkadeInfoOptions, aD as GetVtxosOptions, aE as PaginationOptions, f as GetVtxosFilter, aF as CreateContractParams, aG as GetContractsFilter, x as VirtualCoin, aH as GetSpendablePathsOptions, aI as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aJ as IssuanceParams, aK as ReissuanceParams, aL as BurnParams, aM as RenewVtxosOptions, A as ArkadeInfo, aN as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ae as ContractSyncState, ai as ContractWithVtxos, aO as WatchedScript, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a6 as IReadonlyWallet, h as ActivityRegistry, ad as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, p as IAssetManager, o as SendParams, m as IDelegateManager, aY as IVtxoManager, a8 as OnchainProvider, U as Network, ag as NetworkName, ak as Coin, aZ as SendBitcoinParams, a_ as ExplorerTransaction, aq as SignedIntent, ar as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, w as TapLeafScript, b2 as EncodedVtxoScript, X as CSVMultisigTapscript, v as RelativeTimelock, V as VtxoScript, b3 as Status, ah as ArkAddress, b4 as ChainTx, u as IndexerProvider, _ as TxTree, b5 as PathContext } from './index-
|
|
2
|
-
export {
|
|
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 './hdWalletCapable-
|
|
4
|
-
export {
|
|
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 {
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a7 as ReadonlyIdentity, a as Identity, at as DescriptorSigningRequest, au as Transaction, ap as SignerSession, a5 as DescriptorProvider, av as IntentFeeConfig, aw as OffchainInput, ax as FeeAmount, ay as OnchainInput, az as FeeOutput, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch, W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, y as Contract, C as ContractRepository, F as ContractFilter, I as IWallet, t as ArkProvider, an as SettlementConfig, aA as ContractWatcherConfig, aB as Asset, R as Recipient, aC as FeeInfo, n as SettlementEvent, S as SettleParams, G as GetArkadeInfoOptions, aD as GetVtxosOptions, aE as PaginationOptions, f as GetVtxosFilter, aF as CreateContractParams, aG as GetContractsFilter, x as VirtualCoin, aH as GetSpendablePathsOptions, aI as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aJ as IssuanceParams, aK as ReissuanceParams, aL as BurnParams, aM as RenewVtxosOptions, A as ArkadeInfo, aN as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ae as ContractSyncState, ai as ContractWithVtxos, aO as WatchedScript, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a6 as IReadonlyWallet, h as ActivityRegistry, ad as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, p as IAssetManager, o as SendParams, m as IDelegateManager, aY as IVtxoManager, a8 as OnchainProvider, U as Network, ag as NetworkName, ak as Coin, aZ as SendBitcoinParams, a_ as ExplorerTransaction, aq as SignedIntent, ar as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, w as TapLeafScript, b2 as EncodedVtxoScript, X as CSVMultisigTapscript, v as RelativeTimelock, V as VtxoScript, b3 as Status, ah as ArkAddress, b4 as ChainTx, u as IndexerProvider, _ as TxTree, b5 as PathContext } from './index-BIL9boGL.js';
|
|
2
|
+
export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a2 as BatchFailedEvent, a0 as BatchFinalizationEvent, a1 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Y as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, Q as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, al as ContractManager, am as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractVtxoEvent, br as ContractWatcher, bs as DEFAULT_VTXO_PAGE_SIZE, bt as DelegateManagerImpl, bu as DelegateOptions, a9 as DelegateProvider, bv as DeprecatedSignerMigrationReport, bw as DeprecatedSignerReport, bx as DigestMismatchError, by as Discoverable, bz as DiscoveredContract, bA as DiscoveryDeps, bB as ESPLORA_URL, bC as EsploraProvider, bD as EventSourceCapable, bE as EventSourceFactory, bF as EventSourceLike, bG as EventSourceUnavailableError, ab as ExitCaptureMode, bH as ExitChainResolver, ac as ExitDataSource, bI as ExtendedContractVtxo, bJ as GroupMembership, bK as HandlerError, bL as INTENT_TERMINAL_STATES, bM as IndexerTxType, bN as IntentCoin, bO as KnownMetadata, bP as MUTINYNET_EMULATOR_PUBKEY, bQ as MigrateDeprecatedSignerOptions, bR as MigrationLegReport, bS as MigrationVtxoRef, bT as MultisigTapscript, bU as NewAddressType, bV as Nonces, bW as Output, bX as PageResponse, bY as PartialSig, bZ as PrevTxSource, b_ as PrevTxUnavailableError, b$ as ProviderClass, c0 as REGTEST_EMULATOR_PUBKEY, c1 as RawTxSource, aa as ReadonlyWalletConfig, af as RecipientArkadeAddressContext, q as RestArkProvider, c2 as RestDelegateProvider, r as RestIndexerProvider, c3 as ScanContractsOptions, c4 as ScanResult, c5 as ScheduledSession, c6 as SettlementEventType, c7 as SignRequest, c8 as SignerClassification, c9 as SignerSet, ca as SubscriptionEvent, cb as SubscriptionHeartbeat, s as SubscriptionResponse, cc as SweepTxNotification, cd as TapLeaves, ce as TapTreeCoder, cf as TapscriptType, as as TimeHeight, $ as TreeNoncesEvent, a4 as TreeSignatureEvent, Z as TreeSigningStartedEvent, a3 as TreeTxEvent, cg as Tx, ch as TxHistoryRecord, ci as TxKey, cj as TxNotification, ck as TxTag, cl as TxTreeNode, cm as TxType, cn as Vtxo, co as VtxoChain, ao as VtxoManager, cp as VtxoType, b as WalletConfig, cq as WalletMode, cr as WithPrevTx, cs as assertAllowedSighashTypes, ct as assertRecipientArkadeAddress, cu as assetMintResolver, cv as attachPrevArkTxs, cw as attachPrevoutTxs, cx as boardingResolver, cy as canRecoverOnchain, cz as canSpendOffchain, cA as canSweepOnchain, cB as classifyAgainstSignerSet, cC as classifyContractSigner, cD as collabExitResolver, cE as configureEventSource, cF as createDefaultActivityRegistry, cG as createExitChainResolver, cH as decodeTapscript, cI as defaultEmulatorPubkey, cJ as getAllNormalizedVtxos, cK as getConfiguredEventSource, cL as getNetwork, cM as getNormalizedVtxos, cN as getRandomId, cO as getSequence, cP as hasCandidates, cQ as hasTerminalSpend, cR as isBatchSignable, cS as isContractVtxoEvent, cT as isCooperativelyMigratable, cU as isDiscoverable, cV as isEventSourceUnavailableError, cW as isPastExpiry, cX as isSigningIdentity, cY as isSubdust, cZ as isTerminalIntentState, c_ as isVirtualCoin, c$ as isVtxoExpiringSoon, d0 as networkFromArkadeInfo, d1 as networks, d2 as resolveEmulatorPubkey, d3 as resolveEventSource, d4 as resolvePrevTxs, d5 as scriptFromTapLeafScript, d6 as signerSetFromInfo, d7 as toXOnlySignerHex, d8 as withPrevTxs } from './index-BIL9boGL.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 './hdWalletCapable-DvumVrKW.js';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-DvumVrKW.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-QVhQgYvU.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 VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-QVhQgYvU.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-CyBnNY9v.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-CyBnNY9v.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';
|
|
@@ -902,6 +902,12 @@ declare class IndexedDBWalletRepository implements WalletRepository {
|
|
|
902
902
|
private getDB;
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
+
interface WalletRestoreHook {
|
|
906
|
+
id: string;
|
|
907
|
+
restore(wallet: IWallet): Promise<void>;
|
|
908
|
+
}
|
|
909
|
+
declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
|
|
910
|
+
|
|
905
911
|
/**
|
|
906
912
|
* Domain separator for the preimage derivation.
|
|
907
913
|
*
|
|
@@ -3370,6 +3376,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3370
3376
|
readonly identity: Identity;
|
|
3371
3377
|
private readonly _assetManager;
|
|
3372
3378
|
private readonly hasDelegate;
|
|
3379
|
+
private _restoreInFlight?;
|
|
3373
3380
|
protected constructor(serviceWorker: ServiceWorker, identity: Identity, walletRepository: WalletRepository, contractRepository: ContractRepository, messageTag: string, hasDelegate: boolean);
|
|
3374
3381
|
get assetManager(): IAssetManager;
|
|
3375
3382
|
protected serializeIdentity(): Promise<SerializedIdentity>;
|
|
@@ -3453,6 +3460,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3453
3460
|
restore(opts?: {
|
|
3454
3461
|
gapLimit?: number;
|
|
3455
3462
|
}): Promise<void>;
|
|
3463
|
+
private _restoreWorkerWallet;
|
|
3456
3464
|
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
3457
3465
|
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
3458
3466
|
getVtxoManager(): Promise<IVtxoManager>;
|
|
@@ -6616,4 +6624,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6616
6624
|
burn(params: BurnParams): Promise<string>;
|
|
6617
6625
|
}
|
|
6618
6626
|
|
|
6619
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|
|
6627
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, type WalletRestoreHook, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|
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, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_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, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertRecipientArkadeAddress, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, 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, logExcludedVtxos, makeHandle, matchServerCheckpoints, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, resolveAssetAmount, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, 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, 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, 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, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_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, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertRecipientArkadeAddress, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, 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, logExcludedVtxos, makeHandle, matchServerCheckpoints, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-LN4ZJZK4.js';
|
|
2
|
+
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-G6S4XSFI.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-XCNAGBFR.js';
|
|
4
|
+
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, 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, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-MTYQXZ2T.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
|
-
require('../../chunk-
|
|
3
|
+
var chunkZTCDT7KB_cjs = require('../../chunk-ZTCDT7KB.cjs');
|
|
4
|
+
require('../../chunk-2AWDPVZI.cjs');
|
|
5
|
+
require('../../chunk-K5RED5VE.cjs');
|
|
6
|
+
require('../../chunk-NY5FN4VV.cjs');
|
|
7
7
|
|
|
8
8
|
// src/repositories/realm/walletRepository.ts
|
|
9
9
|
var RealmWalletRepository = class {
|
|
@@ -37,7 +37,7 @@ var RealmWalletRepository = class {
|
|
|
37
37
|
await this.ensureInit();
|
|
38
38
|
this.realm.write(() => {
|
|
39
39
|
for (const vtxo of vtxos) {
|
|
40
|
-
const s =
|
|
40
|
+
const s = chunkZTCDT7KB_cjs.serializeVtxo(vtxo);
|
|
41
41
|
this.realm.create(
|
|
42
42
|
"ArkVtxo",
|
|
43
43
|
{
|
|
@@ -89,7 +89,7 @@ var RealmWalletRepository = class {
|
|
|
89
89
|
throw new Error("RealmWalletRepository requires an address");
|
|
90
90
|
}
|
|
91
91
|
for (const vtxo of vtxos) {
|
|
92
|
-
if (!
|
|
92
|
+
if (!chunkZTCDT7KB_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
93
93
|
throw new Error(
|
|
94
94
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
95
95
|
);
|
|
@@ -114,7 +114,7 @@ var RealmWalletRepository = class {
|
|
|
114
114
|
await this.ensureInit();
|
|
115
115
|
this.realm.write(() => {
|
|
116
116
|
for (const utxo of utxos) {
|
|
117
|
-
const s =
|
|
117
|
+
const s = chunkZTCDT7KB_cjs.serializeUtxo(utxo);
|
|
118
118
|
this.realm.create(
|
|
119
119
|
"ArkUtxo",
|
|
120
120
|
{
|
|
@@ -167,7 +167,7 @@ var RealmWalletRepository = class {
|
|
|
167
167
|
amount: tx.amount,
|
|
168
168
|
settled: tx.settled,
|
|
169
169
|
createdAt: tx.createdAt,
|
|
170
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
170
|
+
assetsJson: tx.assets ? JSON.stringify(chunkZTCDT7KB_cjs.serializeAssets(tx.assets)) : null
|
|
171
171
|
},
|
|
172
172
|
"modified"
|
|
173
173
|
);
|
|
@@ -241,9 +241,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
241
241
|
// Post-migration every row has `script`, but the backfill is
|
|
242
242
|
// idempotent: derive from `address` if the legacy column is still
|
|
243
243
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
244
|
-
script: obj.script ??
|
|
244
|
+
script: obj.script ?? chunkZTCDT7KB_cjs.scriptFromArkAddress(obj.address)
|
|
245
245
|
};
|
|
246
|
-
return
|
|
246
|
+
return chunkZTCDT7KB_cjs.deserializeVtxo(serialized);
|
|
247
247
|
}
|
|
248
248
|
function utxoObjectToDomain(obj) {
|
|
249
249
|
const serialized = {
|
|
@@ -262,7 +262,7 @@ function utxoObjectToDomain(obj) {
|
|
|
262
262
|
status: JSON.parse(obj.statusJson),
|
|
263
263
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
264
264
|
};
|
|
265
|
-
return
|
|
265
|
+
return chunkZTCDT7KB_cjs.deserializeUtxo(serialized);
|
|
266
266
|
}
|
|
267
267
|
function txObjectToDomain(obj) {
|
|
268
268
|
const tx = {
|
|
@@ -277,7 +277,7 @@ function txObjectToDomain(obj) {
|
|
|
277
277
|
createdAt: obj.createdAt
|
|
278
278
|
};
|
|
279
279
|
if (obj.assetsJson) {
|
|
280
|
-
tx.assets =
|
|
280
|
+
tx.assets = chunkZTCDT7KB_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
281
281
|
}
|
|
282
282
|
return tx;
|
|
283
283
|
}
|
|
@@ -457,7 +457,7 @@ var RealmIntentRepository = class {
|
|
|
457
457
|
const clashes = [
|
|
458
458
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
|
|
459
459
|
].map(toIntent);
|
|
460
|
-
|
|
460
|
+
chunkZTCDT7KB_cjs.assertIntentIdUnique(intent, clashes);
|
|
461
461
|
}
|
|
462
462
|
this.realm.create(
|
|
463
463
|
"ArkIntent",
|
|
@@ -486,14 +486,14 @@ var RealmIntentRepository = class {
|
|
|
486
486
|
}
|
|
487
487
|
async getIntents(filter) {
|
|
488
488
|
const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
|
|
489
|
-
const out = filter ? all.filter((i) =>
|
|
490
|
-
const { skip, end } =
|
|
489
|
+
const out = filter ? all.filter((i) => chunkZTCDT7KB_cjs.intentMatchesFilter(i, filter)) : all;
|
|
490
|
+
const { skip, end } = chunkZTCDT7KB_cjs.intentPageBounds(filter, out.length);
|
|
491
491
|
return out.slice(skip, end);
|
|
492
492
|
}
|
|
493
493
|
async getLockedVtxoOutpoints() {
|
|
494
494
|
const out = [];
|
|
495
495
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
496
|
-
if (!
|
|
496
|
+
if (!chunkZTCDT7KB_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
|
|
497
497
|
return out;
|
|
498
498
|
}
|
|
499
499
|
async [Symbol.asyncDispose]() {
|
|
@@ -535,7 +535,7 @@ var RealmVirtualTxRepository = class {
|
|
|
535
535
|
txid: t.txid,
|
|
536
536
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
537
537
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
538
|
-
type:
|
|
538
|
+
type: chunkZTCDT7KB_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
539
539
|
},
|
|
540
540
|
"modified"
|
|
541
541
|
);
|
|
@@ -780,9 +780,9 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
780
780
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
781
781
|
const newVtxo = newVtxos[i];
|
|
782
782
|
if (!newVtxo.script) {
|
|
783
|
-
newVtxo.script =
|
|
783
|
+
newVtxo.script = chunkZTCDT7KB_cjs.scriptFromArkAddress(newVtxo.address);
|
|
784
784
|
}
|
|
785
|
-
const facts =
|
|
785
|
+
const facts = chunkZTCDT7KB_cjs.legacyVtxoFacts(legacyByPk.get(newVtxo.pk));
|
|
786
786
|
if (facts) {
|
|
787
787
|
if (newVtxo.isSpent == null) newVtxo.isSpent = facts.isSpent;
|
|
788
788
|
if (newVtxo.isSwept == null) newVtxo.isSwept = facts.isSwept;
|
|
@@ -812,7 +812,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
812
812
|
|
|
813
813
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
814
814
|
enumerable: true,
|
|
815
|
-
get: function () { return
|
|
815
|
+
get: function () { return chunkZTCDT7KB_cjs.ChainedTxType; }
|
|
816
816
|
});
|
|
817
817
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
818
818
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-
|
|
2
|
-
export { Q as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-BIL9boGL.cjs';
|
|
2
|
+
export { Q as ChainedTxType } from '../../index-BIL9boGL.cjs';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-
|
|
2
|
-
export { Q as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-BIL9boGL.js';
|
|
2
|
+
export { Q as ChainedTxType } from '../../index-BIL9boGL.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType, legacyVtxoFacts } 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, legacyVtxoFacts } from '../../chunk-LN4ZJZK4.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-LN4ZJZK4.js';
|
|
3
|
+
import '../../chunk-G6S4XSFI.js';
|
|
4
|
+
import '../../chunk-XCNAGBFR.js';
|
|
5
|
+
import '../../chunk-MTYQXZ2T.js';
|
|
6
6
|
|
|
7
7
|
// src/repositories/realm/walletRepository.ts
|
|
8
8
|
var RealmWalletRepository = class {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
3
|
+
var chunkZTCDT7KB_cjs = require('../../chunk-ZTCDT7KB.cjs');
|
|
4
|
+
require('../../chunk-2AWDPVZI.cjs');
|
|
5
|
+
require('../../chunk-K5RED5VE.cjs');
|
|
6
|
+
require('../../chunk-NY5FN4VV.cjs');
|
|
7
7
|
|
|
8
8
|
// src/repositories/sqlite/transaction.ts
|
|
9
9
|
var writeChains = /* @__PURE__ */ new WeakMap();
|
|
@@ -172,7 +172,7 @@ var SQLiteWalletRepository = class {
|
|
|
172
172
|
for (const row of nullRows) {
|
|
173
173
|
await this.db.run(
|
|
174
174
|
`UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
|
|
175
|
-
[
|
|
175
|
+
[chunkZTCDT7KB_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
178
|
const tempName = `${this.tables.vtxos}__migrate_tmp`;
|
|
@@ -213,7 +213,7 @@ var SQLiteWalletRepository = class {
|
|
|
213
213
|
WHERE virtual_status_json IS NOT NULL AND is_swept IS NULL`
|
|
214
214
|
);
|
|
215
215
|
for (const row of rows) {
|
|
216
|
-
const facts =
|
|
216
|
+
const facts = chunkZTCDT7KB_cjs.legacyVtxoFacts(row.virtual_status_json);
|
|
217
217
|
if (!facts) continue;
|
|
218
218
|
await this.db.run(
|
|
219
219
|
`UPDATE ${this.tables.vtxos}
|
|
@@ -285,7 +285,7 @@ var SQLiteWalletRepository = class {
|
|
|
285
285
|
async saveVtxos(address, vtxos) {
|
|
286
286
|
await this.ensureInit();
|
|
287
287
|
for (const vtxo of vtxos) {
|
|
288
|
-
const s =
|
|
288
|
+
const s = chunkZTCDT7KB_cjs.serializeVtxo(vtxo);
|
|
289
289
|
await this.db.run(
|
|
290
290
|
`INSERT OR REPLACE INTO ${this.tables.vtxos}
|
|
291
291
|
(txid, vout, value, address,
|
|
@@ -346,7 +346,7 @@ var SQLiteWalletRepository = class {
|
|
|
346
346
|
throw new Error("SQLiteWalletRepository requires an address");
|
|
347
347
|
}
|
|
348
348
|
for (const vtxo of vtxos) {
|
|
349
|
-
if (!
|
|
349
|
+
if (!chunkZTCDT7KB_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
350
350
|
throw new Error(
|
|
351
351
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
352
352
|
);
|
|
@@ -370,7 +370,7 @@ var SQLiteWalletRepository = class {
|
|
|
370
370
|
async saveUtxos(address, utxos) {
|
|
371
371
|
await this.ensureInit();
|
|
372
372
|
for (const utxo of utxos) {
|
|
373
|
-
const s =
|
|
373
|
+
const s = chunkZTCDT7KB_cjs.serializeUtxo(utxo);
|
|
374
374
|
await this.db.run(
|
|
375
375
|
`INSERT OR REPLACE INTO ${this.tables.utxos}
|
|
376
376
|
(txid, vout, value, address,
|
|
@@ -426,7 +426,7 @@ var SQLiteWalletRepository = class {
|
|
|
426
426
|
tx.amount,
|
|
427
427
|
tx.settled ? 1 : 0,
|
|
428
428
|
tx.createdAt,
|
|
429
|
-
tx.assets ? JSON.stringify(
|
|
429
|
+
tx.assets ? JSON.stringify(chunkZTCDT7KB_cjs.serializeAssets(tx.assets)) : null
|
|
430
430
|
]
|
|
431
431
|
);
|
|
432
432
|
}
|
|
@@ -504,9 +504,9 @@ function vtxoRowToDomain(row) {
|
|
|
504
504
|
// Post-migration every row has `script`, but the backfill is
|
|
505
505
|
// idempotent: derive from `address` if the legacy column is still
|
|
506
506
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
507
|
-
script: row.script ??
|
|
507
|
+
script: row.script ?? chunkZTCDT7KB_cjs.scriptFromArkAddress(row.address)
|
|
508
508
|
};
|
|
509
|
-
return
|
|
509
|
+
return chunkZTCDT7KB_cjs.deserializeVtxo(serialized);
|
|
510
510
|
}
|
|
511
511
|
function utxoRowToDomain(row) {
|
|
512
512
|
const serialized = {
|
|
@@ -525,7 +525,7 @@ function utxoRowToDomain(row) {
|
|
|
525
525
|
status: JSON.parse(row.status_json),
|
|
526
526
|
extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
|
|
527
527
|
};
|
|
528
|
-
return
|
|
528
|
+
return chunkZTCDT7KB_cjs.deserializeUtxo(serialized);
|
|
529
529
|
}
|
|
530
530
|
function txRowToDomain(row) {
|
|
531
531
|
const tx = {
|
|
@@ -540,7 +540,7 @@ function txRowToDomain(row) {
|
|
|
540
540
|
createdAt: row.created_at
|
|
541
541
|
};
|
|
542
542
|
if (row.assets_json) {
|
|
543
|
-
tx.assets =
|
|
543
|
+
tx.assets = chunkZTCDT7KB_cjs.deserializeAssets(JSON.parse(row.assets_json));
|
|
544
544
|
}
|
|
545
545
|
return tx;
|
|
546
546
|
}
|
|
@@ -813,8 +813,8 @@ var SQLiteIntentRepository = class {
|
|
|
813
813
|
`SELECT * FROM ${this.t} ORDER BY created_at ASC, intent_tx_id ASC`
|
|
814
814
|
);
|
|
815
815
|
let out = rows.map(rowToIntent);
|
|
816
|
-
if (filter) out = out.filter((i) =>
|
|
817
|
-
const { skip, end } =
|
|
816
|
+
if (filter) out = out.filter((i) => chunkZTCDT7KB_cjs.intentMatchesFilter(i, filter));
|
|
817
|
+
const { skip, end } = chunkZTCDT7KB_cjs.intentPageBounds(filter, out.length);
|
|
818
818
|
return out.slice(skip, end);
|
|
819
819
|
}
|
|
820
820
|
async getLockedVtxoOutpoints() {
|
|
@@ -822,7 +822,7 @@ var SQLiteIntentRepository = class {
|
|
|
822
822
|
const rows = await this.db.all(`SELECT * FROM ${this.t}`);
|
|
823
823
|
const out = [];
|
|
824
824
|
for (const r of rows) {
|
|
825
|
-
if (
|
|
825
|
+
if (chunkZTCDT7KB_cjs.isTerminalIntentState(r.state)) continue;
|
|
826
826
|
for (const o of JSON.parse(r.intent_vtxos_json)) out.push(o);
|
|
827
827
|
}
|
|
828
828
|
return out;
|
|
@@ -917,7 +917,7 @@ var SQLiteVirtualTxRepository = class {
|
|
|
917
917
|
const prev = prevByTxid.get(t.txid);
|
|
918
918
|
const psbt = t.psbt ?? prev?.psbt ?? null;
|
|
919
919
|
const expires = t.expiresAt ?? prev?.expires_at ?? null;
|
|
920
|
-
const type =
|
|
920
|
+
const type = chunkZTCDT7KB_cjs.mergeChainedTxType(t.type, prev?.type);
|
|
921
921
|
await this.db.run(
|
|
922
922
|
`INSERT OR REPLACE INTO ${this.tTx} (txid, psbt, expires_at, type) VALUES (?, ?, ?, ?)`,
|
|
923
923
|
[t.txid, psbt, expires, type]
|
|
@@ -1010,7 +1010,7 @@ function sanitizeTablePrefix(p) {
|
|
|
1010
1010
|
|
|
1011
1011
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
1012
1012
|
enumerable: true,
|
|
1013
|
-
get: function () { return
|
|
1013
|
+
get: function () { return chunkZTCDT7KB_cjs.ChainedTxType; }
|
|
1014
1014
|
});
|
|
1015
1015
|
exports.SQLiteContractRepository = SQLiteContractRepository;
|
|
1016
1016
|
exports.SQLiteIntentRepository = SQLiteIntentRepository;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-
|
|
2
|
-
export { Q as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-BIL9boGL.cjs';
|
|
2
|
+
export { Q as ChainedTxType } from '../../index-BIL9boGL.cjs';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-
|
|
2
|
-
export { Q as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, z as ExtendedVirtualCoin, B as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, D as WalletState, C as ContractRepository, F as ContractFilter, y as Contract, H as IntentRepository, J as ArkIntent, K as IntentFilter, O as Outpoint, L as VirtualTxRepository, M as VirtualTx, P as VtxoBranch } from '../../index-BIL9boGL.js';
|
|
2
|
+
export { Q as ChainedTxType } from '../../index-BIL9boGL.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { scriptFromArkAddress, legacyVtxoFacts, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, 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 { scriptFromArkAddress, legacyVtxoFacts, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-LN4ZJZK4.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-LN4ZJZK4.js';
|
|
3
|
+
import '../../chunk-G6S4XSFI.js';
|
|
4
|
+
import '../../chunk-XCNAGBFR.js';
|
|
5
|
+
import '../../chunk-MTYQXZ2T.js';
|
|
6
6
|
|
|
7
7
|
// src/repositories/sqlite/transaction.ts
|
|
8
8
|
var writeChains = /* @__PURE__ */ new WeakMap();
|