@arkade-os/sdk 0.5.3 → 0.5.5
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 +138 -50
- package/dist/adapters/expo.cjs +10 -5
- package/dist/adapters/expo.d.cts +13 -8
- package/dist/adapters/expo.d.ts +13 -8
- package/dist/adapters/expo.js +4 -3
- package/dist/{asyncStorageTaskQueue-C9PkPcW_.d.cts → asyncStorageTaskQueue-BbH-THYJ.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-B3U5gQ-i.d.ts → asyncStorageTaskQueue-BlvkJyTa.d.ts} +2 -2
- package/dist/base-C-Y5t_0F.d.cts +359 -0
- package/dist/base-C-Y5t_0F.d.ts +359 -0
- package/dist/{chunk-OPX2HRWM.js → chunk-4I53THL6.js} +210 -937
- package/dist/chunk-4I53THL6.js.map +1 -0
- package/dist/{chunk-5WRA66RV.cjs → chunk-5SYUEVJH.cjs} +10 -10
- package/dist/chunk-5SYUEVJH.cjs.map +1 -0
- package/dist/{chunk-6FL4N4S2.js → chunk-7GIKLFHC.js} +83 -20
- package/dist/chunk-7GIKLFHC.js.map +1 -0
- package/dist/{chunk-BYPBVHVA.cjs → chunk-AMH7Q3DF.cjs} +61 -935
- package/dist/chunk-AMH7Q3DF.cjs.map +1 -0
- package/dist/{chunk-P7B4LQ3H.js → chunk-BCA6D255.js} +18 -842
- package/dist/chunk-BCA6D255.js.map +1 -0
- package/dist/{chunk-T7C3E2HL.js → chunk-CE46RS6L.js} +20 -39
- package/dist/chunk-CE46RS6L.js.map +1 -0
- package/dist/chunk-DNFTHG73.js +829 -0
- package/dist/chunk-DNFTHG73.js.map +1 -0
- package/dist/chunk-FDJ734CH.js +882 -0
- package/dist/chunk-FDJ734CH.js.map +1 -0
- package/dist/chunk-FLPWNMX3.cjs +930 -0
- package/dist/chunk-FLPWNMX3.cjs.map +1 -0
- package/dist/{chunk-Y4BL3YYX.js → chunk-FVVXCDNE.js} +4 -4
- package/dist/chunk-FVVXCDNE.js.map +1 -0
- package/dist/{chunk-ZPF4I3K2.cjs → chunk-HQQ4NRXI.cjs} +29 -47
- package/dist/chunk-HQQ4NRXI.cjs.map +1 -0
- package/dist/chunk-JFJNB7ZH.cjs +884 -0
- package/dist/chunk-JFJNB7ZH.cjs.map +1 -0
- package/dist/{chunk-KW7ZEWYS.cjs → chunk-KCL5AVML.cjs} +223 -985
- package/dist/chunk-KCL5AVML.cjs.map +1 -0
- package/dist/{chunk-HAQAWBYG.js → chunk-OO2KEK64.js} +2860 -1366
- package/dist/chunk-OO2KEK64.js.map +1 -0
- package/dist/{chunk-OUTWUYJ4.cjs → chunk-T254PXSN.cjs} +3337 -1824
- package/dist/chunk-T254PXSN.cjs.map +1 -0
- package/dist/chunk-V3ZLL5VY.js +380 -0
- package/dist/chunk-V3ZLL5VY.js.map +1 -0
- package/dist/chunk-X6ZI53DZ.cjs +383 -0
- package/dist/chunk-X6ZI53DZ.cjs.map +1 -0
- package/dist/{chunk-ZMSM3NOH.cjs → chunk-XWUCNMPN.cjs} +98 -34
- package/dist/chunk-XWUCNMPN.cjs.map +1 -0
- package/dist/compiler.cjs +50 -0
- package/dist/compiler.cjs.map +1 -0
- package/dist/compiler.d.cts +38 -0
- package/dist/compiler.d.ts +38 -0
- package/dist/compiler.js +47 -0
- package/dist/compiler.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +11 -9
- package/dist/contracts/handlers/index.d.cts +6 -4
- package/dist/contracts/handlers/index.d.ts +6 -4
- package/dist/contracts/handlers/index.js +4 -2
- package/dist/{delegate-Cd28gxpM.d.ts → delegate-gGkUnYpi.d.cts} +1 -1
- package/dist/{delegate-ByfKszb6.d.cts → delegate-iyDum4fw.d.ts} +1 -1
- package/dist/{index-B6X2E7W_.d.ts → index-BWwVnJhU.d.cts} +7 -272
- package/dist/{index-DgH_0j14.d.cts → index-Bx-iArDs.d.ts} +7 -272
- package/dist/{index-BURzbRup.d.cts → index-DCml4QJn.d.ts} +1090 -1140
- package/dist/{index-BURzbRup.d.ts → index-DkyzIzKL.d.cts} +1090 -1140
- package/dist/index.cjs +470 -371
- package/dist/index.d.cts +687 -410
- package/dist/index.d.ts +687 -410
- package/dist/index.js +7 -4
- package/dist/{wallet-BnmhohgZ.d.ts → keyringDescriptorProvider-CS4w4PWd.d.ts} +427 -372
- package/dist/{wallet-BjQugVUt.d.cts → keyringDescriptorProvider-CmHXrIXd.d.cts} +427 -372
- package/dist/program-BARSNg3X.d.ts +286 -0
- package/dist/program-znrWkxE4.d.cts +286 -0
- package/dist/repositories/realm/index.cjs +100 -51
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +25 -10
- package/dist/repositories/realm/index.d.ts +25 -10
- package/dist/repositories/realm/index.js +72 -24
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +222 -131
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +36 -17
- package/dist/repositories/sqlite/index.d.ts +36 -17
- package/dist/repositories/sqlite/index.js +196 -107
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-BaNCSxqK.d.ts → taskRunner-DgMLSk_O.d.ts} +4 -4
- package/dist/{taskRunner-i56-drQV.d.cts → taskRunner-buh6aFpG.d.cts} +4 -4
- package/dist/wallet/expo/background.cjs +17 -14
- package/dist/wallet/expo/background.cjs.map +1 -1
- package/dist/wallet/expo/background.d.cts +5 -4
- package/dist/wallet/expo/background.d.ts +5 -4
- package/dist/wallet/expo/background.js +10 -7
- package/dist/wallet/expo/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +29 -16
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +12 -7
- package/dist/wallet/expo/index.d.ts +12 -7
- package/dist/wallet/expo/index.js +20 -7
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +12 -9
- package/dist/worker/expo/index.cjs.map +1 -1
- package/dist/worker/expo/index.d.cts +6 -5
- package/dist/worker/expo/index.d.ts +6 -5
- package/dist/worker/expo/index.js +8 -5
- package/dist/worker/expo/index.js.map +1 -1
- package/package.json +16 -1
- package/dist/chunk-5WRA66RV.cjs.map +0 -1
- package/dist/chunk-6FL4N4S2.js.map +0 -1
- package/dist/chunk-BYPBVHVA.cjs.map +0 -1
- package/dist/chunk-HAQAWBYG.js.map +0 -1
- package/dist/chunk-KW7ZEWYS.cjs.map +0 -1
- package/dist/chunk-OPX2HRWM.js.map +0 -1
- package/dist/chunk-OUTWUYJ4.cjs.map +0 -1
- package/dist/chunk-P7B4LQ3H.js.map +0 -1
- package/dist/chunk-T7C3E2HL.js.map +0 -1
- package/dist/chunk-Y4BL3YYX.js.map +0 -1
- package/dist/chunk-ZMSM3NOH.cjs.map +0 -1
- package/dist/chunk-ZPF4I3K2.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
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, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy,
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { a as Identity, aB as Transaction, aA as SignerSession, ag as ReadonlyIdentity, ae as DescriptorProvider, aH as DescriptorSigningRequest, aI as IntentFeeConfig, aJ as OffchainInput, aK as FeeAmount, aL as OnchainInput, aM as FeeOutput, Y as BatchRegistrationRepository, Z as ArkIntent, _ as IntentPageFilter, P as PageRequest, D as PageResult, B as Outpoint, $ as BatchRegistration, a0 as VirtualTxRepository, a1 as VirtualTx, a2 as VtxoBranch, W as WalletRepository, Q as AtomicWalletState, z 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, U as WalletState, y as Contract, C as ContractRepository, X as ContractFilter, I as IWallet, O as OperatorProvider, ak as IntentRepository, ar as NetworkName, ah as OnchainProvider, ay as SettlementConfig, aN as ContractWatcherConfig, aO as Asset, R as Recipient, aP as FeeInfo, o as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetOperatorInfoOptions, aQ as GetVtxosOptions, aR as PaginationOptions, f as GetVtxosFilter, g as GetSpendableVtxosFilter, aS as CreateContractParams, aT as GetContractsFilter, V as VirtualCoin, aU as GetSpendablePathsOptions, aV as GetAllSpendingPathsOptions, l as GetNewAddressesOptions, aW as InputExpiryFloor, aX as IssuanceParams, aY as ReissuanceParams, aZ as BurnParams, a_ as RenewVtxosOptions, q as SendOnchainParams, A as ArkadeInfo, a$ as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ao as ContractSyncState, at as ContractWithVtxos, b0 as WatchedScript, b1 as PathSelection, m as NewAddress, b2 as ContractEvent, b3 as AssetDetails, b4 as IssuanceResult, b5 as DelegateInfo, b6 as MigrationGlobalSkipReason, b7 as MigrationLegSkipReason, b8 as SignerStatus, af as IReadonlyWallet, i as ActivityRegistry, an as IReadonlyAssetManager, b9 as StorageConfig, j as Activity, k as IContractManager, r as IAssetManager, p as SendParams, n as IDelegateManager, ba as IVtxoManager, a4 as Network, av as Coin, bb as SendBitcoinParams, bc as ExplorerTransaction, aC as SignedIntent, aD as Intent, bd as TreeNonces, be as TreePartialSigs, T as TxNotificationEvent, aE as SignedProof, aF as Proof, bf as PendingTx, bg as EmulatorProvider, bh as Status, bi as ChainTx, x as IndexerProvider, a7 as TxTree, bj as ArkadeService, bk as ContractVtxoEvent, bl as ExtendedContractVtxo, bm as ResolvedArkadeService, bn as resolveArkadeService, bo as PathContext } from './index-DCml4QJn.js';
|
|
2
|
+
export { bp as ActivityIntent, bq as ActivityResolver, br as ArkIntentState, w as ArkProvider, bs as AssetMetadata, bt as BATCH_REGISTRATION_TERMINAL_STATES, bu as BITCOIN_EMULATOR_PUBKEY, bv as BaseWalletConfig, ab as BatchFailedEvent, a9 as BatchFinalizationEvent, aa as BatchFinalizedEvent, bw as BatchInfo, bx as BatchRegistrationFilter, by as BatchRegistrationPageFilter, bz as BatchRegistrationState, bA as BatchSignableIdentity, a5 as BatchStartedEvent, bB as CandidateDeps, bC as ChainTxType, a3 as ChainedTxType, bD as CommitmentTx, bE as ConnectorTreeNode, bF as ContractBalance, bG as ContractEventCallback, bH as ContractHandler, aw as ContractManager, ax as ContractManagerConfig, bI as ContractScope, bJ as ContractState, bK as ContractVtxo, bL as ContractWatcher, bM as ContractWatcherEventCallback, bN as DEFAULT_ARKADE_EMULATOR_URL, bO as DEFAULT_VTXO_PAGE_SIZE, bP as DelegateManagerImpl, bQ as DelegateOptions, ai as DelegateProvider, bR as DeprecatedSignerMigrationReport, bS as DeprecatedSignerReport, bT as DigestMismatchError, bU as Discoverable, bV as DiscoveredContract, bW as DiscoveryDeps, bX as ESPLORA_URL, bY as EmulatorInfo, aq as EsploraProvider, bZ as EventSourceCapable, b_ as EventSourceFactory, b$ as EventSourceLike, c0 as EventSourceUnavailableError, al as ExitCaptureMode, c1 as ExitChainResolver, am as ExitDataSource, c2 as GetArkadeInfoOptions, c3 as GetUtxosOptions, c4 as GroupMembership, c5 as HandlerError, c6 as INTENT_TERMINAL_STATES, c7 as IndexerTxType, c8 as IndexerUtxo, c9 as IndexerUtxosUnsupportedError, ca as IntentCoin, cb as IntentFilter, cc as KnownMetadata, cd as MAX_PAGE_SIZE, ce as MUTINYNET_EMULATOR_PUBKEY, cf as MigrateDeprecatedSignerOptions, cg as MigrationLegReport, ch as MigrationVtxoRef, ci as NewAddressType, cj as Nonces, ck as OnchainCosignAmbiguousError, cl as OnchainCosignRejectedError, cm as OnchainCosignUnsupportedError, as as OperatorInfo, cn as Output, co as PageResponse, cp as PartialSig, cq as PrevTxSource, cr as PrevTxUnavailableError, cs as ProofInput, ct as ProviderClass, cu as REGTEST_EMULATOR_PUBKEY, cv as RawTxSource, aj as ReadonlyWalletConfig, ap as RecipientArkadeAddressContext, cw as RenewalSplit, cx as RenewalSplitContext, cy as RestArkProvider, cz as RestDelegateProvider, cA as RestEmulatorProvider, t as RestIndexerProvider, s as RestOperatorProvider, cB as ScanContractsOptions, cC as ScanResult, cD as ScheduledSession, cE as SettlementEventType, cF as SignRequest, cG as SignerClassification, cH as SignerSet, u as SubscriptionEvent, cI as SubscriptionFilter, v as SubscriptionHeartbeat, cJ as SubscriptionResponse, cK as SweepTxNotification, cL as TapLeaves, aG as TimeHeight, a8 as TreeNoncesEvent, ad as TreeSignatureEvent, cM as TreeSignerSession, a6 as TreeSigningStartedEvent, ac as TreeTxEvent, cN as Tx, cO as TxHistoryRecord, cP as TxKey, cQ as TxNotification, cR as TxTag, cS as TxTreeNode, cT as TxType, cU as Vtxo, cV as VtxoChain, az as VtxoManager, cW as VtxoType, b as WalletConfig, cX as WalletMode, cY as WithPrevTx, cZ as assertAllowedSighashTypes, c_ as assertPageRequest, c$ as assertRecipientArkadeAddress, d0 as assetMintResolver, d1 as attachPrevArkTxs, d2 as attachPrevoutTxs, d3 as boardingResolver, d4 as canRecoverOnchain, d5 as canSpendOffchain, d6 as canSweepOnchain, d7 as classifyAgainstSignerSet, d8 as classifyContractSigner, d9 as collabExitResolver, da as collectBatchRegistrations, db as collectContracts, dc as collectIntents, dd as collectPages, de as collectScriptVtxos, df as collectTransactionHistory, dg as collectUtxos, dh as collectVtxos, di as configureEventSource, dj as createDefaultActivityRegistry, dk as createExitChainResolver, dl as defaultEmulatorPubkey, dm as getAllNormalizedVtxos, dn as getConfiguredEventSource, dp as getNetwork, dq as getNormalizedVtxos, dr as getRandomId, ds as hasCandidates, dt as isBatchSignable, du as isContractVtxoEvent, dv as isCooperativelyMigratable, dw as isDiscoverable, dx as isEventSourceUnavailableError, dy as isPastExpiry, dz as isSigningIdentity, dA as isSubdust, dB as isTerminalBatchRegistrationState, dC as isTerminalIntentState, dD as isVirtualCoin, dE as isVtxoExpiringSoon, dF as isVtxoSpent, dG as iteratePages, dH as networkFromArkadeInfo, dI as networkFromOperatorInfo, dJ as networks, dK as pageResult, dL as resolveEmulatorPubkey, dM as resolveEventSource, dN as resolvePrevTxs, dO as signerSetFromInfo, dP as toOffchainInputFeeParams, dQ as toXOnlySignerHex, dR as withPrevTxs } from './index-DCml4QJn.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 './keyringDescriptorProvider-CS4w4PWd.js';
|
|
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, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, N as NotifiesIncomingFunds, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, O as resolveDescriptorSigner, Q as selectVirtualCoins, T as signingDescriptorIndex, U as strictSigningDescriptorIndex, X as waitForIncomingFunds } from './keyringDescriptorProvider-CS4w4PWd.js';
|
|
5
|
+
import { T as TapLeafScript, E as EncodedVtxoScript, C as CSVMultisigTapscript, R as RelativeTimelock, V as VtxoScript, A as ArkAddress } from './base-C-Y5t_0F.js';
|
|
6
|
+
export { a as ArkTapscript, b as CLTVMultisigTapscript, c as ConditionCSVMultisigTapscript, d as ConditionMultisigTapscript, M as MultisigTapscript, e as TapTreeCoder, f as TapscriptType, g as decodeTapscript, h as getSequence, s as scriptFromTapLeafScript } from './base-C-Y5t_0F.js';
|
|
7
|
+
export { A as ArkadeContractHandler, B as BoardingContractHandler, a as BoardingContractParams, D as DefaultContractHandler, b as DefaultContractParams, c as DelegateContractHandler, d as DelegateContractParams, V as VHTLC, e as VHTLCContractHandler, f as VHTLCContractParams, g as VHTLCV2ContractHandler, h as VHTLCV2ContractParams, i as contractHandlers } from './index-Bx-iArDs.js';
|
|
8
|
+
import { D as DefaultVtxo } from './delegate-iyDum4fw.js';
|
|
9
|
+
export { a as DelegateVtxo } from './delegate-iyDum4fw.js';
|
|
9
10
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
10
|
-
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
11
11
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
12
|
+
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
12
13
|
import { ElectrumWS } from 'ws-electrumx-client';
|
|
13
14
|
import { TransactionOutput, TransactionInputUpdate } from '@scure/btc-signer/psbt.js';
|
|
14
15
|
import * as P from 'micro-packed';
|
|
16
|
+
import { P as Program, A as ArkadeArgValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeParamValue, d as ArkadeFunction, I as InputDef, e as ArkadeValueType, C as CompiledProgramFunction, S as SourceRange, f as ArkadeArgType, g as ArkadeContractParams, h as ArkadeSegment, i as AsmToken, j as InputRef, k as SUPPORTED_PROGRAM_VERSION, l as SignerRef, T as TapscriptSegment, m as TweakedSigner, U as UnsupportedProgramVersionError, W as WitnessRef, n as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, o as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './program-BARSNg3X.js';
|
|
15
17
|
import '@scure/btc-signer/transaction.js';
|
|
16
18
|
|
|
17
19
|
/** Validate an optional millisecond duration; zero retains its caller-defined meaning. */
|
|
@@ -19,242 +21,147 @@ declare function assertNonNegativeMs(name: string, ms: number | undefined): void
|
|
|
19
21
|
/** Validate a timer delay without changing whether zero disables or immediately fires it. */
|
|
20
22
|
declare function assertTimerMs(name: string, ms: number | undefined): void;
|
|
21
23
|
|
|
24
|
+
/** The two WebAuthn calls a passkey needs; `navigator.credentials` in a browser, or a native bridge. */
|
|
25
|
+
interface WebAuthnClient {
|
|
26
|
+
create(options: CredentialCreationOptions): Promise<Credential | null>;
|
|
27
|
+
get(options: CredentialRequestOptions): Promise<Credential | null>;
|
|
28
|
+
}
|
|
29
|
+
/** The browser or the authenticator cannot return a PRF secret, so this passkey cannot derive a key. */
|
|
30
|
+
declare class PrfUnavailable extends Error {
|
|
31
|
+
name: string;
|
|
32
|
+
/** Set when the passkey was created before this failure, so an app can still use it some other way. */
|
|
33
|
+
credentialId?: Uint8Array;
|
|
34
|
+
}
|
|
35
|
+
/** The user dismissed the passkey prompt. */
|
|
36
|
+
declare class PasskeyCancelled extends Error {
|
|
37
|
+
name: string;
|
|
38
|
+
constructor(message?: string);
|
|
39
|
+
}
|
|
22
40
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* (plain strings only — no functions or prototypes).
|
|
26
|
-
*
|
|
27
|
-
* `descriptor` carries the wildcard *template* (e.g.
|
|
28
|
-
* `tr([fp/86'/0'/0']xpub.../0/*)`), not a concrete index — the
|
|
29
|
-
* receiving factories require a template, and storing it directly
|
|
30
|
-
* means nothing here has to convert concrete → template on rehydrate.
|
|
31
|
-
*
|
|
32
|
-
* Adding a new variant is a source change in every worker build; keep
|
|
33
|
-
* old variants around until all deployed workers handle them.
|
|
34
|
-
*/
|
|
35
|
-
type SerializedSigningIdentity = {
|
|
36
|
-
type: "single-key";
|
|
37
|
-
privateKey: string;
|
|
38
|
-
} | {
|
|
39
|
-
type: "seed";
|
|
40
|
-
seed: string;
|
|
41
|
-
descriptor: string;
|
|
42
|
-
} | {
|
|
43
|
-
type: "mnemonic";
|
|
44
|
-
mnemonic: string;
|
|
45
|
-
descriptor: string;
|
|
46
|
-
passphrase?: string;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Tagged envelope for a readonly identity transported across the
|
|
50
|
-
* service-worker boundary. All variants are structured-clone safe.
|
|
51
|
-
* `descriptor` is the wildcard template (see
|
|
52
|
-
* {@link SerializedSigningIdentity}).
|
|
41
|
+
* A new passkey failed its first use. A cancel and an authenticator that never repeats its PRF
|
|
42
|
+
* (Windows Hello) are the same `NotAllowedError`, so offer another way rather than prompt again.
|
|
53
43
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
declare class PasskeyUnconfirmed extends PrfUnavailable {
|
|
45
|
+
name: string;
|
|
46
|
+
}
|
|
47
|
+
/** The label of a passkey's first wallet, as in Breez's seedless-restore implementation. */
|
|
48
|
+
declare const DEFAULT_PASSKEY_LABEL = "Default";
|
|
49
|
+
/** Whether this browser says its passkeys can do PRF; `"unknown"` where it cannot tell before trying. */
|
|
50
|
+
declare function prfSupport(): Promise<"yes" | "no" | "unknown">;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a discoverable passkey that requires user verification, then uses it once and returns
|
|
53
|
+
* that use's PRF secret: a key must never depend on a secret its passkey cannot give again. When
|
|
54
|
+
* creation returns no PRF result there is nothing to compare that use against, so an authenticator
|
|
55
|
+
* that changes its secret later is not caught here; it derives other words on the next sign-in.
|
|
56
|
+
*
|
|
57
|
+
* @throws PrfUnavailable when the authenticator cannot do PRF or gives another secret on reuse
|
|
58
|
+
* @throws PasskeyUnconfirmed when the passkey fails its first use right after creation, for any
|
|
59
|
+
* reason (`cause` holds the error); this and PrfUnavailable carry the new passkey's
|
|
60
|
+
* `credentialId`, since the passkey exists by then
|
|
61
|
+
* @throws PasskeyCancelled when the user dismisses the prompt
|
|
62
|
+
*/
|
|
63
|
+
declare function createPrfPasskey(o: {
|
|
64
|
+
rp: {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
};
|
|
68
|
+
userId: Uint8Array;
|
|
69
|
+
userName: string;
|
|
70
|
+
salt: Uint8Array;
|
|
71
|
+
client?: WebAuthnClient;
|
|
72
|
+
}): Promise<{
|
|
73
|
+
credentialId: Uint8Array;
|
|
74
|
+
prf: Uint8Array;
|
|
75
|
+
}>;
|
|
63
76
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* signing primitives — suitable for watch-only identities backed by an
|
|
67
|
-
* xpub.
|
|
68
|
-
*
|
|
69
|
-
* Extracted from {@link HDCapableIdentity} so that
|
|
70
|
-
* `ReadonlyDescriptorIdentity` can stand in for an HD wallet's read-only
|
|
71
|
-
* surface (template-aware, derives pubkeys at any index) without having
|
|
72
|
-
* to claim signing capability it cannot honour.
|
|
77
|
+
* Uses a passkey and returns its PRF secret for `salt`. With no `credentialIds` the browser offers
|
|
78
|
+
* every passkey for `rpId`; `userHandle` then says which one was picked.
|
|
73
79
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
80
|
+
declare function evaluatePrf(o: {
|
|
81
|
+
rpId: string;
|
|
82
|
+
salt: Uint8Array;
|
|
83
|
+
credentialIds?: Uint8Array[];
|
|
84
|
+
client?: WebAuthnClient;
|
|
85
|
+
}): Promise<{
|
|
86
|
+
credentialId: Uint8Array;
|
|
87
|
+
userHandle: Uint8Array | null;
|
|
88
|
+
prf: Uint8Array;
|
|
89
|
+
}>;
|
|
84
90
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* Deliberately does NOT extend `DescriptorProvider`: if an HD-capable
|
|
89
|
-
* identity were silently usable as a concrete descriptor source, callers
|
|
90
|
-
* could bypass receive rotation and unknowingly reuse a single address
|
|
91
|
-
* forever. To use this identity as a wallet's descriptor source, wrap
|
|
92
|
-
* it explicitly:
|
|
93
|
-
*
|
|
94
|
-
* - `HDDescriptorProvider` — rotating, recommended for new wallets.
|
|
95
|
-
* - `StaticDescriptorProvider` — pinned to a single key, for legacy or
|
|
96
|
-
* explicitly-non-rotating use cases.
|
|
91
|
+
* BIP39 words from a PRF secret. Twelve, from its first 16 bytes, is what Breez's SDK derives
|
|
92
|
+
* (`prf_to_mnemonic`), so a Breez wallet using the same passkey and salt gets the same words.
|
|
93
|
+
* Twenty-four, from all 32 bytes, is what the seedless-restore spec text's `BIP39(root_key)` reads as.
|
|
97
94
|
*/
|
|
98
|
-
|
|
99
|
-
/** Signs each request with the key derived from its descriptor. */
|
|
100
|
-
signDescriptorTransactions(requests: DescriptorSigningRequest[]): Promise<Transaction[]>;
|
|
101
|
-
/** Signs a message using the key derived from `descriptor`. */
|
|
102
|
-
signDescriptorMessage(descriptor: string, message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
103
|
-
}
|
|
95
|
+
declare const mnemonicFromPrf: (prfSecret: Uint8Array, words?: 12 | 24) => string;
|
|
104
96
|
|
|
105
|
-
/** Used for default BIP86 derivation with network selection. */
|
|
106
|
-
interface NetworkOptions {
|
|
107
|
-
/**
|
|
108
|
-
* Mainnet (coin type 0) or testnet (coin type 1).
|
|
109
|
-
*
|
|
110
|
-
* @defaultValue `true`
|
|
111
|
-
*/
|
|
112
|
-
isMainnet?: boolean;
|
|
113
|
-
}
|
|
114
|
-
/** Used for a caller-supplied account-descriptor template. */
|
|
115
|
-
interface DescriptorOptions {
|
|
116
|
-
/**
|
|
117
|
-
* Account-descriptor *template*; must end with the BIP-32 wildcard suffix `/*)`. Stored as-is
|
|
118
|
-
* on {@link SeedIdentity.descriptor} for HD providers to rotate through indices.
|
|
119
|
-
*/
|
|
120
|
-
descriptor: string;
|
|
121
|
-
}
|
|
122
|
-
/** Either default BIP86 derivation (with optional network selection) or a caller-supplied template. */
|
|
123
|
-
type SeedIdentityOptions = NetworkOptions | DescriptorOptions;
|
|
124
|
-
/** Used for deriving an identity from a BIP39 mnemonic. */
|
|
125
|
-
type MnemonicOptions = SeedIdentityOptions & {
|
|
126
|
-
/** Optional BIP39 passphrase for additional seed entropy. */
|
|
127
|
-
passphrase?: string;
|
|
128
|
-
};
|
|
129
97
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* The recommended identity type: BIP86 (Taproot) derivation by default, or a caller-supplied
|
|
133
|
-
* wildcard template. Prefer it (or @see MnemonicIdentity) over `SingleKey`, which exists for
|
|
134
|
-
* backward compatibility with raw nsec-style keys.
|
|
135
|
-
*
|
|
136
|
-
* {@link descriptor} holds the wildcard template (e.g. `tr([fp/86'/0'/0']xpub/0/*)`); consumers
|
|
137
|
-
* materialize concrete indices themselves (see `HDDescriptorProvider`).
|
|
138
|
-
*
|
|
139
|
-
* Deliberately NOT a `DescriptorProvider`, so it can't silently be used as a concrete
|
|
140
|
-
* descriptor source and defeat HD rotation. Wrap it in `HDDescriptorProvider` (rotating
|
|
141
|
-
* receive addresses) or {@link StaticDescriptorProvider} (legacy single-key behaviour).
|
|
98
|
+
* In-memory single key implementation for Bitcoin transaction signing.
|
|
142
99
|
*
|
|
143
100
|
* @example
|
|
144
101
|
* ```typescript
|
|
145
|
-
*
|
|
102
|
+
* // Create from hex string
|
|
103
|
+
* const key = SingleKey.fromHex('your_private_key_hex');
|
|
146
104
|
*
|
|
147
|
-
* //
|
|
148
|
-
* const
|
|
105
|
+
* // Create from raw bytes
|
|
106
|
+
* const key = SingleKey.fromPrivateKey(privateKeyBytes);
|
|
149
107
|
*
|
|
150
|
-
* //
|
|
151
|
-
* const
|
|
108
|
+
* // Create random key
|
|
109
|
+
* const randomKey = SingleKey.fromRandomBytes();
|
|
152
110
|
*
|
|
153
|
-
* //
|
|
154
|
-
* const
|
|
111
|
+
* // Sign a transaction
|
|
112
|
+
* const signedTx = await key.sign(transaction);
|
|
155
113
|
* ```
|
|
156
114
|
*/
|
|
157
|
-
declare class
|
|
158
|
-
private
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
* derivation path.
|
|
167
|
-
*/
|
|
168
|
-
constructor(seed: Uint8Array, opts?: SeedIdentityOptions);
|
|
115
|
+
declare class SingleKey implements Identity {
|
|
116
|
+
private key;
|
|
117
|
+
private constructor();
|
|
118
|
+
/** Create a signing identity from raw private key bytes. */
|
|
119
|
+
static fromPrivateKey(privateKey: Uint8Array): SingleKey;
|
|
120
|
+
/** Create a signing identity from a hex-encoded private key. */
|
|
121
|
+
static fromHex(privateKeyHex: string): SingleKey;
|
|
122
|
+
/** Create a signing identity with a freshly generated random private key. */
|
|
123
|
+
static fromRandomBytes(): SingleKey;
|
|
169
124
|
/**
|
|
170
|
-
*
|
|
171
|
-
* derivation, or `{ descriptor }` for a template ending in `/*)`.
|
|
125
|
+
* Export the private key as a hex string.
|
|
172
126
|
*
|
|
173
|
-
* @
|
|
127
|
+
* @returns The private key as a hex string
|
|
174
128
|
*/
|
|
175
|
-
|
|
176
|
-
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
177
|
-
compressedPublicKey(): Promise<Uint8Array>;
|
|
129
|
+
toHex(): string;
|
|
178
130
|
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
131
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
132
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
133
|
+
signerSession(): SignerSession;
|
|
179
134
|
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
180
135
|
/**
|
|
181
|
-
* BIP-340 sign `messageHash` with
|
|
182
|
-
*
|
|
183
|
-
*
|
|
136
|
+
* BIP-340 sign `messageHash` with aux_rand = 0, so the signature — and
|
|
137
|
+
* anything derived from it — is reproducible from the key alone.
|
|
138
|
+
*
|
|
139
|
+
* What lets a static wallet derive a swap preimage instead of storing one
|
|
140
|
+
* (see `wallet/contractSecrets.ts`). Deliberately NOT `signMessage`, whose
|
|
141
|
+
* schnorr branch draws a random aux_rand: a preimage derived from that is
|
|
142
|
+
* unrecoverable, and the loss would only surface at claim time.
|
|
184
143
|
*/
|
|
185
144
|
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
186
|
-
|
|
187
|
-
/** Watch-only copy; carries the template forward, so it stays HD-capable without the seed. */
|
|
188
|
-
toReadonly(): Promise<ReadonlyDescriptorIdentity>;
|
|
189
|
-
/** Returns true when `descriptor` is derived from this identity's seed. */
|
|
190
|
-
ownsDescriptor(descriptor: string): boolean;
|
|
191
|
-
/**
|
|
192
|
-
* Signs each request with the key derived from its descriptor.
|
|
193
|
-
* Each descriptor must share this identity's seed ({@link ownsDescriptor}).
|
|
194
|
-
*/
|
|
195
|
-
signDescriptorTransactions(requests: DescriptorSigningRequest[]): Promise<Transaction[]>;
|
|
196
|
-
/** Signs a message with the key derived from `descriptor`. */
|
|
197
|
-
signDescriptorMessage(descriptor: string, message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
198
|
-
/**
|
|
199
|
-
* BIP-340 sign `messageHash` with the key derived from `descriptor`,
|
|
200
|
-
* aux_rand = 0. Backs {@link DescriptorIdentity.signSchnorrDeterministic},
|
|
201
|
-
* which swap preimage derivation reads through.
|
|
202
|
-
*/
|
|
203
|
-
signSchnorrDeterministicWithDescriptor(descriptor: string, messageHash: Uint8Array): Promise<Uint8Array>;
|
|
204
|
-
private derivePrivateKeyForDescriptor;
|
|
205
|
-
private signTxWithKey;
|
|
206
|
-
private signMessageWithKey;
|
|
145
|
+
toReadonly(): Promise<ReadonlySingleKey>;
|
|
207
146
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
* @example
|
|
213
|
-
* ```typescript
|
|
214
|
-
* const identity = MnemonicIdentity.fromMnemonic(
|
|
215
|
-
* 'abandon abandon abandon ...',
|
|
216
|
-
* { isMainnet: true, passphrase: 'secret' }
|
|
217
|
-
* );
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
declare class MnemonicIdentity extends SeedIdentity {
|
|
221
|
-
private constructor();
|
|
147
|
+
declare class ReadonlySingleKey implements ReadonlyIdentity {
|
|
148
|
+
private readonly publicKey;
|
|
149
|
+
/** Create a readonly identity from a compressed public key. */
|
|
150
|
+
constructor(publicKey: Uint8Array);
|
|
222
151
|
/**
|
|
223
|
-
*
|
|
224
|
-
* derivation, or `{ descriptor }` for a template ending in `/*)`, plus optional passphrase.
|
|
152
|
+
* Create a ReadonlySingleKey from a compressed public key.
|
|
225
153
|
*
|
|
226
|
-
* @param
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* ```typescript
|
|
236
|
-
* const ro = ReadonlyDescriptorIdentity.fromDescriptor(
|
|
237
|
-
* "tr([fp/86'/0'/0']xpub.../0/*)"
|
|
238
|
-
* );
|
|
239
|
-
* ro.descriptor;
|
|
240
|
-
* // => "tr([fp/86'/0'/0']xpub.../0/*)" — the template
|
|
241
|
-
* ```
|
|
242
|
-
*/
|
|
243
|
-
declare class ReadonlyDescriptorIdentity implements ReadonlyHDCapableIdentity {
|
|
244
|
-
/**
|
|
245
|
-
* Index-0 expansion of {@link descriptor}; the x-only pubkey (32 bytes) and the compressed
|
|
246
|
-
* pubkey (via the bip32 node) are both read off it on demand.
|
|
154
|
+
* @param publicKey - 33-byte compressed public key (02/03 prefix + 32-byte x coordinate)
|
|
155
|
+
* @returns A new ReadonlySingleKey instance
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const pubkey = new Uint8Array(33); // your compressed public key
|
|
159
|
+
* const readonlyKey = ReadonlySingleKey.fromPublicKey(pubkey);
|
|
160
|
+
* ```
|
|
247
161
|
*/
|
|
248
|
-
|
|
249
|
-
/** Wildcard account-descriptor template (e.g. `tr([fp/86'/0'/0']xpub/0/*)`). */
|
|
250
|
-
readonly descriptor: string;
|
|
251
|
-
private constructor();
|
|
252
|
-
/** @param descriptor - Wildcard-suffixed Taproot template (`tr([fp/path']xpub.../child/*)`). */
|
|
253
|
-
static fromDescriptor(descriptor: string): ReadonlyDescriptorIdentity;
|
|
162
|
+
static fromPublicKey(publicKey: Uint8Array): ReadonlySingleKey;
|
|
254
163
|
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
255
164
|
compressedPublicKey(): Promise<Uint8Array>;
|
|
256
|
-
/** Returns true when `descriptor` derives from this identity's xpub. */
|
|
257
|
-
ownsDescriptor(descriptor: string): boolean;
|
|
258
165
|
}
|
|
259
166
|
|
|
260
167
|
/**
|
|
@@ -370,6 +277,48 @@ declare class DescriptorIdentity implements Identity {
|
|
|
370
277
|
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
371
278
|
}
|
|
372
279
|
|
|
280
|
+
/**
|
|
281
|
+
* Read-side HD capability marker. Exposes the wildcard-suffixed account
|
|
282
|
+
* descriptor *template* and the descriptor-membership predicate, but no
|
|
283
|
+
* signing primitives — suitable for watch-only identities backed by an
|
|
284
|
+
* xpub.
|
|
285
|
+
*
|
|
286
|
+
* Extracted from {@link HDCapableIdentity} so that
|
|
287
|
+
* `ReadonlyDescriptorIdentity` can stand in for an HD wallet's read-only
|
|
288
|
+
* surface (template-aware, derives pubkeys at any index) without having
|
|
289
|
+
* to claim signing capability it cannot honour.
|
|
290
|
+
*/
|
|
291
|
+
interface ReadonlyHDCapableIdentity extends ReadonlyIdentity {
|
|
292
|
+
/**
|
|
293
|
+
* The wildcard-suffixed account descriptor template
|
|
294
|
+
* (e.g. `tr([fp/86'/0'/0']xpub/0/*)`). Consumers materialize a
|
|
295
|
+
* concrete descriptor by replacing the `*` with a derivation index.
|
|
296
|
+
*/
|
|
297
|
+
readonly descriptor: string;
|
|
298
|
+
/** True iff `descriptor` derives from this identity's xpub/seed. */
|
|
299
|
+
ownsDescriptor(descriptor: string): boolean;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Capability marker for identities that can be rotated through an HD
|
|
303
|
+
* derivation tree AND can sign at each rotated index.
|
|
304
|
+
*
|
|
305
|
+
* Deliberately does NOT extend `DescriptorProvider`: if an HD-capable
|
|
306
|
+
* identity were silently usable as a concrete descriptor source, callers
|
|
307
|
+
* could bypass receive rotation and unknowingly reuse a single address
|
|
308
|
+
* forever. To use this identity as a wallet's descriptor source, wrap
|
|
309
|
+
* it explicitly:
|
|
310
|
+
*
|
|
311
|
+
* - `HDDescriptorProvider` — rotating, recommended for new wallets.
|
|
312
|
+
* - `StaticDescriptorProvider` — pinned to a single key, for legacy or
|
|
313
|
+
* explicitly-non-rotating use cases.
|
|
314
|
+
*/
|
|
315
|
+
interface HDCapableIdentity extends ReadonlyHDCapableIdentity, Identity {
|
|
316
|
+
/** Signs each request with the key derived from its descriptor. */
|
|
317
|
+
signDescriptorTransactions(requests: DescriptorSigningRequest[]): Promise<Transaction[]>;
|
|
318
|
+
/** Signs a message using the key derived from `descriptor`. */
|
|
319
|
+
signDescriptorMessage(descriptor: string, message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
320
|
+
}
|
|
321
|
+
|
|
373
322
|
/**
|
|
374
323
|
* Wraps a legacy Identity (single-key) as a DescriptorProvider.
|
|
375
324
|
* The descriptor is always a simple tr(pubkey) format.
|
|
@@ -435,15 +384,23 @@ declare class Estimator {
|
|
|
435
384
|
evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
|
|
436
385
|
}
|
|
437
386
|
|
|
438
|
-
declare class
|
|
387
|
+
declare class InMemoryBatchRegistrationRepository implements BatchRegistrationRepository {
|
|
439
388
|
readonly version: 1;
|
|
440
389
|
private byId;
|
|
441
390
|
clear(): Promise<void>;
|
|
442
|
-
|
|
443
|
-
|
|
391
|
+
saveBatchRegistration(intent: ArkIntent): Promise<void>;
|
|
392
|
+
getBatchRegistrationsPage(filter: IntentPageFilter | undefined, page: PageRequest): Promise<PageResult<ArkIntent>>;
|
|
444
393
|
getLockedVtxoOutpoints(): Promise<Outpoint[]>;
|
|
394
|
+
/** @deprecated Use {@link saveBatchRegistration}. */
|
|
395
|
+
saveIntent(intent: ArkIntent): Promise<void>;
|
|
396
|
+
/** @deprecated Use {@link getBatchRegistrationsPage}. */
|
|
397
|
+
getIntentsPage(filter: IntentPageFilter | undefined, page: PageRequest): Promise<PageResult<BatchRegistration, string>>;
|
|
445
398
|
[Symbol.asyncDispose](): Promise<void>;
|
|
446
399
|
}
|
|
400
|
+
/** @deprecated Use {@link InMemoryBatchRegistrationRepository}. */
|
|
401
|
+
declare const InMemoryIntentRepository: typeof InMemoryBatchRegistrationRepository;
|
|
402
|
+
/** @deprecated Use {@link InMemoryBatchRegistrationRepository}. */
|
|
403
|
+
type InMemoryIntentRepository = InMemoryBatchRegistrationRepository;
|
|
447
404
|
|
|
448
405
|
declare class InMemoryVirtualTxRepository implements VirtualTxRepository {
|
|
449
406
|
readonly version: 1;
|
|
@@ -479,24 +436,33 @@ declare class IndexedDBVirtualTxRepository implements VirtualTxRepository {
|
|
|
479
436
|
}
|
|
480
437
|
|
|
481
438
|
/**
|
|
482
|
-
* @experimental
|
|
483
|
-
* {@link BATCHES_DB_NAME} by default, never in the wallet/contract one.
|
|
439
|
+
* @experimental Batch registration persistence is opt-in. Stored in its own
|
|
440
|
+
* database, {@link BATCHES_DB_NAME} by default, never in the wallet/contract one.
|
|
484
441
|
*/
|
|
485
|
-
declare class
|
|
442
|
+
declare class IndexedDBBatchRegistrationRepository implements BatchRegistrationRepository {
|
|
486
443
|
readonly version: 1;
|
|
487
444
|
private readonly connection;
|
|
488
445
|
constructor(dbName?: string);
|
|
489
446
|
private getDB;
|
|
490
447
|
clear(): Promise<void>;
|
|
491
|
-
|
|
492
|
-
|
|
448
|
+
saveBatchRegistration(intent: ArkIntent): Promise<void>;
|
|
449
|
+
getBatchRegistrationsPage(filter: IntentPageFilter | undefined, page: PageRequest): Promise<PageResult<ArkIntent>>;
|
|
493
450
|
getLockedVtxoOutpoints(): Promise<Outpoint[]>;
|
|
451
|
+
/** @deprecated Use {@link saveBatchRegistration}. */
|
|
452
|
+
saveIntent(intent: ArkIntent): Promise<void>;
|
|
453
|
+
/** @deprecated Use {@link getBatchRegistrationsPage}. */
|
|
454
|
+
getIntentsPage(filter: IntentPageFilter | undefined, page: PageRequest): Promise<PageResult<BatchRegistration, string>>;
|
|
494
455
|
[Symbol.asyncDispose](): Promise<void>;
|
|
495
456
|
}
|
|
457
|
+
/** @deprecated Use {@link IndexedDBBatchRegistrationRepository}. */
|
|
458
|
+
declare const IndexedDBIntentRepository: typeof IndexedDBBatchRegistrationRepository;
|
|
459
|
+
/** @deprecated Use {@link IndexedDBBatchRegistrationRepository}. */
|
|
460
|
+
type IndexedDBIntentRepository = IndexedDBBatchRegistrationRepository;
|
|
496
461
|
|
|
497
462
|
/**
|
|
498
463
|
* In-memory implementation of WalletRepository.
|
|
499
464
|
* Data is ephemeral and scoped to the instance.
|
|
465
|
+
* Atomic updates require structuredClone and cloneable state; they provide no durability.
|
|
500
466
|
*/
|
|
501
467
|
declare class InMemoryWalletRepository implements WalletRepository {
|
|
502
468
|
readonly version: 2;
|
|
@@ -504,6 +470,8 @@ declare class InMemoryWalletRepository implements WalletRepository {
|
|
|
504
470
|
private readonly utxosByAddress;
|
|
505
471
|
private readonly txsByAddress;
|
|
506
472
|
private walletState;
|
|
473
|
+
readonly atomicWalletState?: AtomicWalletState;
|
|
474
|
+
constructor();
|
|
507
475
|
getVtxosPage(address: string, page: PageRequest<Outpoint>): Promise<PageResult<ExtendedVirtualCoin, Outpoint>>;
|
|
508
476
|
saveVtxos(address: string, vtxos: ExtendedVirtualCoin[]): Promise<void>;
|
|
509
477
|
deleteVtxos(address: string): Promise<void>;
|
|
@@ -654,12 +622,35 @@ declare function contractFromArkContractWithAddress(encoded: string, serverPubKe
|
|
|
654
622
|
/** Check if a string is an arkcontract. */
|
|
655
623
|
declare function isArkContract(str: string): boolean;
|
|
656
624
|
|
|
625
|
+
/**
|
|
626
|
+
* Thrown when a descriptor-capable contract (default, delegate, or boarding)
|
|
627
|
+
* cannot be routed to any signer: its owner key (`params.pubKey`) is not this
|
|
628
|
+
* wallet's baseline signing key, and the record carries no
|
|
629
|
+
* `metadata.signingDescriptor` to send it to a descriptor-aware signer.
|
|
630
|
+
*
|
|
631
|
+
* Note that this can arise also when a contract belongs to a different identity (storage reuse).
|
|
632
|
+
*/
|
|
633
|
+
declare class MissingSigningDescriptorError extends Error {
|
|
634
|
+
readonly contractScript: string;
|
|
635
|
+
readonly contractType: "default" | "delegate" | "boarding";
|
|
636
|
+
readonly name = "MissingSigningDescriptorError";
|
|
637
|
+
constructor(contractScript: string, contractType: "default" | "delegate" | "boarding");
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Thrown when an input needs descriptor-aware signing but no
|
|
641
|
+
* DescriptorProvider was wired into the wallet.
|
|
642
|
+
*/
|
|
643
|
+
declare class DescriptorSigningProviderMissingError extends Error {
|
|
644
|
+
readonly name = "DescriptorSigningProviderMissingError";
|
|
645
|
+
constructor();
|
|
646
|
+
}
|
|
647
|
+
|
|
657
648
|
/**
|
|
658
649
|
* In-memory implementation of ContractRepository.
|
|
659
650
|
* Data is ephemeral and scoped to the instance.
|
|
660
651
|
*/
|
|
661
652
|
declare class InMemoryContractRepository implements ContractRepository {
|
|
662
|
-
readonly version:
|
|
653
|
+
readonly version: 4;
|
|
663
654
|
private readonly contractsByScript;
|
|
664
655
|
clear(): Promise<void>;
|
|
665
656
|
getContractsPage(filter: ContractFilter | undefined, page: PageRequest): Promise<PageResult<Contract>>;
|
|
@@ -674,7 +665,7 @@ declare class InMemoryContractRepository implements ContractRepository {
|
|
|
674
665
|
* Data is stored as JSON strings in key/value stores.
|
|
675
666
|
*/
|
|
676
667
|
declare class IndexedDBContractRepository implements ContractRepository {
|
|
677
|
-
readonly version:
|
|
668
|
+
readonly version: 4;
|
|
678
669
|
private readonly connection;
|
|
679
670
|
constructor(dbName?: string);
|
|
680
671
|
clear(): Promise<void>;
|
|
@@ -692,76 +683,257 @@ interface WalletRestoreHook {
|
|
|
692
683
|
id: string;
|
|
693
684
|
restore(wallet: IWallet): Promise<void>;
|
|
694
685
|
}
|
|
695
|
-
declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
|
|
696
|
-
|
|
686
|
+
declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Tagged envelope for a signing identity transported across the
|
|
690
|
+
* service-worker boundary. All variants are structured-clone safe
|
|
691
|
+
* (plain strings only — no functions or prototypes).
|
|
692
|
+
*
|
|
693
|
+
* `descriptor` carries the wildcard *template* (e.g.
|
|
694
|
+
* `tr([fp/86'/0'/0']xpub.../0/*)`), not a concrete index — the
|
|
695
|
+
* receiving factories require a template, and storing it directly
|
|
696
|
+
* means nothing here has to convert concrete → template on rehydrate.
|
|
697
|
+
*
|
|
698
|
+
* Adding a new variant is a source change in every worker build; keep
|
|
699
|
+
* old variants around until all deployed workers handle them.
|
|
700
|
+
*/
|
|
701
|
+
type SerializedSigningIdentity = {
|
|
702
|
+
type: "single-key";
|
|
703
|
+
privateKey: string;
|
|
704
|
+
} | {
|
|
705
|
+
type: "seed";
|
|
706
|
+
seed: string;
|
|
707
|
+
descriptor: string;
|
|
708
|
+
} | {
|
|
709
|
+
type: "mnemonic";
|
|
710
|
+
mnemonic: string;
|
|
711
|
+
descriptor: string;
|
|
712
|
+
passphrase?: string;
|
|
713
|
+
};
|
|
714
|
+
/**
|
|
715
|
+
* Tagged envelope for a readonly identity transported across the
|
|
716
|
+
* service-worker boundary. All variants are structured-clone safe.
|
|
717
|
+
* `descriptor` is the wildcard template (see
|
|
718
|
+
* {@link SerializedSigningIdentity}).
|
|
719
|
+
*/
|
|
720
|
+
type SerializedReadonlyIdentity = {
|
|
721
|
+
type: "readonly-single-key";
|
|
722
|
+
publicKey: string;
|
|
723
|
+
} | {
|
|
724
|
+
type: "readonly-descriptor";
|
|
725
|
+
descriptor: string;
|
|
726
|
+
};
|
|
727
|
+
type SerializedIdentity = SerializedSigningIdentity | SerializedReadonlyIdentity;
|
|
728
|
+
|
|
729
|
+
/** Used for default BIP86 derivation with network selection. */
|
|
730
|
+
interface NetworkOptions {
|
|
731
|
+
/**
|
|
732
|
+
* Mainnet (coin type 0) or testnet (coin type 1).
|
|
733
|
+
*
|
|
734
|
+
* @defaultValue `true`
|
|
735
|
+
*/
|
|
736
|
+
isMainnet?: boolean;
|
|
737
|
+
}
|
|
738
|
+
/** Used for a caller-supplied account-descriptor template. */
|
|
739
|
+
interface DescriptorOptions {
|
|
740
|
+
/**
|
|
741
|
+
* Account-descriptor *template*; must end with the BIP-32 wildcard suffix `/*)`. Stored as-is
|
|
742
|
+
* on {@link SeedIdentity.descriptor} for HD providers to rotate through indices.
|
|
743
|
+
*/
|
|
744
|
+
descriptor: string;
|
|
745
|
+
}
|
|
746
|
+
/** Either default BIP86 derivation (with optional network selection) or a caller-supplied template. */
|
|
747
|
+
type SeedIdentityOptions = NetworkOptions | DescriptorOptions;
|
|
748
|
+
/** Used for deriving an identity from a BIP39 mnemonic. */
|
|
749
|
+
type MnemonicOptions = SeedIdentityOptions & {
|
|
750
|
+
/** Optional BIP39 passphrase for additional seed entropy. */
|
|
751
|
+
passphrase?: string;
|
|
752
|
+
};
|
|
753
|
+
/**
|
|
754
|
+
* Where a passkey-derived identity comes from. Each `label` is a separate wallet on the same
|
|
755
|
+
* passkey; its UTF-8 bytes are the PRF salt, unnormalized as in Breez's provider, so an app taking
|
|
756
|
+
* non-ASCII labels from users should normalize them (NFC) itself. Defaults to
|
|
757
|
+
* {@link DEFAULT_PASSKEY_LABEL}. `words` picks 12 (Breez's SDK, the default) or 24 (the spec text),
|
|
758
|
+
* see {@link mnemonicFromPrf}.
|
|
759
|
+
*/
|
|
760
|
+
interface PasskeySource {
|
|
761
|
+
client?: WebAuthnClient;
|
|
762
|
+
label?: string;
|
|
763
|
+
words?: 12 | 24;
|
|
764
|
+
}
|
|
765
|
+
/** A passkey-derived identity, with its words so the app can offer them as a backup. */
|
|
766
|
+
interface PasskeyMnemonic {
|
|
767
|
+
identity: MnemonicIdentity;
|
|
768
|
+
mnemonic: string;
|
|
769
|
+
credentialId: Uint8Array;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Seed-based identity derived from a raw seed and an account descriptor *template*.
|
|
773
|
+
*
|
|
774
|
+
* The recommended identity type: BIP86 (Taproot) derivation by default, or a caller-supplied
|
|
775
|
+
* wildcard template. Prefer it (or @see MnemonicIdentity) over `SingleKey`, which exists for
|
|
776
|
+
* backward compatibility with raw nsec-style keys.
|
|
777
|
+
*
|
|
778
|
+
* {@link descriptor} holds the wildcard template (e.g. `tr([fp/86'/0'/0']xpub/0/*)`); consumers
|
|
779
|
+
* materialize concrete indices themselves (see `HDDescriptorProvider`).
|
|
780
|
+
*
|
|
781
|
+
* Deliberately NOT a `DescriptorProvider`, so it can't silently be used as a concrete
|
|
782
|
+
* descriptor source and defeat HD rotation. Wrap it in `HDDescriptorProvider` (rotating
|
|
783
|
+
* receive addresses) or {@link StaticDescriptorProvider} (legacy single-key behaviour).
|
|
784
|
+
*
|
|
785
|
+
* @example
|
|
786
|
+
* ```typescript
|
|
787
|
+
* const seed = mnemonicToSeedSync(mnemonic);
|
|
788
|
+
*
|
|
789
|
+
* // Testnet (BIP86 wildcard descriptor m/86'/1'/0'/0/*)
|
|
790
|
+
* const identity = SeedIdentity.fromSeed(seed, { isMainnet: false });
|
|
791
|
+
*
|
|
792
|
+
* // Mainnet (BIP86 wildcard descriptor m/86'/0'/0'/0/*)
|
|
793
|
+
* const identity = SeedIdentity.fromSeed(seed, { isMainnet: true });
|
|
794
|
+
*
|
|
795
|
+
* // Caller-supplied wildcard descriptor (must end in `/*)`).
|
|
796
|
+
* const identity = SeedIdentity.fromSeed(seed, { descriptor });
|
|
797
|
+
* ```
|
|
798
|
+
*/
|
|
799
|
+
declare class SeedIdentity implements HDCapableIdentity {
|
|
800
|
+
private readonly derivedKey;
|
|
801
|
+
/** Wildcard account-descriptor template (e.g. `tr([fp/86'/0'/0']xpub/0/*)`). */
|
|
802
|
+
readonly descriptor: string;
|
|
803
|
+
/**
|
|
804
|
+
* Constructs a SeedIdentity from a 64-byte seed and either a wildcard `{ descriptor }` or the
|
|
805
|
+
* default BIP86 path for `{ isMainnet }`. Prefer {@link fromSeed}.
|
|
806
|
+
*
|
|
807
|
+
* Throws on a non-wildcard descriptor, an xpub mismatch with the seed, or a missing
|
|
808
|
+
* derivation path.
|
|
809
|
+
*/
|
|
810
|
+
constructor(seed: Uint8Array, opts?: SeedIdentityOptions);
|
|
811
|
+
/**
|
|
812
|
+
* Creates a SeedIdentity from a raw 64-byte seed: `{ isMainnet }` for default BIP86
|
|
813
|
+
* derivation, or `{ descriptor }` for a template ending in `/*)`.
|
|
814
|
+
*
|
|
815
|
+
* @param seed - 64-byte seed (typically from mnemonicToSeedSync)
|
|
816
|
+
*/
|
|
817
|
+
static fromSeed(seed: Uint8Array, opts?: SeedIdentityOptions): SeedIdentity;
|
|
818
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
819
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
820
|
+
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
821
|
+
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
822
|
+
/**
|
|
823
|
+
* BIP-340 sign `messageHash` with this identity's own key, aux_rand = 0 (for an `auto`-mode
|
|
824
|
+
* wallet whose bare `tr(pubkey)` resolves to the identity itself). NOT via `signMessage`,
|
|
825
|
+
* whose random aux_rand would make the signature unreproducible.
|
|
826
|
+
*/
|
|
827
|
+
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
828
|
+
signerSession(): SignerSession;
|
|
829
|
+
/** Watch-only copy; carries the template forward, so it stays HD-capable without the seed. */
|
|
830
|
+
toReadonly(): Promise<ReadonlyDescriptorIdentity>;
|
|
831
|
+
/** Returns true when `descriptor` is derived from this identity's seed. */
|
|
832
|
+
ownsDescriptor(descriptor: string): boolean;
|
|
833
|
+
/**
|
|
834
|
+
* Signs each request with the key derived from its descriptor.
|
|
835
|
+
* Each descriptor must share this identity's seed ({@link ownsDescriptor}).
|
|
836
|
+
*/
|
|
837
|
+
signDescriptorTransactions(requests: DescriptorSigningRequest[]): Promise<Transaction[]>;
|
|
838
|
+
/** Signs a message with the key derived from `descriptor`. */
|
|
839
|
+
signDescriptorMessage(descriptor: string, message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
840
|
+
/**
|
|
841
|
+
* BIP-340 sign `messageHash` with the key derived from `descriptor`,
|
|
842
|
+
* aux_rand = 0. Backs {@link DescriptorIdentity.signSchnorrDeterministic},
|
|
843
|
+
* which swap preimage derivation reads through.
|
|
844
|
+
*/
|
|
845
|
+
signSchnorrDeterministicWithDescriptor(descriptor: string, messageHash: Uint8Array): Promise<Uint8Array>;
|
|
846
|
+
private derivePrivateKeyForDescriptor;
|
|
847
|
+
private signTxWithKey;
|
|
848
|
+
private signMessageWithKey;
|
|
849
|
+
}
|
|
697
850
|
/**
|
|
698
|
-
*
|
|
851
|
+
* Mnemonic-based identity derived from a BIP39 phrase; recommended where users manage their own
|
|
852
|
+
* backup phrase. Extends @see SeedIdentity with mnemonic validation and an optional passphrase.
|
|
699
853
|
*
|
|
700
854
|
* @example
|
|
701
855
|
* ```typescript
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
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);
|
|
856
|
+
* const identity = MnemonicIdentity.fromMnemonic(
|
|
857
|
+
* 'abandon abandon abandon ...',
|
|
858
|
+
* { isMainnet: true, passphrase: 'secret' }
|
|
859
|
+
* );
|
|
713
860
|
* ```
|
|
714
861
|
*/
|
|
715
|
-
declare class
|
|
716
|
-
private key;
|
|
862
|
+
declare class MnemonicIdentity extends SeedIdentity {
|
|
717
863
|
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
864
|
/**
|
|
725
|
-
*
|
|
865
|
+
* Creates a MnemonicIdentity from a BIP39 phrase: `{ isMainnet }` for default BIP86
|
|
866
|
+
* derivation, or `{ descriptor }` for a template ending in `/*)`, plus optional passphrase.
|
|
726
867
|
*
|
|
727
|
-
* @
|
|
868
|
+
* @param phrase - BIP39 mnemonic phrase (12 or 24 words)
|
|
728
869
|
*/
|
|
729
|
-
|
|
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>;
|
|
870
|
+
static fromMnemonic(phrase: string, opts?: MnemonicOptions): MnemonicIdentity;
|
|
735
871
|
/**
|
|
736
|
-
*
|
|
737
|
-
*
|
|
872
|
+
* Creates a passkey and derives an identity from its PRF secret. The words are the backup: the
|
|
873
|
+
* passkey re-derives them on any device it syncs to, so whoever controls that passkey (and its
|
|
874
|
+
* sync account) can sign. The derivation follows Breez's seedless-restore implementation, so
|
|
875
|
+
* with the default 12 words the same passkey and label give the same words as a Breez wallet.
|
|
738
876
|
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
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.
|
|
877
|
+
* Each call makes a new passkey with its own words: offer {@link fromPasskey} first, and store
|
|
878
|
+
* `credentialId`. The browser's picker shows only `userName`, so make it tell wallets apart.
|
|
879
|
+
* Reusing an existing passkey's `userId` replaces that passkey, and its words, on most
|
|
880
|
+
* authenticators.
|
|
753
881
|
*
|
|
754
|
-
* @param publicKey - 33-byte compressed public key (02/03 prefix + 32-byte x coordinate)
|
|
755
|
-
* @returns A new ReadonlySingleKey instance
|
|
756
882
|
* @example
|
|
757
883
|
* ```typescript
|
|
758
|
-
* const
|
|
759
|
-
*
|
|
884
|
+
* const { identity, mnemonic, credentialId } = await MnemonicIdentity.createPasskey({
|
|
885
|
+
* rp: { id: location.hostname, name: "My wallet" },
|
|
886
|
+
* userName: "alice",
|
|
887
|
+
* });
|
|
760
888
|
* ```
|
|
761
889
|
*/
|
|
762
|
-
static
|
|
890
|
+
static createPasskey(o: {
|
|
891
|
+
rp: {
|
|
892
|
+
id: string;
|
|
893
|
+
name: string;
|
|
894
|
+
};
|
|
895
|
+
userName: string;
|
|
896
|
+
userId?: Uint8Array;
|
|
897
|
+
} & PasskeySource & MnemonicOptions): Promise<PasskeyMnemonic>;
|
|
898
|
+
/**
|
|
899
|
+
* Re-derives the identity of a passkey made by {@link createPasskey}. Without `credentialIds`
|
|
900
|
+
* the browser offers every passkey for `rpId`, and the one picked decides the wallet: another
|
|
901
|
+
* passkey gives other words, not an error. Pass the stored `credentialId` where there is one;
|
|
902
|
+
* the returned `credentialId` says which passkey was used.
|
|
903
|
+
*/
|
|
904
|
+
static fromPasskey(o: {
|
|
905
|
+
rpId: string;
|
|
906
|
+
credentialIds?: Uint8Array[];
|
|
907
|
+
} & PasskeySource & MnemonicOptions): Promise<PasskeyMnemonic>;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Watch-only HD identity from a wildcard descriptor template (e.g.
|
|
911
|
+
* `tr([fp/86'/0'/0']xpub.../0/*)`): derives public keys and rotates HD indices, cannot sign.
|
|
912
|
+
*
|
|
913
|
+
* @example
|
|
914
|
+
* ```typescript
|
|
915
|
+
* const ro = ReadonlyDescriptorIdentity.fromDescriptor(
|
|
916
|
+
* "tr([fp/86'/0'/0']xpub.../0/*)"
|
|
917
|
+
* );
|
|
918
|
+
* ro.descriptor;
|
|
919
|
+
* // => "tr([fp/86'/0'/0']xpub.../0/*)" — the template
|
|
920
|
+
* ```
|
|
921
|
+
*/
|
|
922
|
+
declare class ReadonlyDescriptorIdentity implements ReadonlyHDCapableIdentity {
|
|
923
|
+
/**
|
|
924
|
+
* Index-0 expansion of {@link descriptor}; the x-only pubkey (32 bytes) and the compressed
|
|
925
|
+
* pubkey (via the bip32 node) are both read off it on demand.
|
|
926
|
+
*/
|
|
927
|
+
private readonly indexZero;
|
|
928
|
+
/** Wildcard account-descriptor template (e.g. `tr([fp/86'/0'/0']xpub/0/*)`). */
|
|
929
|
+
readonly descriptor: string;
|
|
930
|
+
private constructor();
|
|
931
|
+
/** @param descriptor - Wildcard-suffixed Taproot template (`tr([fp/path']xpub.../child/*)`). */
|
|
932
|
+
static fromDescriptor(descriptor: string): ReadonlyDescriptorIdentity;
|
|
763
933
|
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
764
934
|
compressedPublicKey(): Promise<Uint8Array>;
|
|
935
|
+
/** Returns true when `descriptor` derives from this identity's xpub. */
|
|
936
|
+
ownsDescriptor(descriptor: string): boolean;
|
|
765
937
|
}
|
|
766
938
|
|
|
767
939
|
/**
|
|
@@ -923,29 +1095,6 @@ declare function isDeterministicSigner(value: unknown): value is DeterministicSi
|
|
|
923
1095
|
*/
|
|
924
1096
|
declare function adoptContractDescriptor(wallet: IWallet, descriptor: string): Promise<void>;
|
|
925
1097
|
|
|
926
|
-
/**
|
|
927
|
-
* Thrown when a descriptor-capable contract (default, delegate, or boarding)
|
|
928
|
-
* cannot be routed to any signer: its owner key (`params.pubKey`) is not this
|
|
929
|
-
* wallet's baseline signing key, and the record carries no
|
|
930
|
-
* `metadata.signingDescriptor` to send it to a descriptor-aware signer.
|
|
931
|
-
*
|
|
932
|
-
* Note that this can arise also when a contract belongs to a different identity (storage reuse).
|
|
933
|
-
*/
|
|
934
|
-
declare class MissingSigningDescriptorError extends Error {
|
|
935
|
-
readonly contractScript: string;
|
|
936
|
-
readonly contractType: "default" | "delegate" | "boarding";
|
|
937
|
-
readonly name = "MissingSigningDescriptorError";
|
|
938
|
-
constructor(contractScript: string, contractType: "default" | "delegate" | "boarding");
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* Thrown when an input needs descriptor-aware signing but no
|
|
942
|
-
* DescriptorProvider was wired into the wallet.
|
|
943
|
-
*/
|
|
944
|
-
declare class DescriptorSigningProviderMissingError extends Error {
|
|
945
|
-
readonly name = "DescriptorSigningProviderMissingError";
|
|
946
|
-
constructor();
|
|
947
|
-
}
|
|
948
|
-
|
|
949
1098
|
type RequestEnvelope = {
|
|
950
1099
|
tag: string;
|
|
951
1100
|
id: string;
|
|
@@ -968,7 +1117,7 @@ type ResponseEnvelope = {
|
|
|
968
1117
|
broadcast?: boolean;
|
|
969
1118
|
};
|
|
970
1119
|
type MessageBusServices = {
|
|
971
|
-
arkProvider:
|
|
1120
|
+
arkProvider: OperatorProvider;
|
|
972
1121
|
wallet?: Wallet;
|
|
973
1122
|
readonlyWallet: ReadonlyWallet;
|
|
974
1123
|
};
|
|
@@ -1230,7 +1379,9 @@ declare function assembleBtcdTaprootTree(scripts: Bytes[]): TaprootTreeNode;
|
|
|
1230
1379
|
declare enum AssetInputType {
|
|
1231
1380
|
Unspecified = 0,
|
|
1232
1381
|
Local = 1,
|
|
1233
|
-
|
|
1382
|
+
/** @deprecated Use {@link AssetInputType.Proof}. */
|
|
1383
|
+
Intent = 2,
|
|
1384
|
+
Proof = 2
|
|
1234
1385
|
}
|
|
1235
1386
|
declare enum AssetRefType {
|
|
1236
1387
|
Unspecified = 0,
|
|
@@ -1401,17 +1552,17 @@ type AssetInputLocal = {
|
|
|
1401
1552
|
vin: number;
|
|
1402
1553
|
amount: bigint;
|
|
1403
1554
|
};
|
|
1404
|
-
type
|
|
1405
|
-
type: AssetInputType.
|
|
1555
|
+
type AssetInputProof = Pick<AssetInputLocal, "vin" | "amount"> & {
|
|
1556
|
+
type: AssetInputType.Proof;
|
|
1406
1557
|
txid: Uint8Array;
|
|
1407
1558
|
};
|
|
1408
1559
|
/**
|
|
1409
1560
|
* AssetInput represents an input of an asset group.
|
|
1410
1561
|
* a local input references a real transaction input and specify the amount in satoshis.
|
|
1411
|
-
*
|
|
1562
|
+
* a proof input references an external proof transaction. It is created by the operator to handle batch leaf transaction.
|
|
1412
1563
|
*/
|
|
1413
1564
|
declare class AssetInput {
|
|
1414
|
-
readonly input: AssetInputLocal |
|
|
1565
|
+
readonly input: AssetInputLocal | AssetInputProof;
|
|
1415
1566
|
private constructor();
|
|
1416
1567
|
/** Gets the transaction input index for an asset input, e.g. 0 */
|
|
1417
1568
|
get vin(): number;
|
|
@@ -1419,8 +1570,10 @@ declare class AssetInput {
|
|
|
1419
1570
|
get amount(): bigint;
|
|
1420
1571
|
/** Create a local asset input that points at a transaction input index. */
|
|
1421
1572
|
static create(vin: number, amount: bigint | number): AssetInput;
|
|
1422
|
-
/** Create
|
|
1423
|
-
static
|
|
1573
|
+
/** Create a proof-backed asset input referencing an external proof transaction. */
|
|
1574
|
+
static createProof(txid: string, vin: number, amount: bigint | number): AssetInput;
|
|
1575
|
+
/** @deprecated Use {@link createProof}. */
|
|
1576
|
+
static createIntent: typeof AssetInput.createProof;
|
|
1424
1577
|
/** Decode an asset input from its hex string form. */
|
|
1425
1578
|
static fromString(s: string): AssetInput;
|
|
1426
1579
|
/** Decode an asset input from its serialized bytes. */
|
|
@@ -1630,7 +1783,7 @@ declare class AssetGroup {
|
|
|
1630
1783
|
*
|
|
1631
1784
|
* @returns `true` when the group has an asset id and outputs exceed local inputs
|
|
1632
1785
|
* @remarks
|
|
1633
|
-
* Only local inputs contribute to the comparison;
|
|
1786
|
+
* Only local inputs contribute to the comparison; proof-backed inputs contribute `0` here.
|
|
1634
1787
|
*/
|
|
1635
1788
|
isReissuance(): boolean;
|
|
1636
1789
|
/**
|
|
@@ -1647,13 +1800,13 @@ declare class AssetGroup {
|
|
|
1647
1800
|
*/
|
|
1648
1801
|
validate(): void;
|
|
1649
1802
|
/**
|
|
1650
|
-
* Convert the group into its batch-leaf representation for the given
|
|
1803
|
+
* Convert the group into its batch-leaf representation for the given proof txid.
|
|
1651
1804
|
*
|
|
1652
|
-
* @param
|
|
1805
|
+
* @param proofTxid - Proof transaction id used to build the leaf input reference
|
|
1653
1806
|
* @returns Batch-leaf asset group
|
|
1654
|
-
* @see AssetInput.
|
|
1807
|
+
* @see AssetInput.createProof
|
|
1655
1808
|
*/
|
|
1656
|
-
toBatchLeafAssetGroup(
|
|
1809
|
+
toBatchLeafAssetGroup(proofTxid: Uint8Array): AssetGroup;
|
|
1657
1810
|
/**
|
|
1658
1811
|
* Encode the asset group to a hex string.
|
|
1659
1812
|
*
|
|
@@ -1722,8 +1875,8 @@ declare class Packet implements ExtensionPacket {
|
|
|
1722
1875
|
* type returns the TLV packet type tag. Implements ExtensionPacket interface.
|
|
1723
1876
|
*/
|
|
1724
1877
|
type(): number;
|
|
1725
|
-
/** Convert the packet into the batch-leaf form for a specific
|
|
1726
|
-
leafTxPacket(
|
|
1878
|
+
/** Convert the packet into the batch-leaf form for a specific proof transaction id. */
|
|
1879
|
+
leafTxPacket(proofTxid: Uint8Array): Packet;
|
|
1727
1880
|
/**
|
|
1728
1881
|
* serialize encodes the packet as raw bytes (varint group count + group data).
|
|
1729
1882
|
* Does NOT include OP_RETURN, Arkade magic bytes (`ARK`), or TLV type/length; those are
|
|
@@ -1946,6 +2099,9 @@ declare class Ramps {
|
|
|
1946
2099
|
* fee on that output rather than on a grossed-up figure. {@link offboard} keeps
|
|
1947
2100
|
* the other anchor, which needs `g - fee(g) = amount` solved — impossible for
|
|
1948
2101
|
* a program charging the whole output.
|
|
2102
|
+
*
|
|
2103
|
+
* Returns the onchain txid instead when onchain coins alone cover `amount`
|
|
2104
|
+
* and were spent via arkd cosigning.
|
|
1949
2105
|
*/
|
|
1950
2106
|
offboardExact(params: {
|
|
1951
2107
|
destinationAddress: string;
|
|
@@ -1955,6 +2111,7 @@ declare class Ramps {
|
|
|
1955
2111
|
eventCallback?: (event: SettlementEvent) => void;
|
|
1956
2112
|
vtxos?: NormalizedExtendedVirtualCoin[];
|
|
1957
2113
|
}): ReturnType<IWallet["settle"]>;
|
|
2114
|
+
private tryCosign;
|
|
1958
2115
|
private offboardInputs;
|
|
1959
2116
|
/** Every candidate, or with `concurrentSpending` the shortest covering prefix in send order. */
|
|
1960
2117
|
private fundExit;
|
|
@@ -2086,12 +2243,12 @@ type ResponseGetBoardingAddress = ResponseEnvelope & {
|
|
|
2086
2243
|
address: string;
|
|
2087
2244
|
};
|
|
2088
2245
|
};
|
|
2089
|
-
type
|
|
2090
|
-
type: "GET_ARKADE_INFO";
|
|
2091
|
-
payload?:
|
|
2246
|
+
type RequestGetOperatorInfo = RequestEnvelope & {
|
|
2247
|
+
type: "GET_OPERATOR_INFO" | "GET_ARKADE_INFO";
|
|
2248
|
+
payload?: GetOperatorInfoOptions;
|
|
2092
2249
|
};
|
|
2093
|
-
type
|
|
2094
|
-
type: "
|
|
2250
|
+
type ResponseGetOperatorInfo = ResponseEnvelope & {
|
|
2251
|
+
type: "OPERATOR_INFO";
|
|
2095
2252
|
payload: {
|
|
2096
2253
|
info: ArkadeInfo;
|
|
2097
2254
|
};
|
|
@@ -2715,6 +2872,29 @@ type ResponseSweepExpiredBoardingUtxos = ResponseEnvelope & {
|
|
|
2715
2872
|
txid: string;
|
|
2716
2873
|
};
|
|
2717
2874
|
};
|
|
2875
|
+
type RequestCosignOnchainTx = RequestEnvelope & {
|
|
2876
|
+
type: "COSIGN_ONCHAIN_TX";
|
|
2877
|
+
/** Base64 PSBT. */
|
|
2878
|
+
payload: {
|
|
2879
|
+
psbt: string;
|
|
2880
|
+
};
|
|
2881
|
+
};
|
|
2882
|
+
type ResponseCosignOnchainTx = ResponseEnvelope & {
|
|
2883
|
+
type: "COSIGN_ONCHAIN_TX_SUCCESS";
|
|
2884
|
+
payload: {
|
|
2885
|
+
txid: string;
|
|
2886
|
+
};
|
|
2887
|
+
};
|
|
2888
|
+
type RequestSendOnchain = RequestEnvelope & {
|
|
2889
|
+
type: "SEND_ONCHAIN";
|
|
2890
|
+
payload: SendOnchainParams;
|
|
2891
|
+
};
|
|
2892
|
+
type ResponseSendOnchain = ResponseEnvelope & {
|
|
2893
|
+
type: "SEND_ONCHAIN_SUCCESS";
|
|
2894
|
+
payload: {
|
|
2895
|
+
txid: string;
|
|
2896
|
+
};
|
|
2897
|
+
};
|
|
2718
2898
|
type WireMigrationVtxoRef = {
|
|
2719
2899
|
txid: string;
|
|
2720
2900
|
vout: number;
|
|
@@ -2780,8 +2960,8 @@ type RequestRestoreWallet = RequestEnvelope & {
|
|
|
2780
2960
|
type ResponseRestoreWallet = ResponseEnvelope & {
|
|
2781
2961
|
type: "RESTORE_WALLET_SUCCESS";
|
|
2782
2962
|
};
|
|
2783
|
-
type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestGetAddress | RequestGetBoardingAddress |
|
|
2784
|
-
type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseGetAddress | ResponseGetBoardingAddress |
|
|
2963
|
+
type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestGetAddress | RequestGetBoardingAddress | RequestGetOperatorInfo | 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 | RequestCosignOnchainTx | RequestSendOnchain | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
|
|
2964
|
+
type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetOperatorInfo | 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 | ResponseCosignOnchainTx | ResponseSendOnchain | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
|
|
2785
2965
|
declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
|
|
2786
2966
|
readonly messageTag: string;
|
|
2787
2967
|
private wallet;
|
|
@@ -2857,11 +3037,7 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2857
3037
|
/** History rows plus the address they are stored under. Does not write. */
|
|
2858
3038
|
private loadHistoryCache;
|
|
2859
3039
|
private storeHistoryCache;
|
|
2860
|
-
/**
|
|
2861
|
-
* @param gen - set by a background caller; each write here is skipped once it goes stale.
|
|
2862
|
-
* The fetch saves the fetched rows itself, before control returns, so that one write is
|
|
2863
|
-
* outside this check.
|
|
2864
|
-
*/
|
|
3040
|
+
/** @param gen - set by a background caller; the refresh is skipped once it goes stale. */
|
|
2865
3041
|
private refreshBoardingCache;
|
|
2866
3042
|
/**
|
|
2867
3043
|
* Force a full VTXO refresh from the indexer, then refresh cached data.
|
|
@@ -2882,7 +3058,7 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2882
3058
|
* Read all virtual outputs from the repository, aggregated across all contract
|
|
2883
3059
|
* addresses and the wallet's primary address, with deduplication.
|
|
2884
3060
|
*
|
|
2885
|
-
* Recovery-only contracts (imported by `claimCash` for
|
|
3061
|
+
* Recovery-only contracts (imported by `claimCash` for operator-swept
|
|
2886
3062
|
* arkcash) are excluded by default, mirroring {@link ReadonlyWallet.getVtxos}:
|
|
2887
3063
|
* they are settled in their own isolated intent and must stay out of the
|
|
2888
3064
|
* wallet's balance / VTXO / coin-selection / pending-tx views that read this.
|
|
@@ -2962,7 +3138,7 @@ interface ServiceWorkerWalletOptions {
|
|
|
2962
3138
|
lazyInitialization?: boolean;
|
|
2963
3139
|
/** Defer boarding and history loading; render boarding.loaded=false as unknown. */
|
|
2964
3140
|
lazyBoarding?: boolean;
|
|
2965
|
-
/**
|
|
3141
|
+
/** The operator's endpoint and optional public key. */
|
|
2966
3142
|
arkServer?: {
|
|
2967
3143
|
url: string;
|
|
2968
3144
|
publicKey?: string;
|
|
@@ -3130,12 +3306,14 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
|
|
|
3130
3306
|
getBoardingAddress(): Promise<string>;
|
|
3131
3307
|
/**
|
|
3132
3308
|
* Delegated to the worker, which holds the wallet that owns the connection.
|
|
3133
|
-
* The payload crosses raw — see {@link
|
|
3309
|
+
* The payload crosses raw — see {@link ResponseGetOperatorInfo} for why.
|
|
3134
3310
|
*/
|
|
3135
|
-
|
|
3311
|
+
getOperatorInfo(opts?: GetOperatorInfoOptions): Promise<ArkadeInfo>;
|
|
3312
|
+
/** @deprecated Use {@link getOperatorInfo}. */
|
|
3313
|
+
getArkadeInfo(opts?: GetOperatorInfoOptions): Promise<ArkadeInfo>;
|
|
3136
3314
|
/**
|
|
3137
3315
|
* An {@link ArkadeReader} that speaks to the worker rather than to the
|
|
3138
|
-
*
|
|
3316
|
+
* operator. The page holds no provider, so a caller that built its own from a
|
|
3139
3317
|
* URL would open a second connection outside the worker's rate gate and
|
|
3140
3318
|
* caches — this proxy is what keeps chain reads in one place.
|
|
3141
3319
|
*/
|
|
@@ -3274,6 +3452,8 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
|
|
|
3274
3452
|
}): Promise<void>;
|
|
3275
3453
|
private _restoreWorkerWallet;
|
|
3276
3454
|
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
3455
|
+
cosignOnchainTx(psbt: string | Transaction$1): Promise<string>;
|
|
3456
|
+
sendOnchain(params: SendOnchainParams): Promise<string>;
|
|
3277
3457
|
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
3278
3458
|
getVtxoManager(): Promise<IVtxoManager>;
|
|
3279
3459
|
}
|
|
@@ -3693,6 +3873,12 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3693
3873
|
}>;
|
|
3694
3874
|
private resolveOutspends;
|
|
3695
3875
|
getTransactions(address: string): Promise<ExplorerTransaction[]>;
|
|
3876
|
+
/**
|
|
3877
|
+
* Timestamps of the blocks at the given heights (unconfirmed, `<= 0`, are skipped), one header
|
|
3878
|
+
* fetch per distinct height. A height whose header cannot be fetched, typically an indexer
|
|
3879
|
+
* lagging a fresh block, is absent from the map: callers see no block time, not a failure.
|
|
3880
|
+
*/
|
|
3881
|
+
private fetchBlockTimes;
|
|
3696
3882
|
/**
|
|
3697
3883
|
* Resolve a list of `{tx_hash, height}` entries (as returned by the
|
|
3698
3884
|
* scripthash history endpoint) into ExplorerTransaction shape **without
|
|
@@ -3731,6 +3917,7 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3731
3917
|
time: number;
|
|
3732
3918
|
hash: string;
|
|
3733
3919
|
}>;
|
|
3920
|
+
getMedianTimePast(height: number): Promise<number>;
|
|
3734
3921
|
/**
|
|
3735
3922
|
* Consensus's `GetMedianTimePast`, ending at and including `height`.
|
|
3736
3923
|
*
|
|
@@ -3748,12 +3935,12 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3748
3935
|
}
|
|
3749
3936
|
|
|
3750
3937
|
/**
|
|
3751
|
-
* Decorates an {@link
|
|
3938
|
+
* Decorates an {@link OperatorProvider}, caching {@link OperatorProvider.getInfo} for
|
|
3752
3939
|
* `ttlMs` (default 60s). Other provider methods pass through.
|
|
3753
3940
|
* Expired-cache refresh failures propagate; persisted wallet boot fallback
|
|
3754
3941
|
* lives in `arkInfoSnapshot`.
|
|
3755
3942
|
*/
|
|
3756
|
-
declare class
|
|
3943
|
+
declare class CachingOperatorProvider implements OperatorProvider {
|
|
3757
3944
|
private readonly inner;
|
|
3758
3945
|
private readonly ttlMs;
|
|
3759
3946
|
private cached?;
|
|
@@ -3762,7 +3949,8 @@ declare class CachingArkProvider implements ArkProvider {
|
|
|
3762
3949
|
/** Bumped on every event-driven cache write; see {@link getInfo}. */
|
|
3763
3950
|
private generation;
|
|
3764
3951
|
private readonly unsubscribe;
|
|
3765
|
-
|
|
3952
|
+
readonly cosignOnchainTx?: (psbtB64: string) => Promise<string>;
|
|
3953
|
+
constructor(inner: OperatorProvider, ttlMs?: number);
|
|
3766
3954
|
/** Releases the inner provider's server-info subscription. */
|
|
3767
3955
|
dispose(): void;
|
|
3768
3956
|
get serverUrl(): string | undefined;
|
|
@@ -3781,9 +3969,13 @@ declare class CachingArkProvider implements ArkProvider {
|
|
|
3781
3969
|
submitSignedForfeitTxs(signedForfeitTxs: string[], signedCommitmentTx?: string): Promise<void>;
|
|
3782
3970
|
getEventStream(signal: AbortSignal, topics: string[]): AsyncIterableIterator<SettlementEvent>;
|
|
3783
3971
|
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<TxNotificationEvent>;
|
|
3784
|
-
getPendingTxs(intent:
|
|
3972
|
+
getPendingTxs(intent: SignedProof<Proof.GetPendingTxMessage>): Promise<PendingTx[]>;
|
|
3785
3973
|
onServerInfoChanged(listener: (info: ArkadeInfo) => void): () => void;
|
|
3786
3974
|
}
|
|
3975
|
+
/** @deprecated Use {@link CachingOperatorProvider}. */
|
|
3976
|
+
declare const CachingArkProvider: typeof CachingOperatorProvider;
|
|
3977
|
+
/** @deprecated Use {@link CachingOperatorProvider}. */
|
|
3978
|
+
type CachingArkProvider = CachingOperatorProvider;
|
|
3787
3979
|
|
|
3788
3980
|
type ArkTxInput = {
|
|
3789
3981
|
tapLeafScript: TapLeafScript;
|
|
@@ -3797,7 +3989,7 @@ type OffchainTx = {
|
|
|
3797
3989
|
*
|
|
3798
3990
|
* Creates one checkpoint transaction per input and a virtual transaction that
|
|
3799
3991
|
* combines all the checkpoints, sending to the specified outputs. This is the
|
|
3800
|
-
* core function for creating
|
|
3992
|
+
* core function for creating virtual transactions.
|
|
3801
3993
|
*
|
|
3802
3994
|
* @param inputs - Array of virtual transaction inputs
|
|
3803
3995
|
* @param outputs - Array of transaction outputs
|
|
@@ -3805,7 +3997,7 @@ type OffchainTx = {
|
|
|
3805
3997
|
* @returns Object containing the virtual transaction and checkpoint transactions
|
|
3806
3998
|
*/
|
|
3807
3999
|
declare function buildOffchainTx(inputs: ArkTxInput[], outputs: TransactionOutput[], serverUnrollScript: CSVMultisigTapscript.Type): OffchainTx;
|
|
3808
|
-
declare function hasBoardingTxExpired(coin: ExtendedCoin, boardingTimelock: RelativeTimelock, chainTipHeight?: number): boolean;
|
|
4000
|
+
declare function hasBoardingTxExpired(coin: ExtendedCoin, boardingTimelock: RelativeTimelock, chainTipHeight?: number, chainTipMedianTime?: number, confirmationParentMedianTime?: number): boolean;
|
|
3809
4001
|
/**
|
|
3810
4002
|
* Verify tapscript signatures on a transaction input
|
|
3811
4003
|
* @param tx Transaction to verify
|
|
@@ -3840,8 +4032,8 @@ declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transac
|
|
|
3840
4032
|
*/
|
|
3841
4033
|
declare function isValidArkAddress(address: string): boolean;
|
|
3842
4034
|
/**
|
|
3843
|
-
* Minimal
|
|
3844
|
-
* transaction. Both {@link
|
|
4035
|
+
* Minimal operator provider surface required to submit and finalize an offchain
|
|
4036
|
+
* transaction. Both {@link OperatorProvider} implementations satisfy it
|
|
3845
4037
|
* structurally, so declaring it here keeps this module free of a provider
|
|
3846
4038
|
* import (and of the dependency cycle that would create).
|
|
3847
4039
|
*/
|
|
@@ -3915,7 +4107,7 @@ interface VerifyServerSignatures {
|
|
|
3915
4107
|
* is controlled by a single key — the "thin signer" path.
|
|
3916
4108
|
*
|
|
3917
4109
|
* Needs no wallet, repository, or contract state: just an identity that can
|
|
3918
|
-
* sign, an
|
|
4110
|
+
* sign, an operator provider, the inputs (already carrying their spend leaf and tap
|
|
3919
4111
|
* tree), the outputs, and the server unroll script. Used by the ArkadeCash sweep
|
|
3920
4112
|
* to move bearer coins to the receiver's address without spinning up a full
|
|
3921
4113
|
* background-managed wallet on shared repositories.
|
|
@@ -4028,7 +4220,7 @@ declare const VtxoTaprootTree: ArkPsbtFieldCoder<Uint8Array>;
|
|
|
4028
4220
|
declare const ConditionWitness: ArkPsbtFieldCoder<Uint8Array[]>;
|
|
4029
4221
|
/**
|
|
4030
4222
|
* PrevArkTxField carries the serialized raw bitcoin tx of the previous Ark tx
|
|
4031
|
-
* spent by an input. Used by OP_INSPECTINPUTSCRIPTPUBKEY on
|
|
4223
|
+
* spent by an input. Used by OP_INSPECTINPUTSCRIPTPUBKEY on proofs and
|
|
4032
4224
|
* other contexts where the prevout pkScript must be looked up off-chain.
|
|
4033
4225
|
*
|
|
4034
4226
|
* Key: [0xde] || "prevarktx". Value: serialized wire.MsgTx (NOT a PSBT).
|
|
@@ -4072,7 +4264,7 @@ declare const VtxoTreeExpiry: ArkPsbtFieldCoder<{
|
|
|
4072
4264
|
* Supports P2TR (Taproot) signing and verification, P2WPKH verification,
|
|
4073
4265
|
* and legacy P2PKH verification (Bitcoin Core signmessage format).
|
|
4074
4266
|
*
|
|
4075
|
-
* Reuses the same toSpend/toSign transaction construction as
|
|
4267
|
+
* Reuses the same toSpend/toSign transaction construction as Proofs,
|
|
4076
4268
|
* but with the standard BIP-322 tagged hash ("BIP0322-signed-message")
|
|
4077
4269
|
* instead of the Arkade-specific tag.
|
|
4078
4270
|
*
|
|
@@ -4154,7 +4346,7 @@ declare class ArkNote implements ExtendedCoin {
|
|
|
4154
4346
|
readonly txid: string;
|
|
4155
4347
|
readonly vout = 0;
|
|
4156
4348
|
readonly forfeitTapLeafScript: TapLeafScript;
|
|
4157
|
-
readonly
|
|
4349
|
+
readonly proofTapLeafScript: TapLeafScript;
|
|
4158
4350
|
readonly tapTree: Bytes;
|
|
4159
4351
|
readonly status: Status;
|
|
4160
4352
|
readonly extraWitness?: Bytes[] | undefined;
|
|
@@ -4166,6 +4358,8 @@ declare class ArkNote implements ExtendedCoin {
|
|
|
4166
4358
|
* @param HRP - Optional human-readable prefix for string encoding
|
|
4167
4359
|
*/
|
|
4168
4360
|
constructor(preimage: Uint8Array, value: number, HRP?: string);
|
|
4361
|
+
/** @deprecated Use {@link proofTapLeafScript}. */
|
|
4362
|
+
get intentTapLeafScript(): TapLeafScript;
|
|
4169
4363
|
/**
|
|
4170
4364
|
* Encode the note as raw bytes.
|
|
4171
4365
|
*
|
|
@@ -4264,7 +4458,13 @@ type ArkadeExtendedVirtualCoin = ExtendedVirtualCoin & {
|
|
|
4264
4458
|
* silently treat as boarding and settle without a forfeit.
|
|
4265
4459
|
*/
|
|
4266
4460
|
type ArkadeBatchInput = ArkadeExtendedCoin | ArkadeExtendedVirtualCoin;
|
|
4267
|
-
declare function createArkadeBatchHandler(intentId: string, inputs: ArkadeBatchInput[],
|
|
4461
|
+
declare function createArkadeBatchHandler(intentId: string, inputs: ArkadeBatchInput[],
|
|
4462
|
+
/**
|
|
4463
|
+
* Signs forfeits and boarding inputs. `undefined` only when every input's forfeit leaf names
|
|
4464
|
+
* just the server and the emulator, which co-signs at finalization: a leaf that also needs a
|
|
4465
|
+
* user key would reach arkd unsigned and fail the batch.
|
|
4466
|
+
*/
|
|
4467
|
+
signer: Identity | undefined, signedProof: string, message: Proof.RegisterMessage, session: SignerSession, arkProvider: OperatorProvider, emulator: EmulatorProvider, network: Network,
|
|
4268
4468
|
/**
|
|
4269
4469
|
* Expected recipients of the settlement, validated against the virtual
|
|
4270
4470
|
* output tree before co-signing it, and — when tree signing did not run —
|
|
@@ -4783,7 +4983,7 @@ declare const UnilateralExit: {
|
|
|
4783
4983
|
*
|
|
4784
4984
|
* Retryable:
|
|
4785
4985
|
* - {@link ProviderUnavailableError} — already-classified 5xx/429/unavailable
|
|
4786
|
-
* (see e.g. {@link https |
|
|
4986
|
+
* (see e.g. {@link https | RestOperatorProvider.getInfo}'s non-2xx branch);
|
|
4787
4987
|
* - {@link FetchError} — transport-level `fetch` rejection (DNS failure,
|
|
4788
4988
|
* connection refused, TLS/CORS), which also carries undici timeouts as its
|
|
4789
4989
|
* `cause`;
|
|
@@ -5349,51 +5549,6 @@ declare namespace bignum {
|
|
|
5349
5549
|
export { bignum_BIGNUM_MAX_BYTES as BIGNUM_MAX_BYTES, bignum_decode as decode, bignum_encode as encode };
|
|
5350
5550
|
}
|
|
5351
5551
|
|
|
5352
|
-
/**
|
|
5353
|
-
* Read the JSON `arkadec` writes into a {@link Program}: `$param` placeholders,
|
|
5354
|
-
* @scure opcode names, and one structured tapleaf per compiler leaf.
|
|
5355
|
-
*/
|
|
5356
|
-
|
|
5357
|
-
interface ArtifactParameter {
|
|
5358
|
-
name: string;
|
|
5359
|
-
type: string;
|
|
5360
|
-
}
|
|
5361
|
-
interface ArtifactStruct {
|
|
5362
|
-
name: string;
|
|
5363
|
-
fields: ArtifactParameter[];
|
|
5364
|
-
}
|
|
5365
|
-
interface ArtifactWitnessElement {
|
|
5366
|
-
name: string;
|
|
5367
|
-
type: string;
|
|
5368
|
-
encoding?: string;
|
|
5369
|
-
injected?: boolean;
|
|
5370
|
-
}
|
|
5371
|
-
interface ArtifactLeaf {
|
|
5372
|
-
name: string;
|
|
5373
|
-
witness?: ArtifactWitnessElement[];
|
|
5374
|
-
asm: string[];
|
|
5375
|
-
}
|
|
5376
|
-
interface ArtifactCovenant {
|
|
5377
|
-
inputs: ArtifactParameter[];
|
|
5378
|
-
asm: string[];
|
|
5379
|
-
}
|
|
5380
|
-
interface ArtifactGroup {
|
|
5381
|
-
name: string;
|
|
5382
|
-
arkade?: ArtifactCovenant;
|
|
5383
|
-
leaves: ArtifactLeaf[];
|
|
5384
|
-
}
|
|
5385
|
-
interface ContractArtifact {
|
|
5386
|
-
formatVersion?: number;
|
|
5387
|
-
contractName: string;
|
|
5388
|
-
constructorInputs: ArtifactParameter[];
|
|
5389
|
-
structs?: ArtifactStruct[];
|
|
5390
|
-
functions: ArtifactGroup[];
|
|
5391
|
-
}
|
|
5392
|
-
/** `true` when `value` is an arkadec artifact rather than a Program. */
|
|
5393
|
-
declare function isContractArtifact(value: unknown): value is ContractArtifact;
|
|
5394
|
-
/** Adds `server`, and one param per child-output placeholder for the caller to bind to that output key. */
|
|
5395
|
-
declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
5396
|
-
|
|
5397
5552
|
/**
|
|
5398
5553
|
* Arkade Contract — artifact-driven, high-level covenant API.
|
|
5399
5554
|
*
|
|
@@ -5437,7 +5592,7 @@ declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
|
5437
5592
|
* } satisfies Program;
|
|
5438
5593
|
*
|
|
5439
5594
|
* const arkade = await Arkade.connect({ arkade: ark, emulator, indexer, identity, network });
|
|
5440
|
-
* // `server` is declared in `params`, so it defaults to the client's
|
|
5595
|
+
* // `server` is declared in `params`, so it defaults to the client's operator key.
|
|
5441
5596
|
* const htlc = arkade.contract(htlcProgram, { hash, receiver, amount: 10_000n });
|
|
5442
5597
|
* // `preimage` is typed Uint8Array; calling `claim()` with no args is a type error.
|
|
5443
5598
|
* const { txid } = await htlc.functions.claim(preimage).to(receiver, 10_000n).send();
|
|
@@ -5446,16 +5601,24 @@ declare function programFromArtifact(artifact: ContractArtifact): Program;
|
|
|
5446
5601
|
* @module arkade/contract
|
|
5447
5602
|
*/
|
|
5448
5603
|
|
|
5604
|
+
/**
|
|
5605
|
+
* A scalar or whole struct/array value, flattened to dotted names (`owners.0.key`).
|
|
5606
|
+
* Struct fields are checked at runtime so interface types need no index signature.
|
|
5607
|
+
*/
|
|
5608
|
+
type ArkadeNestedValue = ArkadeArgValue | object;
|
|
5449
5609
|
/** The argument tuple of a function, derived from its declared `inputs`. */
|
|
5450
5610
|
type ArgsTuple<I extends readonly InputDef[]> = {
|
|
5451
5611
|
[K in keyof I]: ArkadeValueType[I[K]["type"]];
|
|
5452
5612
|
};
|
|
5453
|
-
/**
|
|
5613
|
+
/**
|
|
5614
|
+
* The call signature arguments for one function (nullary when `inputs` is absent). Dotted input
|
|
5615
|
+
* names group into one struct or array argument at runtime; dotted or widened names stay loose.
|
|
5616
|
+
*/
|
|
5454
5617
|
type FnArgs<F extends ArkadeFunction> = F extends {
|
|
5455
5618
|
inputs: infer I extends readonly InputDef[];
|
|
5456
|
-
} ? ArgsTuple<I> : [];
|
|
5619
|
+
} ? string extends I[number]["name"] ? ArkadeNestedValue[] : Extract<I[number]["name"], `${string}.${string}`> extends never ? ArgsTuple<I> : ArkadeNestedValue[] : [];
|
|
5457
5620
|
/** A contract's functions returning `R`: typed per function for a literal program, else loose. */
|
|
5458
|
-
type FunctionMap<P extends Program, R> = string extends keyof P["functions"] ? Record<string, (...args:
|
|
5621
|
+
type FunctionMap<P extends Program, R> = string extends keyof P["functions"] ? Record<string, (...args: ArkadeNestedValue[]) => R> : {
|
|
5459
5622
|
[K in keyof P["functions"]]: (...args: FnArgs<P["functions"][K]>) => R;
|
|
5460
5623
|
};
|
|
5461
5624
|
/**
|
|
@@ -5476,7 +5639,7 @@ interface Utxo {
|
|
|
5476
5639
|
*/
|
|
5477
5640
|
script?: string;
|
|
5478
5641
|
/**
|
|
5479
|
-
* Whether the
|
|
5642
|
+
* Whether the operator swept the coin's batch, as {@link ArkadeContract.getUtxos} reports it. A
|
|
5480
5643
|
* swept coin can't be spent offchain, so `.from()` refuses it; recover it into a batch instead.
|
|
5481
5644
|
*/
|
|
5482
5645
|
isSwept?: boolean;
|
|
@@ -5539,16 +5702,18 @@ interface ArkadeSpendResult {
|
|
|
5539
5702
|
signedCheckpointTxs: string[];
|
|
5540
5703
|
}
|
|
5541
5704
|
/** The callable spending paths of a contract. */
|
|
5542
|
-
type CallableFunctions = Record<string, (...args:
|
|
5705
|
+
type CallableFunctions = Record<string, (...args: ArkadeNestedValue[]) => ArkadeTransactionBuilder>;
|
|
5543
5706
|
/** What {@link Arkade} needs from the Arkade server; see {@link ArkadeConnectOptions.arkade}. */
|
|
5544
|
-
type ArkadeServerProvider = Pick<
|
|
5707
|
+
type ArkadeServerProvider = Pick<OperatorProvider, "getInfo"> & Partial<ArkadeBroadcaster & Pick<OperatorProvider, "cosignOnchainTx">>;
|
|
5545
5708
|
/** Fields shared by both forms of {@link ArkadeConnectOptions}. */
|
|
5546
5709
|
interface ArkadeConnectCommonOptions {
|
|
5710
|
+
/** Onchain provider for onchain spends; defaults to the service's when `service` is used. */
|
|
5711
|
+
onchain?: Pick<OnchainProvider, "getRawTransaction" | "broadcastTransaction">;
|
|
5547
5712
|
/** Signer for paths that require a user signature; optional for watch-only. */
|
|
5548
5713
|
identity?: Identity;
|
|
5549
5714
|
/**
|
|
5550
|
-
* Network for address derivation. Defaults to the network the
|
|
5551
|
-
* reports on `getInfo` — or the SDK default when the
|
|
5715
|
+
* Network for address derivation. Defaults to the network the operator
|
|
5716
|
+
* reports on `getInfo` — or the SDK default when the operator names none.
|
|
5552
5717
|
*/
|
|
5553
5718
|
network?: Network;
|
|
5554
5719
|
/**
|
|
@@ -5593,9 +5758,9 @@ interface ArkadeConnectServiceOptions extends ArkadeConnectCommonOptions {
|
|
|
5593
5758
|
/** The provider form: hand over providers you already hold (e.g. a wallet's). */
|
|
5594
5759
|
interface ArkadeConnectProviderOptions extends ArkadeConnectCommonOptions {
|
|
5595
5760
|
/**
|
|
5596
|
-
* The
|
|
5761
|
+
* The operator provider. Only `getInfo` is required (enough to derive, register and
|
|
5597
5762
|
* inspect contracts); without `submitTx`/`finalizeTx`, `.send()` throws. So a caller already
|
|
5598
|
-
* holding `wallet.
|
|
5763
|
+
* holding `wallet.getOperatorInfo()` can connect without a second `/v1/info` round-trip.
|
|
5599
5764
|
*/
|
|
5600
5765
|
arkade: ArkadeServerProvider;
|
|
5601
5766
|
/**
|
|
@@ -5632,11 +5797,12 @@ type EventHandle = {
|
|
|
5632
5797
|
callback: (event: ArkadeContractEvent) => void | Promise<void>;
|
|
5633
5798
|
};
|
|
5634
5799
|
/**
|
|
5635
|
-
* A connected Arkade client holding the providers and resolved network constants (
|
|
5800
|
+
* A connected Arkade client holding the providers and resolved network constants (operator key,
|
|
5636
5801
|
* co-signer key, checkpoint closure), so creating contracts is synchronous.
|
|
5637
5802
|
*/
|
|
5638
5803
|
declare class Arkade {
|
|
5639
5804
|
readonly arkProvider: ArkadeServerProvider;
|
|
5805
|
+
readonly onchain?: Pick<OnchainProvider, "getRawTransaction" | "broadcastTransaction">;
|
|
5640
5806
|
/** The co-signing service, or undefined for emulator-less (pure tapscript) usage. */
|
|
5641
5807
|
readonly emulator: EmulatorProvider | undefined;
|
|
5642
5808
|
readonly network: Network;
|
|
@@ -5667,7 +5833,7 @@ declare class Arkade {
|
|
|
5667
5833
|
private disposed;
|
|
5668
5834
|
private constructor();
|
|
5669
5835
|
/**
|
|
5670
|
-
* Connect and resolve the
|
|
5836
|
+
* Connect and resolve the operator key, checkpoint closure and (if present) the cosigner key.
|
|
5671
5837
|
*
|
|
5672
5838
|
* @example
|
|
5673
5839
|
* ```typescript
|
|
@@ -5695,9 +5861,10 @@ declare class Arkade {
|
|
|
5695
5861
|
* the program's literal type, so `functions` is strongly typed.
|
|
5696
5862
|
*
|
|
5697
5863
|
* Declared `server`/`user` params default to the client's keys. Compiler
|
|
5698
|
-
* artifacts reserve the
|
|
5864
|
+
* artifacts reserve the operator key and exit delay to the connected operator.
|
|
5865
|
+
* Struct and array params are passed whole by name (see {@link ArkadeNestedValue}).
|
|
5699
5866
|
*/
|
|
5700
|
-
contract<const P extends Program>(program: P, args?: Record<string,
|
|
5867
|
+
contract<const P extends Program>(program: P, args?: Record<string, ArkadeNestedValue>): ArkadeContract<P>;
|
|
5701
5868
|
/**
|
|
5702
5869
|
* Start a spend with no function of its own: each `.from(coins, contract.unlock.<name>(...))`
|
|
5703
5870
|
* names the function its coins are spent through.
|
|
@@ -5708,7 +5875,6 @@ declare class Arkade {
|
|
|
5708
5875
|
declare class ArkadeContract<P extends Program = Program> {
|
|
5709
5876
|
readonly client: Arkade;
|
|
5710
5877
|
readonly program: P;
|
|
5711
|
-
readonly args: Record<string, ArkadeParamValue>;
|
|
5712
5878
|
/** The compiled taproot tree of spending-path leaves. */
|
|
5713
5879
|
readonly vtxoScript: ArkadeProgramScript;
|
|
5714
5880
|
/** Encoded taproot tree (shared spend context for every path). */
|
|
@@ -5717,10 +5883,12 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5717
5883
|
readonly keys: ProgramKeys;
|
|
5718
5884
|
/** Spending paths in declaration order. */
|
|
5719
5885
|
private readonly compiled;
|
|
5720
|
-
|
|
5886
|
+
/** Constructor bindings by flattened name (`owners.0.key`), as persisted. */
|
|
5887
|
+
readonly args: Record<string, ArkadeParamValue>;
|
|
5888
|
+
constructor(client: Arkade, program: P, args?: Record<string, ArkadeNestedValue>, keys?: ProgramKeys);
|
|
5721
5889
|
/**
|
|
5722
5890
|
* Rebuild a callable contract from a persisted `"arkade"` row. Compiles with the stored keys,
|
|
5723
|
-
* not the client's current ones, so script and address survive a
|
|
5891
|
+
* not the client's current ones, so script and address survive a rotation of the operator's signer.
|
|
5724
5892
|
*/
|
|
5725
5893
|
static fromContract(client: Arkade, contract: Contract): ArkadeContract;
|
|
5726
5894
|
/** Resolve the {@link TapLeafScript} for a spending path by its index. */
|
|
@@ -5799,6 +5967,7 @@ declare class ArkadeTransactionBuilder {
|
|
|
5799
5967
|
private readonly extraPackets;
|
|
5800
5968
|
private readonly inputs;
|
|
5801
5969
|
private changeScript?;
|
|
5970
|
+
private feeSats?;
|
|
5802
5971
|
/** @internal */
|
|
5803
5972
|
constructor(client: Arkade, unlocker?: ArkadeUnlocker | undefined);
|
|
5804
5973
|
/**
|
|
@@ -5821,6 +5990,8 @@ declare class ArkadeTransactionBuilder {
|
|
|
5821
5990
|
withPacket(packet: ExtensionPacket): this;
|
|
5822
5991
|
/** Destination for any surplus (inputs − outputs). Required when the spend is not exact. */
|
|
5823
5992
|
change(script: Uint8Array): this;
|
|
5993
|
+
/** Onchain only: the fee taken out of the surplus; without `.change()` it must equal the surplus. */
|
|
5994
|
+
onchainFee(sats: bigint): this;
|
|
5824
5995
|
/** Add an output — `(script, amount)` or a list of outputs. */
|
|
5825
5996
|
to(script: Uint8Array, amount: bigint): this;
|
|
5826
5997
|
to(outputs: TransactionOutput[]): this;
|
|
@@ -5830,6 +6001,12 @@ declare class ArkadeTransactionBuilder {
|
|
|
5830
6001
|
checkpoints: Transaction[];
|
|
5831
6002
|
}>;
|
|
5832
6003
|
private assemble;
|
|
6004
|
+
/** Assemble the unsigned onchain spend of a coin sitting at the contract address. */
|
|
6005
|
+
buildOnchain(): Promise<Transaction>;
|
|
6006
|
+
/** Build, cosign and broadcast the onchain spend; returns its txid. */
|
|
6007
|
+
sendOnchain(): Promise<string>;
|
|
6008
|
+
private serverSigns;
|
|
6009
|
+
private leafTimelocks;
|
|
5833
6010
|
/** Build, submit and return the finalized transaction. */
|
|
5834
6011
|
send(): Promise<ArkadeSpendResult>;
|
|
5835
6012
|
/** Sign the client-owned inputs of the ark tx (no-op when there are none). */
|
|
@@ -5847,6 +6024,92 @@ declare class ArkadeTransactionBuilder {
|
|
|
5847
6024
|
private buildAssetPacket;
|
|
5848
6025
|
}
|
|
5849
6026
|
|
|
6027
|
+
/** A covenant VTXO and the function that renews it. */
|
|
6028
|
+
interface ProgramContractRenewTarget {
|
|
6029
|
+
contract: ArkadeContract<any>;
|
|
6030
|
+
coin: VirtualCoin;
|
|
6031
|
+
/**
|
|
6032
|
+
* Covenant function that lets proof input k+1 through to proof output k unchanged (the
|
|
6033
|
+
* emulator enforces it), e.g.
|
|
6034
|
+
* `require(tx.version == 2); require(this.tunnel(this.activeInputIndex - 1));`. Default `renew`.
|
|
6035
|
+
*/
|
|
6036
|
+
fn?: string;
|
|
6037
|
+
}
|
|
6038
|
+
/**
|
|
6039
|
+
* Renews covenant VTXOs into a new batch without any owner key: the emulator signs the intent
|
|
6040
|
+
* proof after running each covenant and co-signs the forfeits, so a keeper can keep coins alive
|
|
6041
|
+
* while their owners are offline. Returns the commitment txid.
|
|
6042
|
+
*
|
|
6043
|
+
* A renewal that fails or is aborted after registering deletes its intent, freeing the coins for a
|
|
6044
|
+
* retry. `signal` is honoured until the batch's forfeits are being sent; from then on the renewal
|
|
6045
|
+
* waits for the batch to finalize or fail, since it may commit either way.
|
|
6046
|
+
*/
|
|
6047
|
+
declare function renewProgramContractOutputs(client: Arkade, targets: ProgramContractRenewTarget[], opts?: {
|
|
6048
|
+
session?: SignerSession;
|
|
6049
|
+
signal?: AbortSignal;
|
|
6050
|
+
}): Promise<{
|
|
6051
|
+
commitmentTxid: string;
|
|
6052
|
+
intentId: string;
|
|
6053
|
+
}>;
|
|
6054
|
+
|
|
6055
|
+
/**
|
|
6056
|
+
* Read the JSON `arkadec` writes into a {@link Program}: `$param` placeholders,
|
|
6057
|
+
* @scure opcode names, and one structured tapleaf per compiler leaf.
|
|
6058
|
+
*/
|
|
6059
|
+
|
|
6060
|
+
interface ArtifactParameter {
|
|
6061
|
+
name: string;
|
|
6062
|
+
type: string;
|
|
6063
|
+
}
|
|
6064
|
+
interface ArtifactStruct {
|
|
6065
|
+
name: string;
|
|
6066
|
+
fields: ArtifactParameter[];
|
|
6067
|
+
}
|
|
6068
|
+
interface ArtifactWitnessElement {
|
|
6069
|
+
name: string;
|
|
6070
|
+
type: string;
|
|
6071
|
+
encoding?: string;
|
|
6072
|
+
injected?: boolean;
|
|
6073
|
+
}
|
|
6074
|
+
interface ArtifactLeaf {
|
|
6075
|
+
name: string;
|
|
6076
|
+
witness?: ArtifactWitnessElement[];
|
|
6077
|
+
asm: string[];
|
|
6078
|
+
}
|
|
6079
|
+
interface ArtifactCovenant {
|
|
6080
|
+
inputs: ArtifactParameter[];
|
|
6081
|
+
asm: string[];
|
|
6082
|
+
}
|
|
6083
|
+
interface ArtifactGroup {
|
|
6084
|
+
name: string;
|
|
6085
|
+
arkade?: ArtifactCovenant;
|
|
6086
|
+
leaves: ArtifactLeaf[];
|
|
6087
|
+
}
|
|
6088
|
+
interface ContractArtifact {
|
|
6089
|
+
formatVersion?: number;
|
|
6090
|
+
contractName: string;
|
|
6091
|
+
constructorInputs: ArtifactParameter[];
|
|
6092
|
+
structs?: ArtifactStruct[];
|
|
6093
|
+
functions: ArtifactGroup[];
|
|
6094
|
+
fingerprint?: string;
|
|
6095
|
+
}
|
|
6096
|
+
/** The compiler's debug file: each covenant's source map, keyed by spend group. */
|
|
6097
|
+
interface ContractDebugInfo {
|
|
6098
|
+
formatVersion: number;
|
|
6099
|
+
/** The {@link ContractArtifact.fingerprint} of the build that wrote it. */
|
|
6100
|
+
artifactFingerprint?: string;
|
|
6101
|
+
functions: Record<string, {
|
|
6102
|
+
sourceMap: SourceRange[];
|
|
6103
|
+
}>;
|
|
6104
|
+
}
|
|
6105
|
+
/** `true` when `value` is an arkadec artifact rather than a Program. */
|
|
6106
|
+
declare function isContractArtifact(value: unknown): value is ContractArtifact;
|
|
6107
|
+
/**
|
|
6108
|
+
* Adds `server`, and one param per child-output placeholder for the caller to bind to that output key.
|
|
6109
|
+
* With the build's `debug` file, each covenant segment also carries its `sourceMap`.
|
|
6110
|
+
*/
|
|
6111
|
+
declare function programFromArtifact(artifact: ContractArtifact, debug?: ContractDebugInfo): Program;
|
|
6112
|
+
|
|
5850
6113
|
/**
|
|
5851
6114
|
* Arkade Script Support
|
|
5852
6115
|
*
|
|
@@ -5885,6 +6148,7 @@ type index_ArkadeContractSubscription = ArkadeContractSubscription;
|
|
|
5885
6148
|
type index_ArkadeExtendedCoin = ArkadeExtendedCoin;
|
|
5886
6149
|
type index_ArkadeExtendedVirtualCoin = ArkadeExtendedVirtualCoin;
|
|
5887
6150
|
declare const index_ArkadeFunction: typeof ArkadeFunction;
|
|
6151
|
+
type index_ArkadeNestedValue = ArkadeNestedValue;
|
|
5888
6152
|
declare const index_ArkadeParamValue: typeof ArkadeParamValue;
|
|
5889
6153
|
declare const index_ArkadeProgramScript: typeof ArkadeProgramScript;
|
|
5890
6154
|
declare const index_ArkadeScript: typeof ArkadeScript;
|
|
@@ -5902,6 +6166,7 @@ type index_AssetSpec = AssetSpec;
|
|
|
5902
6166
|
type index_CallableFunctions = CallableFunctions;
|
|
5903
6167
|
declare const index_CompiledProgramFunction: typeof CompiledProgramFunction;
|
|
5904
6168
|
type index_ContractArtifact = ContractArtifact;
|
|
6169
|
+
type index_ContractDebugInfo = ContractDebugInfo;
|
|
5905
6170
|
type index_ContractFunctions<P extends Program> = ContractFunctions<P>;
|
|
5906
6171
|
type index_ContractUnlockers<P extends Program> = ContractUnlockers<P>;
|
|
5907
6172
|
declare const index_InputDef: typeof InputDef;
|
|
@@ -5910,12 +6175,14 @@ declare const index_OP: typeof OP;
|
|
|
5910
6175
|
declare const index_OPCODE_NAMES: typeof OPCODE_NAMES;
|
|
5911
6176
|
declare const index_OPCODE_VALUES: typeof OPCODE_VALUES;
|
|
5912
6177
|
declare const index_Program: typeof Program;
|
|
6178
|
+
type index_ProgramContractRenewTarget = ProgramContractRenewTarget;
|
|
5913
6179
|
declare const index_ProgramKeys: typeof ProgramKeys;
|
|
5914
6180
|
declare const index_ResolvedArkadeService: typeof ResolvedArkadeService;
|
|
5915
6181
|
declare const index_SUPPORTED_PROGRAM_VERSION: typeof SUPPORTED_PROGRAM_VERSION;
|
|
5916
6182
|
declare const index_Script: typeof Script;
|
|
5917
6183
|
declare const index_ScriptType: typeof ScriptType;
|
|
5918
6184
|
declare const index_SignerRef: typeof SignerRef;
|
|
6185
|
+
declare const index_SourceRange: typeof SourceRange;
|
|
5919
6186
|
declare const index_TapscriptSegment: typeof TapscriptSegment;
|
|
5920
6187
|
declare const index_TweakedSigner: typeof TweakedSigner;
|
|
5921
6188
|
declare const index_UnsupportedProgramVersionError: typeof UnsupportedProgramVersionError;
|
|
@@ -5934,6 +6201,7 @@ declare const index_getOpcodeValue: typeof getOpcodeValue;
|
|
|
5934
6201
|
declare const index_isContractArtifact: typeof isContractArtifact;
|
|
5935
6202
|
declare const index_parseArtifact: typeof parseArtifact;
|
|
5936
6203
|
declare const index_programFromArtifact: typeof programFromArtifact;
|
|
6204
|
+
declare const index_renewProgramContractOutputs: typeof renewProgramContractOutputs;
|
|
5937
6205
|
declare const index_resolveArkadeService: typeof resolveArkadeService;
|
|
5938
6206
|
declare const index_resolveAsm: typeof resolveAsm;
|
|
5939
6207
|
declare const index_serializeArkadeContractParams: typeof serializeArkadeContractParams;
|
|
@@ -5942,7 +6210,7 @@ declare const index_toASM: typeof toASM;
|
|
|
5942
6210
|
declare const index_validateProgram: typeof validateProgram;
|
|
5943
6211
|
declare const index_witnessRefToBytes: typeof witnessRefToBytes;
|
|
5944
6212
|
declare namespace index {
|
|
5945
|
-
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, type index_ArkadeUnlocker as ArkadeUnlocker, 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, type index_ContractUnlockers as ContractUnlockers, 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 };
|
|
6213
|
+
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, type index_ArkadeNestedValue as ArkadeNestedValue, 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, type index_ArkadeUnlocker as ArkadeUnlocker, 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_ContractDebugInfo as ContractDebugInfo, type index_ContractFunctions as ContractFunctions, type index_ContractUnlockers as ContractUnlockers, 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, type index_ProgramContractRenewTarget as ProgramContractRenewTarget, 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_SourceRange as SourceRange, 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_renewProgramContractOutputs as renewProgramContractOutputs, 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 };
|
|
5946
6214
|
}
|
|
5947
6215
|
|
|
5948
6216
|
/** Known BIP21 parameters including Arkade-specific extensions. */
|
|
@@ -6297,6 +6565,15 @@ declare function isCltvSatisfied(context: PathContext, locktime: bigint): boolea
|
|
|
6297
6565
|
*/
|
|
6298
6566
|
declare function isCsvSpendable(context: PathContext, sequence?: number): boolean;
|
|
6299
6567
|
|
|
6568
|
+
declare class OnchainCosignPreflightError extends Error {
|
|
6569
|
+
readonly reason: string;
|
|
6570
|
+
constructor(reason: string, options?: {
|
|
6571
|
+
cause?: unknown;
|
|
6572
|
+
});
|
|
6573
|
+
}
|
|
6574
|
+
/** True only when the coins were definitely not spent, so paying another way is safe. */
|
|
6575
|
+
declare function isCosignFallback(e: unknown): boolean;
|
|
6576
|
+
|
|
6300
6577
|
/**
|
|
6301
6578
|
* Convert RelativeTimelock to BIP68 sequence number.
|
|
6302
6579
|
*/
|
|
@@ -6540,4 +6817,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6540
6817
|
private burnWith;
|
|
6541
6818
|
}
|
|
6542
6819
|
|
|
6543
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote,
|
|
6820
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, Arkade, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, ArkadeService, Asset, AssetDetails, AssetManager, AtomicWalletState, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BatchRegistration, BatchRegistrationRepository, BurnParams, CSVMultisigTapscript, CachingArkProvider, CachingOperatorProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, Contract, ContractEvent, ContractFilter, ContractRepository, ContractSyncState, ContractVtxoEvent, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_PASSKEY_LABEL, 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, GetNewAddressesOptions, GetOperatorInfoOptions, GetSpendableVtxosFilter, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryBatchRegistrationRepository, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBBatchRegistrationRepository, 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, OnchainCosignPreflightError, OnchainInput, OnchainProvider, OnchainWallet, OperatorProvider, Outpoint, OversizedChangeError, P2A, PageRequest, PageResult, PaginationOptions, type ParsedArkContract, PasskeyCancelled, type PasskeyMnemonic, type PasskeySource, PasskeyUnconfirmed, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, PrfUnavailable, Proof, 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, SendOnchainParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignedProof, 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, type WebAuthnClient, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertNonNegativeMs, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertTimerMs, assertValidServerUnrollScript, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, captureSendDeadline, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, createPrfPasskey, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, evaluatePrf, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCosignFallback, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, mnemonicFromPrf, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, prfSupport, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, selectionOf, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, submitViaEmulator, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|