@arkade-os/sdk 0.4.54 → 0.4.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{ark-acFuA57I.d.cts → ark-Do9Lqfsp.d.cts} +35 -2
- package/dist/{ark-acFuA57I.d.ts → ark-Do9Lqfsp.d.ts} +35 -2
- package/dist/{asyncStorageTaskQueue-BO3cvMpP.d.cts → asyncStorageTaskQueue-C3DYxvAT.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-DACXtP0I.d.ts → asyncStorageTaskQueue-DOnBOEDn.d.ts} +2 -2
- package/dist/{chunk-YRLBZJYO.cjs → chunk-C6UYPHTQ.cjs} +9 -9
- package/dist/{chunk-YRLBZJYO.cjs.map → chunk-C6UYPHTQ.cjs.map} +1 -1
- package/dist/{chunk-BYJJIITU.cjs → chunk-CSS74VCN.cjs} +17 -17
- package/dist/{chunk-BYJJIITU.cjs.map → chunk-CSS74VCN.cjs.map} +1 -1
- package/dist/{chunk-ZOY5JSVA.js → chunk-ENWR2F2P.js} +3 -3
- package/dist/{chunk-ZOY5JSVA.js.map → chunk-ENWR2F2P.js.map} +1 -1
- package/dist/{chunk-RNECH3TA.cjs → chunk-G7DOBFQN.cjs} +15 -15
- package/dist/{chunk-RNECH3TA.cjs.map → chunk-G7DOBFQN.cjs.map} +1 -1
- package/dist/{chunk-4EIKOJLD.js → chunk-JCJ5WFS3.js} +11 -4
- package/dist/chunk-JCJ5WFS3.js.map +1 -0
- package/dist/{chunk-7L3P3EP5.js → chunk-LAONNMM5.js} +4 -4
- package/dist/{chunk-7L3P3EP5.js.map → chunk-LAONNMM5.js.map} +1 -1
- package/dist/{chunk-GMUVWKOK.cjs → chunk-OWCPXRGP.cjs} +11 -3
- package/dist/chunk-OWCPXRGP.cjs.map +1 -0
- package/dist/{chunk-A37WVZ5T.js → chunk-QMPNPZ2T.js} +23 -4
- package/dist/chunk-QMPNPZ2T.js.map +1 -0
- package/dist/{chunk-TEHJCEF3.js → chunk-QO3IKBYL.js} +366 -51
- package/dist/chunk-QO3IKBYL.js.map +1 -0
- package/dist/{chunk-QY2YVFZT.js → chunk-SG4X7SEC.js} +4 -4
- package/dist/{chunk-QY2YVFZT.js.map → chunk-SG4X7SEC.js.map} +1 -1
- package/dist/{chunk-53XNU2EL.cjs → chunk-V2TOHHPW.cjs} +60 -40
- package/dist/chunk-V2TOHHPW.cjs.map +1 -0
- package/dist/{chunk-D5LUPJJP.cjs → chunk-ZPL34T2Q.cjs} +717 -395
- package/dist/chunk-ZPL34T2Q.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +8 -8
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-Ca_wXiYE.d.cts → delegate-C0iIBxen.d.cts} +1 -1
- package/dist/{delegate-DjwZZi6L.d.ts → delegate-DmhFrtdq.d.ts} +1 -1
- package/dist/{index-Ddq0mIKX.d.ts → index-BNt4wcSh.d.ts} +2 -2
- package/dist/{index-DFfefdpc.d.cts → index-BnLM1XxA.d.cts} +2 -2
- package/dist/index.cjs +238 -202
- package/dist/index.d.cts +138 -14
- package/dist/index.d.ts +138 -14
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-DbCNRP31.d.ts → taskRunner-Bgs-0I3x.d.ts} +2 -2
- package/dist/{taskRunner-DEwlrgId.d.cts → taskRunner-RwUvgQ5M.d.cts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +14 -14
- package/dist/wallet/expo/index.d.cts +5 -5
- package/dist/wallet/expo/index.d.ts +5 -5
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-ByjM6L20.d.cts → wallet-5Aou-V5n.d.ts} +83 -6
- package/dist/{wallet-B9rpddG2.d.ts → wallet-Ck7BH8zR.d.cts} +83 -6
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-4EIKOJLD.js.map +0 -1
- package/dist/chunk-53XNU2EL.cjs.map +0 -1
- package/dist/chunk-A37WVZ5T.js.map +0 -1
- package/dist/chunk-D5LUPJJP.cjs.map +0 -1
- package/dist/chunk-GMUVWKOK.cjs.map +0 -1
- package/dist/chunk-TEHJCEF3.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as ReadonlyIdentity, a as Identity, al as DescriptorSigningRequest, am as Transaction, ah as SignerSession, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, an as IntentFeeConfig, ao as OffchainInput, ap as FeeAmount, aq as OnchainInput, ar as FeeOutput, n as ArkProvider, af as SettlementConfig, as as ContractWatcherConfig, at as Asset, R as Recipient, I as IWallet, au as FeeInfo, i as SettlementEvent,
|
|
2
|
-
export { aT as ActivityIntent, aU as ActivityResolver, a9 as ArkInfo, aV as ArkIntentState, aW as ArkTapscript, aX as AssetMetadata, aY as BaseWalletConfig, U as BatchFailedEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, aZ as BatchInfo, a_ as BatchSignableIdentity, J as BatchStartedEvent, a$ as CLTVMultisigTapscript, b0 as CandidateDeps, b1 as ChainTxType, H as ChainedTxType, b2 as CommitmentTx, b3 as ConditionCSVMultisigTapscript, b4 as ConditionMultisigTapscript, b5 as ContractBalance, b6 as ContractEventCallback, b7 as ContractHandler, ac as ContractManager, ad as ContractManagerConfig, b8 as ContractState, b9 as ContractVtxo, ba as ContractWatcher, bb as DelegateManagerImpl, bc as DelegateOptions, a2 as DelegateProvider, bd as DelegatorManagerImpl, be as DelegatorProvider, bf as DeprecatedSignerMigrationReport, bg as DeprecatedSignerReport, bh as DigestMismatchError, bi as Discoverable, bj as DiscoveredContract, bk as DiscoveryDeps, bl as ESPLORA_URL, bm as EsploraProvider, a4 as ExitCaptureMode, bn as ExitChainResolver, a5 as ExitDataSource, bo as ExtendedContractVtxo, bp as GroupMembership, bq as HandlerError, br as IDelegatorManager, bs as INTENT_TERMINAL_STATES, bt as IndexerTxType, bu as KnownMetadata, bv as MigrateDeprecatedSignerOptions, bw as MigrationLegReport, bx as MigrationVtxoRef, by as MultisigTapscript, bz as Nonces, bA as Output, bB as PageResponse, bC as PaginationOptions, bD as PartialSig, bE as ProviderClass, a3 as ReadonlyWalletConfig, k as RestArkProvider, bF as RestDelegateProvider, bG as RestDelegatorProvider, l as RestIndexerProvider, bH as ScanContractsOptions, bI as ScanResult, bJ as ScheduledSession, bK as SettlementEventType, bL as SignRequest, ai as SignedIntent, bM as SignerClassification, bN as SignerSet, bO as SubscriptionEvent, bP as SubscriptionHeartbeat, m as SubscriptionResponse, bQ as TapLeaves, bR as TapTreeCoder, bS as TapscriptType, ak as TimeHeight, bT as TreeNonces, M as TreeNoncesEvent, bU as TreePartialSigs, Y as TreeSignatureEvent, K as TreeSigningStartedEvent, X as TreeTxEvent, bV as Tx, bW as TxHistoryRecord, bX as TxKey, T as TxNotification, bY as
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
1
|
+
import { $ as ReadonlyIdentity, a as Identity, al as DescriptorSigningRequest, am as Transaction, ah as SignerSession, Z as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, an as IntentFeeConfig, ao as OffchainInput, ap as FeeAmount, aq as OnchainInput, ar as FeeOutput, n as ArkProvider, af as SettlementConfig, as as ContractWatcherConfig, at as Asset, R as Recipient, I as IWallet, au as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, av as CreateContractParams, aw as GetContractsFilter, r as VirtualCoin, ax as GetSpendablePathsOptions, ay as GetAllSpendingPathsOptions, az as IssuanceParams, aA as ReissuanceParams, aB as BurnParams, aC as RenewVtxosOptions, c as WalletBalance, a7 as ContractSyncState, aD as ContractWithVtxos, aE as PathSelection, aF as ContractEvent, aG as AssetDetails, aH as IssuanceResult, aI as DelegateInfo, aJ as MigrationGlobalSkipReason, aK as MigrationLegSkipReason, aL as SignerStatus, _ as IReadonlyWallet, d as ActivityRegistry, a6 as IReadonlyAssetManager, aM as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aN as IVtxoManager, a1 as OnchainProvider, a0 as Network, a8 as NetworkName, ab as Coin, aO as ExplorerTransaction, q as TapLeafScript, aP as EncodedVtxoScript, ae as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aQ as Status, aa as ArkAddress, aj as Intent, aR as ChainTx, o as IndexerProvider, L as TxTree, aS as PathContext } from './ark-Do9Lqfsp.cjs';
|
|
2
|
+
export { aT as ActivityIntent, aU as ActivityResolver, a9 as ArkInfo, aV as ArkIntentState, aW as ArkTapscript, aX as AssetMetadata, aY as BaseWalletConfig, U as BatchFailedEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, aZ as BatchInfo, a_ as BatchSignableIdentity, J as BatchStartedEvent, a$ as CLTVMultisigTapscript, b0 as CandidateDeps, b1 as ChainTxType, H as ChainedTxType, b2 as CommitmentTx, b3 as ConditionCSVMultisigTapscript, b4 as ConditionMultisigTapscript, b5 as ContractBalance, b6 as ContractEventCallback, b7 as ContractHandler, ac as ContractManager, ad as ContractManagerConfig, b8 as ContractState, b9 as ContractVtxo, ba as ContractWatcher, bb as DelegateManagerImpl, bc as DelegateOptions, a2 as DelegateProvider, bd as DelegatorManagerImpl, be as DelegatorProvider, bf as DeprecatedSignerMigrationReport, bg as DeprecatedSignerReport, bh as DigestMismatchError, bi as Discoverable, bj as DiscoveredContract, bk as DiscoveryDeps, bl as ESPLORA_URL, bm as EsploraProvider, a4 as ExitCaptureMode, bn as ExitChainResolver, a5 as ExitDataSource, bo as ExtendedContractVtxo, bp as GroupMembership, bq as HandlerError, br as IDelegatorManager, bs as INTENT_TERMINAL_STATES, bt as IndexerTxType, bu as KnownMetadata, bv as MigrateDeprecatedSignerOptions, bw as MigrationLegReport, bx as MigrationVtxoRef, by as MultisigTapscript, bz as Nonces, bA as Output, bB as PageResponse, bC as PaginationOptions, bD as PartialSig, bE as ProviderClass, a3 as ReadonlyWalletConfig, k as RestArkProvider, bF as RestDelegateProvider, bG as RestDelegatorProvider, l as RestIndexerProvider, bH as ScanContractsOptions, bI as ScanResult, bJ as ScheduledSession, bK as SettlementEventType, bL as SignRequest, ai as SignedIntent, bM as SignerClassification, bN as SignerSet, bO as SubscriptionEvent, bP as SubscriptionHeartbeat, m as SubscriptionResponse, bQ as TapLeaves, bR as TapTreeCoder, bS as TapscriptType, ak as TimeHeight, bT as TreeNonces, M as TreeNoncesEvent, bU as TreePartialSigs, Y as TreeSignatureEvent, K as TreeSigningStartedEvent, X as TreeTxEvent, bV as Tx, bW as TxHistoryRecord, bX as TxKey, T as TxNotification, bY as TxTag, bZ as TxTreeNode, b_ as TxType, b$ as VirtualStatus, c0 as Vtxo, c1 as VtxoChain, ag as VtxoManager, c2 as VtxoType, b as WalletConfig, c3 as WalletMode, c4 as assetMintResolver, c5 as boardingResolver, c6 as canRecoverOnchain, c7 as canSpendOffchain, c8 as classifyAgainstSignerSet, c9 as classifyContractSigner, ca as collabExitResolver, cb as createDefaultActivityRegistry, cc as createExitChainResolver, cd as decodeTapscript, ce as getNetwork, cf as getSequence, cg as hasCandidates, ch as hasTerminalSpend, ci as isBatchSignable, cj as isCooperativelyMigratable, ck as isDiscoverable, cl as isExpired, cm as isPastExpiry, cn as isRecoverable, co as isSpendable, cp as isSubdust, cq as isTerminalIntentState, cr as isVirtualCoin, cs as isVtxoExpiringSoon, ct as networks, cu as scriptFromTapLeafScript, cv as signerSetFromInfo, cw as toXOnlySignerHex } from './ark-Do9Lqfsp.cjs';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as Batch } from './wallet-Ck7BH8zR.cjs';
|
|
4
|
+
export { A as ArkError, d as ArkErrorName, e as ArkadeCashClaimResult, f as ArkadeCashCreateError, g as ArkadeCashUnclaimedReason, h as ArkadeCashUnclaimedVtxo, i as BoardingUtxoGroup, H as HDWalletCapable, I as IncomingFunds, j as ProviderKind, k as ProviderUnavailableError, S as ServerInfoSource, l as ServerResponseMismatchError, m as isArkError, n as isHDWalletCapable, o as maybeArkError, s as selectVirtualCoins, w as waitForIncomingFunds } from './wallet-Ck7BH8zR.cjs';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-BnLM1XxA.cjs';
|
|
6
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as contractHandlers } from './index-BnLM1XxA.cjs';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-C0iIBxen.cjs';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-C0iIBxen.cjs';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
10
10
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
11
11
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
@@ -265,6 +265,12 @@ declare class SeedIdentity implements HDCapableIdentity {
|
|
|
265
265
|
* this method only as backing implementation for descriptor providers.
|
|
266
266
|
*/
|
|
267
267
|
signMessageWithDescriptor(descriptor: string, message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
268
|
+
/**
|
|
269
|
+
* BIP-340 sign `messageHash` with the key derived from `descriptor`,
|
|
270
|
+
* aux_rand = 0. Backs {@link DescriptorIdentity.signSchnorrDeterministic},
|
|
271
|
+
* which swap preimage derivation reads through.
|
|
272
|
+
*/
|
|
273
|
+
signSchnorrDeterministicWithDescriptor(descriptor: string, messageHash: Uint8Array): Promise<Uint8Array>;
|
|
268
274
|
private derivePrivateKeyForDescriptor;
|
|
269
275
|
private signTxWithKey;
|
|
270
276
|
private signMessageWithKey;
|
|
@@ -357,6 +363,77 @@ declare class ReadonlyDescriptorIdentity implements ReadonlyHDCapableIdentity {
|
|
|
357
363
|
isOurs(descriptor: string): boolean;
|
|
358
364
|
}
|
|
359
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Compressed (33-byte) counterpart of {@link deriveDescriptorLeafPubKey}, for
|
|
368
|
+
* protocols that key on the parity byte (Boltz swap keys).
|
|
369
|
+
*
|
|
370
|
+
* Only HD descriptors are supported: a bare `tr(xonly)` has lost its parity and
|
|
371
|
+
* synthesizing `02||xonly` would silently produce the wrong key half the time.
|
|
372
|
+
*/
|
|
373
|
+
declare function deriveDescriptorLeafCompressedPubKey(descriptor: string): Uint8Array;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Descriptor-scoped signing surface — the two members every
|
|
377
|
+
* {@link DescriptorProvider} and every `HDCapableIdentity` share.
|
|
378
|
+
*/
|
|
379
|
+
type DescriptorSigner = Pick<DescriptorProvider, "signWithDescriptor" | "signMessageWithDescriptor">;
|
|
380
|
+
/**
|
|
381
|
+
* Per-descriptor deterministic Schnorr signing. Separate from the baseline
|
|
382
|
+
* `DeterministicSignCapable` marker because the seed holder — not the
|
|
383
|
+
* descriptor — is the only party that can derive the key at an index.
|
|
384
|
+
*/
|
|
385
|
+
interface HDDeterministicSignCapable {
|
|
386
|
+
/** BIP-340 sign `messageHash` with the descriptor's key and aux_rand = 0. */
|
|
387
|
+
signSchnorrDeterministicWithDescriptor(descriptor: string, messageHash: Uint8Array): Promise<Uint8Array>;
|
|
388
|
+
}
|
|
389
|
+
/** Type guard for {@link HDDeterministicSignCapable}. */
|
|
390
|
+
declare function isHDDeterministicSignCapable(value: unknown): value is HDDeterministicSignCapable;
|
|
391
|
+
/** Constructor arguments for {@link DescriptorIdentity}. */
|
|
392
|
+
interface DescriptorIdentityOptions {
|
|
393
|
+
/** Materialized descriptor (no wildcard) this identity is pinned to. */
|
|
394
|
+
descriptor: string;
|
|
395
|
+
/** Descriptor-aware signer — an `HDDescriptorProvider` or an HD identity. */
|
|
396
|
+
signer: DescriptorSigner;
|
|
397
|
+
/**
|
|
398
|
+
* Seed-holding identity behind `signer`. Backs the members that are not
|
|
399
|
+
* descriptor-scoped in the provider contract: musig2 sessions and
|
|
400
|
+
* deterministic Schnorr.
|
|
401
|
+
*/
|
|
402
|
+
base: Identity;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* {@link Identity} pinned to one materialized HD descriptor: every key and
|
|
406
|
+
* signature it produces belongs to that index rather than to the wallet's
|
|
407
|
+
* baseline key.
|
|
408
|
+
*
|
|
409
|
+
* Lets components that take a plain `Identity` (VHTLC claim/refund, batch
|
|
410
|
+
* joins) operate on a rotated index without knowing about descriptors.
|
|
411
|
+
*
|
|
412
|
+
* Deliberately does NOT satisfy `isBatchSignable`, `isHDCapableIdentity`, or
|
|
413
|
+
* `hasToReadonly` — it is a leaf signer, not another HD root.
|
|
414
|
+
*/
|
|
415
|
+
declare class DescriptorIdentity implements Identity {
|
|
416
|
+
private readonly descriptor;
|
|
417
|
+
private readonly signer;
|
|
418
|
+
private readonly base;
|
|
419
|
+
constructor({ descriptor, signer, base }: DescriptorIdentityOptions);
|
|
420
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
421
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
422
|
+
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
423
|
+
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
424
|
+
/**
|
|
425
|
+
* Delegated: `TreeSignerSession.random()` consults no key material, so the
|
|
426
|
+
* session is index-independent.
|
|
427
|
+
*/
|
|
428
|
+
signerSession(): SignerSession;
|
|
429
|
+
/**
|
|
430
|
+
* Throws rather than falling back to the baseline key: a preimage derived
|
|
431
|
+
* from the wrong index is unrecoverable, and callers probe this member
|
|
432
|
+
* through a structural guard that cannot tell the two apart.
|
|
433
|
+
*/
|
|
434
|
+
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
435
|
+
}
|
|
436
|
+
|
|
360
437
|
/**
|
|
361
438
|
* In-memory single key implementation for Bitcoin transaction signing.
|
|
362
439
|
*
|
|
@@ -3286,6 +3363,45 @@ declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transac
|
|
|
3286
3363
|
* @returns True if the address is valid, false otherwise.
|
|
3287
3364
|
*/
|
|
3288
3365
|
declare function isValidArkAddress(address: string): boolean;
|
|
3366
|
+
/**
|
|
3367
|
+
* Pair each server-returned checkpoint PSBT with the locally built checkpoint
|
|
3368
|
+
* of the same txid, rejecting anything else.
|
|
3369
|
+
*
|
|
3370
|
+
* The ark tx signed just above spends each checkpoint at `checkpointTxid:0`, so
|
|
3371
|
+
* the response is only usable if it carries the same txids: a checkpoint with
|
|
3372
|
+
* any other txid leaves that ark tx unspendable. The two sets are therefore
|
|
3373
|
+
* equal by construction, and this pairing is what the signing step below
|
|
3374
|
+
* consumes.
|
|
3375
|
+
*
|
|
3376
|
+
* Matching is by txid rather than by position — nothing in the wire contract
|
|
3377
|
+
* promises arkd echoes checkpoints in submission order — while the result keeps
|
|
3378
|
+
* the server's order, so nothing downstream is reordered.
|
|
3379
|
+
*
|
|
3380
|
+
* Comparing txids is sound while checkpoint inputs are taproot-only: witness
|
|
3381
|
+
* data does not affect the txid, so the server's signature cannot change it. A
|
|
3382
|
+
* future P2SH-wrapped/scriptSig input could acquire a `finalScriptSig`
|
|
3383
|
+
* server-side and legitimately change txid; that protocol shape would need a
|
|
3384
|
+
* different comparison target.
|
|
3385
|
+
*/
|
|
3386
|
+
declare function matchServerCheckpoints(serverCheckpointTxs: string[], expectedCheckpoints: Transaction[], context: string): {
|
|
3387
|
+
server: Transaction;
|
|
3388
|
+
local: Transaction;
|
|
3389
|
+
}[];
|
|
3390
|
+
/**
|
|
3391
|
+
* Assert a `submitTx` response refers to the ark transaction just submitted.
|
|
3392
|
+
*
|
|
3393
|
+
* The returned `arkTxid` is what gets passed to `finalizeTx` and persisted by
|
|
3394
|
+
* callers, so a stale or misrouted response must be rejected before either
|
|
3395
|
+
* happens: it must equal the locally signed transaction's txid, and when the
|
|
3396
|
+
* response carries the counter-signed `finalArkTx`, that transaction's txid
|
|
3397
|
+
* must match too. Server signatures live in the witness and cannot
|
|
3398
|
+
* legitimately change either — with the same taproot-only caveat as
|
|
3399
|
+
* {@link matchServerCheckpoints}.
|
|
3400
|
+
*/
|
|
3401
|
+
declare function assertSubmittedArkTxid(response: {
|
|
3402
|
+
arkTxid: string;
|
|
3403
|
+
finalArkTx?: string;
|
|
3404
|
+
}, signedArkTx: Transaction, context: string): void;
|
|
3289
3405
|
|
|
3290
3406
|
declare function getRandomId(): string;
|
|
3291
3407
|
|
|
@@ -3659,8 +3775,10 @@ type ArkadeBatchInput = ArkadeExtendedCoin | ArkadeExtendedVirtualCoin;
|
|
|
3659
3775
|
declare function createArkadeBatchHandler(intentId: string, inputs: ArkadeBatchInput[], signer: Identity, signedProof: string, message: Intent.RegisterMessage, session: SignerSession, arkProvider: ArkProvider, emulator: EmulatorProvider, network: Network,
|
|
3660
3776
|
/**
|
|
3661
3777
|
* Expected recipients of the settlement, validated against the virtual
|
|
3662
|
-
* output tree before co-signing it
|
|
3663
|
-
*
|
|
3778
|
+
* output tree before co-signing it, and — when tree signing did not run —
|
|
3779
|
+
* against the commitment tx before signing anything at finalization
|
|
3780
|
+
* (mirrors `Wallet.createBatchHandler`). Without this the handler signs
|
|
3781
|
+
* whatever the server proposes, on both paths.
|
|
3664
3782
|
*/
|
|
3665
3783
|
recipients?: Recipient[]): Batch.Handler;
|
|
3666
3784
|
|
|
@@ -4003,9 +4121,15 @@ declare class Executor implements AsyncIterable<ExecutorEvent> {
|
|
|
4003
4121
|
constructor(pkg: ExitPackage, provider: OnchainProvider, opts?: {
|
|
4004
4122
|
pollIntervalMs?: number;
|
|
4005
4123
|
feeWallet?: ExitFeeWallet;
|
|
4006
|
-
/** Abort to stop execution.
|
|
4007
|
-
*
|
|
4008
|
-
*
|
|
4124
|
+
/** Abort to stop execution.
|
|
4125
|
+
*
|
|
4126
|
+
* Iteration then rejects with `signal.reason`. Calling `abort()`
|
|
4127
|
+
* with no argument yields an error whose `name` is `"AbortError"`;
|
|
4128
|
+
* a custom reason is forwarded as-is, matching `fetch` and
|
|
4129
|
+
* `AbortSignal.prototype.throwIfAborted`.
|
|
4130
|
+
*
|
|
4131
|
+
* Already-broadcast transactions are not recalled; the executor is
|
|
4132
|
+
* idempotent, so a later run resumes from the chain. */
|
|
4009
4133
|
signal?: AbortSignal;
|
|
4010
4134
|
});
|
|
4011
4135
|
/**
|
|
@@ -5372,4 +5496,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
5372
5496
|
burn(params: BurnParams): Promise<string>;
|
|
5373
5497
|
}
|
|
5374
5498
|
|
|
5375
|
-
export { ARKADE_MAGIC, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, Batch, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, type DescriptorOptions, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertSendableAmount, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isCsvSpendable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isRetryableProviderError, isValidArkAddress, makeHandle, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
5499
|
+
export { ARKADE_MAGIC, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, Batch, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, type HDDeterministicSignCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deriveDescriptorLeafCompressedPubKey, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isCsvSpendable, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isRetryableProviderError, isValidArkAddress, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as ReadonlyIdentity, a as Identity, al as DescriptorSigningRequest, am as Transaction, ah as SignerSession, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, an as IntentFeeConfig, ao as OffchainInput, ap as FeeAmount, aq as OnchainInput, ar as FeeOutput, n as ArkProvider, af as SettlementConfig, as as ContractWatcherConfig, at as Asset, R as Recipient, I as IWallet, au as FeeInfo, i as SettlementEvent,
|
|
2
|
-
export { aT as ActivityIntent, aU as ActivityResolver, a9 as ArkInfo, aV as ArkIntentState, aW as ArkTapscript, aX as AssetMetadata, aY as BaseWalletConfig, U as BatchFailedEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, aZ as BatchInfo, a_ as BatchSignableIdentity, J as BatchStartedEvent, a$ as CLTVMultisigTapscript, b0 as CandidateDeps, b1 as ChainTxType, H as ChainedTxType, b2 as CommitmentTx, b3 as ConditionCSVMultisigTapscript, b4 as ConditionMultisigTapscript, b5 as ContractBalance, b6 as ContractEventCallback, b7 as ContractHandler, ac as ContractManager, ad as ContractManagerConfig, b8 as ContractState, b9 as ContractVtxo, ba as ContractWatcher, bb as DelegateManagerImpl, bc as DelegateOptions, a2 as DelegateProvider, bd as DelegatorManagerImpl, be as DelegatorProvider, bf as DeprecatedSignerMigrationReport, bg as DeprecatedSignerReport, bh as DigestMismatchError, bi as Discoverable, bj as DiscoveredContract, bk as DiscoveryDeps, bl as ESPLORA_URL, bm as EsploraProvider, a4 as ExitCaptureMode, bn as ExitChainResolver, a5 as ExitDataSource, bo as ExtendedContractVtxo, bp as GroupMembership, bq as HandlerError, br as IDelegatorManager, bs as INTENT_TERMINAL_STATES, bt as IndexerTxType, bu as KnownMetadata, bv as MigrateDeprecatedSignerOptions, bw as MigrationLegReport, bx as MigrationVtxoRef, by as MultisigTapscript, bz as Nonces, bA as Output, bB as PageResponse, bC as PaginationOptions, bD as PartialSig, bE as ProviderClass, a3 as ReadonlyWalletConfig, k as RestArkProvider, bF as RestDelegateProvider, bG as RestDelegatorProvider, l as RestIndexerProvider, bH as ScanContractsOptions, bI as ScanResult, bJ as ScheduledSession, bK as SettlementEventType, bL as SignRequest, ai as SignedIntent, bM as SignerClassification, bN as SignerSet, bO as SubscriptionEvent, bP as SubscriptionHeartbeat, m as SubscriptionResponse, bQ as TapLeaves, bR as TapTreeCoder, bS as TapscriptType, ak as TimeHeight, bT as TreeNonces, M as TreeNoncesEvent, bU as TreePartialSigs, Y as TreeSignatureEvent, K as TreeSigningStartedEvent, X as TreeTxEvent, bV as Tx, bW as TxHistoryRecord, bX as TxKey, T as TxNotification, bY as
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
1
|
+
import { $ as ReadonlyIdentity, a as Identity, al as DescriptorSigningRequest, am as Transaction, ah as SignerSession, Z as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, an as IntentFeeConfig, ao as OffchainInput, ap as FeeAmount, aq as OnchainInput, ar as FeeOutput, n as ArkProvider, af as SettlementConfig, as as ContractWatcherConfig, at as Asset, R as Recipient, I as IWallet, au as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, av as CreateContractParams, aw as GetContractsFilter, r as VirtualCoin, ax as GetSpendablePathsOptions, ay as GetAllSpendingPathsOptions, az as IssuanceParams, aA as ReissuanceParams, aB as BurnParams, aC as RenewVtxosOptions, c as WalletBalance, a7 as ContractSyncState, aD as ContractWithVtxos, aE as PathSelection, aF as ContractEvent, aG as AssetDetails, aH as IssuanceResult, aI as DelegateInfo, aJ as MigrationGlobalSkipReason, aK as MigrationLegSkipReason, aL as SignerStatus, _ as IReadonlyWallet, d as ActivityRegistry, a6 as IReadonlyAssetManager, aM as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aN as IVtxoManager, a1 as OnchainProvider, a0 as Network, a8 as NetworkName, ab as Coin, aO as ExplorerTransaction, q as TapLeafScript, aP as EncodedVtxoScript, ae as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aQ as Status, aa as ArkAddress, aj as Intent, aR as ChainTx, o as IndexerProvider, L as TxTree, aS as PathContext } from './ark-Do9Lqfsp.js';
|
|
2
|
+
export { aT as ActivityIntent, aU as ActivityResolver, a9 as ArkInfo, aV as ArkIntentState, aW as ArkTapscript, aX as AssetMetadata, aY as BaseWalletConfig, U as BatchFailedEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, aZ as BatchInfo, a_ as BatchSignableIdentity, J as BatchStartedEvent, a$ as CLTVMultisigTapscript, b0 as CandidateDeps, b1 as ChainTxType, H as ChainedTxType, b2 as CommitmentTx, b3 as ConditionCSVMultisigTapscript, b4 as ConditionMultisigTapscript, b5 as ContractBalance, b6 as ContractEventCallback, b7 as ContractHandler, ac as ContractManager, ad as ContractManagerConfig, b8 as ContractState, b9 as ContractVtxo, ba as ContractWatcher, bb as DelegateManagerImpl, bc as DelegateOptions, a2 as DelegateProvider, bd as DelegatorManagerImpl, be as DelegatorProvider, bf as DeprecatedSignerMigrationReport, bg as DeprecatedSignerReport, bh as DigestMismatchError, bi as Discoverable, bj as DiscoveredContract, bk as DiscoveryDeps, bl as ESPLORA_URL, bm as EsploraProvider, a4 as ExitCaptureMode, bn as ExitChainResolver, a5 as ExitDataSource, bo as ExtendedContractVtxo, bp as GroupMembership, bq as HandlerError, br as IDelegatorManager, bs as INTENT_TERMINAL_STATES, bt as IndexerTxType, bu as KnownMetadata, bv as MigrateDeprecatedSignerOptions, bw as MigrationLegReport, bx as MigrationVtxoRef, by as MultisigTapscript, bz as Nonces, bA as Output, bB as PageResponse, bC as PaginationOptions, bD as PartialSig, bE as ProviderClass, a3 as ReadonlyWalletConfig, k as RestArkProvider, bF as RestDelegateProvider, bG as RestDelegatorProvider, l as RestIndexerProvider, bH as ScanContractsOptions, bI as ScanResult, bJ as ScheduledSession, bK as SettlementEventType, bL as SignRequest, ai as SignedIntent, bM as SignerClassification, bN as SignerSet, bO as SubscriptionEvent, bP as SubscriptionHeartbeat, m as SubscriptionResponse, bQ as TapLeaves, bR as TapTreeCoder, bS as TapscriptType, ak as TimeHeight, bT as TreeNonces, M as TreeNoncesEvent, bU as TreePartialSigs, Y as TreeSignatureEvent, K as TreeSigningStartedEvent, X as TreeTxEvent, bV as Tx, bW as TxHistoryRecord, bX as TxKey, T as TxNotification, bY as TxTag, bZ as TxTreeNode, b_ as TxType, b$ as VirtualStatus, c0 as Vtxo, c1 as VtxoChain, ag as VtxoManager, c2 as VtxoType, b as WalletConfig, c3 as WalletMode, c4 as assetMintResolver, c5 as boardingResolver, c6 as canRecoverOnchain, c7 as canSpendOffchain, c8 as classifyAgainstSignerSet, c9 as classifyContractSigner, ca as collabExitResolver, cb as createDefaultActivityRegistry, cc as createExitChainResolver, cd as decodeTapscript, ce as getNetwork, cf as getSequence, cg as hasCandidates, ch as hasTerminalSpend, ci as isBatchSignable, cj as isCooperativelyMigratable, ck as isDiscoverable, cl as isExpired, cm as isPastExpiry, cn as isRecoverable, co as isSpendable, cp as isSubdust, cq as isTerminalIntentState, cr as isVirtualCoin, cs as isVtxoExpiringSoon, ct as networks, cu as scriptFromTapLeafScript, cv as signerSetFromInfo, cw as toXOnlySignerHex } from './ark-Do9Lqfsp.js';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as Batch } from './wallet-5Aou-V5n.js';
|
|
4
|
+
export { A as ArkError, d as ArkErrorName, e as ArkadeCashClaimResult, f as ArkadeCashCreateError, g as ArkadeCashUnclaimedReason, h as ArkadeCashUnclaimedVtxo, i as BoardingUtxoGroup, H as HDWalletCapable, I as IncomingFunds, j as ProviderKind, k as ProviderUnavailableError, S as ServerInfoSource, l as ServerResponseMismatchError, m as isArkError, n as isHDWalletCapable, o as maybeArkError, s as selectVirtualCoins, w as waitForIncomingFunds } from './wallet-5Aou-V5n.js';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-BNt4wcSh.js';
|
|
6
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as contractHandlers } from './index-BNt4wcSh.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-DmhFrtdq.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-DmhFrtdq.js';
|
|
9
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
10
10
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
11
11
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
@@ -265,6 +265,12 @@ declare class SeedIdentity implements HDCapableIdentity {
|
|
|
265
265
|
* this method only as backing implementation for descriptor providers.
|
|
266
266
|
*/
|
|
267
267
|
signMessageWithDescriptor(descriptor: string, message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
268
|
+
/**
|
|
269
|
+
* BIP-340 sign `messageHash` with the key derived from `descriptor`,
|
|
270
|
+
* aux_rand = 0. Backs {@link DescriptorIdentity.signSchnorrDeterministic},
|
|
271
|
+
* which swap preimage derivation reads through.
|
|
272
|
+
*/
|
|
273
|
+
signSchnorrDeterministicWithDescriptor(descriptor: string, messageHash: Uint8Array): Promise<Uint8Array>;
|
|
268
274
|
private derivePrivateKeyForDescriptor;
|
|
269
275
|
private signTxWithKey;
|
|
270
276
|
private signMessageWithKey;
|
|
@@ -357,6 +363,77 @@ declare class ReadonlyDescriptorIdentity implements ReadonlyHDCapableIdentity {
|
|
|
357
363
|
isOurs(descriptor: string): boolean;
|
|
358
364
|
}
|
|
359
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Compressed (33-byte) counterpart of {@link deriveDescriptorLeafPubKey}, for
|
|
368
|
+
* protocols that key on the parity byte (Boltz swap keys).
|
|
369
|
+
*
|
|
370
|
+
* Only HD descriptors are supported: a bare `tr(xonly)` has lost its parity and
|
|
371
|
+
* synthesizing `02||xonly` would silently produce the wrong key half the time.
|
|
372
|
+
*/
|
|
373
|
+
declare function deriveDescriptorLeafCompressedPubKey(descriptor: string): Uint8Array;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Descriptor-scoped signing surface — the two members every
|
|
377
|
+
* {@link DescriptorProvider} and every `HDCapableIdentity` share.
|
|
378
|
+
*/
|
|
379
|
+
type DescriptorSigner = Pick<DescriptorProvider, "signWithDescriptor" | "signMessageWithDescriptor">;
|
|
380
|
+
/**
|
|
381
|
+
* Per-descriptor deterministic Schnorr signing. Separate from the baseline
|
|
382
|
+
* `DeterministicSignCapable` marker because the seed holder — not the
|
|
383
|
+
* descriptor — is the only party that can derive the key at an index.
|
|
384
|
+
*/
|
|
385
|
+
interface HDDeterministicSignCapable {
|
|
386
|
+
/** BIP-340 sign `messageHash` with the descriptor's key and aux_rand = 0. */
|
|
387
|
+
signSchnorrDeterministicWithDescriptor(descriptor: string, messageHash: Uint8Array): Promise<Uint8Array>;
|
|
388
|
+
}
|
|
389
|
+
/** Type guard for {@link HDDeterministicSignCapable}. */
|
|
390
|
+
declare function isHDDeterministicSignCapable(value: unknown): value is HDDeterministicSignCapable;
|
|
391
|
+
/** Constructor arguments for {@link DescriptorIdentity}. */
|
|
392
|
+
interface DescriptorIdentityOptions {
|
|
393
|
+
/** Materialized descriptor (no wildcard) this identity is pinned to. */
|
|
394
|
+
descriptor: string;
|
|
395
|
+
/** Descriptor-aware signer — an `HDDescriptorProvider` or an HD identity. */
|
|
396
|
+
signer: DescriptorSigner;
|
|
397
|
+
/**
|
|
398
|
+
* Seed-holding identity behind `signer`. Backs the members that are not
|
|
399
|
+
* descriptor-scoped in the provider contract: musig2 sessions and
|
|
400
|
+
* deterministic Schnorr.
|
|
401
|
+
*/
|
|
402
|
+
base: Identity;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* {@link Identity} pinned to one materialized HD descriptor: every key and
|
|
406
|
+
* signature it produces belongs to that index rather than to the wallet's
|
|
407
|
+
* baseline key.
|
|
408
|
+
*
|
|
409
|
+
* Lets components that take a plain `Identity` (VHTLC claim/refund, batch
|
|
410
|
+
* joins) operate on a rotated index without knowing about descriptors.
|
|
411
|
+
*
|
|
412
|
+
* Deliberately does NOT satisfy `isBatchSignable`, `isHDCapableIdentity`, or
|
|
413
|
+
* `hasToReadonly` — it is a leaf signer, not another HD root.
|
|
414
|
+
*/
|
|
415
|
+
declare class DescriptorIdentity implements Identity {
|
|
416
|
+
private readonly descriptor;
|
|
417
|
+
private readonly signer;
|
|
418
|
+
private readonly base;
|
|
419
|
+
constructor({ descriptor, signer, base }: DescriptorIdentityOptions);
|
|
420
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
421
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
422
|
+
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
423
|
+
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
424
|
+
/**
|
|
425
|
+
* Delegated: `TreeSignerSession.random()` consults no key material, so the
|
|
426
|
+
* session is index-independent.
|
|
427
|
+
*/
|
|
428
|
+
signerSession(): SignerSession;
|
|
429
|
+
/**
|
|
430
|
+
* Throws rather than falling back to the baseline key: a preimage derived
|
|
431
|
+
* from the wrong index is unrecoverable, and callers probe this member
|
|
432
|
+
* through a structural guard that cannot tell the two apart.
|
|
433
|
+
*/
|
|
434
|
+
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
435
|
+
}
|
|
436
|
+
|
|
360
437
|
/**
|
|
361
438
|
* In-memory single key implementation for Bitcoin transaction signing.
|
|
362
439
|
*
|
|
@@ -3286,6 +3363,45 @@ declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transac
|
|
|
3286
3363
|
* @returns True if the address is valid, false otherwise.
|
|
3287
3364
|
*/
|
|
3288
3365
|
declare function isValidArkAddress(address: string): boolean;
|
|
3366
|
+
/**
|
|
3367
|
+
* Pair each server-returned checkpoint PSBT with the locally built checkpoint
|
|
3368
|
+
* of the same txid, rejecting anything else.
|
|
3369
|
+
*
|
|
3370
|
+
* The ark tx signed just above spends each checkpoint at `checkpointTxid:0`, so
|
|
3371
|
+
* the response is only usable if it carries the same txids: a checkpoint with
|
|
3372
|
+
* any other txid leaves that ark tx unspendable. The two sets are therefore
|
|
3373
|
+
* equal by construction, and this pairing is what the signing step below
|
|
3374
|
+
* consumes.
|
|
3375
|
+
*
|
|
3376
|
+
* Matching is by txid rather than by position — nothing in the wire contract
|
|
3377
|
+
* promises arkd echoes checkpoints in submission order — while the result keeps
|
|
3378
|
+
* the server's order, so nothing downstream is reordered.
|
|
3379
|
+
*
|
|
3380
|
+
* Comparing txids is sound while checkpoint inputs are taproot-only: witness
|
|
3381
|
+
* data does not affect the txid, so the server's signature cannot change it. A
|
|
3382
|
+
* future P2SH-wrapped/scriptSig input could acquire a `finalScriptSig`
|
|
3383
|
+
* server-side and legitimately change txid; that protocol shape would need a
|
|
3384
|
+
* different comparison target.
|
|
3385
|
+
*/
|
|
3386
|
+
declare function matchServerCheckpoints(serverCheckpointTxs: string[], expectedCheckpoints: Transaction[], context: string): {
|
|
3387
|
+
server: Transaction;
|
|
3388
|
+
local: Transaction;
|
|
3389
|
+
}[];
|
|
3390
|
+
/**
|
|
3391
|
+
* Assert a `submitTx` response refers to the ark transaction just submitted.
|
|
3392
|
+
*
|
|
3393
|
+
* The returned `arkTxid` is what gets passed to `finalizeTx` and persisted by
|
|
3394
|
+
* callers, so a stale or misrouted response must be rejected before either
|
|
3395
|
+
* happens: it must equal the locally signed transaction's txid, and when the
|
|
3396
|
+
* response carries the counter-signed `finalArkTx`, that transaction's txid
|
|
3397
|
+
* must match too. Server signatures live in the witness and cannot
|
|
3398
|
+
* legitimately change either — with the same taproot-only caveat as
|
|
3399
|
+
* {@link matchServerCheckpoints}.
|
|
3400
|
+
*/
|
|
3401
|
+
declare function assertSubmittedArkTxid(response: {
|
|
3402
|
+
arkTxid: string;
|
|
3403
|
+
finalArkTx?: string;
|
|
3404
|
+
}, signedArkTx: Transaction, context: string): void;
|
|
3289
3405
|
|
|
3290
3406
|
declare function getRandomId(): string;
|
|
3291
3407
|
|
|
@@ -3659,8 +3775,10 @@ type ArkadeBatchInput = ArkadeExtendedCoin | ArkadeExtendedVirtualCoin;
|
|
|
3659
3775
|
declare function createArkadeBatchHandler(intentId: string, inputs: ArkadeBatchInput[], signer: Identity, signedProof: string, message: Intent.RegisterMessage, session: SignerSession, arkProvider: ArkProvider, emulator: EmulatorProvider, network: Network,
|
|
3660
3776
|
/**
|
|
3661
3777
|
* Expected recipients of the settlement, validated against the virtual
|
|
3662
|
-
* output tree before co-signing it
|
|
3663
|
-
*
|
|
3778
|
+
* output tree before co-signing it, and — when tree signing did not run —
|
|
3779
|
+
* against the commitment tx before signing anything at finalization
|
|
3780
|
+
* (mirrors `Wallet.createBatchHandler`). Without this the handler signs
|
|
3781
|
+
* whatever the server proposes, on both paths.
|
|
3664
3782
|
*/
|
|
3665
3783
|
recipients?: Recipient[]): Batch.Handler;
|
|
3666
3784
|
|
|
@@ -4003,9 +4121,15 @@ declare class Executor implements AsyncIterable<ExecutorEvent> {
|
|
|
4003
4121
|
constructor(pkg: ExitPackage, provider: OnchainProvider, opts?: {
|
|
4004
4122
|
pollIntervalMs?: number;
|
|
4005
4123
|
feeWallet?: ExitFeeWallet;
|
|
4006
|
-
/** Abort to stop execution.
|
|
4007
|
-
*
|
|
4008
|
-
*
|
|
4124
|
+
/** Abort to stop execution.
|
|
4125
|
+
*
|
|
4126
|
+
* Iteration then rejects with `signal.reason`. Calling `abort()`
|
|
4127
|
+
* with no argument yields an error whose `name` is `"AbortError"`;
|
|
4128
|
+
* a custom reason is forwarded as-is, matching `fetch` and
|
|
4129
|
+
* `AbortSignal.prototype.throwIfAborted`.
|
|
4130
|
+
*
|
|
4131
|
+
* Already-broadcast transactions are not recalled; the executor is
|
|
4132
|
+
* idempotent, so a later run resumes from the chain. */
|
|
4009
4133
|
signal?: AbortSignal;
|
|
4010
4134
|
});
|
|
4011
4135
|
/**
|
|
@@ -5372,4 +5496,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
5372
5496
|
burn(params: BurnParams): Promise<string>;
|
|
5373
5497
|
}
|
|
5374
5498
|
|
|
5375
|
-
export { ARKADE_MAGIC, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, Batch, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, type DescriptorOptions, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertSendableAmount, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isCsvSpendable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isRetryableProviderError, isValidArkAddress, makeHandle, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
5499
|
+
export { ARKADE_MAGIC, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, Batch, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, type HDDeterministicSignCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deriveDescriptorLeafCompressedPubKey, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isCsvSpendable, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isRetryableProviderError, isValidArkAddress, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports as arkade, assertSendableAmount, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, deserializeExitPackage, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, makeHandle, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-
|
|
2
|
-
export { ChainTxType, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-
|
|
3
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, isCltvSatisfied, isCsvSpendable } from './chunk-
|
|
4
|
-
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, Intent, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, RestArkProvider, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, buildVersion, canRecoverOnchain, canSpendOffchain, decodeTapscript, getArkPsbtFields, getNetwork, getSequence, hasTerminalSpend, isArkError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports as arkade, assertSendableAmount, assertSubmittedArkTxid, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, deserializeExitPackage, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-QO3IKBYL.js';
|
|
2
|
+
export { ChainTxType, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-ENWR2F2P.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, isCltvSatisfied, isCsvSpendable } from './chunk-QMPNPZ2T.js';
|
|
4
|
+
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, Intent, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, buildVersion, canRecoverOnchain, canSpendOffchain, decodeTapscript, getArkPsbtFields, getNetwork, getSequence, hasTerminalSpend, isArkError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-JCJ5WFS3.js';
|
|
5
5
|
import './chunk-NSBPE2FW.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
3
|
+
var chunkZPL34T2Q_cjs = require('../../chunk-ZPL34T2Q.cjs');
|
|
4
|
+
require('../../chunk-G7DOBFQN.cjs');
|
|
5
|
+
require('../../chunk-V2TOHHPW.cjs');
|
|
6
|
+
require('../../chunk-OWCPXRGP.cjs');
|
|
7
7
|
require('../../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
9
9
|
// src/repositories/realm/walletRepository.ts
|
|
@@ -38,7 +38,7 @@ var RealmWalletRepository = class {
|
|
|
38
38
|
await this.ensureInit();
|
|
39
39
|
this.realm.write(() => {
|
|
40
40
|
for (const vtxo of vtxos) {
|
|
41
|
-
const s =
|
|
41
|
+
const s = chunkZPL34T2Q_cjs.serializeVtxo(vtxo);
|
|
42
42
|
this.realm.create(
|
|
43
43
|
"ArkVtxo",
|
|
44
44
|
{
|
|
@@ -86,7 +86,7 @@ var RealmWalletRepository = class {
|
|
|
86
86
|
throw new Error("RealmWalletRepository requires an address");
|
|
87
87
|
}
|
|
88
88
|
for (const vtxo of vtxos) {
|
|
89
|
-
if (!
|
|
89
|
+
if (!chunkZPL34T2Q_cjs.isVtxoForScript(vtxo, key.script)) {
|
|
90
90
|
throw new Error(
|
|
91
91
|
`VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
|
|
92
92
|
);
|
|
@@ -111,7 +111,7 @@ var RealmWalletRepository = class {
|
|
|
111
111
|
await this.ensureInit();
|
|
112
112
|
this.realm.write(() => {
|
|
113
113
|
for (const utxo of utxos) {
|
|
114
|
-
const s =
|
|
114
|
+
const s = chunkZPL34T2Q_cjs.serializeUtxo(utxo);
|
|
115
115
|
this.realm.create(
|
|
116
116
|
"ArkUtxo",
|
|
117
117
|
{
|
|
@@ -164,7 +164,7 @@ var RealmWalletRepository = class {
|
|
|
164
164
|
amount: tx.amount,
|
|
165
165
|
settled: tx.settled,
|
|
166
166
|
createdAt: tx.createdAt,
|
|
167
|
-
assetsJson: tx.assets ? JSON.stringify(
|
|
167
|
+
assetsJson: tx.assets ? JSON.stringify(chunkZPL34T2Q_cjs.serializeAssets(tx.assets)) : null
|
|
168
168
|
},
|
|
169
169
|
"modified"
|
|
170
170
|
);
|
|
@@ -234,9 +234,9 @@ function vtxoObjectToDomain(obj) {
|
|
|
234
234
|
// Post-migration every row has `script`, but the backfill is
|
|
235
235
|
// idempotent: derive from `address` if the legacy column is still
|
|
236
236
|
// null (e.g. the migration hasn't run yet on this handle).
|
|
237
|
-
script: obj.script ??
|
|
237
|
+
script: obj.script ?? chunkZPL34T2Q_cjs.scriptFromArkAddress(obj.address)
|
|
238
238
|
};
|
|
239
|
-
return
|
|
239
|
+
return chunkZPL34T2Q_cjs.deserializeVtxo(serialized);
|
|
240
240
|
}
|
|
241
241
|
function utxoObjectToDomain(obj) {
|
|
242
242
|
const serialized = {
|
|
@@ -255,7 +255,7 @@ function utxoObjectToDomain(obj) {
|
|
|
255
255
|
status: JSON.parse(obj.statusJson),
|
|
256
256
|
extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
|
|
257
257
|
};
|
|
258
|
-
return
|
|
258
|
+
return chunkZPL34T2Q_cjs.deserializeUtxo(serialized);
|
|
259
259
|
}
|
|
260
260
|
function txObjectToDomain(obj) {
|
|
261
261
|
const tx = {
|
|
@@ -270,7 +270,7 @@ function txObjectToDomain(obj) {
|
|
|
270
270
|
createdAt: obj.createdAt
|
|
271
271
|
};
|
|
272
272
|
if (obj.assetsJson) {
|
|
273
|
-
tx.assets =
|
|
273
|
+
tx.assets = chunkZPL34T2Q_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
274
274
|
}
|
|
275
275
|
return tx;
|
|
276
276
|
}
|
|
@@ -431,7 +431,7 @@ var RealmIntentRepository = class {
|
|
|
431
431
|
const clashes = [
|
|
432
432
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
|
|
433
433
|
].map(toIntent);
|
|
434
|
-
|
|
434
|
+
chunkZPL34T2Q_cjs.assertIntentIdUnique(intent, clashes);
|
|
435
435
|
}
|
|
436
436
|
this.realm.create(
|
|
437
437
|
"ArkIntent",
|
|
@@ -460,14 +460,14 @@ var RealmIntentRepository = class {
|
|
|
460
460
|
}
|
|
461
461
|
async getIntents(filter) {
|
|
462
462
|
const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
|
|
463
|
-
const out = filter ? all.filter((i) =>
|
|
464
|
-
const { skip, end } =
|
|
463
|
+
const out = filter ? all.filter((i) => chunkZPL34T2Q_cjs.intentMatchesFilter(i, filter)) : all;
|
|
464
|
+
const { skip, end } = chunkZPL34T2Q_cjs.intentPageBounds(filter, out.length);
|
|
465
465
|
return out.slice(skip, end);
|
|
466
466
|
}
|
|
467
467
|
async getLockedVtxoOutpoints() {
|
|
468
468
|
const out = [];
|
|
469
469
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
470
|
-
if (!
|
|
470
|
+
if (!chunkZPL34T2Q_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
|
|
471
471
|
return out;
|
|
472
472
|
}
|
|
473
473
|
async [Symbol.asyncDispose]() {
|
|
@@ -509,7 +509,7 @@ var RealmVirtualTxRepository = class {
|
|
|
509
509
|
txid: t.txid,
|
|
510
510
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
511
511
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
512
|
-
type:
|
|
512
|
+
type: chunkZPL34T2Q_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
513
513
|
},
|
|
514
514
|
"modified"
|
|
515
515
|
);
|
|
@@ -742,7 +742,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
742
742
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
743
743
|
const newVtxo = newVtxos[i];
|
|
744
744
|
if (!newVtxo.script) {
|
|
745
|
-
newVtxo.script =
|
|
745
|
+
newVtxo.script = chunkZPL34T2Q_cjs.scriptFromArkAddress(newVtxo.address);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
const oldHasVirtualTx = Array.isArray(oldRealm?.schema) && oldRealm.schema.some((s) => s.name === "ArkVirtualTx");
|
|
@@ -759,7 +759,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
759
759
|
|
|
760
760
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
761
761
|
enumerable: true,
|
|
762
|
-
get: function () { return
|
|
762
|
+
get: function () { return chunkZPL34T2Q_cjs.ChainedTxType; }
|
|
763
763
|
});
|
|
764
764
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
765
765
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|