@arkade-os/sdk 0.4.64 → 0.4.65
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.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{chunk-HQ2DDMQN.js → chunk-3G5V564P.js} +141 -3
- package/dist/chunk-3G5V564P.js.map +1 -0
- package/dist/{chunk-WJN2BLEI.js → chunk-5YTSQSLE.js} +226 -353
- package/dist/chunk-5YTSQSLE.js.map +1 -0
- package/dist/{chunk-35YIP6OA.cjs → chunk-7X744EFF.cjs} +10 -10
- package/dist/{chunk-35YIP6OA.cjs.map → chunk-7X744EFF.cjs.map} +1 -1
- package/dist/{chunk-WXCVS6PD.cjs → chunk-BABJ77NG.cjs} +196 -57
- package/dist/chunk-BABJ77NG.cjs.map +1 -0
- package/dist/{chunk-FZFSGOTZ.cjs → chunk-G552MISJ.cjs} +3 -3
- package/dist/{chunk-FZFSGOTZ.cjs.map → chunk-G552MISJ.cjs.map} +1 -1
- package/dist/{chunk-LPEE2H2M.cjs → chunk-GFZNEMGL.cjs} +629 -748
- package/dist/chunk-GFZNEMGL.cjs.map +1 -0
- package/dist/{chunk-USXWE2EJ.js → chunk-RESN6QHP.js} +4 -4
- package/dist/{chunk-USXWE2EJ.js.map → chunk-RESN6QHP.js.map} +1 -1
- package/dist/{chunk-4N45WCSJ.cjs → chunk-SJQM5AVB.cjs} +17 -17
- package/dist/{chunk-4N45WCSJ.cjs.map → chunk-SJQM5AVB.cjs.map} +1 -1
- package/dist/{chunk-XJCBV4AA.js → chunk-TFSVXMTM.js} +3 -3
- package/dist/{chunk-XJCBV4AA.js.map → chunk-TFSVXMTM.js.map} +1 -1
- package/dist/{chunk-ZUEGFM3T.js → chunk-TYTPVPKD.js} +4 -4
- package/dist/{chunk-ZUEGFM3T.js.map → chunk-TYTPVPKD.js.map} +1 -1
- package/dist/{chunk-LN2VZP63.js → chunk-XMOIRDLF.js} +151 -12
- package/dist/chunk-XMOIRDLF.js.map +1 -0
- package/dist/{chunk-RXITDAV4.cjs → chunk-XN55B6EP.cjs} +155 -17
- package/dist/chunk-XN55B6EP.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +1 -1
- package/dist/contracts/handlers/index.d.ts +1 -1
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{index-aZycGEsQ.d.cts → index-BtTtQFUX.d.cts} +109 -0
- package/dist/{index-Bxe9kBFs.d.ts → index-fDDiA1-L.d.ts} +109 -0
- package/dist/index.cjs +300 -268
- package/dist/index.d.cts +187 -13
- package/dist/index.d.ts +187 -13
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.js +5 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -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/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import { a2 as ReadonlyIdentity, a as Identity, ap as DescriptorSigningRequest,
|
|
|
2
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 DelegateManagerImpl, bg as DelegateOptions, a4 as DelegateProvider, bh as DelegatorManagerImpl, bi as DelegatorProvider, bj as DeprecatedSignerMigrationReport, bk as DeprecatedSignerReport, bl as DigestMismatchError, bm as Discoverable, bn as DiscoveredContract, bo as DiscoveryDeps, bp as ESPLORA_URL, bq as EsploraProvider, br as EventSourceCapable, bs as EventSourceFactory, bt as EventSourceLike, bu as EventSourceUnavailableError, a6 as ExitCaptureMode, bv as ExitChainResolver, a7 as ExitDataSource, bw as ExtendedContractVtxo, bx as GroupMembership, by as HandlerError, bz as IDelegatorManager, bA as INTENT_TERMINAL_STATES, bB as IndexerTxType, bC as KnownMetadata, bD as MUTINYNET_EMULATOR_PUBKEY, bE as MigrateDeprecatedSignerOptions, bF as MigrationLegReport, bG as MigrationVtxoRef, bH as MultisigTapscript, bI as Nonces, bJ as Output, bK as PageResponse, bL as PaginationOptions, bM as PartialSig, bN as ProviderClass, bO as REGTEST_EMULATOR_PUBKEY, a5 as ReadonlyWalletConfig, l as RestArkProvider, bP as RestDelegateProvider, bQ as RestDelegatorProvider, m as RestIndexerProvider, bR as ScanContractsOptions, bS as ScanResult, bT as ScheduledSession, bU as SettlementEventType, bV as SignRequest, am as SignedIntent, bW as SignerClassification, bX as SignerSet, bY as SubscriptionEvent, bZ as SubscriptionHeartbeat, n as SubscriptionResponse, b_ as TapLeaves, b$ as TapTreeCoder, c0 as TapscriptType, ao as TimeHeight, c1 as TreeNonces, X as TreeNoncesEvent, c2 as TreePartialSigs, a0 as TreeSignatureEvent, Q as TreeSigningStartedEvent, $ as TreeTxEvent, c3 as Tx, c4 as TxHistoryRecord, c5 as TxKey, T as TxNotification, c6 as TxTag, c7 as TxTreeNode, c8 as TxType, c9 as VirtualStatus, ca as Vtxo, cb as VtxoChain, ak as VtxoManager, cc as VtxoType, b as WalletConfig, cd as WalletMode, ce as assetMintResolver, cf as boardingResolver, cg as canRecoverOnchain, ch as canSpendOffchain, ci as classifyAgainstSignerSet, cj as classifyContractSigner, ck as collabExitResolver, cl as configureEventSource, cm as createDefaultActivityRegistry, cn as createExitChainResolver, co as decodeTapscript, cp as defaultEmulatorPubkey, cq as getConfiguredEventSource, cr as getNetwork, cs as getRandomId, ct as getSequence, cu as hasCandidates, cv as hasTerminalSpend, cw as isBatchSignable, cx as isCooperativelyMigratable, cy as isDiscoverable, cz as isEventSourceUnavailableError, cA as isExpired, cB as isPastExpiry, cC as isRecoverable, cD as isSigningIdentity, cE as isSpendable, cF as isSubdust, cG as isTerminalIntentState, cH as isVirtualCoin, cI as isVtxoExpiringSoon, cJ as networks, cK as resolveEmulatorPubkey, cL as resolveEventSource, cM as scriptFromTapLeafScript, cN as signerSetFromInfo, cO as toXOnlySignerHex } from './index-CFOMyVMt.cjs';
|
|
3
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-C2NvHjWB.cjs';
|
|
4
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-C2NvHjWB.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-
|
|
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-
|
|
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-BtTtQFUX.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-BtTtQFUX.cjs';
|
|
7
7
|
import { D as DefaultVtxo } from './delegate-BBQW61ym.cjs';
|
|
8
8
|
export { a as DelegateVtxo } from './delegate-BBQW61ym.cjs';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
@@ -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
|
/**
|
|
@@ -5993,6 +6068,22 @@ declare class FetchError extends Error {
|
|
|
5993
6068
|
});
|
|
5994
6069
|
}
|
|
5995
6070
|
|
|
6071
|
+
/**
|
|
6072
|
+
* How long a blocked upgrade waits before the open is reported as failed.
|
|
6073
|
+
*
|
|
6074
|
+
* An `IDBOpenDBRequest` that is blocked never settles on its own: it waits for
|
|
6075
|
+
* the other connection to close, however long that takes. A hang is worse than a
|
|
6076
|
+
* failure here, because the caller cannot retry what never settles.
|
|
6077
|
+
*/
|
|
6078
|
+
declare const BLOCKED_UPGRADE_TIMEOUT_MS = 10000;
|
|
6079
|
+
/** A database upgrade was held open by another connection past
|
|
6080
|
+
* {@link BLOCKED_UPGRADE_TIMEOUT_MS}. Retryable: closing the other tab and
|
|
6081
|
+
* calling again is the remedy, and the bookkeeping was cleared so it can be. */
|
|
6082
|
+
declare class DatabaseUpgradeBlockedError extends Error {
|
|
6083
|
+
readonly dbName: string;
|
|
6084
|
+
readonly name = "DatabaseUpgradeBlockedError";
|
|
6085
|
+
constructor(dbName: string);
|
|
6086
|
+
}
|
|
5996
6087
|
/**
|
|
5997
6088
|
* Opens an IndexedDB database and increments the reference count.
|
|
5998
6089
|
* Handles global object detection and callbacks.
|
|
@@ -6010,12 +6101,95 @@ declare function openDatabase(dbName: string, dbVersion: number, initDatabase: (
|
|
|
6010
6101
|
/**
|
|
6011
6102
|
* Decrements the reference count and closes the database when no references remain.
|
|
6012
6103
|
*
|
|
6104
|
+
* Refcount contract: call once per *successful* {@link openDatabase}, never per
|
|
6105
|
+
* rejection. A rejected open already cleared its own bookkeeping, so a call
|
|
6106
|
+
* paired with it decrements whatever entry a successor installed under the same
|
|
6107
|
+
* name. {@link createManagedConnection} honours this — it only closes while it
|
|
6108
|
+
* holds a promise, and every rejection path drops that promise first.
|
|
6109
|
+
*
|
|
6013
6110
|
* @param dbName The name of the database to close.
|
|
6014
6111
|
*
|
|
6015
6112
|
* @returns True if the database was closed, false otherwise.
|
|
6016
6113
|
*/
|
|
6017
6114
|
declare function closeDatabase(dbName: string): Promise<boolean>;
|
|
6018
6115
|
|
|
6116
|
+
/** A disposed {@link ManagedConnection} was read from. Reopening instead would
|
|
6117
|
+
* take a refcount nothing will ever release, so this is loud rather than
|
|
6118
|
+
* silently leaky: the fix belongs at the caller, which is using a repository it
|
|
6119
|
+
* already tore down. */
|
|
6120
|
+
declare class ConnectionDisposedError extends Error {
|
|
6121
|
+
readonly dbName: string;
|
|
6122
|
+
readonly name = "ConnectionDisposedError";
|
|
6123
|
+
constructor(dbName: string);
|
|
6124
|
+
}
|
|
6125
|
+
/** Lazily-opened, self-healing handle on one IndexedDB database. */
|
|
6126
|
+
interface ManagedConnection extends AsyncDisposable {
|
|
6127
|
+
/**
|
|
6128
|
+
* The open connection, opening it on first call.
|
|
6129
|
+
*
|
|
6130
|
+
* Call this once per operation and use the handle for the transaction you
|
|
6131
|
+
* start right away — never store it on the repository, and never carry it
|
|
6132
|
+
* across an `await`. The connection can be closed underneath you at any
|
|
6133
|
+
* time (a `versionchange` from another tab, eviction, "clear site data"),
|
|
6134
|
+
* after which every transaction on that handle throws `InvalidStateError`;
|
|
6135
|
+
* a later `get()` transparently reopens, but only for callers that ask
|
|
6136
|
+
* again. Holding the resolved database is exactly the defect this type
|
|
6137
|
+
* exists to remove.
|
|
6138
|
+
*
|
|
6139
|
+
* ## The dispose boundary
|
|
6140
|
+
*
|
|
6141
|
+
* `get()` is valid only before `[Symbol.asyncDispose]`. Afterwards it
|
|
6142
|
+
* rejects with {@link ConnectionDisposedError}, permanently: dispose has
|
|
6143
|
+
* released this connection's single reference, and reopening would take a
|
|
6144
|
+
* refcount nothing is left to release. Disposal is final by design — there
|
|
6145
|
+
* is no revive; construct a new repository, which constructs a new
|
|
6146
|
+
* connection, instead.
|
|
6147
|
+
*
|
|
6148
|
+
* Dispose neither awaits nor cancels work already in flight. A transaction
|
|
6149
|
+
* started just before it can abort when the underlying handle closes, and
|
|
6150
|
+
* an in-flight `get()` may resolve to a database that is closing. So
|
|
6151
|
+
* sequence disposal after the operations you care about have settled —
|
|
6152
|
+
* `await` the repository's outstanding calls first — rather than racing it
|
|
6153
|
+
* against them.
|
|
6154
|
+
*
|
|
6155
|
+
* Callers must not close the database themselves; the reference this
|
|
6156
|
+
* connection holds is released by its own dispose, once.
|
|
6157
|
+
*/
|
|
6158
|
+
get(): Promise<IDBDatabase>;
|
|
6159
|
+
}
|
|
6160
|
+
/**
|
|
6161
|
+
* Forget-and-reopen around {@link openDatabase}, shared by every IndexedDB
|
|
6162
|
+
* repository. Caching the resolved `IDBDatabase` is the defect this exists to
|
|
6163
|
+
* remove: once the manager closes on `versionchange`, every later transaction on
|
|
6164
|
+
* that handle throws `InvalidStateError` with no path back.
|
|
6165
|
+
*
|
|
6166
|
+
* Opens nothing until the first {@link ManagedConnection.get} — repositories
|
|
6167
|
+
* construct their storage in their own constructors, and an eager open would
|
|
6168
|
+
* move the "IndexedDB is not available in this environment" throw to
|
|
6169
|
+
* construction time.
|
|
6170
|
+
*/
|
|
6171
|
+
declare function createManagedConnection(dbName: string, version: number, initDatabase: (db: IDBDatabase, oldVersion: number, transaction: IDBTransaction | null) => void): ManagedConnection;
|
|
6172
|
+
|
|
6173
|
+
/** Resolve with an {@link IDBRequest}'s result, or reject with its error. */
|
|
6174
|
+
declare const promisifyRequest: <T>(request: IDBRequest<T>) => Promise<T>;
|
|
6175
|
+
/**
|
|
6176
|
+
* Resolve once a transaction commits, or reject if it errors or aborts.
|
|
6177
|
+
*
|
|
6178
|
+
* A write is durable at *commit*, not at request success — quota pressure and
|
|
6179
|
+
* storage eviction abort a transaction whose every request already succeeded.
|
|
6180
|
+
* Reads may resolve on {@link promisifyRequest}; writes must await this.
|
|
6181
|
+
*/
|
|
6182
|
+
declare const awaitTransaction: (transaction: IDBTransaction) => Promise<void>;
|
|
6183
|
+
/**
|
|
6184
|
+
* Queue a delete for every row an index matches. Fire-and-forget by design:
|
|
6185
|
+
* the requests are queued as the cursor walks and the caller learns they
|
|
6186
|
+
* committed by awaiting the transaction, not this. A failing cursor or delete
|
|
6187
|
+
* aborts the transaction, which {@link awaitTransaction} reports.
|
|
6188
|
+
*/
|
|
6189
|
+
declare const deleteByIndex: (store: IDBObjectStore, indexName: string, value: IDBValidKey) => void;
|
|
6190
|
+
/** Read every row matching any of `values` on an index, flattened. */
|
|
6191
|
+
declare const getAllByIndexValues: <T>(store: IDBObjectStore, indexName: string, values: readonly IDBValidKey[]) => Promise<T[]>;
|
|
6192
|
+
|
|
6019
6193
|
declare const MESSAGE_BUS_NOT_INITIALIZED = "MessageBus not initialized";
|
|
6020
6194
|
/**
|
|
6021
6195
|
* Message for the "an init is in flight" variant.
|
|
@@ -6102,4 +6276,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6102
6276
|
burn(params: BurnParams): Promise<string>;
|
|
6103
6277
|
}
|
|
6104
6278
|
|
|
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 };
|
|
6279
|
+
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, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { a2 as ReadonlyIdentity, a as Identity, ap as DescriptorSigningRequest,
|
|
|
2
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 DelegateManagerImpl, bg as DelegateOptions, a4 as DelegateProvider, bh as DelegatorManagerImpl, bi as DelegatorProvider, bj as DeprecatedSignerMigrationReport, bk as DeprecatedSignerReport, bl as DigestMismatchError, bm as Discoverable, bn as DiscoveredContract, bo as DiscoveryDeps, bp as ESPLORA_URL, bq as EsploraProvider, br as EventSourceCapable, bs as EventSourceFactory, bt as EventSourceLike, bu as EventSourceUnavailableError, a6 as ExitCaptureMode, bv as ExitChainResolver, a7 as ExitDataSource, bw as ExtendedContractVtxo, bx as GroupMembership, by as HandlerError, bz as IDelegatorManager, bA as INTENT_TERMINAL_STATES, bB as IndexerTxType, bC as KnownMetadata, bD as MUTINYNET_EMULATOR_PUBKEY, bE as MigrateDeprecatedSignerOptions, bF as MigrationLegReport, bG as MigrationVtxoRef, bH as MultisigTapscript, bI as Nonces, bJ as Output, bK as PageResponse, bL as PaginationOptions, bM as PartialSig, bN as ProviderClass, bO as REGTEST_EMULATOR_PUBKEY, a5 as ReadonlyWalletConfig, l as RestArkProvider, bP as RestDelegateProvider, bQ as RestDelegatorProvider, m as RestIndexerProvider, bR as ScanContractsOptions, bS as ScanResult, bT as ScheduledSession, bU as SettlementEventType, bV as SignRequest, am as SignedIntent, bW as SignerClassification, bX as SignerSet, bY as SubscriptionEvent, bZ as SubscriptionHeartbeat, n as SubscriptionResponse, b_ as TapLeaves, b$ as TapTreeCoder, c0 as TapscriptType, ao as TimeHeight, c1 as TreeNonces, X as TreeNoncesEvent, c2 as TreePartialSigs, a0 as TreeSignatureEvent, Q as TreeSigningStartedEvent, $ as TreeTxEvent, c3 as Tx, c4 as TxHistoryRecord, c5 as TxKey, T as TxNotification, c6 as TxTag, c7 as TxTreeNode, c8 as TxType, c9 as VirtualStatus, ca as Vtxo, cb as VtxoChain, ak as VtxoManager, cc as VtxoType, b as WalletConfig, cd as WalletMode, ce as assetMintResolver, cf as boardingResolver, cg as canRecoverOnchain, ch as canSpendOffchain, ci as classifyAgainstSignerSet, cj as classifyContractSigner, ck as collabExitResolver, cl as configureEventSource, cm as createDefaultActivityRegistry, cn as createExitChainResolver, co as decodeTapscript, cp as defaultEmulatorPubkey, cq as getConfiguredEventSource, cr as getNetwork, cs as getRandomId, ct as getSequence, cu as hasCandidates, cv as hasTerminalSpend, cw as isBatchSignable, cx as isCooperativelyMigratable, cy as isDiscoverable, cz as isEventSourceUnavailableError, cA as isExpired, cB as isPastExpiry, cC as isRecoverable, cD as isSigningIdentity, cE as isSpendable, cF as isSubdust, cG as isTerminalIntentState, cH as isVirtualCoin, cI as isVtxoExpiringSoon, cJ as networks, cK as resolveEmulatorPubkey, cL as resolveEventSource, cM as scriptFromTapLeafScript, cN as signerSetFromInfo, cO as toXOnlySignerHex } from './index-CFOMyVMt.js';
|
|
3
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-DJUnN939.js';
|
|
4
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-DJUnN939.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-
|
|
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-
|
|
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-fDDiA1-L.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-fDDiA1-L.js';
|
|
7
7
|
import { D as DefaultVtxo } from './delegate-Dv_9OVHv.js';
|
|
8
8
|
export { a as DelegateVtxo } from './delegate-Dv_9OVHv.js';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
@@ -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
|
/**
|
|
@@ -5993,6 +6068,22 @@ declare class FetchError extends Error {
|
|
|
5993
6068
|
});
|
|
5994
6069
|
}
|
|
5995
6070
|
|
|
6071
|
+
/**
|
|
6072
|
+
* How long a blocked upgrade waits before the open is reported as failed.
|
|
6073
|
+
*
|
|
6074
|
+
* An `IDBOpenDBRequest` that is blocked never settles on its own: it waits for
|
|
6075
|
+
* the other connection to close, however long that takes. A hang is worse than a
|
|
6076
|
+
* failure here, because the caller cannot retry what never settles.
|
|
6077
|
+
*/
|
|
6078
|
+
declare const BLOCKED_UPGRADE_TIMEOUT_MS = 10000;
|
|
6079
|
+
/** A database upgrade was held open by another connection past
|
|
6080
|
+
* {@link BLOCKED_UPGRADE_TIMEOUT_MS}. Retryable: closing the other tab and
|
|
6081
|
+
* calling again is the remedy, and the bookkeeping was cleared so it can be. */
|
|
6082
|
+
declare class DatabaseUpgradeBlockedError extends Error {
|
|
6083
|
+
readonly dbName: string;
|
|
6084
|
+
readonly name = "DatabaseUpgradeBlockedError";
|
|
6085
|
+
constructor(dbName: string);
|
|
6086
|
+
}
|
|
5996
6087
|
/**
|
|
5997
6088
|
* Opens an IndexedDB database and increments the reference count.
|
|
5998
6089
|
* Handles global object detection and callbacks.
|
|
@@ -6010,12 +6101,95 @@ declare function openDatabase(dbName: string, dbVersion: number, initDatabase: (
|
|
|
6010
6101
|
/**
|
|
6011
6102
|
* Decrements the reference count and closes the database when no references remain.
|
|
6012
6103
|
*
|
|
6104
|
+
* Refcount contract: call once per *successful* {@link openDatabase}, never per
|
|
6105
|
+
* rejection. A rejected open already cleared its own bookkeeping, so a call
|
|
6106
|
+
* paired with it decrements whatever entry a successor installed under the same
|
|
6107
|
+
* name. {@link createManagedConnection} honours this — it only closes while it
|
|
6108
|
+
* holds a promise, and every rejection path drops that promise first.
|
|
6109
|
+
*
|
|
6013
6110
|
* @param dbName The name of the database to close.
|
|
6014
6111
|
*
|
|
6015
6112
|
* @returns True if the database was closed, false otherwise.
|
|
6016
6113
|
*/
|
|
6017
6114
|
declare function closeDatabase(dbName: string): Promise<boolean>;
|
|
6018
6115
|
|
|
6116
|
+
/** A disposed {@link ManagedConnection} was read from. Reopening instead would
|
|
6117
|
+
* take a refcount nothing will ever release, so this is loud rather than
|
|
6118
|
+
* silently leaky: the fix belongs at the caller, which is using a repository it
|
|
6119
|
+
* already tore down. */
|
|
6120
|
+
declare class ConnectionDisposedError extends Error {
|
|
6121
|
+
readonly dbName: string;
|
|
6122
|
+
readonly name = "ConnectionDisposedError";
|
|
6123
|
+
constructor(dbName: string);
|
|
6124
|
+
}
|
|
6125
|
+
/** Lazily-opened, self-healing handle on one IndexedDB database. */
|
|
6126
|
+
interface ManagedConnection extends AsyncDisposable {
|
|
6127
|
+
/**
|
|
6128
|
+
* The open connection, opening it on first call.
|
|
6129
|
+
*
|
|
6130
|
+
* Call this once per operation and use the handle for the transaction you
|
|
6131
|
+
* start right away — never store it on the repository, and never carry it
|
|
6132
|
+
* across an `await`. The connection can be closed underneath you at any
|
|
6133
|
+
* time (a `versionchange` from another tab, eviction, "clear site data"),
|
|
6134
|
+
* after which every transaction on that handle throws `InvalidStateError`;
|
|
6135
|
+
* a later `get()` transparently reopens, but only for callers that ask
|
|
6136
|
+
* again. Holding the resolved database is exactly the defect this type
|
|
6137
|
+
* exists to remove.
|
|
6138
|
+
*
|
|
6139
|
+
* ## The dispose boundary
|
|
6140
|
+
*
|
|
6141
|
+
* `get()` is valid only before `[Symbol.asyncDispose]`. Afterwards it
|
|
6142
|
+
* rejects with {@link ConnectionDisposedError}, permanently: dispose has
|
|
6143
|
+
* released this connection's single reference, and reopening would take a
|
|
6144
|
+
* refcount nothing is left to release. Disposal is final by design — there
|
|
6145
|
+
* is no revive; construct a new repository, which constructs a new
|
|
6146
|
+
* connection, instead.
|
|
6147
|
+
*
|
|
6148
|
+
* Dispose neither awaits nor cancels work already in flight. A transaction
|
|
6149
|
+
* started just before it can abort when the underlying handle closes, and
|
|
6150
|
+
* an in-flight `get()` may resolve to a database that is closing. So
|
|
6151
|
+
* sequence disposal after the operations you care about have settled —
|
|
6152
|
+
* `await` the repository's outstanding calls first — rather than racing it
|
|
6153
|
+
* against them.
|
|
6154
|
+
*
|
|
6155
|
+
* Callers must not close the database themselves; the reference this
|
|
6156
|
+
* connection holds is released by its own dispose, once.
|
|
6157
|
+
*/
|
|
6158
|
+
get(): Promise<IDBDatabase>;
|
|
6159
|
+
}
|
|
6160
|
+
/**
|
|
6161
|
+
* Forget-and-reopen around {@link openDatabase}, shared by every IndexedDB
|
|
6162
|
+
* repository. Caching the resolved `IDBDatabase` is the defect this exists to
|
|
6163
|
+
* remove: once the manager closes on `versionchange`, every later transaction on
|
|
6164
|
+
* that handle throws `InvalidStateError` with no path back.
|
|
6165
|
+
*
|
|
6166
|
+
* Opens nothing until the first {@link ManagedConnection.get} — repositories
|
|
6167
|
+
* construct their storage in their own constructors, and an eager open would
|
|
6168
|
+
* move the "IndexedDB is not available in this environment" throw to
|
|
6169
|
+
* construction time.
|
|
6170
|
+
*/
|
|
6171
|
+
declare function createManagedConnection(dbName: string, version: number, initDatabase: (db: IDBDatabase, oldVersion: number, transaction: IDBTransaction | null) => void): ManagedConnection;
|
|
6172
|
+
|
|
6173
|
+
/** Resolve with an {@link IDBRequest}'s result, or reject with its error. */
|
|
6174
|
+
declare const promisifyRequest: <T>(request: IDBRequest<T>) => Promise<T>;
|
|
6175
|
+
/**
|
|
6176
|
+
* Resolve once a transaction commits, or reject if it errors or aborts.
|
|
6177
|
+
*
|
|
6178
|
+
* A write is durable at *commit*, not at request success — quota pressure and
|
|
6179
|
+
* storage eviction abort a transaction whose every request already succeeded.
|
|
6180
|
+
* Reads may resolve on {@link promisifyRequest}; writes must await this.
|
|
6181
|
+
*/
|
|
6182
|
+
declare const awaitTransaction: (transaction: IDBTransaction) => Promise<void>;
|
|
6183
|
+
/**
|
|
6184
|
+
* Queue a delete for every row an index matches. Fire-and-forget by design:
|
|
6185
|
+
* the requests are queued as the cursor walks and the caller learns they
|
|
6186
|
+
* committed by awaiting the transaction, not this. A failing cursor or delete
|
|
6187
|
+
* aborts the transaction, which {@link awaitTransaction} reports.
|
|
6188
|
+
*/
|
|
6189
|
+
declare const deleteByIndex: (store: IDBObjectStore, indexName: string, value: IDBValidKey) => void;
|
|
6190
|
+
/** Read every row matching any of `values` on an index, flattened. */
|
|
6191
|
+
declare const getAllByIndexValues: <T>(store: IDBObjectStore, indexName: string, values: readonly IDBValidKey[]) => Promise<T[]>;
|
|
6192
|
+
|
|
6019
6193
|
declare const MESSAGE_BUS_NOT_INITIALIZED = "MessageBus not initialized";
|
|
6020
6194
|
/**
|
|
6021
6195
|
* Message for the "an init is in flight" variant.
|
|
@@ -6102,4 +6276,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6102
6276
|
burn(params: BurnParams): Promise<string>;
|
|
6103
6277
|
}
|
|
6104
6278
|
|
|
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 };
|
|
6279
|
+
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, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|