@arkade-os/sdk 0.4.65 → 0.4.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -15
- 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-Chwe60Ce.d.cts → asyncStorageTaskQueue-LTpeXYaD.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Dq_UcvDx.d.ts → asyncStorageTaskQueue-Za-e_zMk.d.ts} +2 -2
- package/dist/{chunk-G552MISJ.cjs → chunk-2JV4VQ7C.cjs} +56 -28
- package/dist/chunk-2JV4VQ7C.cjs.map +1 -0
- package/dist/{chunk-TFSVXMTM.js → chunk-3WIWNE4P.js} +56 -29
- package/dist/chunk-3WIWNE4P.js.map +1 -0
- package/dist/{chunk-XMOIRDLF.js → chunk-6TAQF6EV.js} +118 -16
- package/dist/chunk-6TAQF6EV.js.map +1 -0
- package/dist/{chunk-5YTSQSLE.js → chunk-AEWJU6NZ.js} +1033 -193
- package/dist/chunk-AEWJU6NZ.js.map +1 -0
- package/dist/{chunk-XN55B6EP.cjs → chunk-CO3KKSWM.cjs} +46 -19
- package/dist/chunk-CO3KKSWM.cjs.map +1 -0
- package/dist/{chunk-RESN6QHP.js → chunk-EALWOVHK.js} +4 -4
- package/dist/{chunk-RESN6QHP.js.map → chunk-EALWOVHK.js.map} +1 -1
- package/dist/{chunk-GFZNEMGL.cjs → chunk-MJUTO3PY.cjs} +1425 -574
- package/dist/chunk-MJUTO3PY.cjs.map +1 -0
- package/dist/{chunk-TYTPVPKD.js → chunk-MZFUZUTQ.js} +4 -4
- package/dist/{chunk-TYTPVPKD.js.map → chunk-MZFUZUTQ.js.map} +1 -1
- package/dist/{chunk-BABJ77NG.cjs → chunk-OIZ2V2VD.cjs} +163 -60
- package/dist/chunk-OIZ2V2VD.cjs.map +1 -0
- package/dist/{chunk-SJQM5AVB.cjs → chunk-R2YAMONM.cjs} +17 -17
- package/dist/{chunk-SJQM5AVB.cjs.map → chunk-R2YAMONM.cjs.map} +1 -1
- package/dist/{chunk-3G5V564P.js → chunk-X3VEMUVV.js} +32 -6
- package/dist/chunk-X3VEMUVV.js.map +1 -0
- package/dist/{chunk-7X744EFF.cjs → chunk-YDRZDZPP.cjs} +10 -10
- package/dist/{chunk-7X744EFF.cjs.map → chunk-YDRZDZPP.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-BBQW61ym.d.cts → delegate-Bz2e2zXY.d.cts} +1 -1
- package/dist/{delegate-Dv_9OVHv.d.ts → delegate-cdmzb2f9.d.ts} +1 -1
- package/dist/{wallet-DJUnN939.d.ts → hdWalletCapable-BSjuUYOO.d.cts} +319 -128
- package/dist/{wallet-C2NvHjWB.d.cts → hdWalletCapable-Hi12xjCJ.d.ts} +319 -128
- package/dist/{index-fDDiA1-L.d.ts → index-BiACuWaf.d.ts} +109 -13
- package/dist/{index-BtTtQFUX.d.cts → index-D2GjZxBr.d.cts} +109 -13
- package/dist/{index-CFOMyVMt.d.cts → index-DU5o_hz7.d.cts} +275 -51
- package/dist/{index-CFOMyVMt.d.ts → index-DU5o_hz7.d.ts} +275 -51
- package/dist/index.cjs +328 -276
- package/dist/index.d.cts +312 -41
- package/dist/index.d.ts +312 -41
- 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-BZJMLQ6g.d.cts} +2 -2
- package/dist/{taskRunner-BDzWbpct.d.ts → taskRunner-DATaRQus.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +18 -14
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +7 -5
- package/dist/wallet/expo/index.d.ts +7 -5
- package/dist/wallet/expo/index.js +10 -6
- package/dist/wallet/expo/index.js.map +1 -1
- 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 +3 -3
- package/dist/chunk-3G5V564P.js.map +0 -1
- package/dist/chunk-5YTSQSLE.js.map +0 -1
- package/dist/chunk-BABJ77NG.cjs.map +0 -1
- package/dist/chunk-G552MISJ.cjs.map +0 -1
- package/dist/chunk-GFZNEMGL.cjs.map +0 -1
- package/dist/chunk-TFSVXMTM.js.map +0 -1
- package/dist/chunk-XMOIRDLF.js.map +0 -1
- package/dist/chunk-XN55B6EP.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './
|
|
4
|
-
export {
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-
|
|
6
|
-
export { 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 { a4 as ReadonlyIdentity, a as Identity, ar as DescriptorSigningRequest, as as Transaction, an as SignerSession, a2 as DescriptorProvider, at as IntentFeeConfig, au as OffchainInput, av as FeeAmount, aw as OnchainInput, ax as FeeOutput, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch, W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, v as Contract, C as ContractRepository, z as ContractFilter, I as IWallet, q as ArkProvider, al as SettlementConfig, ay as ContractWatcherConfig, az as Asset, R as Recipient, aA as FeeInfo, k as SettlementEvent, j as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aB as CreateContractParams, aC as GetContractsFilter, u as VirtualCoin, aD as GetSpendablePathsOptions, aE as GetAllSpendingPathsOptions, g as GetNewAddressesOptions, aF as IssuanceParams, aG as ReissuanceParams, aH as BurnParams, aI as RenewVtxosOptions, c as WalletBalance, ab as ContractSyncState, ag as ContractWithVtxos, aJ as PathSelection, h as NewAddress, aK as ContractEvent, aL as AssetDetails, aM as IssuanceResult, aN as DelegateInfo, aO as MigrationGlobalSkipReason, aP as MigrationLegSkipReason, aQ as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aR as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aS as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aT as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aU as TreeNonces, aV as TreePartialSigs, T as TxNotificationEvent, aW as PendingTx, t as TapLeafScript, aX as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aY as Status, af as ArkAddress, aZ as ChainTx, r as IndexerProvider, X as TxTree, a_ as PathContext } from './index-DU5o_hz7.js';
|
|
2
|
+
export { a$ as ActivityIntent, b0 as ActivityResolver, b1 as ArkIntentState, b2 as ArkTapscript, b3 as AssetMetadata, b4 as BITCOIN_EMULATOR_PUBKEY, b5 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b6 as BatchInfo, b7 as BatchSignableIdentity, Q as BatchStartedEvent, b8 as CLTVMultisigTapscript, b9 as CandidateDeps, ba as ChainTxType, L as ChainedTxType, bb as CommitmentTx, bc as ConditionCSVMultisigTapscript, bd as ConditionMultisigTapscript, be as ContractBalance, bf as ContractEventCallback, bg as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bh as ContractState, bi as ContractVtxo, bj as ContractWatcher, bk as DEFAULT_VTXO_PAGE_SIZE, bl as DelegateManagerImpl, bm as DelegateOptions, a6 as DelegateProvider, bn as DelegatorManagerImpl, bo as DelegatorProvider, bp as DeprecatedSignerMigrationReport, bq as DeprecatedSignerReport, br as DigestMismatchError, bs as Discoverable, bt as DiscoveredContract, bu as DiscoveryDeps, bv as ESPLORA_URL, bw as EsploraProvider, bx as EventSourceCapable, by as EventSourceFactory, bz as EventSourceLike, bA as EventSourceUnavailableError, a8 as ExitCaptureMode, bB as ExitChainResolver, a9 as ExitDataSource, bC as ExtendedContractVtxo, bD as GroupMembership, bE as HandlerError, bF as IDelegatorManager, bG as INTENT_TERMINAL_STATES, bH as IndexerTxType, bI as IntentCoin, bJ as KnownMetadata, bK as MUTINYNET_EMULATOR_PUBKEY, bL as MigrateDeprecatedSignerOptions, bM as MigrationLegReport, bN as MigrationVtxoRef, bO as MultisigTapscript, bP as NewAddressType, bQ as Nonces, bR as Output, bS as PageResponse, bT as PaginationOptions, bU as PartialSig, bV as PrevTxSource, bW as PrevTxUnavailableError, bX as ProviderClass, bY as REGTEST_EMULATOR_PUBKEY, bZ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, b_ as RestDelegateProvider, b$ as RestDelegatorProvider, o as RestIndexerProvider, c0 as ScanContractsOptions, c1 as ScanResult, c2 as ScheduledSession, c3 as SettlementEventType, c4 as SignRequest, c5 as SignerClassification, c6 as SignerSet, c7 as SubscriptionEvent, c8 as SubscriptionHeartbeat, p as SubscriptionResponse, c9 as SweepTxNotification, ca as TapLeaves, cb as TapTreeCoder, cc as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cd as Tx, ce as TxHistoryRecord, cf as TxKey, cg as TxNotification, ch as TxTag, ci as TxTreeNode, cj as TxType, ck as VirtualStatus, cl as Vtxo, cm as VtxoChain, am as VtxoManager, cn as VtxoType, b as WalletConfig, co as WalletMode, cp as WithPrevTx, cq as assetMintResolver, cr as attachPrevArkTxs, cs as attachPrevoutTxs, ct as boardingResolver, cu as canRecoverOnchain, cv as canSpendOffchain, cw as canSweepOnchain, cx as classifyAgainstSignerSet, cy as classifyContractSigner, cz as collabExitResolver, cA as configureEventSource, cB as createDefaultActivityRegistry, cC as createExitChainResolver, cD as decodeTapscript, cE as defaultEmulatorPubkey, cF as getConfiguredEventSource, cG as getNetwork, cH as getRandomId, cI as getSequence, cJ as hasCandidates, cK as hasTerminalSpend, cL as isBatchSignable, cM as isCooperativelyMigratable, cN as isDiscoverable, cO as isEventSourceUnavailableError, cP as isExpired, cQ as isPastExpiry, cR as isRecoverable, cS as isSigningIdentity, cT as isSpendable, cU as isSubdust, cV as isTerminalIntentState, cW as isVirtualCoin, cX as isVtxoExpiringSoon, cY as networks, cZ as resolveEmulatorPubkey, c_ as resolveEventSource, c$ as resolvePrevTxs, d0 as scriptFromTapLeafScript, d1 as signerSetFromInfo, d2 as toXOnlySignerHex, d3 as withPrevTxs } from './index-DU5o_hz7.js';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-Hi12xjCJ.js';
|
|
4
|
+
export { f as ArkError, g as ArkErrorName, h as ArkadeCashClaimResult, i as ArkadeCashCreateError, j as ArkadeCashUnclaimedReason, k as ArkadeCashUnclaimedVtxo, l as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, m as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, n as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, o as ProviderKind, p as ProviderUnavailableError, q as REGTEST_MIN_BATCH_EXPIRY_SECONDS, r as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, s as ServerInfoSource, t as ServerResponseMismatchError, u as WalletCannotAllocateAddressError, v as assertValidBatchExpiry, w as assertValidServerUnrollScript, x as defaultBatchExpiryPolicy, y as defaultCheckpointExitDelayPolicy, z as isAddressAllocationCapable, E as isArkError, G as isHDAllocationCapable, J as isHDWalletCapable, K as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveCheckpointExitDelayPolicy, O as resolveDescriptorSigner, Q as selectVirtualCoins, T as signingDescriptorIndex, U as strictSigningDescriptorIndex, V as waitForIncomingFunds } from './hdWalletCapable-Hi12xjCJ.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-BiACuWaf.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-BiACuWaf.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-cdmzb2f9.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-cdmzb2f9.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';
|
|
@@ -1076,9 +1076,29 @@ interface ProvisionedKey {
|
|
|
1076
1076
|
* artifact; {@link contractSigner} resolves it back to a signer.
|
|
1077
1077
|
*/
|
|
1078
1078
|
descriptor: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* The Ark scriptPubKey that corresponds to this key — the pkScript of the
|
|
1081
|
+
* wallet's current receive address. Returned alongside {@link pubkey} so
|
|
1082
|
+
* callers building the lockup script do not need a separate
|
|
1083
|
+
* {@link IWallet.getAddress} round-trip or an `ArkAddress.decode` call.
|
|
1084
|
+
*/
|
|
1085
|
+
pkScript: Uint8Array;
|
|
1086
|
+
/**
|
|
1087
|
+
* The receive address {@link pkScript} was decoded from, captured in the
|
|
1088
|
+
* same single {@link IWallet.getAddress} read. The quote-time refund
|
|
1089
|
+
* address and the covenant's `refundPkScript` must always name the same
|
|
1090
|
+
* script, and two independent reads of a wallet that rotates its receive
|
|
1091
|
+
* address would not guarantee that — reuse this, never a second
|
|
1092
|
+
* `getAddress()` call.
|
|
1093
|
+
*/
|
|
1094
|
+
address: string;
|
|
1079
1095
|
}
|
|
1080
|
-
/**
|
|
1081
|
-
|
|
1096
|
+
/**
|
|
1097
|
+
* A claim key together with the preimage it claims with. `pkScript` and
|
|
1098
|
+
* `address` are excluded: a claim leg funds nothing, so it names no refund
|
|
1099
|
+
* destination.
|
|
1100
|
+
*/
|
|
1101
|
+
interface ProvisionedClaimSecret extends Omit<ProvisionedKey, "pkScript" | "address"> {
|
|
1082
1102
|
preimage: Uint8Array;
|
|
1083
1103
|
/** `sha256(preimage)` — what the contract commits to. */
|
|
1084
1104
|
paymentHash: Uint8Array;
|
|
@@ -1114,9 +1134,10 @@ interface ProvisionedClaimSecret extends ProvisionedKey {
|
|
|
1114
1134
|
* the failure would surface at refund time with the money already committed.
|
|
1115
1135
|
* Throws {@link ForeignDescriptorError} instead, before there is a quote.
|
|
1116
1136
|
*
|
|
1117
|
-
*
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1137
|
+
* The wallet's identity key is reused rather than a fresh HD child, so no
|
|
1138
|
+
* index is consumed when the artifact is never built — and the covenant's
|
|
1139
|
+
* refund path is on the same key as the refund address the caller sends to
|
|
1140
|
+
* at quote time.
|
|
1120
1141
|
*/
|
|
1121
1142
|
declare function provisionRefundKey(wallet: IWallet): Promise<ProvisionedKey>;
|
|
1122
1143
|
/**
|
|
@@ -1246,6 +1267,11 @@ interface MessageHandler<REQ extends RequestEnvelope = RequestEnvelope, RES exte
|
|
|
1246
1267
|
* Called once when the SW is starting up
|
|
1247
1268
|
* @param services - Providers and wallet instances available to the handler.
|
|
1248
1269
|
* @param repositories - Repositories available to the handler.
|
|
1270
|
+
* @param channel - Push channel to clients, for responses that answer no
|
|
1271
|
+
* request. Use it instead of holding events for the next {@link tick}.
|
|
1272
|
+
* The channel is scoped to the generation it was handed out in: after a
|
|
1273
|
+
* bus re-init or `stop()` it goes inert on its own, so retaining one past
|
|
1274
|
+
* `stop()` cannot post.
|
|
1249
1275
|
**/
|
|
1250
1276
|
start(services: {
|
|
1251
1277
|
arkProvider: ArkProvider;
|
|
@@ -1253,6 +1279,8 @@ interface MessageHandler<REQ extends RequestEnvelope = RequestEnvelope, RES exte
|
|
|
1253
1279
|
readonlyWallet: ReadonlyWallet;
|
|
1254
1280
|
}, repositories: {
|
|
1255
1281
|
walletRepository: WalletRepository;
|
|
1282
|
+
}, channel?: {
|
|
1283
|
+
broadcast(response: RES): void;
|
|
1256
1284
|
}): Promise<void>;
|
|
1257
1285
|
/** Called once when the SW is shutting down */
|
|
1258
1286
|
stop(): Promise<void>;
|
|
@@ -1365,12 +1393,31 @@ declare class MessageBus {
|
|
|
1365
1393
|
private readonly buildServicesFn;
|
|
1366
1394
|
private readonly boundOnMessage;
|
|
1367
1395
|
private readonly intentRepository?;
|
|
1396
|
+
/** Pending broadcasts, drained FIFO by a single {@link drain} loop. */
|
|
1397
|
+
private broadcastQueue;
|
|
1398
|
+
private draining;
|
|
1399
|
+
/** Bumped wherever the generation owning the queued broadcasts ends. */
|
|
1400
|
+
private broadcastEpoch;
|
|
1368
1401
|
/** Create the service-worker message bus with repositories and handler configuration. */
|
|
1369
1402
|
constructor(walletRepository: WalletRepository, contractRepository: ContractRepository, { messageHandlers, tickIntervalMs, messageTimeoutMs, messageTimeoutOverrides, intentRepository, debug, buildServices, }: Options);
|
|
1370
1403
|
/** Start the message bus and attach service-worker event listeners. */
|
|
1371
1404
|
start(): Promise<void>;
|
|
1372
1405
|
/** Stop the message bus, cancel ticks, and stop all registered handlers. */
|
|
1373
1406
|
stop(): Promise<void>;
|
|
1407
|
+
/** Invalidate every broadcast belonging to the outgoing generation. */
|
|
1408
|
+
private invalidateBroadcasts;
|
|
1409
|
+
private broadcastToClients;
|
|
1410
|
+
/**
|
|
1411
|
+
* Single fan-out loop, so pushes and tick responses keep one FIFO order.
|
|
1412
|
+
* A helper posting per response would race: `clients.matchAll()` gives no
|
|
1413
|
+
* cross-call resolution order, and it would de-batch `runTick`.
|
|
1414
|
+
*/
|
|
1415
|
+
private drain;
|
|
1416
|
+
/**
|
|
1417
|
+
* A dropped batch has no periodic recovery to fall back on now that events
|
|
1418
|
+
* no longer ride the tick, so name the loss under {@link Options.debug}.
|
|
1419
|
+
*/
|
|
1420
|
+
private logDroppedBroadcasts;
|
|
1374
1421
|
private scheduleNextTick;
|
|
1375
1422
|
private runTick;
|
|
1376
1423
|
/**
|
|
@@ -2688,6 +2735,16 @@ type ResponseGetNextSigningDescriptor = ResponseEnvelope & {
|
|
|
2688
2735
|
descriptor?: string;
|
|
2689
2736
|
};
|
|
2690
2737
|
};
|
|
2738
|
+
type RequestGetNewAddresses = RequestEnvelope & {
|
|
2739
|
+
type: "GET_NEW_ADDRESSES";
|
|
2740
|
+
payload?: GetNewAddressesOptions;
|
|
2741
|
+
};
|
|
2742
|
+
type ResponseGetNewAddresses = ResponseEnvelope & {
|
|
2743
|
+
type: "NEW_ADDRESSES";
|
|
2744
|
+
payload: {
|
|
2745
|
+
addresses: NewAddress[];
|
|
2746
|
+
};
|
|
2747
|
+
};
|
|
2691
2748
|
type RequestGetUsedSigningDescriptors = RequestEnvelope & {
|
|
2692
2749
|
type: "GET_USED_SIGNING_DESCRIPTORS";
|
|
2693
2750
|
payload?: {
|
|
@@ -2985,8 +3042,8 @@ type RequestRestoreWallet = RequestEnvelope & {
|
|
|
2985
3042
|
type ResponseRestoreWallet = ResponseEnvelope & {
|
|
2986
3043
|
type: "RESTORE_WALLET_SUCCESS";
|
|
2987
3044
|
};
|
|
2988
|
-
type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetSpendableVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestGetCurrentSigningDescriptor | RequestGetNextSigningDescriptor | RequestGetUsedSigningDescriptors | RequestAdvanceSigningDescriptorWatermark | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
|
|
2989
|
-
type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetSpendableVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseGetCurrentSigningDescriptor | ResponseGetNextSigningDescriptor | ResponseGetUsedSigningDescriptors | ResponseAdvanceSigningDescriptorWatermark | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
|
|
3045
|
+
type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetSpendableVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestGetCurrentSigningDescriptor | RequestGetNextSigningDescriptor | RequestGetNewAddresses | RequestGetUsedSigningDescriptors | RequestAdvanceSigningDescriptorWatermark | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
|
|
3046
|
+
type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetSpendableVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseGetCurrentSigningDescriptor | ResponseGetNextSigningDescriptor | ResponseGetNewAddresses | ResponseGetUsedSigningDescriptors | ResponseAdvanceSigningDescriptorWatermark | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
|
|
2990
3047
|
declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
|
|
2991
3048
|
readonly messageTag: string;
|
|
2992
3049
|
private wallet;
|
|
@@ -2997,6 +3054,11 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2997
3054
|
private incomingFundsSubscription;
|
|
2998
3055
|
private contractEventsSubscription;
|
|
2999
3056
|
private onNextTick;
|
|
3057
|
+
private channel;
|
|
3058
|
+
private incomingFundsEpoch;
|
|
3059
|
+
private contractEventsEpoch;
|
|
3060
|
+
/** Per-request progress callbacks: ends with the handler, not with a re-init. */
|
|
3061
|
+
private requestEpoch;
|
|
3000
3062
|
/**
|
|
3001
3063
|
* Instantiate a new WalletUpdater.
|
|
3002
3064
|
* Can override the default `messageTag` allowing more than one updater to run in parallel.
|
|
@@ -3005,10 +3067,17 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
3005
3067
|
constructor(options?: {
|
|
3006
3068
|
messageTag?: string;
|
|
3007
3069
|
});
|
|
3008
|
-
start(...params: Parameters<MessageHandler["start"]>): Promise<void>;
|
|
3070
|
+
start(...params: Parameters<MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse>["start"]>): Promise<void>;
|
|
3009
3071
|
stop(): Promise<void>;
|
|
3010
3072
|
tick(_now: number): Promise<WalletUpdaterResponse[]>;
|
|
3011
|
-
private
|
|
3073
|
+
private epochOf;
|
|
3074
|
+
private newGeneration;
|
|
3075
|
+
/**
|
|
3076
|
+
* A handle rather than a `broadcast(response, epoch)` call, because it can
|
|
3077
|
+
* only be written where the closure it guards is created — an epoch passed
|
|
3078
|
+
* at the call site reads identically whether it guards anything or not.
|
|
3079
|
+
*/
|
|
3080
|
+
private newEmitter;
|
|
3012
3081
|
private requireWallet;
|
|
3013
3082
|
private tagged;
|
|
3014
3083
|
isLongRunning(message: WalletUpdaterRequest): boolean;
|
|
@@ -3352,7 +3421,7 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
|
|
|
3352
3421
|
reload(): Promise<boolean>;
|
|
3353
3422
|
getContractManager(): Promise<IContractManager>;
|
|
3354
3423
|
}
|
|
3355
|
-
declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements IWallet, HDWalletCapable, HDAllocationCapable {
|
|
3424
|
+
declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements IWallet, HDWalletCapable, HDAllocationCapable, AddressAllocationCapable {
|
|
3356
3425
|
readonly serviceWorker: ServiceWorker;
|
|
3357
3426
|
readonly walletRepository: WalletRepository;
|
|
3358
3427
|
readonly contractRepository: ContractRepository;
|
|
@@ -3381,6 +3450,22 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3381
3450
|
getCurrentSigningDescriptor(): Promise<string | undefined>;
|
|
3382
3451
|
/** @see HDAllocationCapable.getNextSigningDescriptor */
|
|
3383
3452
|
getNextSigningDescriptor(): Promise<string | undefined>;
|
|
3453
|
+
/**
|
|
3454
|
+
* @see Wallet.getNewAddresses
|
|
3455
|
+
*
|
|
3456
|
+
* Proxied as a single request rather than rebuilt page-side out of
|
|
3457
|
+
* {@link getNextSigningDescriptor}: the worker owns the HD watermark *and*
|
|
3458
|
+
* the contract repository, so splitting the operation would let a page burn
|
|
3459
|
+
* an index and then fail to register the script, leaving an address nothing
|
|
3460
|
+
* watches.
|
|
3461
|
+
*
|
|
3462
|
+
* Note the error shape — `WalletCannotAllocateAddressError` is thrown
|
|
3463
|
+
* worker-side and cannot cross the message boundary as a class, so a
|
|
3464
|
+
* `forceNew` refusal surfaces here as a plain `Error` carrying its message
|
|
3465
|
+
* (and the worker-side error as `cause`). Callers that must branch on the
|
|
3466
|
+
* refusal match the message rather than `instanceof`.
|
|
3467
|
+
*/
|
|
3468
|
+
getNewAddresses(opts?: GetNewAddressesOptions): Promise<NewAddress[]>;
|
|
3384
3469
|
/** @see HDWalletCapable.getUsedSigningDescriptors */
|
|
3385
3470
|
getUsedSigningDescriptors(opts?: {
|
|
3386
3471
|
lookAhead?: number;
|
|
@@ -3827,6 +3912,7 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3827
3912
|
* @returns The broadcast txid (or the child txid for 1P1C packages).
|
|
3828
3913
|
*/
|
|
3829
3914
|
broadcastTransaction(...txs: string[]): Promise<string>;
|
|
3915
|
+
getRawTransaction(txid: string): Promise<Uint8Array>;
|
|
3830
3916
|
getTxOutspends(txid: string): Promise<{
|
|
3831
3917
|
spent: boolean;
|
|
3832
3918
|
txid: string;
|
|
@@ -3873,6 +3959,44 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3873
3959
|
close(): Promise<void>;
|
|
3874
3960
|
}
|
|
3875
3961
|
|
|
3962
|
+
/**
|
|
3963
|
+
* Decorates an {@link ArkProvider}, caching {@link ArkProvider.getInfo} for
|
|
3964
|
+
* `ttlMs` (default 60s). Other provider methods pass through.
|
|
3965
|
+
* Expired-cache refresh failures propagate; persisted wallet boot fallback
|
|
3966
|
+
* lives in `arkInfoSnapshot`.
|
|
3967
|
+
*/
|
|
3968
|
+
declare class CachingArkProvider implements ArkProvider {
|
|
3969
|
+
private readonly inner;
|
|
3970
|
+
private readonly ttlMs;
|
|
3971
|
+
private cached?;
|
|
3972
|
+
private expiresAt;
|
|
3973
|
+
private inflight?;
|
|
3974
|
+
/** Bumped on every event-driven cache write; see {@link getInfo}. */
|
|
3975
|
+
private generation;
|
|
3976
|
+
private readonly unsubscribe;
|
|
3977
|
+
constructor(inner: ArkProvider, ttlMs?: number);
|
|
3978
|
+
/** Releases the inner provider's server-info subscription. */
|
|
3979
|
+
dispose(): void;
|
|
3980
|
+
get serverUrl(): string | undefined;
|
|
3981
|
+
getInfo(): Promise<ArkInfo>;
|
|
3982
|
+
submitTx(signedArkTx: string, checkpointTxs: string[]): Promise<{
|
|
3983
|
+
arkTxid: string;
|
|
3984
|
+
finalArkTx: string;
|
|
3985
|
+
signedCheckpointTxs: string[];
|
|
3986
|
+
}>;
|
|
3987
|
+
finalizeTx(arkTxid: string, finalCheckpointTxs: string[]): Promise<void>;
|
|
3988
|
+
registerIntent(intent: SignedIntent<Intent.RegisterMessage>): Promise<string>;
|
|
3989
|
+
deleteIntent(intent: SignedIntent<Intent.DeleteMessage>): Promise<void>;
|
|
3990
|
+
confirmRegistration(intentId: string): Promise<void>;
|
|
3991
|
+
submitTreeNonces(batchId: string, pubkey: string, nonces: TreeNonces): Promise<void>;
|
|
3992
|
+
submitTreeSignatures(batchId: string, pubkey: string, signatures: TreePartialSigs): Promise<void>;
|
|
3993
|
+
submitSignedForfeitTxs(signedForfeitTxs: string[], signedCommitmentTx?: string): Promise<void>;
|
|
3994
|
+
getEventStream(signal: AbortSignal, topics: string[]): AsyncIterableIterator<SettlementEvent>;
|
|
3995
|
+
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<TxNotificationEvent>;
|
|
3996
|
+
getPendingTxs(intent: SignedIntent<Intent.GetPendingTxMessage>): Promise<PendingTx[]>;
|
|
3997
|
+
onServerInfoChanged(listener: (info: ArkInfo) => void): () => void;
|
|
3998
|
+
}
|
|
3999
|
+
|
|
3876
4000
|
type ArkTxInput = {
|
|
3877
4001
|
tapLeafScript: TapLeafScript;
|
|
3878
4002
|
} & EncodedVtxoScript & Pick<VirtualCoin, "txid" | "vout" | "value">;
|
|
@@ -4451,6 +4575,37 @@ declare class TxWeightEstimator {
|
|
|
4451
4575
|
vsize(): VSize;
|
|
4452
4576
|
}
|
|
4453
4577
|
|
|
4578
|
+
/**
|
|
4579
|
+
* Called when a VTXO's exit becomes observable onchain.
|
|
4580
|
+
*
|
|
4581
|
+
* The seam exists because nothing else can learn the fact: delta sync filters on *creation* time
|
|
4582
|
+
* (`GetVtxosOptions.after` / `before`), so a status change on an older VTXO is invisible to it, and
|
|
4583
|
+
* neither exit path can reach a contract manager on its own — `Unroll.Session` takes no contract
|
|
4584
|
+
* layer by design, and the `UnilateralExit` executor is deliberately keyless and provider-only.
|
|
4585
|
+
*
|
|
4586
|
+
* A plain function type, with no runtime import anywhere in this module, is what lets both keep
|
|
4587
|
+
* that independence: an exit path calls the hook, it does not import the contract layer.
|
|
4588
|
+
*
|
|
4589
|
+
* **Best-effort by contract.** An exit is a disaster-recovery path and must never fail because a
|
|
4590
|
+
* cache write did, so every call site goes through {@link notifyExitObserved}.
|
|
4591
|
+
*/
|
|
4592
|
+
type OnExitObserved = (outpoint: Outpoint) => void | Promise<void>;
|
|
4593
|
+
/**
|
|
4594
|
+
* Adapt a contract manager into an {@link OnExitObserved}: the wallet-side half of the seam, kept
|
|
4595
|
+
* out of `exit/` so the dependency direction stays outward.
|
|
4596
|
+
*
|
|
4597
|
+
* **A prompt, not a guarantee.** The hook fires when the EXPLORER reports the exit confirmed, and
|
|
4598
|
+
* `refreshOutpoints` then asks the INDEXER. If arkd has not yet marked the output `isUnrolled` the
|
|
4599
|
+
* refresh writes the state it does report — or returns silently when it names no vtxo at all — and
|
|
4600
|
+
* nothing here retries. A miss leaves the wallet exactly where it was before this seam existed: it
|
|
4601
|
+
* learns the exit whenever something else next refreshes the outpoint. The executor's second fire
|
|
4602
|
+
* at sweep-confirm is the natural retry, and by then the exit has been onchain for at least the
|
|
4603
|
+
* CSV delay.
|
|
4604
|
+
*/
|
|
4605
|
+
declare function exitObserverFor(manager: Pick<IContractManager, "refreshOutpoints">): OnExitObserved;
|
|
4606
|
+
/** Fire an observation without letting it into the exit's failure path. */
|
|
4607
|
+
declare function notifyExitObserved(onExitObserved: OnExitObserved | undefined, outpoint: Outpoint): Promise<void>;
|
|
4608
|
+
|
|
4454
4609
|
declare namespace Unroll {
|
|
4455
4610
|
enum StepType {
|
|
4456
4611
|
UNROLL = 0,
|
|
@@ -4528,6 +4683,16 @@ declare namespace Unroll {
|
|
|
4528
4683
|
* previous behaviour (indexer only).
|
|
4529
4684
|
*/
|
|
4530
4685
|
readonly virtualTxRepository?: VirtualTxRepository | undefined;
|
|
4686
|
+
/**
|
|
4687
|
+
* Fired once the chain is fully onchain (`StepType.DONE`), so a
|
|
4688
|
+
* wallet repository can be prompted to re-read the outpoint —
|
|
4689
|
+
* delta sync never would, filtering as it does on creation time.
|
|
4690
|
+
* Fired ONCE, so an observer that reads a lagging indexer gets no
|
|
4691
|
+
* second chance; see {@link exitObserverFor}. Best-effort — a
|
|
4692
|
+
* rejection never reaches the exit. Prefer {@link sessionFor},
|
|
4693
|
+
* which wires it from the wallet.
|
|
4694
|
+
*/
|
|
4695
|
+
readonly onExitObserved?: OnExitObserved | undefined;
|
|
4531
4696
|
/** Create an unroll session from a virtual output outpoint and its dependency chain. */
|
|
4532
4697
|
constructor(toUnroll: Outpoint & {
|
|
4533
4698
|
chain: ChainTx[];
|
|
@@ -4538,9 +4703,19 @@ declare namespace Unroll {
|
|
|
4538
4703
|
* miss, then cached best-effort for later exits. Omitted ⇒ exact
|
|
4539
4704
|
* previous behaviour (indexer only).
|
|
4540
4705
|
*/
|
|
4541
|
-
virtualTxRepository?: VirtualTxRepository | undefined
|
|
4706
|
+
virtualTxRepository?: VirtualTxRepository | undefined,
|
|
4707
|
+
/**
|
|
4708
|
+
* Fired once the chain is fully onchain (`StepType.DONE`), so a
|
|
4709
|
+
* wallet repository can be prompted to re-read the outpoint —
|
|
4710
|
+
* delta sync never would, filtering as it does on creation time.
|
|
4711
|
+
* Fired ONCE, so an observer that reads a lagging indexer gets no
|
|
4712
|
+
* second chance; see {@link exitObserverFor}. Best-effort — a
|
|
4713
|
+
* rejection never reaches the exit. Prefer {@link sessionFor},
|
|
4714
|
+
* which wires it from the wallet.
|
|
4715
|
+
*/
|
|
4716
|
+
onExitObserved?: OnExitObserved | undefined);
|
|
4542
4717
|
/** Create an unroll session by loading the virtual output chain from the indexer. */
|
|
4543
|
-
static create(toUnroll: Outpoint, bumper: AnchorBumper, explorer: OnchainProvider, indexer: IndexerProvider, virtualTxRepository?: VirtualTxRepository): Promise<Session>;
|
|
4718
|
+
static create(toUnroll: Outpoint, bumper: AnchorBumper, explorer: OnchainProvider, indexer: IndexerProvider, virtualTxRepository?: VirtualTxRepository, onExitObserved?: OnExitObserved): Promise<Session>;
|
|
4544
4719
|
/**
|
|
4545
4720
|
* Resolve a chain tx's raw PSBT (base64). Repo first when configured;
|
|
4546
4721
|
* indexer on a miss, then best-effort cached so a later exit doesn't
|
|
@@ -4550,6 +4725,14 @@ declare namespace Unroll {
|
|
|
4550
4725
|
private resolveVirtualTxBase64;
|
|
4551
4726
|
/**
|
|
4552
4727
|
* Get the next step to be executed
|
|
4728
|
+
*
|
|
4729
|
+
* @remarks
|
|
4730
|
+
* `do()` is the step, not a formality: every effect lives there, and at
|
|
4731
|
+
* `StepType.DONE` that includes firing {@link onExitObserved}. A caller
|
|
4732
|
+
* driving `next()` by hand must always await it — the async iterator
|
|
4733
|
+
* below does. Reading `type` and skipping `do()` leaves the exit
|
|
4734
|
+
* unobserved, and on the other step kinds unbroadcast.
|
|
4735
|
+
*
|
|
4553
4736
|
* @returns The next step to be executed + the function to execute it
|
|
4554
4737
|
*/
|
|
4555
4738
|
next(): Promise<Step & {
|
|
@@ -4561,6 +4744,16 @@ declare namespace Unroll {
|
|
|
4561
4744
|
*/
|
|
4562
4745
|
[Symbol.asyncIterator](): AsyncIterator<Step>;
|
|
4563
4746
|
}
|
|
4747
|
+
/**
|
|
4748
|
+
* {@link Session.create} with everything the wallet already holds — explorer, indexer,
|
|
4749
|
+
* virtual-tx cache — plus the exit observer, which re-reads the outpoint at `StepType.DONE`
|
|
4750
|
+
* rather than waiting for a delta sync that cannot see the change. That single fire is a
|
|
4751
|
+
* prompt and not a guarantee — see {@link exitObserverFor}.
|
|
4752
|
+
*
|
|
4753
|
+
* Prefer this to building a `Session` by hand: an optional parameter only reaches callers who
|
|
4754
|
+
* know to pass it, which is the same failure mode the seam exists to close.
|
|
4755
|
+
*/
|
|
4756
|
+
function sessionFor(wallet: Wallet, toUnroll: Outpoint, bumper: AnchorBumper): Promise<Session>;
|
|
4564
4757
|
/**
|
|
4565
4758
|
* Complete the unroll of a virtual output by broadcasting the transaction that spends the CSV path.
|
|
4566
4759
|
* @param wallet the wallet owning the virtual output(s)
|
|
@@ -4734,6 +4927,32 @@ type ExecutorEvent = {
|
|
|
4734
4927
|
interface ExitFeeWallet {
|
|
4735
4928
|
bumpAnchor(parentHex: string, feeRate: number): Promise<[parentHex: string, childHex: string]>;
|
|
4736
4929
|
}
|
|
4930
|
+
interface ExecutorOptions {
|
|
4931
|
+
pollIntervalMs?: number;
|
|
4932
|
+
feeWallet?: ExitFeeWallet;
|
|
4933
|
+
/** Abort to stop execution.
|
|
4934
|
+
*
|
|
4935
|
+
* Iteration then rejects with `signal.reason`. Calling `abort()`
|
|
4936
|
+
* with no argument yields an error whose `name` is `"AbortError"`;
|
|
4937
|
+
* a custom reason is forwarded as-is, matching `fetch` and
|
|
4938
|
+
* `AbortSignal.prototype.throwIfAborted`.
|
|
4939
|
+
*
|
|
4940
|
+
* Already-broadcast transactions are not recalled; the executor is
|
|
4941
|
+
* idempotent, so a later run resumes from the chain. */
|
|
4942
|
+
signal?: AbortSignal;
|
|
4943
|
+
/**
|
|
4944
|
+
* Fired per VTXO once every step serving its branch is onchain, and again
|
|
4945
|
+
* once its sweep confirms — the two moments an exit becomes observable.
|
|
4946
|
+
* Two fires rather than one is what makes an observer reading a lagging
|
|
4947
|
+
* indexer recoverable here: by the sweep the exit has been onchain for at
|
|
4948
|
+
* least the CSV delay.
|
|
4949
|
+
*
|
|
4950
|
+
* Best-effort: a rejection never reaches the exit, which is the whole point
|
|
4951
|
+
* of a keyless disaster-recovery path. `UnilateralExit.execute` wires it
|
|
4952
|
+
* from a wallet; passing it here keeps the bare executor provider-only.
|
|
4953
|
+
*/
|
|
4954
|
+
onExitObserved?: OnExitObserved;
|
|
4955
|
+
}
|
|
4737
4956
|
/**
|
|
4738
4957
|
* Keyless, stateless executor for a pre-signed exit package.
|
|
4739
4958
|
*
|
|
@@ -4747,20 +4966,15 @@ declare class Executor implements AsyncIterable<ExecutorEvent> {
|
|
|
4747
4966
|
private readonly pollIntervalMs;
|
|
4748
4967
|
private readonly feeWallet?;
|
|
4749
4968
|
private readonly signal?;
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
*
|
|
4760
|
-
* Already-broadcast transactions are not recalled; the executor is
|
|
4761
|
-
* idempotent, so a later run resumes from the chain. */
|
|
4762
|
-
signal?: AbortSignal;
|
|
4763
|
-
});
|
|
4969
|
+
private readonly onExitObserved?;
|
|
4970
|
+
constructor(pkg: ExitPackage, provider: OnchainProvider, opts?: ExecutorOptions);
|
|
4971
|
+
/**
|
|
4972
|
+
* Per-VTXO branch progress, which the executor otherwise does not track:
|
|
4973
|
+
* `dead` / `done` are per-step, and a VTXO is only onchain once EVERY
|
|
4974
|
+
* `package`/`bump` step naming it has confirmed. (`broadcast` — the funding
|
|
4975
|
+
* splitter — carries no `forVtxos` and serves no single VTXO.)
|
|
4976
|
+
*/
|
|
4977
|
+
private branchSteps;
|
|
4764
4978
|
/**
|
|
4765
4979
|
* Poll delay. Nearly all wall-clock time is spent here, so it must be the
|
|
4766
4980
|
* thing that reacts to abort — checking only between polls would leave
|
|
@@ -4770,8 +4984,25 @@ declare class Executor implements AsyncIterable<ExecutorEvent> {
|
|
|
4770
4984
|
private status;
|
|
4771
4985
|
private waitConfirmed;
|
|
4772
4986
|
[Symbol.asyncIterator](): AsyncIterator<ExecutorEvent>;
|
|
4987
|
+
/** `"txid:vout"` -> outpoint, then hand it to the hook. A malformed entry is skipped. */
|
|
4988
|
+
private observe;
|
|
4773
4989
|
}
|
|
4774
4990
|
|
|
4991
|
+
/**
|
|
4992
|
+
* An {@link Executor} with the wallet's exit observer already wired, so the repository re-reads
|
|
4993
|
+
* each outpoint as its branch confirms and again as its sweep does, moving the value into the
|
|
4994
|
+
* `unrolled` balance bucket without waiting for a delta sync — which could not see the change
|
|
4995
|
+
* anyway, filtering as it does on creation time. What the re-read learns depends on the indexer
|
|
4996
|
+
* having caught up; see `exitObserverFor`.
|
|
4997
|
+
*
|
|
4998
|
+
* The bare `Executor` stays keyless and provider-only; this is the wallet-side convenience that
|
|
4999
|
+
* makes the default path correct, because an opt-in parameter only reaches callers who know to pass
|
|
5000
|
+
* it. An explicit `opts.onExitObserved` still wins.
|
|
5001
|
+
*/
|
|
5002
|
+
declare function execute(wallet: Wallet, pkg: ExitPackage, opts?: ExecutorOptions & {
|
|
5003
|
+
provider?: OnchainProvider;
|
|
5004
|
+
}): Promise<Executor>;
|
|
5005
|
+
|
|
4775
5006
|
/**
|
|
4776
5007
|
* Build the fully pre-signed unilateral exit package.
|
|
4777
5008
|
*
|
|
@@ -4791,10 +5022,17 @@ declare function prepare(opts: ExitOptions): Promise<ExitPackage>;
|
|
|
4791
5022
|
* VTXOs onchain and broadcasts the fee-funding splitter; `Executor` drives
|
|
4792
5023
|
* the resulting package to completion with nothing but an
|
|
4793
5024
|
* Esplora-compatible endpoint — no keys, no Arkade infrastructure.
|
|
5025
|
+
*
|
|
5026
|
+
* `execute` is the wallet-side shorthand for that last step: the same
|
|
5027
|
+
* executor, with the exit observer wired so the wallet's own repository
|
|
5028
|
+
* re-reads each outpoint as its branch confirms and again as its sweep
|
|
5029
|
+
* does — picking the exit up as it lands, indexer lag permitting. See
|
|
5030
|
+
* `exitObserverFor` for why that is a prompt rather than a guarantee.
|
|
4794
5031
|
*/
|
|
4795
5032
|
declare const UnilateralExit: {
|
|
4796
5033
|
readonly estimate: typeof estimate;
|
|
4797
5034
|
readonly prepare: typeof prepare;
|
|
5035
|
+
readonly execute: typeof execute;
|
|
4798
5036
|
readonly Executor: typeof Executor;
|
|
4799
5037
|
};
|
|
4800
5038
|
|
|
@@ -5379,6 +5617,11 @@ declare namespace bignum {
|
|
|
5379
5617
|
* param must be bound, every `$name` reference must be declared, and bound
|
|
5380
5618
|
* values are validated against their type at compilation.
|
|
5381
5619
|
*
|
|
5620
|
+
* A covenant spend needs an `indexer`, not just an `emulator`: the co-signing
|
|
5621
|
+
* service resolves each input's prevout pkScript from the previous ark tx the
|
|
5622
|
+
* PSBT carries, and only the indexer can supply those bytes. Pure tapscript
|
|
5623
|
+
* spends go straight to arkd and need neither.
|
|
5624
|
+
*
|
|
5382
5625
|
* @example
|
|
5383
5626
|
* ```typescript
|
|
5384
5627
|
* const htlcProgram = {
|
|
@@ -5434,10 +5677,13 @@ interface Utxo {
|
|
|
5434
5677
|
vout: number;
|
|
5435
5678
|
value: number;
|
|
5436
5679
|
/**
|
|
5437
|
-
*
|
|
5438
|
-
*
|
|
5439
|
-
* attaches it as the PrevArkTx field.
|
|
5680
|
+
* Raw wire bytes of the ark transaction that created this VTXO, attached as
|
|
5681
|
+
* the PrevArkTx field on input 0.
|
|
5440
5682
|
*
|
|
5683
|
+
* An override, not the only channel: covenant spends resolve the previous
|
|
5684
|
+
* tx of every input through the client's indexer. Supply it when the tx is
|
|
5685
|
+
* not yet indexable — a recursive covenant spending the output of an ark tx
|
|
5686
|
+
* the caller just built — and the resolved value is suppressed for input 0.
|
|
5441
5687
|
*/
|
|
5442
5688
|
sourceTx?: Uint8Array;
|
|
5443
5689
|
}
|
|
@@ -5483,8 +5729,12 @@ interface ArkadeConnectOptions {
|
|
|
5483
5729
|
* tapscript contracts (multisig/timelock/hashlock) don't need it.
|
|
5484
5730
|
*/
|
|
5485
5731
|
emulator?: EmulatorProvider;
|
|
5486
|
-
/**
|
|
5487
|
-
|
|
5732
|
+
/**
|
|
5733
|
+
* Indexer — enables `getUtxos`/`getBalance` and coin auto-selection, and
|
|
5734
|
+
* resolves the previous ark txs a covenant spend must carry (see
|
|
5735
|
+
* {@link attachPrevArkTxs}). Required for covenant spends.
|
|
5736
|
+
*/
|
|
5737
|
+
indexer?: Pick<IndexerProvider, "getVtxos" | "getVirtualTxs">;
|
|
5488
5738
|
/** Signer for paths that require a user signature; optional for watch-only. */
|
|
5489
5739
|
identity?: Identity;
|
|
5490
5740
|
/** Network for address derivation; defaults to the SDK default. */
|
|
@@ -5534,7 +5784,7 @@ declare class Arkade {
|
|
|
5534
5784
|
*/
|
|
5535
5785
|
readonly emulatorKey: Uint8Array | undefined;
|
|
5536
5786
|
readonly checkpoint: CSVMultisigTapscript.Type;
|
|
5537
|
-
readonly indexer?: Pick<IndexerProvider, "getVtxos">;
|
|
5787
|
+
readonly indexer?: Pick<IndexerProvider, "getVtxos" | "getVirtualTxs">;
|
|
5538
5788
|
readonly identity?: Identity;
|
|
5539
5789
|
/** The signing identity's x-only public key, resolved at connect — identifies which inputs the wallet signs. */
|
|
5540
5790
|
readonly userKey?: Uint8Array;
|
|
@@ -6046,6 +6296,27 @@ declare function timelockToSequence(timelock: RelativeTimelock): number;
|
|
|
6046
6296
|
*/
|
|
6047
6297
|
declare function sequenceToTimelock(sequence: number): RelativeTimelock;
|
|
6048
6298
|
|
|
6299
|
+
/**
|
|
6300
|
+
* Normalize a secp256k1 public key to the 32-byte x-only form every tapscript,
|
|
6301
|
+
* covenant param and `params.serverPubKey` in this SDK is denominated in.
|
|
6302
|
+
*
|
|
6303
|
+
* A compressed key drops its parity prefix; an x-only key passes through. Both
|
|
6304
|
+
* arrive over the same wires — arkd advertises `signerPubkey` either way,
|
|
6305
|
+
* `Identity.xOnlyPublicKey` implementations vary, and solver-supplied fields
|
|
6306
|
+
* are whatever the peer sent — so the caller usually cannot know which it
|
|
6307
|
+
* holds. Anything else is refused rather than silently truncated: a 65-byte
|
|
6308
|
+
* uncompressed key, stripped of one byte, yields a plausible 32-byte value
|
|
6309
|
+
* that is not the key, which surfaces as an address nobody funded.
|
|
6310
|
+
*
|
|
6311
|
+
* The result may alias `key` rather than copy it; callers that mutate either
|
|
6312
|
+
* value after normalization should copy first.
|
|
6313
|
+
*
|
|
6314
|
+
* @param key - 32-byte x-only or 33-byte compressed public key
|
|
6315
|
+
* @param label - Name used in the error, e.g. `"ark signer key"`
|
|
6316
|
+
* @see toXOnlySignerHex for the hex-in, hex-out signer-rotation equivalent
|
|
6317
|
+
*/
|
|
6318
|
+
declare function toXOnly(key: Uint8Array, label?: string): Uint8Array;
|
|
6319
|
+
|
|
6049
6320
|
declare const buildVersion = "0.9.9";
|
|
6050
6321
|
/**
|
|
6051
6322
|
* The SDK's own version string, sourced from package.json
|
|
@@ -6276,4 +6547,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6276
6547
|
burn(params: BurnParams): Promise<string>;
|
|
6277
6548
|
}
|
|
6278
6549
|
|
|
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 };
|
|
6550
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, 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, CachingArkProvider, 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 ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetNewAddressesOptions, 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, NewAddress, OffchainInput, type OffchainTx, type OnExitObserved, 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, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, 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, exitObserverFor, 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, notifyExitObserved, 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 };
|