@arkade-os/sdk 0.4.64 → 0.4.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +3 -6
- package/dist/adapters/expo.d.ts +3 -6
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-Dq_UcvDx.d.ts → asyncStorageTaskQueue-B6SijMi3.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-Chwe60Ce.d.cts → asyncStorageTaskQueue-BZcIN7sA.d.cts} +1 -1
- package/dist/{chunk-HQ2DDMQN.js → chunk-2JZGPXU4.js} +170 -6
- package/dist/chunk-2JZGPXU4.js.map +1 -0
- package/dist/{chunk-RXITDAV4.cjs → chunk-3S3JZUEN.cjs} +184 -19
- package/dist/chunk-3S3JZUEN.cjs.map +1 -0
- package/dist/{chunk-USXWE2EJ.js → chunk-55ZZ6RBL.js} +4 -4
- package/dist/{chunk-USXWE2EJ.js.map → chunk-55ZZ6RBL.js.map} +1 -1
- package/dist/{chunk-LPEE2H2M.cjs → chunk-5E6IZNRG.cjs} +656 -774
- package/dist/chunk-5E6IZNRG.cjs.map +1 -0
- package/dist/{chunk-LN2VZP63.js → chunk-CYOI4PEA.js} +162 -15
- package/dist/chunk-CYOI4PEA.js.map +1 -0
- package/dist/{chunk-WJN2BLEI.js → chunk-DSC3G6QZ.js} +253 -379
- package/dist/chunk-DSC3G6QZ.js.map +1 -0
- package/dist/{chunk-4N45WCSJ.cjs → chunk-IM6IKNSL.cjs} +17 -17
- package/dist/{chunk-4N45WCSJ.cjs.map → chunk-IM6IKNSL.cjs.map} +1 -1
- package/dist/{chunk-XJCBV4AA.js → chunk-J33ZEM3A.js} +26 -18
- package/dist/chunk-J33ZEM3A.js.map +1 -0
- package/dist/{chunk-35YIP6OA.cjs → chunk-LL47QIHD.cjs} +10 -10
- package/dist/{chunk-35YIP6OA.cjs.map → chunk-LL47QIHD.cjs.map} +1 -1
- package/dist/{chunk-WXCVS6PD.cjs → chunk-PXPPZF5K.cjs} +207 -59
- package/dist/chunk-PXPPZF5K.cjs.map +1 -0
- package/dist/{chunk-ZUEGFM3T.js → chunk-R5POS3RS.js} +4 -4
- package/dist/{chunk-ZUEGFM3T.js.map → chunk-R5POS3RS.js.map} +1 -1
- package/dist/{chunk-FZFSGOTZ.cjs → chunk-ZIRFXBKL.cjs} +26 -18
- package/dist/chunk-ZIRFXBKL.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-Dv_9OVHv.d.ts → delegate-T-vgxMYZ.d.ts} +1 -1
- package/dist/{delegate-BBQW61ym.d.cts → delegate-YXupcWWJ.d.cts} +1 -1
- package/dist/{index-Bxe9kBFs.d.ts → index-D_FgwLH9.d.ts} +111 -2
- package/dist/{index-aZycGEsQ.d.cts → index-e7LYXk1d.d.cts} +111 -2
- package/dist/{index-CFOMyVMt.d.cts → index-uUE_uQPn.d.cts} +70 -33
- package/dist/{index-CFOMyVMt.d.ts → index-uUE_uQPn.d.ts} +70 -33
- package/dist/index.cjs +308 -268
- package/dist/index.d.cts +214 -19
- package/dist/index.d.ts +214 -19
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-CIKOS2OO.d.cts → taskRunner-BOVcIH1N.d.cts} +1 -1
- package/dist/{taskRunner-BDzWbpct.d.ts → taskRunner-DNyD1kXG.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-C2NvHjWB.d.cts → wallet-CNibc3yJ.d.ts} +3 -3
- package/dist/{wallet-DJUnN939.d.ts → wallet-DJN1QgFt.d.cts} +3 -3
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-FZFSGOTZ.cjs.map +0 -1
- package/dist/chunk-HQ2DDMQN.js.map +0 -1
- package/dist/chunk-LN2VZP63.js.map +0 -1
- package/dist/chunk-LPEE2H2M.cjs.map +0 -1
- package/dist/chunk-RXITDAV4.cjs.map +0 -1
- package/dist/chunk-WJN2BLEI.js.map +0 -1
- package/dist/chunk-WXCVS6PD.cjs.map +0 -1
- package/dist/chunk-XJCBV4AA.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a2 as ReadonlyIdentity, a as Identity, ap as DescriptorSigningRequest, aq as Transaction, al as SignerSession, K as DescriptorProvider, ar as IntentFeeConfig, as as OffchainInput, at as FeeAmount, au as OnchainInput, av as FeeOutput, y as IntentRepository, z as ArkIntent, B as IntentFilter, O as Outpoint, D as VirtualTxRepository, F as VirtualTx, H as VtxoBranch, W as WalletRepository, u as ExtendedVirtualCoin, v as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, w as WalletState, t as Contract, C as ContractRepository, x as ContractFilter, I as IWallet, o as ArkProvider, aj as SettlementConfig, aw as ContractWatcherConfig, ax as Asset, R as Recipient, ay as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, az as CreateContractParams, aA as GetContractsFilter, s as VirtualCoin, aB as GetSpendablePathsOptions, aC as GetAllSpendingPathsOptions, aD as IssuanceParams, aE as ReissuanceParams, aF as BurnParams, aG as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, ae as ContractWithVtxos, aH as PathSelection, aI as ContractEvent, aJ as AssetDetails, aK as IssuanceResult, aL as DelegateInfo, aM as MigrationGlobalSkipReason, aN as MigrationLegSkipReason, aO as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aP as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, k as IAssetManager, j as SendParams, g as IDelegateManager, aQ as IVtxoManager, a3 as OnchainProvider, L as Network, ab as NetworkName, ag as Coin, aR as ExplorerTransaction, r as TapLeafScript, aS as EncodedVtxoScript, M as CSVMultisigTapscript, q as RelativeTimelock, V as VtxoScript, aT as Status, ad as ArkAddress, an as Intent, aU as ChainTx, p as IndexerProvider, U as TxTree, aV as PathContext } from './index-
|
|
2
|
-
export { aW as ActivityIntent, aX as ActivityResolver, ac as ArkInfo, aY as ArkIntentState, aZ as ArkTapscript, a_ as AssetMetadata, a$ as BITCOIN_EMULATOR_PUBKEY, b0 as BaseWalletConfig, _ as BatchFailedEvent, Y as BatchFinalizationEvent, Z as BatchFinalizedEvent, b1 as BatchInfo, b2 as BatchSignableIdentity, P as BatchStartedEvent, b3 as CLTVMultisigTapscript, b4 as CandidateDeps, b5 as ChainTxType, J as ChainedTxType, b6 as CommitmentTx, b7 as ConditionCSVMultisigTapscript, b8 as ConditionMultisigTapscript, b9 as ContractBalance, ba as ContractEventCallback, bb as ContractHandler, ah as ContractManager, ai as ContractManagerConfig, bc as ContractState, bd as ContractVtxo, be as ContractWatcher, bf as
|
|
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, B as BatchExpiryPolicy, e as Batch } from './wallet-
|
|
4
|
-
export { A as ArkError, f as ArkErrorName, g as ArkadeCashClaimResult, h as ArkadeCashCreateError, i as ArkadeCashUnclaimedReason, j as ArkadeCashUnclaimedVtxo, k as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, l as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, m as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, n as ProviderKind, o as ProviderUnavailableError, p as REGTEST_MIN_BATCH_EXPIRY_SECONDS, q as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, r as ServerInfoSource, s as ServerResponseMismatchError, t as assertValidBatchExpiry, u as assertValidServerUnrollScript, v as defaultBatchExpiryPolicy, w as defaultCheckpointExitDelayPolicy, x as isArkError, y as isHDAllocationCapable, z as isHDWalletCapable, E as maybeArkError, G as resolveBatchExpiryPolicy, J as resolveCheckpointExitDelayPolicy, K as resolveDescriptorSigner, L as selectVirtualCoins, N as signingDescriptorIndex, O as strictSigningDescriptorIndex, Q as waitForIncomingFunds } from './wallet-
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-
|
|
6
|
-
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a2 as ReadonlyIdentity, a as Identity, ap as DescriptorSigningRequest, aq as Transaction, al as SignerSession, K as DescriptorProvider, ar as IntentFeeConfig, as as OffchainInput, at as FeeAmount, au as OnchainInput, av as FeeOutput, y as IntentRepository, z as ArkIntent, B as IntentFilter, O as Outpoint, D as VirtualTxRepository, F as VirtualTx, H as VtxoBranch, W as WalletRepository, u as ExtendedVirtualCoin, v as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, w as WalletState, t as Contract, C as ContractRepository, x as ContractFilter, I as IWallet, o as ArkProvider, aj as SettlementConfig, aw as ContractWatcherConfig, ax as Asset, R as Recipient, ay as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, az as CreateContractParams, aA as GetContractsFilter, s as VirtualCoin, aB as GetSpendablePathsOptions, aC as GetAllSpendingPathsOptions, aD as IssuanceParams, aE as ReissuanceParams, aF as BurnParams, aG as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, ae as ContractWithVtxos, aH as PathSelection, aI as ContractEvent, aJ as AssetDetails, aK as IssuanceResult, aL as DelegateInfo, aM as MigrationGlobalSkipReason, aN as MigrationLegSkipReason, aO as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aP as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, k as IAssetManager, j as SendParams, g as IDelegateManager, aQ as IVtxoManager, a3 as OnchainProvider, L as Network, ab as NetworkName, ag as Coin, aR as ExplorerTransaction, r as TapLeafScript, aS as EncodedVtxoScript, M as CSVMultisigTapscript, q as RelativeTimelock, V as VtxoScript, aT as Status, ad as ArkAddress, an as Intent, aU as ChainTx, p as IndexerProvider, U as TxTree, aV as PathContext } from './index-uUE_uQPn.js';
|
|
2
|
+
export { aW as ActivityIntent, aX as ActivityResolver, ac as ArkInfo, aY as ArkIntentState, aZ as ArkTapscript, a_ as AssetMetadata, a$ as BITCOIN_EMULATOR_PUBKEY, b0 as BaseWalletConfig, _ as BatchFailedEvent, Y as BatchFinalizationEvent, Z as BatchFinalizedEvent, b1 as BatchInfo, b2 as BatchSignableIdentity, P as BatchStartedEvent, b3 as CLTVMultisigTapscript, b4 as CandidateDeps, b5 as ChainTxType, J as ChainedTxType, b6 as CommitmentTx, b7 as ConditionCSVMultisigTapscript, b8 as ConditionMultisigTapscript, b9 as ContractBalance, ba as ContractEventCallback, bb as ContractHandler, ah as ContractManager, ai as ContractManagerConfig, bc as ContractState, bd as ContractVtxo, be as ContractWatcher, bf as DEFAULT_VTXO_PAGE_SIZE, bg as DelegateManagerImpl, bh as DelegateOptions, a4 as DelegateProvider, bi as DelegatorManagerImpl, bj as DelegatorProvider, bk as DeprecatedSignerMigrationReport, bl as DeprecatedSignerReport, bm as DigestMismatchError, bn as Discoverable, bo as DiscoveredContract, bp as DiscoveryDeps, bq as ESPLORA_URL, br as EsploraProvider, bs as EventSourceCapable, bt as EventSourceFactory, bu as EventSourceLike, bv as EventSourceUnavailableError, a6 as ExitCaptureMode, bw as ExitChainResolver, a7 as ExitDataSource, bx as ExtendedContractVtxo, by as GroupMembership, bz as HandlerError, bA as IDelegatorManager, bB as INTENT_TERMINAL_STATES, bC as IndexerTxType, bD as KnownMetadata, bE as MUTINYNET_EMULATOR_PUBKEY, bF as MigrateDeprecatedSignerOptions, bG as MigrationLegReport, bH as MigrationVtxoRef, bI as MultisigTapscript, bJ as Nonces, bK as Output, bL as PageResponse, bM as PaginationOptions, bN as PartialSig, bO as ProviderClass, bP as REGTEST_EMULATOR_PUBKEY, a5 as ReadonlyWalletConfig, l as RestArkProvider, bQ as RestDelegateProvider, bR as RestDelegatorProvider, m as RestIndexerProvider, bS as ScanContractsOptions, bT as ScanResult, bU as ScheduledSession, bV as SettlementEventType, bW as SignRequest, am as SignedIntent, bX as SignerClassification, bY as SignerSet, bZ as SubscriptionEvent, b_ as SubscriptionHeartbeat, n as SubscriptionResponse, b$ as SweepTxNotification, c0 as TapLeaves, c1 as TapTreeCoder, c2 as TapscriptType, ao as TimeHeight, c3 as TreeNonces, X as TreeNoncesEvent, c4 as TreePartialSigs, a0 as TreeSignatureEvent, Q as TreeSigningStartedEvent, $ as TreeTxEvent, c5 as Tx, c6 as TxHistoryRecord, c7 as TxKey, c8 as TxNotification, T as TxNotificationEvent, c9 as TxTag, ca as TxTreeNode, cb as TxType, cc as VirtualStatus, cd as Vtxo, ce as VtxoChain, ak as VtxoManager, cf as VtxoType, b as WalletConfig, cg as WalletMode, ch as assetMintResolver, ci as boardingResolver, cj as canRecoverOnchain, ck as canSpendOffchain, cl as classifyAgainstSignerSet, cm as classifyContractSigner, cn as collabExitResolver, co as configureEventSource, cp as createDefaultActivityRegistry, cq as createExitChainResolver, cr as decodeTapscript, cs as defaultEmulatorPubkey, ct as getConfiguredEventSource, cu as getNetwork, cv as getRandomId, cw as getSequence, cx as hasCandidates, cy as hasTerminalSpend, cz as isBatchSignable, cA as isCooperativelyMigratable, cB as isDiscoverable, cC as isEventSourceUnavailableError, cD as isExpired, cE as isPastExpiry, cF as isRecoverable, cG as isSigningIdentity, cH as isSpendable, cI as isSubdust, cJ as isTerminalIntentState, cK as isVirtualCoin, cL as isVtxoExpiringSoon, cM as networks, cN as resolveEmulatorPubkey, cO as resolveEventSource, cP as scriptFromTapLeafScript, cQ as signerSetFromInfo, cR as toXOnlySignerHex } from './index-uUE_uQPn.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, B as BatchExpiryPolicy, e as Batch } from './wallet-CNibc3yJ.js';
|
|
4
|
+
export { A as ArkError, f as ArkErrorName, g as ArkadeCashClaimResult, h as ArkadeCashCreateError, i as ArkadeCashUnclaimedReason, j as ArkadeCashUnclaimedVtxo, k as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, l as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, m as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, n as ProviderKind, o as ProviderUnavailableError, p as REGTEST_MIN_BATCH_EXPIRY_SECONDS, q as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, r as ServerInfoSource, s as ServerResponseMismatchError, t as assertValidBatchExpiry, u as assertValidServerUnrollScript, v as defaultBatchExpiryPolicy, w as defaultCheckpointExitDelayPolicy, x as isArkError, y as isHDAllocationCapable, z as isHDWalletCapable, E as maybeArkError, G as resolveBatchExpiryPolicy, J as resolveCheckpointExitDelayPolicy, K as resolveDescriptorSigner, L as selectVirtualCoins, N as signingDescriptorIndex, O as strictSigningDescriptorIndex, Q as waitForIncomingFunds } from './wallet-CNibc3yJ.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-D_FgwLH9.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-D_FgwLH9.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-T-vgxMYZ.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-T-vgxMYZ.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';
|
|
@@ -638,9 +638,8 @@ declare class InMemoryVirtualTxRepository implements VirtualTxRepository {
|
|
|
638
638
|
* shared DB's version-conflict guard rejects the mismatched open.
|
|
639
639
|
*/
|
|
640
640
|
declare class IndexedDBVirtualTxRepository implements VirtualTxRepository {
|
|
641
|
-
private readonly dbName;
|
|
642
641
|
readonly version: 1;
|
|
643
|
-
private
|
|
642
|
+
private readonly connection;
|
|
644
643
|
constructor(dbName?: string);
|
|
645
644
|
private getDB;
|
|
646
645
|
clear(): Promise<void>;
|
|
@@ -661,9 +660,8 @@ declare class IndexedDBVirtualTxRepository implements VirtualTxRepository {
|
|
|
661
660
|
* DB's version-conflict guard rejects the mismatched open.
|
|
662
661
|
*/
|
|
663
662
|
declare class IndexedDBIntentRepository implements IntentRepository {
|
|
664
|
-
private readonly dbName;
|
|
665
663
|
readonly version: 1;
|
|
666
|
-
private
|
|
664
|
+
private readonly connection;
|
|
667
665
|
constructor(dbName?: string);
|
|
668
666
|
private getDB;
|
|
669
667
|
clear(): Promise<void>;
|
|
@@ -922,15 +920,13 @@ declare class InMemoryContractRepository implements ContractRepository {
|
|
|
922
920
|
* Data is stored as JSON strings in key/value stores.
|
|
923
921
|
*/
|
|
924
922
|
declare class IndexedDBContractRepository implements ContractRepository {
|
|
925
|
-
private readonly dbName;
|
|
926
923
|
readonly version: 2;
|
|
927
|
-
private
|
|
924
|
+
private readonly connection;
|
|
928
925
|
constructor(dbName?: string);
|
|
929
926
|
clear(): Promise<void>;
|
|
930
927
|
getContracts(filter?: ContractFilter): Promise<Contract[]>;
|
|
931
928
|
saveContract(contract: Contract): Promise<void>;
|
|
932
929
|
deleteContract(script: string): Promise<void>;
|
|
933
|
-
private getContractsByIndexValues;
|
|
934
930
|
private applyContractFilter;
|
|
935
931
|
private getDB;
|
|
936
932
|
[Symbol.asyncDispose](): Promise<void>;
|
|
@@ -940,9 +936,8 @@ declare class IndexedDBContractRepository implements ContractRepository {
|
|
|
940
936
|
* IndexedDB-based implementation of WalletRepository.
|
|
941
937
|
*/
|
|
942
938
|
declare class IndexedDBWalletRepository implements WalletRepository {
|
|
943
|
-
private readonly dbName;
|
|
944
939
|
readonly version: 1;
|
|
945
|
-
private
|
|
940
|
+
private readonly connection;
|
|
946
941
|
constructor(dbName?: string);
|
|
947
942
|
clear(): Promise<void>;
|
|
948
943
|
[Symbol.asyncDispose](): Promise<void>;
|
|
@@ -2051,10 +2046,90 @@ declare class Packet implements ExtensionPacket {
|
|
|
2051
2046
|
private static fromReader;
|
|
2052
2047
|
}
|
|
2053
2048
|
|
|
2049
|
+
/**
|
|
2050
|
+
* Cross-repo test vectors for the Arkade Asset ID encodings.
|
|
2051
|
+
*
|
|
2052
|
+
* @remarks
|
|
2053
|
+
* Shipped from `src/` rather than `test/` so consumers outside this package can
|
|
2054
|
+
* pin the same bytes: `lightning-swap-service` imports this value, while NArk
|
|
2055
|
+
* and go-sdk vendor the backing `assetIdVectors.json` from a pinned revision of
|
|
2056
|
+
* this repository.
|
|
2057
|
+
*
|
|
2058
|
+
* The encoding is implemented in seven places across three repos and every
|
|
2059
|
+
* disagreement between them fails silently — a flipped txid makes a covenant
|
|
2060
|
+
* unsatisfiable, a flipped group index resolves to a different asset, a case
|
|
2061
|
+
* mismatch is a routing miss. None of those name their cause, which is what
|
|
2062
|
+
* these vectors are for.
|
|
2063
|
+
*
|
|
2064
|
+
* @see plans/asset-id-shared-vectors.md
|
|
2065
|
+
*/
|
|
2066
|
+
interface AssetIdVectors {
|
|
2067
|
+
readonly version: number;
|
|
2068
|
+
readonly note: string;
|
|
2069
|
+
/** Genesis txid in display order — the 32 bytes an id's leading 64 hex chars carry. */
|
|
2070
|
+
readonly txid_hex: string;
|
|
2071
|
+
/** `txid_hex` reversed: serialization order, what the introspection opcodes match. */
|
|
2072
|
+
readonly script_txid_hex: string;
|
|
2073
|
+
readonly valid: ReadonlyArray<{
|
|
2074
|
+
readonly label: string;
|
|
2075
|
+
readonly group_index: number;
|
|
2076
|
+
/** `txid_hex` with the group index appended little-endian. */
|
|
2077
|
+
readonly asset_id_hex: string;
|
|
2078
|
+
/**
|
|
2079
|
+
* The group index as a stack item, after script-number encoding and
|
|
2080
|
+
* before push framing. Not the raw u16: `65535` is `ffff00` here and
|
|
2081
|
+
* `ffff` on the wire, and `0` is the empty item.
|
|
2082
|
+
*/
|
|
2083
|
+
readonly script_group_index_item_hex: string;
|
|
2084
|
+
}>;
|
|
2085
|
+
/** Refused by the identity rule (`^[0-9a-f]{68}$`), though not necessarily by the decoder. */
|
|
2086
|
+
readonly invalid_identity: ReadonlyArray<{
|
|
2087
|
+
readonly label: string;
|
|
2088
|
+
readonly value: string;
|
|
2089
|
+
readonly why: string;
|
|
2090
|
+
/** Present when the value still decodes: what `toString()` must return. */
|
|
2091
|
+
readonly normalizes_to?: string;
|
|
2092
|
+
}>;
|
|
2093
|
+
/** Refused by {@link AssetId.fromString} / `fromBytes`. */
|
|
2094
|
+
readonly invalid_decode: ReadonlyArray<{
|
|
2095
|
+
readonly label: string;
|
|
2096
|
+
readonly value: string;
|
|
2097
|
+
/** Substring of the thrown message — normative for TS, advisory for other SDKs. */
|
|
2098
|
+
readonly expected_error: string;
|
|
2099
|
+
}>;
|
|
2100
|
+
/** Refused by {@link AssetId.create} / `validate`. */
|
|
2101
|
+
readonly invalid_construction: ReadonlyArray<{
|
|
2102
|
+
readonly label: string;
|
|
2103
|
+
readonly txid_hex: string;
|
|
2104
|
+
readonly group_index: number;
|
|
2105
|
+
readonly expected_error: string;
|
|
2106
|
+
/** Set when the group index cannot be expressed by an SDK whose constructor takes a native u16. */
|
|
2107
|
+
readonly outside_uint16?: boolean;
|
|
2108
|
+
}>;
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* The asset-id test vectors, deeply frozen.
|
|
2112
|
+
*
|
|
2113
|
+
* @remarks
|
|
2114
|
+
* Frozen all the way down, not just at the top: every value that matters lives
|
|
2115
|
+
* inside the nested arrays, and the module is a singleton — one consumer
|
|
2116
|
+
* mutating an entry would corrupt it for every other consumer in the process.
|
|
2117
|
+
*
|
|
2118
|
+
* @example
|
|
2119
|
+
* ```typescript
|
|
2120
|
+
* import { asset } from '@arkade-os/sdk'
|
|
2121
|
+
* const { txid_hex, valid } = asset.ASSET_ID_VECTORS
|
|
2122
|
+
* expect(AssetId.create(txid_hex, valid[0].group_index).toString()).toBe(valid[0].asset_id_hex)
|
|
2123
|
+
* ```
|
|
2124
|
+
*/
|
|
2125
|
+
declare const ASSET_ID_VECTORS: AssetIdVectors;
|
|
2126
|
+
|
|
2127
|
+
declare const index$1_ASSET_ID_VECTORS: typeof ASSET_ID_VECTORS;
|
|
2054
2128
|
type index$1_AssetGroup = AssetGroup;
|
|
2055
2129
|
declare const index$1_AssetGroup: typeof AssetGroup;
|
|
2056
2130
|
type index$1_AssetId = AssetId;
|
|
2057
2131
|
declare const index$1_AssetId: typeof AssetId;
|
|
2132
|
+
type index$1_AssetIdVectors = AssetIdVectors;
|
|
2058
2133
|
type index$1_AssetInput = AssetInput;
|
|
2059
2134
|
declare const index$1_AssetInput: typeof AssetInput;
|
|
2060
2135
|
type index$1_AssetInputType = AssetInputType;
|
|
@@ -2076,7 +2151,7 @@ declare const index$1_MetadataList: typeof MetadataList;
|
|
|
2076
2151
|
type index$1_Packet = Packet;
|
|
2077
2152
|
declare const index$1_Packet: typeof Packet;
|
|
2078
2153
|
declare namespace index$1 {
|
|
2079
|
-
export { index$1_AssetGroup as AssetGroup, index$1_AssetId as AssetId, index$1_AssetInput as AssetInput, index$1_AssetInputType as AssetInputType, index$1_AssetInputs as AssetInputs, index$1_AssetOutput as AssetOutput, index$1_AssetOutputs as AssetOutputs, index$1_AssetRef as AssetRef, index$1_AssetRefType as AssetRefType, index$1_Metadata as Metadata, index$1_MetadataList as MetadataList, index$1_Packet as Packet };
|
|
2154
|
+
export { index$1_ASSET_ID_VECTORS as ASSET_ID_VECTORS, index$1_AssetGroup as AssetGroup, index$1_AssetId as AssetId, type index$1_AssetIdVectors as AssetIdVectors, index$1_AssetInput as AssetInput, index$1_AssetInputType as AssetInputType, index$1_AssetInputs as AssetInputs, index$1_AssetOutput as AssetOutput, index$1_AssetOutputs as AssetOutputs, index$1_AssetRef as AssetRef, index$1_AssetRefType as AssetRefType, index$1_Metadata as Metadata, index$1_MetadataList as MetadataList, index$1_Packet as Packet };
|
|
2080
2155
|
}
|
|
2081
2156
|
|
|
2082
2157
|
/**
|
|
@@ -5971,6 +6046,27 @@ declare function timelockToSequence(timelock: RelativeTimelock): number;
|
|
|
5971
6046
|
*/
|
|
5972
6047
|
declare function sequenceToTimelock(sequence: number): RelativeTimelock;
|
|
5973
6048
|
|
|
6049
|
+
/**
|
|
6050
|
+
* Normalize a secp256k1 public key to the 32-byte x-only form every tapscript,
|
|
6051
|
+
* covenant param and `params.serverPubKey` in this SDK is denominated in.
|
|
6052
|
+
*
|
|
6053
|
+
* A compressed key drops its parity prefix; an x-only key passes through. Both
|
|
6054
|
+
* arrive over the same wires — arkd advertises `signerPubkey` either way,
|
|
6055
|
+
* `Identity.xOnlyPublicKey` implementations vary, and solver-supplied fields
|
|
6056
|
+
* are whatever the peer sent — so the caller usually cannot know which it
|
|
6057
|
+
* holds. Anything else is refused rather than silently truncated: a 65-byte
|
|
6058
|
+
* uncompressed key, stripped of one byte, yields a plausible 32-byte value
|
|
6059
|
+
* that is not the key, which surfaces as an address nobody funded.
|
|
6060
|
+
*
|
|
6061
|
+
* The result may alias `key` rather than copy it; callers that mutate either
|
|
6062
|
+
* value after normalization should copy first.
|
|
6063
|
+
*
|
|
6064
|
+
* @param key - 32-byte x-only or 33-byte compressed public key
|
|
6065
|
+
* @param label - Name used in the error, e.g. `"ark signer key"`
|
|
6066
|
+
* @see toXOnlySignerHex for the hex-in, hex-out signer-rotation equivalent
|
|
6067
|
+
*/
|
|
6068
|
+
declare function toXOnly(key: Uint8Array, label?: string): Uint8Array;
|
|
6069
|
+
|
|
5974
6070
|
declare const buildVersion = "0.9.9";
|
|
5975
6071
|
/**
|
|
5976
6072
|
* The SDK's own version string, sourced from package.json
|
|
@@ -5993,6 +6089,22 @@ declare class FetchError extends Error {
|
|
|
5993
6089
|
});
|
|
5994
6090
|
}
|
|
5995
6091
|
|
|
6092
|
+
/**
|
|
6093
|
+
* How long a blocked upgrade waits before the open is reported as failed.
|
|
6094
|
+
*
|
|
6095
|
+
* An `IDBOpenDBRequest` that is blocked never settles on its own: it waits for
|
|
6096
|
+
* the other connection to close, however long that takes. A hang is worse than a
|
|
6097
|
+
* failure here, because the caller cannot retry what never settles.
|
|
6098
|
+
*/
|
|
6099
|
+
declare const BLOCKED_UPGRADE_TIMEOUT_MS = 10000;
|
|
6100
|
+
/** A database upgrade was held open by another connection past
|
|
6101
|
+
* {@link BLOCKED_UPGRADE_TIMEOUT_MS}. Retryable: closing the other tab and
|
|
6102
|
+
* calling again is the remedy, and the bookkeeping was cleared so it can be. */
|
|
6103
|
+
declare class DatabaseUpgradeBlockedError extends Error {
|
|
6104
|
+
readonly dbName: string;
|
|
6105
|
+
readonly name = "DatabaseUpgradeBlockedError";
|
|
6106
|
+
constructor(dbName: string);
|
|
6107
|
+
}
|
|
5996
6108
|
/**
|
|
5997
6109
|
* Opens an IndexedDB database and increments the reference count.
|
|
5998
6110
|
* Handles global object detection and callbacks.
|
|
@@ -6010,12 +6122,95 @@ declare function openDatabase(dbName: string, dbVersion: number, initDatabase: (
|
|
|
6010
6122
|
/**
|
|
6011
6123
|
* Decrements the reference count and closes the database when no references remain.
|
|
6012
6124
|
*
|
|
6125
|
+
* Refcount contract: call once per *successful* {@link openDatabase}, never per
|
|
6126
|
+
* rejection. A rejected open already cleared its own bookkeeping, so a call
|
|
6127
|
+
* paired with it decrements whatever entry a successor installed under the same
|
|
6128
|
+
* name. {@link createManagedConnection} honours this — it only closes while it
|
|
6129
|
+
* holds a promise, and every rejection path drops that promise first.
|
|
6130
|
+
*
|
|
6013
6131
|
* @param dbName The name of the database to close.
|
|
6014
6132
|
*
|
|
6015
6133
|
* @returns True if the database was closed, false otherwise.
|
|
6016
6134
|
*/
|
|
6017
6135
|
declare function closeDatabase(dbName: string): Promise<boolean>;
|
|
6018
6136
|
|
|
6137
|
+
/** A disposed {@link ManagedConnection} was read from. Reopening instead would
|
|
6138
|
+
* take a refcount nothing will ever release, so this is loud rather than
|
|
6139
|
+
* silently leaky: the fix belongs at the caller, which is using a repository it
|
|
6140
|
+
* already tore down. */
|
|
6141
|
+
declare class ConnectionDisposedError extends Error {
|
|
6142
|
+
readonly dbName: string;
|
|
6143
|
+
readonly name = "ConnectionDisposedError";
|
|
6144
|
+
constructor(dbName: string);
|
|
6145
|
+
}
|
|
6146
|
+
/** Lazily-opened, self-healing handle on one IndexedDB database. */
|
|
6147
|
+
interface ManagedConnection extends AsyncDisposable {
|
|
6148
|
+
/**
|
|
6149
|
+
* The open connection, opening it on first call.
|
|
6150
|
+
*
|
|
6151
|
+
* Call this once per operation and use the handle for the transaction you
|
|
6152
|
+
* start right away — never store it on the repository, and never carry it
|
|
6153
|
+
* across an `await`. The connection can be closed underneath you at any
|
|
6154
|
+
* time (a `versionchange` from another tab, eviction, "clear site data"),
|
|
6155
|
+
* after which every transaction on that handle throws `InvalidStateError`;
|
|
6156
|
+
* a later `get()` transparently reopens, but only for callers that ask
|
|
6157
|
+
* again. Holding the resolved database is exactly the defect this type
|
|
6158
|
+
* exists to remove.
|
|
6159
|
+
*
|
|
6160
|
+
* ## The dispose boundary
|
|
6161
|
+
*
|
|
6162
|
+
* `get()` is valid only before `[Symbol.asyncDispose]`. Afterwards it
|
|
6163
|
+
* rejects with {@link ConnectionDisposedError}, permanently: dispose has
|
|
6164
|
+
* released this connection's single reference, and reopening would take a
|
|
6165
|
+
* refcount nothing is left to release. Disposal is final by design — there
|
|
6166
|
+
* is no revive; construct a new repository, which constructs a new
|
|
6167
|
+
* connection, instead.
|
|
6168
|
+
*
|
|
6169
|
+
* Dispose neither awaits nor cancels work already in flight. A transaction
|
|
6170
|
+
* started just before it can abort when the underlying handle closes, and
|
|
6171
|
+
* an in-flight `get()` may resolve to a database that is closing. So
|
|
6172
|
+
* sequence disposal after the operations you care about have settled —
|
|
6173
|
+
* `await` the repository's outstanding calls first — rather than racing it
|
|
6174
|
+
* against them.
|
|
6175
|
+
*
|
|
6176
|
+
* Callers must not close the database themselves; the reference this
|
|
6177
|
+
* connection holds is released by its own dispose, once.
|
|
6178
|
+
*/
|
|
6179
|
+
get(): Promise<IDBDatabase>;
|
|
6180
|
+
}
|
|
6181
|
+
/**
|
|
6182
|
+
* Forget-and-reopen around {@link openDatabase}, shared by every IndexedDB
|
|
6183
|
+
* repository. Caching the resolved `IDBDatabase` is the defect this exists to
|
|
6184
|
+
* remove: once the manager closes on `versionchange`, every later transaction on
|
|
6185
|
+
* that handle throws `InvalidStateError` with no path back.
|
|
6186
|
+
*
|
|
6187
|
+
* Opens nothing until the first {@link ManagedConnection.get} — repositories
|
|
6188
|
+
* construct their storage in their own constructors, and an eager open would
|
|
6189
|
+
* move the "IndexedDB is not available in this environment" throw to
|
|
6190
|
+
* construction time.
|
|
6191
|
+
*/
|
|
6192
|
+
declare function createManagedConnection(dbName: string, version: number, initDatabase: (db: IDBDatabase, oldVersion: number, transaction: IDBTransaction | null) => void): ManagedConnection;
|
|
6193
|
+
|
|
6194
|
+
/** Resolve with an {@link IDBRequest}'s result, or reject with its error. */
|
|
6195
|
+
declare const promisifyRequest: <T>(request: IDBRequest<T>) => Promise<T>;
|
|
6196
|
+
/**
|
|
6197
|
+
* Resolve once a transaction commits, or reject if it errors or aborts.
|
|
6198
|
+
*
|
|
6199
|
+
* A write is durable at *commit*, not at request success — quota pressure and
|
|
6200
|
+
* storage eviction abort a transaction whose every request already succeeded.
|
|
6201
|
+
* Reads may resolve on {@link promisifyRequest}; writes must await this.
|
|
6202
|
+
*/
|
|
6203
|
+
declare const awaitTransaction: (transaction: IDBTransaction) => Promise<void>;
|
|
6204
|
+
/**
|
|
6205
|
+
* Queue a delete for every row an index matches. Fire-and-forget by design:
|
|
6206
|
+
* the requests are queued as the cursor walks and the caller learns they
|
|
6207
|
+
* committed by awaiting the transaction, not this. A failing cursor or delete
|
|
6208
|
+
* aborts the transaction, which {@link awaitTransaction} reports.
|
|
6209
|
+
*/
|
|
6210
|
+
declare const deleteByIndex: (store: IDBObjectStore, indexName: string, value: IDBValidKey) => void;
|
|
6211
|
+
/** Read every row matching any of `values` on an index, flattened. */
|
|
6212
|
+
declare const getAllByIndexValues: <T>(store: IDBObjectStore, indexName: string, values: readonly IDBValidKey[]) => Promise<T[]>;
|
|
6213
|
+
|
|
6019
6214
|
declare const MESSAGE_BUS_NOT_INITIALIZED = "MessageBus not initialized";
|
|
6020
6215
|
/**
|
|
6021
6216
|
* Message for the "an init is in flight" variant.
|
|
@@ -6102,4 +6297,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6102
6297
|
burn(params: BurnParams): Promise<string>;
|
|
6103
6298
|
}
|
|
6104
6299
|
|
|
6105
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, 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 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, GetVtxosFilter, 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, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, 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, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, 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, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, gateExclusion, gatedContracts, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
6300
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, 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 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, GetVtxosFilter, 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, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, 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, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, 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, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, 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, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deserializeExitPackage, encodeArkContract, gateExclusion, gatedContracts, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, outpointExclusion, outpointReasons, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-
|
|
2
|
-
export { ChainTxType, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-
|
|
3
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor } 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, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, buildVersion, canRecoverOnchain, canSpendOffchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getArkPsbtFields, getConfiguredEventSource, getNetwork, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, ChainedTxType, ConnectionDisposedError, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, 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, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, 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, gateExclusion, gatedContracts, getAllByIndexValues, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-DSC3G6QZ.js';
|
|
2
|
+
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-2JZGPXU4.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-CYOI4PEA.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, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, buildVersion, canRecoverOnchain, canSpendOffchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getArkPsbtFields, getConfiguredEventSource, getNetwork, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-J33ZEM3A.js';
|
|
5
5
|
import './chunk-NSBPE2FW.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
3
|
+
var chunk5E6IZNRG_cjs = require('../../chunk-5E6IZNRG.cjs');
|
|
4
|
+
require('../../chunk-3S3JZUEN.cjs');
|
|
5
|
+
require('../../chunk-PXPPZF5K.cjs');
|
|
6
|
+
require('../../chunk-ZIRFXBKL.cjs');
|
|
7
7
|
require('../../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
9
9
|
// src/repositories/realm/walletRepository.ts
|
|
@@ -38,7 +38,7 @@ var RealmWalletRepository = class {
|
|
|
38
38
|
await this.ensureInit();
|
|
39
39
|
this.realm.write(() => {
|
|
40
40
|
for (const vtxo of vtxos) {
|
|
41
|
-
const s =
|
|
41
|
+
const s = chunk5E6IZNRG_cjs.serializeVtxo(vtxo);
|
|
42
42
|
this.realm.create(
|
|
43
43
|
"ArkVtxo",
|
|
44
44
|
{
|
|
@@ -86,7 +86,7 @@ var RealmWalletRepository = class {
|
|
|
86
86
|
throw new Error("RealmWalletRepository requires an address");
|
|
87
87
|
}
|
|
88
88
|
for (const vtxo of vtxos) {
|
|
89
|
-
if (!
|
|
89
|
+
if (!chunk5E6IZNRG_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
90
90
|
throw new Error(
|
|
91
91
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
92
92
|
);
|
|
@@ -111,7 +111,7 @@ var RealmWalletRepository = class {
|
|
|
111
111
|
await this.ensureInit();
|
|
112
112
|
this.realm.write(() => {
|
|
113
113
|
for (const utxo of utxos) {
|
|
114
|
-
const s =
|
|
114
|
+
const s = chunk5E6IZNRG_cjs.serializeUtxo(utxo);
|
|
115
115
|
this.realm.create(
|
|
116
116
|
"ArkUtxo",
|
|
117
117
|
{
|
|
@@ -164,7 +164,7 @@ var RealmWalletRepository = class {
|
|
|
164
164
|
amount: tx.amount,
|
|
165
165
|
settled: tx.settled,
|
|
166
166
|
createdAt: tx.createdAt,
|
|
167
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
167
|
+
assetsJson: tx.assets ? JSON.stringify(chunk5E6IZNRG_cjs.serializeAssets(tx.assets)) : null
|
|
168
168
|
},
|
|
169
169
|
"modified"
|
|
170
170
|
);
|
|
@@ -234,9 +234,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
234
234
|
// Post-migration every row has `script`, but the backfill is
|
|
235
235
|
// idempotent: derive from `address` if the legacy column is still
|
|
236
236
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
237
|
-
script: obj.script ??
|
|
237
|
+
script: obj.script ?? chunk5E6IZNRG_cjs.scriptFromArkAddress(obj.address)
|
|
238
238
|
};
|
|
239
|
-
return
|
|
239
|
+
return chunk5E6IZNRG_cjs.deserializeVtxo(serialized);
|
|
240
240
|
}
|
|
241
241
|
function utxoObjectToDomain(obj) {
|
|
242
242
|
const serialized = {
|
|
@@ -255,7 +255,7 @@ function utxoObjectToDomain(obj) {
|
|
|
255
255
|
status: JSON.parse(obj.statusJson),
|
|
256
256
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
257
257
|
};
|
|
258
|
-
return
|
|
258
|
+
return chunk5E6IZNRG_cjs.deserializeUtxo(serialized);
|
|
259
259
|
}
|
|
260
260
|
function txObjectToDomain(obj) {
|
|
261
261
|
const tx = {
|
|
@@ -270,7 +270,7 @@ function txObjectToDomain(obj) {
|
|
|
270
270
|
createdAt: obj.createdAt
|
|
271
271
|
};
|
|
272
272
|
if (obj.assetsJson) {
|
|
273
|
-
tx.assets =
|
|
273
|
+
tx.assets = chunk5E6IZNRG_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
274
274
|
}
|
|
275
275
|
return tx;
|
|
276
276
|
}
|
|
@@ -450,7 +450,7 @@ var RealmIntentRepository = class {
|
|
|
450
450
|
const clashes = [
|
|
451
451
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
|
|
452
452
|
].map(toIntent);
|
|
453
|
-
|
|
453
|
+
chunk5E6IZNRG_cjs.assertIntentIdUnique(intent, clashes);
|
|
454
454
|
}
|
|
455
455
|
this.realm.create(
|
|
456
456
|
"ArkIntent",
|
|
@@ -479,14 +479,14 @@ var RealmIntentRepository = class {
|
|
|
479
479
|
}
|
|
480
480
|
async getIntents(filter) {
|
|
481
481
|
const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
|
|
482
|
-
const out = filter ? all.filter((i) =>
|
|
483
|
-
const { skip, end } =
|
|
482
|
+
const out = filter ? all.filter((i) => chunk5E6IZNRG_cjs.intentMatchesFilter(i, filter)) : all;
|
|
483
|
+
const { skip, end } = chunk5E6IZNRG_cjs.intentPageBounds(filter, out.length);
|
|
484
484
|
return out.slice(skip, end);
|
|
485
485
|
}
|
|
486
486
|
async getLockedVtxoOutpoints() {
|
|
487
487
|
const out = [];
|
|
488
488
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
489
|
-
if (!
|
|
489
|
+
if (!chunk5E6IZNRG_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
|
|
490
490
|
return out;
|
|
491
491
|
}
|
|
492
492
|
async [Symbol.asyncDispose]() {
|
|
@@ -528,7 +528,7 @@ var RealmVirtualTxRepository = class {
|
|
|
528
528
|
txid: t.txid,
|
|
529
529
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
530
530
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
531
|
-
type:
|
|
531
|
+
type: chunk5E6IZNRG_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
532
532
|
},
|
|
533
533
|
"modified"
|
|
534
534
|
);
|
|
@@ -762,7 +762,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
762
762
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
763
763
|
const newVtxo = newVtxos[i];
|
|
764
764
|
if (!newVtxo.script) {
|
|
765
|
-
newVtxo.script =
|
|
765
|
+
newVtxo.script = chunk5E6IZNRG_cjs.scriptFromArkAddress(newVtxo.address);
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
const oldHasVirtualTx = Array.isArray(oldRealm?.schema) && oldRealm.schema.some((s) => s.name === "ArkVirtualTx");
|
|
@@ -779,7 +779,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
779
779
|
|
|
780
780
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
781
781
|
enumerable: true,
|
|
782
|
-
get: function () { return
|
|
782
|
+
get: function () { return chunk5E6IZNRG_cjs.ChainedTxType; }
|
|
783
783
|
});
|
|
784
784
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
785
785
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, u as ExtendedVirtualCoin, v as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, w as WalletState, C as ContractRepository, x as ContractFilter, t as Contract, y as IntentRepository, z as ArkIntent, B as IntentFilter, O as Outpoint, D as VirtualTxRepository, F as VirtualTx, H as VtxoBranch } from '../../index-
|
|
2
|
-
export { J as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, u as ExtendedVirtualCoin, v as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, w as WalletState, C as ContractRepository, x as ContractFilter, t as Contract, y as IntentRepository, z as ArkIntent, B as IntentFilter, O as Outpoint, D as VirtualTxRepository, F as VirtualTx, H as VtxoBranch } from '../../index-uUE_uQPn.cjs';
|
|
2
|
+
export { J as ChainedTxType } from '../../index-uUE_uQPn.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, u as ExtendedVirtualCoin, v as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, w as WalletState, C as ContractRepository, x as ContractFilter, t as Contract, y as IntentRepository, z as ArkIntent, B as IntentFilter, O as Outpoint, D as VirtualTxRepository, F as VirtualTx, H as VtxoBranch } from '../../index-
|
|
2
|
-
export { J as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, u as ExtendedVirtualCoin, v as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, w as WalletState, C as ContractRepository, x as ContractFilter, t as Contract, y as IntentRepository, z as ArkIntent, B as IntentFilter, O as Outpoint, D as VirtualTxRepository, F as VirtualTx, H as VtxoBranch } from '../../index-uUE_uQPn.js';
|
|
2
|
+
export { J as ChainedTxType } from '../../index-uUE_uQPn.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 } from '../../chunk-
|
|
2
|
-
export { ChainedTxType } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-DSC3G6QZ.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-DSC3G6QZ.js';
|
|
3
|
+
import '../../chunk-2JZGPXU4.js';
|
|
4
|
+
import '../../chunk-CYOI4PEA.js';
|
|
5
|
+
import '../../chunk-J33ZEM3A.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/repositories/realm/walletRepository.ts
|