@arkade-os/sdk 0.5.0-rc.26 → 0.5.0-rc.28
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 +37 -0
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +4 -4
- package/dist/adapters/expo.d.ts +4 -4
- package/dist/adapters/expo.js +3 -3
- package/dist/{index-BfvbSL0W.d.cts → ark-CgZYyMpf.d.cts} +4369 -4205
- package/dist/{index-BfvbSL0W.d.ts → ark-CgZYyMpf.d.ts} +4369 -4205
- package/dist/{asyncStorageTaskQueue-CFWscYpG.d.cts → asyncStorageTaskQueue-B099Jii3.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-DrFapzPg.d.ts → asyncStorageTaskQueue-BeQji1Ee.d.ts} +1 -1
- package/dist/{chunk-K2YTDYQF.cjs → chunk-3P7SXAAC.cjs} +16 -16
- package/dist/{chunk-K2YTDYQF.cjs.map → chunk-3P7SXAAC.cjs.map} +1 -1
- package/dist/{chunk-B2YMUJD5.cjs → chunk-4BT6HBZQ.cjs} +1155 -701
- package/dist/chunk-4BT6HBZQ.cjs.map +1 -0
- package/dist/{chunk-FEBAG2K2.cjs → chunk-6BJJ47JM.cjs} +18 -18
- package/dist/{chunk-FEBAG2K2.cjs.map → chunk-6BJJ47JM.cjs.map} +1 -1
- package/dist/{chunk-HPUKFTZV.js → chunk-BDTASM5W.js} +4 -4
- package/dist/{chunk-HPUKFTZV.js.map → chunk-BDTASM5W.js.map} +1 -1
- package/dist/{chunk-U5ZRDVVB.js → chunk-BIN2DVKS.js} +675 -222
- package/dist/chunk-BIN2DVKS.js.map +1 -0
- package/dist/{chunk-HTCIPDVW.js → chunk-CG7S6CDR.js} +5 -4
- package/dist/chunk-CG7S6CDR.js.map +1 -0
- package/dist/{chunk-N2VM6V6K.js → chunk-CR5YHHEM.js} +154 -51
- package/dist/chunk-CR5YHHEM.js.map +1 -0
- package/dist/{chunk-VVFCCNU2.cjs → chunk-FGKBQH5S.cjs} +5 -3
- package/dist/chunk-FGKBQH5S.cjs.map +1 -0
- package/dist/{chunk-Y5VSJURH.js → chunk-FSSINCR6.js} +4 -4
- package/dist/{chunk-Y5VSJURH.js.map → chunk-FSSINCR6.js.map} +1 -1
- package/dist/{chunk-QCD3SJOL.cjs → chunk-HFSC7T5I.cjs} +10 -10
- package/dist/{chunk-QCD3SJOL.cjs.map → chunk-HFSC7T5I.cjs.map} +1 -1
- package/dist/{chunk-5JQ5EOYE.js → chunk-PHSUZSRH.js} +3 -3
- package/dist/{chunk-5JQ5EOYE.js.map → chunk-PHSUZSRH.js.map} +1 -1
- package/dist/{chunk-CFOIHLON.cjs → chunk-YFQOJTG3.cjs} +201 -96
- package/dist/chunk-YFQOJTG3.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +5 -5
- package/dist/contracts/handlers/index.d.ts +5 -5
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-Cz8FnLqi.d.ts → delegate-B8KSoeVz.d.ts} +1 -1
- package/dist/{delegate-r3jh7UcH.d.cts → delegate-wuf6DBpr.d.cts} +1 -1
- package/dist/{index-DOION7Ta.d.cts → index-1pLGuueL.d.ts} +58 -52
- package/dist/{index-Chgwl4dO.d.ts → index-CP3v0PVS.d.cts} +58 -52
- package/dist/index.cjs +328 -316
- package/dist/index.d.cts +332 -286
- package/dist/index.d.ts +332 -286
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- package/dist/repositories/realm/index.d.cts +4 -4
- package/dist/repositories/realm/index.d.ts +4 -4
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +33 -33
- package/dist/repositories/sqlite/index.d.cts +4 -4
- package/dist/repositories/sqlite/index.d.ts +4 -4
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-CXAcjtdU.d.ts → taskRunner-D4IF7tc8.d.cts} +1 -1
- package/dist/{taskRunner-BO8a-SQh.d.cts → taskRunner-DzEg63qV.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +5 -5
- package/dist/wallet/expo/background.d.ts +5 -5
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +15 -15
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-CFIfUlQP.d.ts → walletRepository-BA5C6Slk.d.cts} +29 -29
- package/dist/{wallet-s90p-vIk.d.cts → walletRepository-BE2yiIHF.d.ts} +29 -29
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +6 -6
- package/dist/worker/expo/index.d.ts +6 -6
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-B2YMUJD5.cjs.map +0 -1
- package/dist/chunk-CFOIHLON.cjs.map +0 -1
- package/dist/chunk-HTCIPDVW.js.map +0 -1
- package/dist/chunk-N2VM6V6K.js.map +0 -1
- package/dist/chunk-U5ZRDVVB.js.map +0 -1
- package/dist/chunk-VVFCCNU2.cjs.map +0 -1
package/dist/index.d.cts
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, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './
|
|
4
|
-
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, p as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, q as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, r as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, s as ProviderKind, t as ProviderUnavailableError, u as REGTEST_MIN_BATCH_EXPIRY_SECONDS, v as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, w as ServerInfoSource, x as ServerResponseMismatchError, V as VtxoReservation, y as VtxoReservedError, z as WaitForIncomingFundsOptions, E as WalletCannotAllocateAddressError, G as assertValidBatchExpiry, J as assertValidServerUnrollScript, L as defaultBatchExpiryPolicy, N as defaultCheckpointExitDelayPolicy, O as isAddressAllocationCapable, Q as isArkError, T as isHDAllocationCapable, U as isHDWalletCapable, X as maybeArkError, Y as resolveBatchExpiryPolicy, Z as resolveCheckpointExitDelayPolicy, _ as resolveDescriptorSigner, $ as selectVirtualCoins, a0 as signingDescriptorIndex, a1 as strictSigningDescriptorIndex, a2 as waitForIncomingFunds } from './
|
|
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
|
|
6
|
-
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a as Identity, a4 as Transaction, az as SignerSession, ah as ReadonlyIdentity, a3 as DescriptorSigningRequest, a2 as DescriptorProvider, X as IntentRepository, Y as ArkIntent, Z as IntentPageFilter, P as PageRequest, D as PageResult, O as Outpoint, _ as VirtualTxRepository, $ as VirtualTx, a0 as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, F as ScriptVtxoCursor, H as ScriptVtxoPageOptions, J as StoredVtxo, K as VtxoRepositoryKey, E as ExtendedCoin, L as TransactionHistoryPageFilter, M as TransactionHistoryPageCursor, h as ArkTransaction, Q as WalletState, z as Contract, I as IWallet, C as ContractRepository, u as ArkProvider, aq as NetworkName, ai as OnchainProvider, ax as SettlementConfig, aD as ContractWatcherConfig, aE as Asset, R as Recipient, aF as FeeInfo, o as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetArkadeInfoOptions, aG as GetVtxosOptions, aH as PaginationOptions, f as GetVtxosFilter, g as GetSpendableVtxosFilter, aI as CreateContractParams, aJ as GetContractsFilter, y as VirtualCoin, aK as GetSpendablePathsOptions, aL as GetAllSpendingPathsOptions, l as GetNewAddressesOptions, aM as InputExpiryFloor, aN as IssuanceParams, aO as ReissuanceParams, aP as BurnParams, aQ as RenewVtxosOptions, A as ArkadeInfo, aR as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ao as ContractSyncState, as as ContractWithVtxos, aS as WatchedScript, aT as PathSelection, m as NewAddress, aU as ContractEvent, aV as AssetDetails, aW as IssuanceResult, aX as DelegateInfo, aY as MigrationGlobalSkipReason, aZ as MigrationLegSkipReason, a_ as SignerStatus, ag as IReadonlyWallet, i as ActivityRegistry, an as IReadonlyAssetManager, a$ as StorageConfig, j as Activity, k as IContractManager, q as IAssetManager, p as SendParams, n as IDelegateManager, b0 as IVtxoManager, a5 as Network, au as Coin, b1 as SendBitcoinParams, b2 as ExplorerTransaction, aA as SignedIntent, aB as Intent, b3 as TreeNonces, b4 as TreePartialSigs, T as TxNotificationEvent, b5 as PendingTx, x as TapLeafScript, b6 as EncodedVtxoScript, a6 as CSVMultisigTapscript, w as RelativeTimelock, b7 as EmulatorProvider, V as VtxoScript, b8 as Status, ar as ArkAddress, b9 as ChainTx, v as IndexerProvider, a9 as TxTree, U as ContractFilter, ba as IntentFeeConfig, bb as OffchainInput, bc as FeeAmount, bd as OnchainInput, be as FeeOutput, bf as ArkadeService, bg as ContractVtxoEvent, bh as ExtendedContractVtxo, bi as ResolvedArkadeService, bj as resolveArkadeService, bk as PathContext } from './ark-CgZYyMpf.cjs';
|
|
2
|
+
export { bl as ActivityIntent, bm as ActivityResolver, bn as ArkIntentState, bo as ArkTapscript, bp as AssetMetadata, bq as BITCOIN_EMULATOR_PUBKEY, br as BaseWalletConfig, ad as BatchFailedEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, bs as BatchInfo, bt as BatchSignableIdentity, a7 as BatchStartedEvent, bu as CLTVMultisigTapscript, bv as CandidateDeps, bw as ChainTxType, a1 as ChainedTxType, bx as CommitmentTx, by as ConditionCSVMultisigTapscript, bz as ConditionMultisigTapscript, bA as ConnectorTreeNode, bB as ContractBalance, bC as ContractEventCallback, bD as ContractHandler, av as ContractManager, aw as ContractManagerConfig, bE as ContractState, bF as ContractVtxo, bG as ContractWatcher, bH as ContractWatcherEventCallback, bI as DEFAULT_ARKADE_EMULATOR_URL, bJ as DEFAULT_VTXO_PAGE_SIZE, bK as DelegateManagerImpl, bL as DelegateOptions, aj as DelegateProvider, bM as DeprecatedSignerMigrationReport, bN as DeprecatedSignerReport, bO as DigestMismatchError, bP as Discoverable, bQ as DiscoveredContract, bR as DiscoveryDeps, bS as ESPLORA_URL, bT as EmulatorInfo, bU as EsploraProvider, bV as EventSourceCapable, bW as EventSourceFactory, bX as EventSourceLike, bY as EventSourceUnavailableError, al as ExitCaptureMode, bZ as ExitChainResolver, am as ExitDataSource, b_ as GroupMembership, b$ as HandlerError, c0 as INTENT_TERMINAL_STATES, c1 as IndexerTxType, c2 as IntentCoin, c3 as IntentFilter, c4 as KnownMetadata, c5 as MAX_PAGE_SIZE, c6 as MUTINYNET_EMULATOR_PUBKEY, c7 as MigrateDeprecatedSignerOptions, c8 as MigrationLegReport, c9 as MigrationVtxoRef, ca as MultisigTapscript, cb as NewAddressType, cc as Nonces, cd as Output, ce as PageResponse, cf as PartialSig, cg as PrevTxSource, ch as PrevTxUnavailableError, ci as ProviderClass, cj as REGTEST_EMULATOR_PUBKEY, ck as RawTxSource, ak as ReadonlyWalletConfig, ap as RecipientArkadeAddressContext, cl as RenewalSplit, cm as RenewalSplitContext, r as RestArkProvider, cn as RestDelegateProvider, co as RestEmulatorProvider, s as RestIndexerProvider, cp as ScanContractsOptions, cq as ScanResult, cr as ScheduledSession, cs as SettlementEventType, ct as SignRequest, cu as SignerClassification, cv as SignerSet, cw as SubscriptionEvent, cx as SubscriptionFilter, cy as SubscriptionHeartbeat, t as SubscriptionResponse, cz as SweepTxNotification, cA as TapLeaves, cB as TapTreeCoder, cC as TapscriptType, aC as TimeHeight, aa as TreeNoncesEvent, af as TreeSignatureEvent, a8 as TreeSigningStartedEvent, ae as TreeTxEvent, cD as Tx, cE as TxHistoryRecord, cF as TxKey, cG as TxNotification, cH as TxTag, cI as TxTreeNode, cJ as TxType, cK as Vtxo, cL as VtxoChain, ay as VtxoManager, cM as VtxoType, b as WalletConfig, cN as WalletMode, cO as WithPrevTx, cP as assertAllowedSighashTypes, cQ as assertPageRequest, cR as assertRecipientArkadeAddress, cS as assetMintResolver, cT as attachPrevArkTxs, cU as attachPrevoutTxs, cV as boardingResolver, cW as canRecoverOnchain, cX as canSpendOffchain, cY as canSweepOnchain, cZ as classifyAgainstSignerSet, c_ as classifyContractSigner, c$ as collabExitResolver, d0 as collectContracts, d1 as collectIntents, d2 as collectPages, d3 as collectScriptVtxos, d4 as collectTransactionHistory, d5 as collectUtxos, d6 as collectVtxos, d7 as configureEventSource, d8 as createDefaultActivityRegistry, d9 as createExitChainResolver, da as decodeTapscript, db as defaultEmulatorPubkey, dc as getAllNormalizedVtxos, dd as getConfiguredEventSource, de as getNetwork, df as getNormalizedVtxos, dg as getRandomId, dh as getSequence, di as hasCandidates, dj as isBatchSignable, dk as isContractVtxoEvent, dl as isCooperativelyMigratable, dm as isDiscoverable, dn as isEventSourceUnavailableError, dp as isPastExpiry, dq as isSigningIdentity, dr as isSubdust, ds as isTerminalIntentState, dt as isVirtualCoin, du as isVtxoExpiringSoon, dv as isVtxoSpent, dw as iteratePages, dx as networkFromArkadeInfo, dy as networks, dz as pageResult, dA as resolveEmulatorPubkey, dB as resolveEventSource, dC as resolvePrevTxs, dD as scriptFromTapLeafScript, dE as signerSetFromInfo, dF as toOffchainInputFeeParams, dG as toXOnlySignerHex, dH as withPrevTxs } from './ark-CgZYyMpf.cjs';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './walletRepository-BA5C6Slk.cjs';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, p as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, q as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, r as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, s as ProviderKind, t as ProviderUnavailableError, u as REGTEST_MIN_BATCH_EXPIRY_SECONDS, v as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, w as ServerInfoSource, x as ServerResponseMismatchError, V as VtxoReservation, y as VtxoReservedError, z as WaitForIncomingFundsOptions, E as WalletCannotAllocateAddressError, G as assertValidBatchExpiry, J as assertValidServerUnrollScript, L as defaultBatchExpiryPolicy, N as defaultCheckpointExitDelayPolicy, O as isAddressAllocationCapable, Q as isArkError, T as isHDAllocationCapable, U as isHDWalletCapable, X as maybeArkError, Y as resolveBatchExpiryPolicy, Z as resolveCheckpointExitDelayPolicy, _ as resolveDescriptorSigner, $ as selectVirtualCoins, a0 as signingDescriptorIndex, a1 as strictSigningDescriptorIndex, a2 as waitForIncomingFunds } from './walletRepository-BA5C6Slk.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 InputDef, e as ArkadeValueType, f as ArkadeArgType, g as ArkadeContractParams, h as ArkadeSegment, i as AsmToken, j as InputRef, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, l as TweakedSigner, U as UnsupportedProgramVersionError, W as WitnessRef, m as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, n as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-CP3v0PVS.cjs';
|
|
6
|
+
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-CP3v0PVS.cjs';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-wuf6DBpr.cjs';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-wuf6DBpr.cjs';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
10
10
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
11
11
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
@@ -14,10 +14,75 @@ import { TransactionOutput, TransactionInputUpdate } from '@scure/btc-signer/psb
|
|
|
14
14
|
import * as P from 'micro-packed';
|
|
15
15
|
import '@scure/btc-signer/transaction.js';
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* In-memory single key implementation for Bitcoin transaction signing.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* // Create from hex string
|
|
23
|
+
* const key = SingleKey.fromHex('your_private_key_hex');
|
|
24
|
+
*
|
|
25
|
+
* // Create from raw bytes
|
|
26
|
+
* const key = SingleKey.fromPrivateKey(privateKeyBytes);
|
|
27
|
+
*
|
|
28
|
+
* // Create random key
|
|
29
|
+
* const randomKey = SingleKey.fromRandomBytes();
|
|
30
|
+
*
|
|
31
|
+
* // Sign a transaction
|
|
32
|
+
* const signedTx = await key.sign(transaction);
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare class SingleKey implements Identity {
|
|
36
|
+
private key;
|
|
37
|
+
private constructor();
|
|
38
|
+
/** Create a signing identity from raw private key bytes. */
|
|
39
|
+
static fromPrivateKey(privateKey: Uint8Array): SingleKey;
|
|
40
|
+
/** Create a signing identity from a hex-encoded private key. */
|
|
41
|
+
static fromHex(privateKeyHex: string): SingleKey;
|
|
42
|
+
/** Create a signing identity with a freshly generated random private key. */
|
|
43
|
+
static fromRandomBytes(): SingleKey;
|
|
44
|
+
/**
|
|
45
|
+
* Export the private key as a hex string.
|
|
46
|
+
*
|
|
47
|
+
* @returns The private key as a hex string
|
|
48
|
+
*/
|
|
49
|
+
toHex(): string;
|
|
50
|
+
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
51
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
52
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
53
|
+
signerSession(): SignerSession;
|
|
54
|
+
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
55
|
+
/**
|
|
56
|
+
* BIP-340 sign `messageHash` with aux_rand = 0, so the signature — and
|
|
57
|
+
* anything derived from it — is reproducible from the key alone.
|
|
58
|
+
*
|
|
59
|
+
* What lets a static wallet derive a swap preimage instead of storing one
|
|
60
|
+
* (see `wallet/contractSecrets.ts`). Deliberately NOT `signMessage`, whose
|
|
61
|
+
* schnorr branch draws a random aux_rand: a preimage derived from that is
|
|
62
|
+
* unrecoverable, and the loss would only surface at claim time.
|
|
63
|
+
*/
|
|
64
|
+
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
65
|
+
toReadonly(): Promise<ReadonlySingleKey>;
|
|
66
|
+
}
|
|
67
|
+
declare class ReadonlySingleKey implements ReadonlyIdentity {
|
|
68
|
+
private readonly publicKey;
|
|
69
|
+
/** Create a readonly identity from a compressed public key. */
|
|
70
|
+
constructor(publicKey: Uint8Array);
|
|
71
|
+
/**
|
|
72
|
+
* Create a ReadonlySingleKey from a compressed public key.
|
|
73
|
+
*
|
|
74
|
+
* @param publicKey - 33-byte compressed public key (02/03 prefix + 32-byte x coordinate)
|
|
75
|
+
* @returns A new ReadonlySingleKey instance
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const pubkey = new Uint8Array(33); // your compressed public key
|
|
79
|
+
* const readonlyKey = ReadonlySingleKey.fromPublicKey(pubkey);
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
static fromPublicKey(publicKey: Uint8Array): ReadonlySingleKey;
|
|
83
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
84
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
85
|
+
}
|
|
21
86
|
|
|
22
87
|
/**
|
|
23
88
|
* Tagged envelope for a signing identity transported across the
|
|
@@ -386,55 +451,6 @@ declare class StaticDescriptorProvider implements DescriptorProvider {
|
|
|
386
451
|
signMessageWithDescriptor(descriptor: string, message: Uint8Array, type?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
387
452
|
}
|
|
388
453
|
|
|
389
|
-
/**
|
|
390
|
-
* Estimator evaluates CEL expressions to calculate fees for Arkade intents
|
|
391
|
-
*/
|
|
392
|
-
declare class Estimator {
|
|
393
|
-
readonly config: IntentFeeConfig;
|
|
394
|
-
private intentOffchainInput?;
|
|
395
|
-
private intentOnchainInput?;
|
|
396
|
-
private intentOffchainOutput?;
|
|
397
|
-
private intentOnchainOutput?;
|
|
398
|
-
/**
|
|
399
|
-
* Creates a new Estimator with the given config
|
|
400
|
-
* @param config - Configuration containing CEL programs for fee calculation
|
|
401
|
-
*/
|
|
402
|
-
constructor(config: IntentFeeConfig);
|
|
403
|
-
/**
|
|
404
|
-
* Evaluates the fee for a given vtxo input
|
|
405
|
-
* @param input - The offchain input to evaluate
|
|
406
|
-
* @returns The fee amount for this input
|
|
407
|
-
*/
|
|
408
|
-
evalOffchainInput(input: OffchainInput): FeeAmount;
|
|
409
|
-
/**
|
|
410
|
-
* Evaluates the fee for a given boarding input
|
|
411
|
-
* @param input - The onchain input to evaluate
|
|
412
|
-
* @returns The fee amount for this input
|
|
413
|
-
*/
|
|
414
|
-
evalOnchainInput(input: OnchainInput): FeeAmount;
|
|
415
|
-
/**
|
|
416
|
-
* Evaluates the fee for a given vtxo output
|
|
417
|
-
* @param output - The output to evaluate
|
|
418
|
-
* @returns The fee amount for this output
|
|
419
|
-
*/
|
|
420
|
-
evalOffchainOutput(output: FeeOutput): FeeAmount;
|
|
421
|
-
/**
|
|
422
|
-
* Evaluates the fee for a given collaborative exit output
|
|
423
|
-
* @param output - The output to evaluate
|
|
424
|
-
* @returns The fee amount for this output
|
|
425
|
-
*/
|
|
426
|
-
evalOnchainOutput(output: FeeOutput): FeeAmount;
|
|
427
|
-
/**
|
|
428
|
-
* Evaluates the fee for a given set of inputs and outputs
|
|
429
|
-
* @param offchainInputs - Array of offchain inputs to evaluate
|
|
430
|
-
* @param onchainInputs - Array of onchain inputs to evaluate
|
|
431
|
-
* @param offchainOutputs - Array of offchain outputs to evaluate
|
|
432
|
-
* @param onchainOutputs - Array of onchain outputs to evaluate
|
|
433
|
-
* @returns The total fee amount
|
|
434
|
-
*/
|
|
435
|
-
evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
454
|
declare class InMemoryIntentRepository implements IntentRepository {
|
|
439
455
|
readonly version: 1;
|
|
440
456
|
private byId;
|
|
@@ -654,115 +670,10 @@ declare function contractFromArkContractWithAddress(encoded: string, serverPubKe
|
|
|
654
670
|
/** Check if a string is an arkcontract. */
|
|
655
671
|
declare function isArkContract(str: string): boolean;
|
|
656
672
|
|
|
657
|
-
/**
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
declare class InMemoryContractRepository implements ContractRepository {
|
|
662
|
-
readonly version: 3;
|
|
663
|
-
private readonly contractsByScript;
|
|
664
|
-
clear(): Promise<void>;
|
|
665
|
-
getContractsPage(filter: ContractFilter | undefined, page: PageRequest): Promise<PageResult<Contract>>;
|
|
666
|
-
saveContract(contract: Contract): Promise<void>;
|
|
667
|
-
deleteContract(script: string): Promise<void>;
|
|
668
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* IndexedDB-based implementation of ContractRepository.
|
|
673
|
-
*
|
|
674
|
-
* Data is stored as JSON strings in key/value stores.
|
|
675
|
-
*/
|
|
676
|
-
declare class IndexedDBContractRepository implements ContractRepository {
|
|
677
|
-
readonly version: 3;
|
|
678
|
-
private readonly connection;
|
|
679
|
-
constructor(dbName?: string);
|
|
680
|
-
clear(): Promise<void>;
|
|
681
|
-
getContractsPage(filter: ContractFilter | undefined, page: PageRequest): Promise<PageResult<Contract>>;
|
|
682
|
-
saveContract(contract: Contract): Promise<void>;
|
|
683
|
-
deleteContract(script: string): Promise<void>;
|
|
684
|
-
/** Up to `limit + 1` rows of `range` that pass `filter`, in key order. */
|
|
685
|
-
private readMatching;
|
|
686
|
-
private applyContractFilter;
|
|
687
|
-
private getDB;
|
|
688
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
interface WalletRestoreHook {
|
|
692
|
-
id: string;
|
|
693
|
-
restore(wallet: IWallet): Promise<void>;
|
|
694
|
-
}
|
|
695
|
-
declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* In-memory single key implementation for Bitcoin transaction signing.
|
|
699
|
-
*
|
|
700
|
-
* @example
|
|
701
|
-
* ```typescript
|
|
702
|
-
* // Create from hex string
|
|
703
|
-
* const key = SingleKey.fromHex('your_private_key_hex');
|
|
704
|
-
*
|
|
705
|
-
* // Create from raw bytes
|
|
706
|
-
* const key = SingleKey.fromPrivateKey(privateKeyBytes);
|
|
707
|
-
*
|
|
708
|
-
* // Create random key
|
|
709
|
-
* const randomKey = SingleKey.fromRandomBytes();
|
|
710
|
-
*
|
|
711
|
-
* // Sign a transaction
|
|
712
|
-
* const signedTx = await key.sign(transaction);
|
|
713
|
-
* ```
|
|
714
|
-
*/
|
|
715
|
-
declare class SingleKey implements Identity {
|
|
716
|
-
private key;
|
|
717
|
-
private constructor();
|
|
718
|
-
/** Create a signing identity from raw private key bytes. */
|
|
719
|
-
static fromPrivateKey(privateKey: Uint8Array): SingleKey;
|
|
720
|
-
/** Create a signing identity from a hex-encoded private key. */
|
|
721
|
-
static fromHex(privateKeyHex: string): SingleKey;
|
|
722
|
-
/** Create a signing identity with a freshly generated random private key. */
|
|
723
|
-
static fromRandomBytes(): SingleKey;
|
|
724
|
-
/**
|
|
725
|
-
* Export the private key as a hex string.
|
|
726
|
-
*
|
|
727
|
-
* @returns The private key as a hex string
|
|
728
|
-
*/
|
|
729
|
-
toHex(): string;
|
|
730
|
-
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
731
|
-
compressedPublicKey(): Promise<Uint8Array>;
|
|
732
|
-
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
733
|
-
signerSession(): SignerSession;
|
|
734
|
-
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
735
|
-
/**
|
|
736
|
-
* BIP-340 sign `messageHash` with aux_rand = 0, so the signature — and
|
|
737
|
-
* anything derived from it — is reproducible from the key alone.
|
|
738
|
-
*
|
|
739
|
-
* What lets a static wallet derive a swap preimage instead of storing one
|
|
740
|
-
* (see `wallet/contractSecrets.ts`). Deliberately NOT `signMessage`, whose
|
|
741
|
-
* schnorr branch draws a random aux_rand: a preimage derived from that is
|
|
742
|
-
* unrecoverable, and the loss would only surface at claim time.
|
|
743
|
-
*/
|
|
744
|
-
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
745
|
-
toReadonly(): Promise<ReadonlySingleKey>;
|
|
746
|
-
}
|
|
747
|
-
declare class ReadonlySingleKey implements ReadonlyIdentity {
|
|
748
|
-
private readonly publicKey;
|
|
749
|
-
/** Create a readonly identity from a compressed public key. */
|
|
750
|
-
constructor(publicKey: Uint8Array);
|
|
751
|
-
/**
|
|
752
|
-
* Create a ReadonlySingleKey from a compressed public key.
|
|
753
|
-
*
|
|
754
|
-
* @param publicKey - 33-byte compressed public key (02/03 prefix + 32-byte x coordinate)
|
|
755
|
-
* @returns A new ReadonlySingleKey instance
|
|
756
|
-
* @example
|
|
757
|
-
* ```typescript
|
|
758
|
-
* const pubkey = new Uint8Array(33); // your compressed public key
|
|
759
|
-
* const readonlyKey = ReadonlySingleKey.fromPublicKey(pubkey);
|
|
760
|
-
* ```
|
|
761
|
-
*/
|
|
762
|
-
static fromPublicKey(publicKey: Uint8Array): ReadonlySingleKey;
|
|
763
|
-
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
764
|
-
compressedPublicKey(): Promise<Uint8Array>;
|
|
765
|
-
}
|
|
673
|
+
/** Validate an optional millisecond duration; zero retains its caller-defined meaning. */
|
|
674
|
+
declare function assertNonNegativeMs(name: string, ms: number | undefined): void;
|
|
675
|
+
/** Validate a timer delay without changing whether zero disables or immediately fires it. */
|
|
676
|
+
declare function assertTimerMs(name: string, ms: number | undefined): void;
|
|
766
677
|
|
|
767
678
|
/**
|
|
768
679
|
* Domain separator for the preimage derivation. Protocol-scoped and versioned, mirroring NArk's
|
|
@@ -1041,6 +952,10 @@ type Options = {
|
|
|
1041
952
|
* Ignored when `buildServices` is supplied — that override owns `storage`.
|
|
1042
953
|
*/
|
|
1043
954
|
intentRepository?: IntentRepository;
|
|
955
|
+
/** The worker wallet's onchain provider, per network: an instance cannot cross `postMessage`.
|
|
956
|
+
* Called on every init and never closed, so return one instance per network. Defaults to
|
|
957
|
+
* Esplora; ignored when `buildServices` is supplied. */
|
|
958
|
+
onchainProvider?: (network: NetworkName) => OnchainProvider;
|
|
1044
959
|
debug?: boolean;
|
|
1045
960
|
buildServices?: (config: Initialize["config"]) => Promise<MessageBusServices>;
|
|
1046
961
|
};
|
|
@@ -1101,13 +1016,14 @@ declare class MessageBus {
|
|
|
1101
1016
|
private readonly buildServicesFn;
|
|
1102
1017
|
private readonly boundOnMessage;
|
|
1103
1018
|
private readonly intentRepository?;
|
|
1019
|
+
private readonly onchainProvider?;
|
|
1104
1020
|
/** Pending broadcasts, drained FIFO by a single {@link drain} loop. */
|
|
1105
1021
|
private broadcastQueue;
|
|
1106
1022
|
private draining;
|
|
1107
1023
|
/** Bumped wherever the generation owning the queued broadcasts ends. */
|
|
1108
1024
|
private broadcastEpoch;
|
|
1109
1025
|
/** Create the service-worker message bus with repositories and handler configuration. */
|
|
1110
|
-
constructor(walletRepository: WalletRepository, contractRepository: ContractRepository, { messageHandlers, tickIntervalMs, messageTimeoutMs, messageTimeoutOverrides, intentRepository, debug, buildServices, }: Options);
|
|
1026
|
+
constructor(walletRepository: WalletRepository, contractRepository: ContractRepository, { messageHandlers, tickIntervalMs, messageTimeoutMs, messageTimeoutOverrides, intentRepository, onchainProvider, debug, buildServices, }: Options);
|
|
1111
1027
|
/** Start the message bus and attach service-worker event listeners. */
|
|
1112
1028
|
start(): Promise<void>;
|
|
1113
1029
|
/** Stop the message bus, cancel ticks, and stop all registered handlers. */
|
|
@@ -1222,6 +1138,12 @@ type TaprootTreeNode = TaprootLeaf | [TaprootTreeNode, TaprootTreeNode];
|
|
|
1222
1138
|
*/
|
|
1223
1139
|
declare function assembleBtcdTaprootTree(scripts: Bytes[]): TaprootTreeNode;
|
|
1224
1140
|
|
|
1141
|
+
interface WalletRestoreHook {
|
|
1142
|
+
id: string;
|
|
1143
|
+
restore(wallet: IWallet): Promise<void>;
|
|
1144
|
+
}
|
|
1145
|
+
declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
|
|
1146
|
+
|
|
1225
1147
|
declare enum AssetInputType {
|
|
1226
1148
|
Unspecified = 0,
|
|
1227
1149
|
Local = 1,
|
|
@@ -2472,6 +2394,15 @@ type ResponseGetAllSpendingPaths = ResponseEnvelope & {
|
|
|
2472
2394
|
paths: PathSelection[];
|
|
2473
2395
|
};
|
|
2474
2396
|
};
|
|
2397
|
+
type RequestGetUnsupportedContracts = RequestEnvelope & {
|
|
2398
|
+
type: "GET_UNSUPPORTED_CONTRACTS";
|
|
2399
|
+
};
|
|
2400
|
+
type ResponseGetUnsupportedContracts = ResponseEnvelope & {
|
|
2401
|
+
type: "UNSUPPORTED_CONTRACTS";
|
|
2402
|
+
payload: {
|
|
2403
|
+
contracts: Contract[];
|
|
2404
|
+
};
|
|
2405
|
+
};
|
|
2475
2406
|
type ResponseSettleEvent = ResponseEnvelope & {
|
|
2476
2407
|
broadcast: true;
|
|
2477
2408
|
type: "SETTLE_EVENT";
|
|
@@ -2766,8 +2697,8 @@ type RequestRestoreWallet = RequestEnvelope & {
|
|
|
2766
2697
|
type ResponseRestoreWallet = ResponseEnvelope & {
|
|
2767
2698
|
type: "RESTORE_WALLET_SUCCESS";
|
|
2768
2699
|
};
|
|
2769
|
-
type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestGetAddress | RequestGetBoardingAddress | RequestGetArkadeInfo | RequestIndexerGetVtxos | RequestIndexerGetVirtualTxs | RequestSubmitTx | RequestFinalizeTx | RequestGetBalance | RequestGetVtxos | RequestGetSpendableVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestGetStoredContractsWithVtxos | RequestWatchScript | RequestUnwatchScript | RequestGetWatchedScripts | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestGetCurrentSigningDescriptor | RequestGetNextSigningDescriptor | RequestGetNewAddresses | RequestGetUsedSigningDescriptors | RequestAdvanceSigningDescriptorWatermark | RequestSend | RequestSendWithDeadline | RequestSendWithInputExpiryFloor | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
|
|
2770
|
-
type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetArkadeInfo | ResponseIndexerGetVtxos | ResponseIndexerGetVirtualTxs | ResponseSubmitTx | ResponseFinalizeTx | ResponseGetBalance | ResponseGetVtxos | ResponseGetSpendableVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseGetStoredContractsWithVtxos | ResponseWatchScript | ResponseUnwatchScript | ResponseGetWatchedScripts | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseContractWatchStateSet | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseGetCurrentSigningDescriptor | ResponseGetNextSigningDescriptor | ResponseGetNewAddresses | ResponseGetUsedSigningDescriptors | ResponseAdvanceSigningDescriptorWatermark | ResponseContractEvent | ResponseSend | ResponseSendDeadlineExceeded | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
|
|
2700
|
+
type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestGetAddress | RequestGetBoardingAddress | RequestGetArkadeInfo | RequestIndexerGetVtxos | RequestIndexerGetVirtualTxs | RequestSubmitTx | RequestFinalizeTx | RequestGetBalance | RequestGetVtxos | RequestGetSpendableVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestGetStoredContractsWithVtxos | RequestWatchScript | RequestUnwatchScript | RequestGetWatchedScripts | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestGetUnsupportedContracts | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestGetCurrentSigningDescriptor | RequestGetNextSigningDescriptor | RequestGetNewAddresses | RequestGetUsedSigningDescriptors | RequestAdvanceSigningDescriptorWatermark | RequestSend | RequestSendWithDeadline | RequestSendWithInputExpiryFloor | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
|
|
2701
|
+
type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetArkadeInfo | ResponseIndexerGetVtxos | ResponseIndexerGetVirtualTxs | ResponseSubmitTx | ResponseFinalizeTx | ResponseGetBalance | ResponseGetVtxos | ResponseGetSpendableVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseGetStoredContractsWithVtxos | ResponseWatchScript | ResponseUnwatchScript | ResponseGetWatchedScripts | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseContractWatchStateSet | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseGetUnsupportedContracts | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseGetCurrentSigningDescriptor | ResponseGetNextSigningDescriptor | ResponseGetNewAddresses | ResponseGetUsedSigningDescriptors | ResponseAdvanceSigningDescriptorWatermark | ResponseContractEvent | ResponseSend | ResponseSendDeadlineExceeded | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
|
|
2771
2702
|
declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
|
|
2772
2703
|
readonly messageTag: string;
|
|
2773
2704
|
private wallet;
|
|
@@ -3757,82 +3688,6 @@ declare class CachingArkProvider implements ArkProvider {
|
|
|
3757
3688
|
onServerInfoChanged(listener: (info: ArkadeInfo) => void): () => void;
|
|
3758
3689
|
}
|
|
3759
3690
|
|
|
3760
|
-
/**
|
|
3761
|
-
* Emulator REST client.
|
|
3762
|
-
*
|
|
3763
|
-
* The emulator is a signing service that executes Arkade scripts
|
|
3764
|
-
* and co-signs transactions when the scripts pass validation.
|
|
3765
|
-
*
|
|
3766
|
-
* The read here goes through `baseFetch`, the SDK's shared fetch boundary, so
|
|
3767
|
-
* it picks up whatever policy that boundary carries. The four submit calls
|
|
3768
|
-
* deliberately do not: aborting a submit would not tell the caller whether the
|
|
3769
|
-
* emulator signed, and none of them has a way to find out, so they stay on the
|
|
3770
|
-
* global `fetch` with their transport-error type unchanged.
|
|
3771
|
-
*/
|
|
3772
|
-
|
|
3773
|
-
interface EmulatorInfo {
|
|
3774
|
-
signerPubkey: string;
|
|
3775
|
-
}
|
|
3776
|
-
interface EmulatorProvider {
|
|
3777
|
-
getInfo(): Promise<EmulatorInfo>;
|
|
3778
|
-
submitTx(arkTx: string, checkpointTxs: string[]): Promise<{
|
|
3779
|
-
signedArkTx: string;
|
|
3780
|
-
signedCheckpointTxs: string[];
|
|
3781
|
-
}>;
|
|
3782
|
-
submitIntent(intent: {
|
|
3783
|
-
proof: string;
|
|
3784
|
-
message: Intent.RegisterMessage;
|
|
3785
|
-
}): Promise<string>;
|
|
3786
|
-
submitFinalization(intent: {
|
|
3787
|
-
proof: string;
|
|
3788
|
-
message: Intent.RegisterMessage;
|
|
3789
|
-
}, forfeits: string[], connectorTree: ConnectorTreeNode[] | null, commitmentTx: string): Promise<{
|
|
3790
|
-
signedForfeits: string[];
|
|
3791
|
-
signedCommitmentTx?: string;
|
|
3792
|
-
}>;
|
|
3793
|
-
submitOnchainTx(tx: string): Promise<{
|
|
3794
|
-
signedTx: string;
|
|
3795
|
-
}>;
|
|
3796
|
-
}
|
|
3797
|
-
interface ConnectorTreeNode {
|
|
3798
|
-
txid: string;
|
|
3799
|
-
tx: string;
|
|
3800
|
-
children: Record<string, string>;
|
|
3801
|
-
}
|
|
3802
|
-
/**
|
|
3803
|
-
* REST-based emulator client.
|
|
3804
|
-
*
|
|
3805
|
-
* @example
|
|
3806
|
-
* ```typescript
|
|
3807
|
-
* const client = new RestEmulatorProvider('http://localhost:7073');
|
|
3808
|
-
* const info = await client.getInfo();
|
|
3809
|
-
* console.log('Emulator pubkey:', info.signerPubkey);
|
|
3810
|
-
* ```
|
|
3811
|
-
*/
|
|
3812
|
-
declare class RestEmulatorProvider implements EmulatorProvider {
|
|
3813
|
-
serverUrl: string;
|
|
3814
|
-
constructor(serverUrl: string);
|
|
3815
|
-
getInfo(): Promise<EmulatorInfo>;
|
|
3816
|
-
submitTx(arkTx: string, checkpointTxs: string[]): Promise<{
|
|
3817
|
-
signedArkTx: string;
|
|
3818
|
-
signedCheckpointTxs: string[];
|
|
3819
|
-
}>;
|
|
3820
|
-
submitIntent(intent: {
|
|
3821
|
-
proof: string;
|
|
3822
|
-
message: Intent.RegisterMessage;
|
|
3823
|
-
}): Promise<string>;
|
|
3824
|
-
submitFinalization(intent: {
|
|
3825
|
-
proof: string;
|
|
3826
|
-
message: Intent.RegisterMessage;
|
|
3827
|
-
}, forfeits: string[], connectorTree: ConnectorTreeNode[] | null, commitmentTx: string): Promise<{
|
|
3828
|
-
signedForfeits: string[];
|
|
3829
|
-
signedCommitmentTx?: string;
|
|
3830
|
-
}>;
|
|
3831
|
-
submitOnchainTx(tx: string): Promise<{
|
|
3832
|
-
signedTx: string;
|
|
3833
|
-
}>;
|
|
3834
|
-
}
|
|
3835
|
-
|
|
3836
3691
|
type ArkTxInput = {
|
|
3837
3692
|
tapLeafScript: TapLeafScript;
|
|
3838
3693
|
} & EncodedVtxoScript & Pick<VirtualCoin, "txid" | "vout" | "value">;
|
|
@@ -4889,6 +4744,75 @@ declare function validateBatchRecipients(commitmentTx: Transaction, vtxoTreeLeav
|
|
|
4889
4744
|
*/
|
|
4890
4745
|
declare function buildForfeitTx(inputs: TransactionInputUpdate[], forfeitPkScript: Uint8Array, txLocktime?: number): Transaction;
|
|
4891
4746
|
|
|
4747
|
+
/**
|
|
4748
|
+
* IndexedDB-based implementation of ContractRepository.
|
|
4749
|
+
*
|
|
4750
|
+
* Data is stored as JSON strings in key/value stores.
|
|
4751
|
+
*/
|
|
4752
|
+
declare class IndexedDBContractRepository implements ContractRepository {
|
|
4753
|
+
readonly version: 3;
|
|
4754
|
+
private readonly connection;
|
|
4755
|
+
constructor(dbName?: string);
|
|
4756
|
+
clear(): Promise<void>;
|
|
4757
|
+
getContractsPage(filter: ContractFilter | undefined, page: PageRequest): Promise<PageResult<Contract>>;
|
|
4758
|
+
saveContract(contract: Contract): Promise<void>;
|
|
4759
|
+
deleteContract(script: string): Promise<void>;
|
|
4760
|
+
/** Up to `limit + 1` rows of `range` that pass `filter`, in key order. */
|
|
4761
|
+
private readMatching;
|
|
4762
|
+
private applyContractFilter;
|
|
4763
|
+
private getDB;
|
|
4764
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
4765
|
+
}
|
|
4766
|
+
|
|
4767
|
+
/**
|
|
4768
|
+
* Estimator evaluates CEL expressions to calculate fees for Arkade intents
|
|
4769
|
+
*/
|
|
4770
|
+
declare class Estimator {
|
|
4771
|
+
readonly config: IntentFeeConfig;
|
|
4772
|
+
private intentOffchainInput?;
|
|
4773
|
+
private intentOnchainInput?;
|
|
4774
|
+
private intentOffchainOutput?;
|
|
4775
|
+
private intentOnchainOutput?;
|
|
4776
|
+
/**
|
|
4777
|
+
* Creates a new Estimator with the given config
|
|
4778
|
+
* @param config - Configuration containing CEL programs for fee calculation
|
|
4779
|
+
*/
|
|
4780
|
+
constructor(config: IntentFeeConfig);
|
|
4781
|
+
/**
|
|
4782
|
+
* Evaluates the fee for a given vtxo input
|
|
4783
|
+
* @param input - The offchain input to evaluate
|
|
4784
|
+
* @returns The fee amount for this input
|
|
4785
|
+
*/
|
|
4786
|
+
evalOffchainInput(input: OffchainInput): FeeAmount;
|
|
4787
|
+
/**
|
|
4788
|
+
* Evaluates the fee for a given boarding input
|
|
4789
|
+
* @param input - The onchain input to evaluate
|
|
4790
|
+
* @returns The fee amount for this input
|
|
4791
|
+
*/
|
|
4792
|
+
evalOnchainInput(input: OnchainInput): FeeAmount;
|
|
4793
|
+
/**
|
|
4794
|
+
* Evaluates the fee for a given vtxo output
|
|
4795
|
+
* @param output - The output to evaluate
|
|
4796
|
+
* @returns The fee amount for this output
|
|
4797
|
+
*/
|
|
4798
|
+
evalOffchainOutput(output: FeeOutput): FeeAmount;
|
|
4799
|
+
/**
|
|
4800
|
+
* Evaluates the fee for a given collaborative exit output
|
|
4801
|
+
* @param output - The output to evaluate
|
|
4802
|
+
* @returns The fee amount for this output
|
|
4803
|
+
*/
|
|
4804
|
+
evalOnchainOutput(output: FeeOutput): FeeAmount;
|
|
4805
|
+
/**
|
|
4806
|
+
* Evaluates the fee for a given set of inputs and outputs
|
|
4807
|
+
* @param offchainInputs - Array of offchain inputs to evaluate
|
|
4808
|
+
* @param onchainInputs - Array of onchain inputs to evaluate
|
|
4809
|
+
* @param offchainOutputs - Array of offchain outputs to evaluate
|
|
4810
|
+
* @param onchainOutputs - Array of onchain outputs to evaluate
|
|
4811
|
+
* @returns The total fee amount
|
|
4812
|
+
*/
|
|
4813
|
+
evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
|
|
4814
|
+
}
|
|
4815
|
+
|
|
4892
4816
|
/**
|
|
4893
4817
|
* EmulatorEntry represents a single entry in the Emulator Packet,
|
|
4894
4818
|
* mapping a transaction input to its arkade script and witness data.
|
|
@@ -5415,6 +5339,7 @@ interface ArtifactGroup {
|
|
|
5415
5339
|
leaves: ArtifactLeaf[];
|
|
5416
5340
|
}
|
|
5417
5341
|
interface ContractArtifact {
|
|
5342
|
+
formatVersion?: number;
|
|
5418
5343
|
contractName: string;
|
|
5419
5344
|
constructorInputs: ArtifactParameter[];
|
|
5420
5345
|
structs?: ArtifactStruct[];
|
|
@@ -5429,8 +5354,8 @@ declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
|
5429
5354
|
* Arkade Contract — artifact-driven, high-level covenant API.
|
|
5430
5355
|
*
|
|
5431
5356
|
* A contract is a {@link Program}: named functions, each split into a `tapscript` segment
|
|
5432
|
-
* enforced on-chain and an `arkadeScript` segment emulated by the co-signing service.
|
|
5433
|
-
*
|
|
5357
|
+
* enforced on-chain and an `arkadeScript` segment emulated by the co-signing service. Compiler
|
|
5358
|
+
* artifacts are normalized into this model, sharing the resolver with hand-written programs.
|
|
5434
5359
|
* The SDK never interprets scripts; it resolves `$param` placeholders and signers, builds the
|
|
5435
5360
|
* taproot tree (co-signer key tweaked by the arkade-script hash) and assembles the spend.
|
|
5436
5361
|
*
|
|
@@ -5442,7 +5367,7 @@ declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
|
5442
5367
|
* "bytes" }]` → `functions.claim(preimage: Uint8Array)`). For a program stored in a variable use
|
|
5443
5368
|
* `satisfies Program`; a `: Program` annotation widens the literal type away. Typed `params`
|
|
5444
5369
|
* descriptors `{ name, type }` make the list authoritative (every param bound, every `$name`
|
|
5445
|
-
* declared, values type-checked)
|
|
5370
|
+
* declared, values type-checked).
|
|
5446
5371
|
*
|
|
5447
5372
|
* A covenant spend needs an `indexer` as well as an `emulator`: the co-signer resolves each
|
|
5448
5373
|
* input's prevout from the previous ark tx the PSBT carries. Pure tapscript spends need neither.
|
|
@@ -5450,10 +5375,10 @@ declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
|
5450
5375
|
* @example
|
|
5451
5376
|
* ```typescript
|
|
5452
5377
|
* const htlcProgram = {
|
|
5453
|
-
* version:
|
|
5378
|
+
* version: 1,
|
|
5454
5379
|
* name: "htlc", // metadata only — round-tripped, never compiled
|
|
5455
5380
|
* params: [
|
|
5456
|
-
* { name: "hash", type: "
|
|
5381
|
+
* { name: "hash", type: "bytes20" },
|
|
5457
5382
|
* { name: "receiver", type: "pubkey" },
|
|
5458
5383
|
* { name: "amount", type: "int" },
|
|
5459
5384
|
* { name: "server", type: "pubkey" },
|
|
@@ -5477,15 +5402,13 @@ declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
|
5477
5402
|
* @module arkade/contract
|
|
5478
5403
|
*/
|
|
5479
5404
|
|
|
5480
|
-
/** The TS type of a single call argument, derived from its {@link InputRef}. */
|
|
5481
|
-
type ArgTsType<R> = R extends InputDef ? ArkadeValueType[R["type"]] : ArkadeArgValue;
|
|
5482
5405
|
/** The argument tuple of a function, derived from its declared `inputs`. */
|
|
5483
|
-
type ArgsTuple<I extends readonly
|
|
5484
|
-
[K in keyof I]:
|
|
5406
|
+
type ArgsTuple<I extends readonly InputDef[]> = {
|
|
5407
|
+
[K in keyof I]: ArkadeValueType[I[K]["type"]];
|
|
5485
5408
|
};
|
|
5486
5409
|
/** The call signature arguments for one function (nullary when `inputs` is absent). */
|
|
5487
5410
|
type FnArgs<F extends ArkadeFunction> = F extends {
|
|
5488
|
-
inputs: infer I extends readonly
|
|
5411
|
+
inputs: infer I extends readonly InputDef[];
|
|
5489
5412
|
} ? ArgsTuple<I> : [];
|
|
5490
5413
|
/**
|
|
5491
5414
|
* The statically-typed `functions` map of a contract: precisely typed per function for a literal
|
|
@@ -5540,25 +5463,8 @@ interface ArkadeSpendResult {
|
|
|
5540
5463
|
type CallableFunctions = Record<string, (...args: ArkadeArgValue[]) => ArkadeTransactionBuilder>;
|
|
5541
5464
|
/** What {@link Arkade} needs from the Arkade server; see {@link ArkadeConnectOptions.arkade}. */
|
|
5542
5465
|
type ArkadeServerProvider = Pick<ArkProvider, "getInfo"> & Partial<ArkadeBroadcaster>;
|
|
5543
|
-
/**
|
|
5544
|
-
interface
|
|
5545
|
-
/**
|
|
5546
|
-
* The Arkade server provider. Only `getInfo` is required (enough to derive, register and
|
|
5547
|
-
* inspect contracts); without `submitTx`/`finalizeTx`, `.send()` throws. So a caller already
|
|
5548
|
-
* holding `wallet.getArkadeInfo()` can connect without a second `/v1/info` round-trip.
|
|
5549
|
-
*/
|
|
5550
|
-
arkade: ArkadeServerProvider;
|
|
5551
|
-
/**
|
|
5552
|
-
* The co-signing (introspector/emulator) service. Required only for functions with an
|
|
5553
|
-
* `arkadeScript` (covenant paths).
|
|
5554
|
-
*/
|
|
5555
|
-
emulator?: EmulatorProvider;
|
|
5556
|
-
/**
|
|
5557
|
-
* Indexer — enables `getUtxos`/`getBalance` and coin auto-selection, and
|
|
5558
|
-
* resolves the previous ark txs a covenant spend must carry (see
|
|
5559
|
-
* {@link attachPrevArkTxs}). Required for covenant spends.
|
|
5560
|
-
*/
|
|
5561
|
-
indexer?: Pick<IndexerProvider, "getVtxos" | "getVirtualTxs">;
|
|
5466
|
+
/** Fields shared by both forms of {@link ArkadeConnectOptions}. */
|
|
5467
|
+
interface ArkadeConnectCommonOptions {
|
|
5562
5468
|
/** Signer for paths that require a user signature; optional for watch-only. */
|
|
5563
5469
|
identity?: Identity;
|
|
5564
5470
|
/**
|
|
@@ -5577,11 +5483,72 @@ interface ArkadeConnectOptions {
|
|
|
5577
5483
|
emulatorPubkey?: string;
|
|
5578
5484
|
/**
|
|
5579
5485
|
* The wallet's contract manager (`wallet.getContractManager()`). Enables
|
|
5580
|
-
* {@link ArkadeContract.register}
|
|
5581
|
-
* repository-backed state for registered contracts
|
|
5486
|
+
* {@link ArkadeContract.register} and {@link ArkadeContract.on}, and makes
|
|
5487
|
+
* {@link ArkadeContract.getUtxos} read repository-backed state for registered contracts
|
|
5488
|
+
* instead of the indexer. Never disposed by {@link Arkade.dispose}.
|
|
5582
5489
|
*/
|
|
5583
5490
|
contractManager?: IContractManager;
|
|
5584
5491
|
}
|
|
5492
|
+
/**
|
|
5493
|
+
* The one-liner form: name the deployment, and `connect` resolves the providers (and, for
|
|
5494
|
+
* `{ network: "bitcoin" }`, the emulator).
|
|
5495
|
+
*/
|
|
5496
|
+
interface ArkadeConnectServiceOptions extends ArkadeConnectCommonOptions {
|
|
5497
|
+
service: ArkadeService;
|
|
5498
|
+
/**
|
|
5499
|
+
* Persist contracts here. The client builds and owns a contract manager over it (with an
|
|
5500
|
+
* in-memory VTXO store), enabling {@link ArkadeContract.register} and
|
|
5501
|
+
* {@link ArkadeContract.on}; {@link Arkade.dispose} stops it. Exclusive with
|
|
5502
|
+
* `contractManager`. Deliberately narrower than the wallet's `StorageConfig`.
|
|
5503
|
+
*/
|
|
5504
|
+
storage?: {
|
|
5505
|
+
contractRepository: ContractRepository;
|
|
5506
|
+
};
|
|
5507
|
+
arkade?: never;
|
|
5508
|
+
emulator?: never;
|
|
5509
|
+
indexer?: never;
|
|
5510
|
+
}
|
|
5511
|
+
/** The provider form: hand over providers you already hold (e.g. a wallet's). */
|
|
5512
|
+
interface ArkadeConnectProviderOptions extends ArkadeConnectCommonOptions {
|
|
5513
|
+
/**
|
|
5514
|
+
* The Arkade server provider. Only `getInfo` is required (enough to derive, register and
|
|
5515
|
+
* inspect contracts); without `submitTx`/`finalizeTx`, `.send()` throws. So a caller already
|
|
5516
|
+
* holding `wallet.getArkadeInfo()` can connect without a second `/v1/info` round-trip.
|
|
5517
|
+
*/
|
|
5518
|
+
arkade: ArkadeServerProvider;
|
|
5519
|
+
/**
|
|
5520
|
+
* The co-signing (introspector/emulator) service. Required only for functions with an
|
|
5521
|
+
* `arkadeScript` (covenant paths).
|
|
5522
|
+
*/
|
|
5523
|
+
emulator?: EmulatorProvider;
|
|
5524
|
+
/**
|
|
5525
|
+
* Indexer — enables `getUtxos`/`getBalance` and coin auto-selection, and
|
|
5526
|
+
* resolves the previous ark txs a covenant spend must carry (see
|
|
5527
|
+
* {@link attachPrevArkTxs}). Required for covenant spends.
|
|
5528
|
+
*/
|
|
5529
|
+
indexer?: Pick<IndexerProvider, "getVtxos" | "getVirtualTxs">;
|
|
5530
|
+
service?: never;
|
|
5531
|
+
storage?: never;
|
|
5532
|
+
}
|
|
5533
|
+
/** Options for {@link Arkade.connect}: `service` and `arkade` are exclusive. */
|
|
5534
|
+
type ArkadeConnectOptions = ArkadeConnectServiceOptions | ArkadeConnectProviderOptions;
|
|
5535
|
+
/** Event types {@link ArkadeContract.on} reports. */
|
|
5536
|
+
type ArkadeContractEventType = "vtxo_received" | "vtxo_spent" | "connection_reset";
|
|
5537
|
+
/** The event an {@link ArkadeContract.on} handle of type `T` receives. */
|
|
5538
|
+
type ArkadeContractEvent<T extends ArkadeContractEventType = ArkadeContractEventType> = T extends "connection_reset" ? Extract<ContractEvent, {
|
|
5539
|
+
type: "connection_reset";
|
|
5540
|
+
}> : Extract<ContractVtxoEvent, {
|
|
5541
|
+
type: T;
|
|
5542
|
+
}>;
|
|
5543
|
+
/** Returned by {@link ArkadeContract.on}. */
|
|
5544
|
+
interface ArkadeContractSubscription {
|
|
5545
|
+
/** Stop delivery to this handle. Idempotent. */
|
|
5546
|
+
off(): void;
|
|
5547
|
+
}
|
|
5548
|
+
type EventHandle = {
|
|
5549
|
+
type: ArkadeContractEventType;
|
|
5550
|
+
callback: (event: ArkadeContractEvent) => void | Promise<void>;
|
|
5551
|
+
};
|
|
5585
5552
|
/**
|
|
5586
5553
|
* A connected Arkade client holding the providers and resolved network constants (server key,
|
|
5587
5554
|
* co-signer key, checkpoint closure), so creating contracts is synchronous.
|
|
@@ -5592,6 +5559,8 @@ declare class Arkade {
|
|
|
5592
5559
|
readonly emulator: EmulatorProvider | undefined;
|
|
5593
5560
|
readonly network: Network;
|
|
5594
5561
|
readonly serverKey: Uint8Array;
|
|
5562
|
+
/** Bare protocol delay (blocks below 512, seconds otherwise), resolved only when needed. */
|
|
5563
|
+
readonly serverExitDelay?: bigint;
|
|
5595
5564
|
/**
|
|
5596
5565
|
* The co-signer key covenants are built against (33-byte compressed), present only when an
|
|
5597
5566
|
* emulator is configured. Resolved from the network or `emulatorPubkey`, never the emulator's
|
|
@@ -5604,17 +5573,46 @@ declare class Arkade {
|
|
|
5604
5573
|
readonly identity?: Identity;
|
|
5605
5574
|
/** The signing identity's x-only public key, resolved at connect — identifies which inputs the wallet signs. */
|
|
5606
5575
|
readonly userKey?: Uint8Array;
|
|
5607
|
-
/** The
|
|
5576
|
+
/** The contract manager, when contract persistence is wired up (passed in or owned). */
|
|
5608
5577
|
readonly contractManager?: IContractManager;
|
|
5578
|
+
/** Whether {@link connect} built {@link contractManager}, so {@link dispose} must stop it. */
|
|
5579
|
+
private readonly ownsContractManager;
|
|
5580
|
+
/** {@link ArkadeContract.on} handles by contract script (hex). */
|
|
5581
|
+
private readonly handles;
|
|
5582
|
+
/** The single `onContractEvent` subscription fanning out to {@link handles}. */
|
|
5583
|
+
private unsubscribeEvents?;
|
|
5584
|
+
private disposed;
|
|
5609
5585
|
private constructor();
|
|
5610
|
-
/**
|
|
5586
|
+
/**
|
|
5587
|
+
* Connect and resolve the server key, checkpoint closure and (if present) the co-signer key.
|
|
5588
|
+
*
|
|
5589
|
+
* @example
|
|
5590
|
+
* ```typescript
|
|
5591
|
+
* const arkade = await Arkade.connect({
|
|
5592
|
+
* service: { network: "bitcoin" },
|
|
5593
|
+
* identity,
|
|
5594
|
+
* storage: { contractRepository },
|
|
5595
|
+
* });
|
|
5596
|
+
* ```
|
|
5597
|
+
*/
|
|
5611
5598
|
static connect(opts: ArkadeConnectOptions): Promise<Arkade>;
|
|
5599
|
+
/**
|
|
5600
|
+
* Stop event delivery to every {@link ArkadeContract.on} handle and, when {@link connect}
|
|
5601
|
+
* built the contract manager (`storage`), dispose it. A caller-passed manager keeps running.
|
|
5602
|
+
*/
|
|
5603
|
+
dispose(): void;
|
|
5604
|
+
/**
|
|
5605
|
+
* @internal Add a handle for `script`, subscribing to the manager on first use; the last
|
|
5606
|
+
* handle's `off()` releases the subscription.
|
|
5607
|
+
*/
|
|
5608
|
+
addEventHandle(manager: IContractManager, script: string, handle: EventHandle): () => void;
|
|
5609
|
+
private dispatch;
|
|
5612
5610
|
/**
|
|
5613
5611
|
* Instantiate a contract from a program and its constructor arguments. `const` inference keeps
|
|
5614
5612
|
* the program's literal type, so `functions` is strongly typed.
|
|
5615
5613
|
*
|
|
5616
|
-
*
|
|
5617
|
-
*
|
|
5614
|
+
* Declared `server`/`user` params default to the client's keys. Compiler
|
|
5615
|
+
* artifacts reserve the server key and exit delay to the connected server.
|
|
5618
5616
|
*/
|
|
5619
5617
|
contract<const P extends Program>(program: P, args?: Record<string, ArkadeParamValue>): ArkadeContract<P>;
|
|
5620
5618
|
}
|
|
@@ -5663,6 +5661,31 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5663
5661
|
label?: string;
|
|
5664
5662
|
metadata?: Record<string, unknown>;
|
|
5665
5663
|
}): Promise<Contract>;
|
|
5664
|
+
/**
|
|
5665
|
+
* Report this contract's activity: `vtxo_received`/`vtxo_spent` for its script, and
|
|
5666
|
+
* `connection_reset` when the manager's event stream reconnects. Registers the contract
|
|
5667
|
+
* (idempotent) so it is persisted and watched; requires a contract manager (`storage` or
|
|
5668
|
+
* `contractManager` on {@link Arkade.connect}).
|
|
5669
|
+
*
|
|
5670
|
+
* Activity is reported from subscription on — coins that predate it are not replayed. After
|
|
5671
|
+
* subscribing, and on every `connection_reset` (the manager re-syncs silently), read stored
|
|
5672
|
+
* state with {@link getVtxos}.
|
|
5673
|
+
*
|
|
5674
|
+
* @example
|
|
5675
|
+
* ```typescript
|
|
5676
|
+
* const spent = await htlc.on("vtxo_spent", (e) => console.log(e.vtxos));
|
|
5677
|
+
* const reset = await htlc.on("connection_reset", async () => reconcile(await htlc.getVtxos()));
|
|
5678
|
+
* spent.off();
|
|
5679
|
+
* ```
|
|
5680
|
+
*/
|
|
5681
|
+
on<T extends ArkadeContractEventType>(type: T, callback: (event: ArkadeContractEvent<T>) => void | Promise<void>): Promise<ArkadeContractSubscription>;
|
|
5682
|
+
/**
|
|
5683
|
+
* Every stored VTXO of this contract, spent ones included (`getUtxos` hides those), as the
|
|
5684
|
+
* contract manager last synced them. The recovery read for {@link on}. Empty when the
|
|
5685
|
+
* contract is not registered.
|
|
5686
|
+
*/
|
|
5687
|
+
getVtxos(): Promise<ExtendedContractVtxo[]>;
|
|
5688
|
+
private requireManager;
|
|
5666
5689
|
/**
|
|
5667
5690
|
* Spendable VTXOs locked by this contract: repository-backed when registered with a
|
|
5668
5691
|
* `contractManager`, otherwise a direct indexer query. Both drop spent and unrolled outputs;
|
|
@@ -5746,9 +5769,14 @@ declare const index_ArkadeArgType: typeof ArkadeArgType;
|
|
|
5746
5769
|
declare const index_ArkadeArgValue: typeof ArkadeArgValue;
|
|
5747
5770
|
type index_ArkadeBatchInput = ArkadeBatchInput;
|
|
5748
5771
|
type index_ArkadeConnectOptions = ArkadeConnectOptions;
|
|
5772
|
+
type index_ArkadeConnectProviderOptions = ArkadeConnectProviderOptions;
|
|
5773
|
+
type index_ArkadeConnectServiceOptions = ArkadeConnectServiceOptions;
|
|
5749
5774
|
type index_ArkadeContract<P extends Program = Program> = ArkadeContract<P>;
|
|
5750
5775
|
declare const index_ArkadeContract: typeof ArkadeContract;
|
|
5776
|
+
type index_ArkadeContractEvent<T extends ArkadeContractEventType = ArkadeContractEventType> = ArkadeContractEvent<T>;
|
|
5777
|
+
type index_ArkadeContractEventType = ArkadeContractEventType;
|
|
5751
5778
|
declare const index_ArkadeContractParams: typeof ArkadeContractParams;
|
|
5779
|
+
type index_ArkadeContractSubscription = ArkadeContractSubscription;
|
|
5752
5780
|
type index_ArkadeExtendedCoin = ArkadeExtendedCoin;
|
|
5753
5781
|
type index_ArkadeExtendedVirtualCoin = ArkadeExtendedVirtualCoin;
|
|
5754
5782
|
declare const index_ArkadeFunction: typeof ArkadeFunction;
|
|
@@ -5759,6 +5787,7 @@ type index_ArkadeScriptOP = ArkadeScriptOP;
|
|
|
5759
5787
|
type index_ArkadeScriptType = ArkadeScriptType;
|
|
5760
5788
|
declare const index_ArkadeSegment: typeof ArkadeSegment;
|
|
5761
5789
|
type index_ArkadeServerProvider = ArkadeServerProvider;
|
|
5790
|
+
declare const index_ArkadeService: typeof ArkadeService;
|
|
5762
5791
|
type index_ArkadeSpendResult = ArkadeSpendResult;
|
|
5763
5792
|
type index_ArkadeTransactionBuilder = ArkadeTransactionBuilder;
|
|
5764
5793
|
declare const index_ArkadeTransactionBuilder: typeof ArkadeTransactionBuilder;
|
|
@@ -5775,12 +5804,14 @@ declare const index_OPCODE_NAMES: typeof OPCODE_NAMES;
|
|
|
5775
5804
|
declare const index_OPCODE_VALUES: typeof OPCODE_VALUES;
|
|
5776
5805
|
declare const index_Program: typeof Program;
|
|
5777
5806
|
declare const index_ProgramKeys: typeof ProgramKeys;
|
|
5807
|
+
declare const index_ResolvedArkadeService: typeof ResolvedArkadeService;
|
|
5778
5808
|
declare const index_SUPPORTED_PROGRAM_VERSION: typeof SUPPORTED_PROGRAM_VERSION;
|
|
5779
5809
|
declare const index_Script: typeof Script;
|
|
5780
5810
|
declare const index_ScriptType: typeof ScriptType;
|
|
5781
5811
|
declare const index_SignerRef: typeof SignerRef;
|
|
5782
5812
|
declare const index_TapscriptSegment: typeof TapscriptSegment;
|
|
5783
5813
|
declare const index_TweakedSigner: typeof TweakedSigner;
|
|
5814
|
+
declare const index_UnsupportedProgramVersionError: typeof UnsupportedProgramVersionError;
|
|
5784
5815
|
type index_Utxo = Utxo;
|
|
5785
5816
|
declare const index_WitnessRef: typeof WitnessRef;
|
|
5786
5817
|
declare const index_arkadeScriptHash: typeof arkadeScriptHash;
|
|
@@ -5796,6 +5827,7 @@ declare const index_getOpcodeValue: typeof getOpcodeValue;
|
|
|
5796
5827
|
declare const index_isContractArtifact: typeof isContractArtifact;
|
|
5797
5828
|
declare const index_parseArtifact: typeof parseArtifact;
|
|
5798
5829
|
declare const index_programFromArtifact: typeof programFromArtifact;
|
|
5830
|
+
declare const index_resolveArkadeService: typeof resolveArkadeService;
|
|
5799
5831
|
declare const index_resolveAsm: typeof resolveAsm;
|
|
5800
5832
|
declare const index_serializeArkadeContractParams: typeof serializeArkadeContractParams;
|
|
5801
5833
|
declare const index_stringifyArtifact: typeof stringifyArtifact;
|
|
@@ -5803,7 +5835,7 @@ declare const index_toASM: typeof toASM;
|
|
|
5803
5835
|
declare const index_validateProgram: typeof validateProgram;
|
|
5804
5836
|
declare const index_witnessRefToBytes: typeof witnessRefToBytes;
|
|
5805
5837
|
declare namespace index {
|
|
5806
|
-
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, index_ArkadeContract as ArkadeContract, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5838
|
+
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5807
5839
|
}
|
|
5808
5840
|
|
|
5809
5841
|
/** Known BIP21 parameters including Arkade-specific extensions. */
|
|
@@ -6401,4 +6433,18 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6401
6433
|
private burnWith;
|
|
6402
6434
|
}
|
|
6403
6435
|
|
|
6404
|
-
|
|
6436
|
+
/**
|
|
6437
|
+
* In-memory implementation of ContractRepository.
|
|
6438
|
+
* Data is ephemeral and scoped to the instance.
|
|
6439
|
+
*/
|
|
6440
|
+
declare class InMemoryContractRepository implements ContractRepository {
|
|
6441
|
+
readonly version: 3;
|
|
6442
|
+
private readonly contractsByScript;
|
|
6443
|
+
clear(): Promise<void>;
|
|
6444
|
+
getContractsPage(filter: ContractFilter | undefined, page: PageRequest): Promise<PageResult<Contract>>;
|
|
6445
|
+
saveContract(contract: Contract): Promise<void>;
|
|
6446
|
+
deleteContract(script: string): Promise<void>;
|
|
6447
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
6448
|
+
}
|
|
6449
|
+
|
|
6450
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, Arkade, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, ArkadeService, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, Contract, ContractEvent, ContractFilter, ContractRepository, ContractSyncState, ContractVtxoEvent, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, DescriptorProvider, type DescriptorSigner, DescriptorSigningProviderMissingError, DescriptorSigningRequest, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, EmulatorPacket, 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, ExtendedContractVtxo, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetSpendableVtxosFilter, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexerProvider, InputExpiryFloor, Intent, IntentFeeConfig, IntentPageFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedExtendedVirtualCoin, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, OversizedChangeError, P2A, PageRequest, PageResult, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, ScriptVtxoCursor, ScriptVtxoPageOptions, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendDeadlineExceededError, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, StaticDescriptorProvider, Status, StorageConfig, StoredVtxo, TapLeafScript, Transaction, TransactionHistoryPageCursor, TransactionHistoryPageFilter, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, UnsupportedProgramVersionError, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, type WalletRestoreHook, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertNonNegativeMs, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertTimerMs, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, captureSendDeadline, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, selectionOf, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, submitViaEmulator, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|