@arkade-os/sdk 0.5.6 → 0.5.7
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 +6 -6
- 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/{asyncStorageTaskQueue-Bh2n0msM.d.cts → asyncStorageTaskQueue-B9byr6ij.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-CpkstKZ5.d.ts → asyncStorageTaskQueue-XP4CCdRY.d.ts} +2 -2
- package/dist/{chunk-HKEPJBTY.cjs → chunk-3NALVGMJ.cjs} +16 -16
- package/dist/{chunk-HKEPJBTY.cjs.map → chunk-3NALVGMJ.cjs.map} +1 -1
- package/dist/{chunk-VWW2ZBPI.js → chunk-4AJRIM44.js} +4 -4
- package/dist/{chunk-VWW2ZBPI.js.map → chunk-4AJRIM44.js.map} +1 -1
- package/dist/{chunk-NDQ4LB4X.cjs → chunk-MQUATTIM.cjs} +8 -8
- package/dist/{chunk-NDQ4LB4X.cjs.map → chunk-MQUATTIM.cjs.map} +1 -1
- package/dist/{chunk-DJYX73W2.js → chunk-MWEDDWFU.js} +4 -4
- package/dist/{chunk-DJYX73W2.js.map → chunk-MWEDDWFU.js.map} +1 -1
- package/dist/{chunk-C7NY6WSA.js → chunk-MWMO2ZQP.js} +3 -3
- package/dist/{chunk-C7NY6WSA.js.map → chunk-MWMO2ZQP.js.map} +1 -1
- package/dist/{chunk-4X67IB2V.cjs → chunk-MXCB6EVM.cjs} +15 -15
- package/dist/{chunk-4X67IB2V.cjs.map → chunk-MXCB6EVM.cjs.map} +1 -1
- package/dist/{chunk-LZAINCGU.cjs → chunk-OMPDPBT5.cjs} +3 -3
- package/dist/chunk-OMPDPBT5.cjs.map +1 -0
- package/dist/{chunk-YKT4NAQG.js → chunk-RLD7DRSZ.js} +341 -25
- package/dist/chunk-RLD7DRSZ.js.map +1 -0
- package/dist/{chunk-Y3CDDPWI.cjs → chunk-URGVQ5TQ.cjs} +756 -434
- package/dist/chunk-URGVQ5TQ.cjs.map +1 -0
- package/dist/{chunk-47Z4LEIW.js → chunk-V2DDN4MV.js} +3 -3
- package/dist/{chunk-47Z4LEIW.js.map → chunk-V2DDN4MV.js.map} +1 -1
- package/dist/{chunk-YS76JSGP.cjs → chunk-V5WRO3P6.cjs} +10 -10
- package/dist/{chunk-YS76JSGP.cjs.map → chunk-V5WRO3P6.cjs.map} +1 -1
- package/dist/{chunk-QTMK34TP.js → chunk-VMVFRTF4.js} +3 -3
- package/dist/chunk-VMVFRTF4.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +2 -2
- package/dist/contracts/handlers/index.d.ts +2 -2
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{index-C66rjxz2.d.ts → index-18cDMayF.d.ts} +1 -1
- package/dist/{index-2wKMrT0a.d.ts → index-B_kcptF8.d.ts} +1 -1
- package/dist/{index-46g577Ka.d.cts → index-Ccfhdfvj.d.cts} +1 -1
- package/dist/{index-Dqk07NwJ.d.cts → index-DDJFHfba.d.cts} +1 -1
- package/dist/index.cjs +335 -311
- package/dist/index.d.cts +72 -121
- package/dist/index.d.ts +72 -121
- package/dist/index.js +4 -4
- package/dist/{keyringDescriptorProvider-DiBM4GmB.d.ts → keyringDescriptorProvider-DL-jAiRO.d.ts} +150 -2
- package/dist/{keyringDescriptorProvider-DnaLUC7v.d.cts → keyringDescriptorProvider-Dtv0JWrT.d.cts} +150 -2
- package/dist/repositories/realm/index.cjs +37 -37
- 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 +35 -35
- 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-BM6IAKlS.d.ts → taskRunner-DUafWu0o.d.ts} +2 -2
- package/dist/{taskRunner-BmDIZiSl.d.cts → taskRunner-JYHaLPne.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 +15 -15
- package/dist/wallet/expo/index.d.cts +3 -3
- package/dist/wallet/expo/index.d.ts +3 -3
- package/dist/wallet/expo/index.js +5 -5
- 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 +2 -2
- package/dist/chunk-LZAINCGU.cjs.map +0 -1
- package/dist/chunk-QTMK34TP.js.map +0 -1
- package/dist/chunk-Y3CDDPWI.cjs.map +0 -1
- package/dist/chunk-YKT4NAQG.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { a as Identity,
|
|
2
|
-
export {
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet,
|
|
4
|
-
export {
|
|
5
|
-
import { T as TapLeafScript, E as EncodedVtxoScript, C as CSVMultisigTapscript, R as RelativeTimelock, V as VtxoScript
|
|
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-
|
|
8
|
-
|
|
9
|
-
export { a as DelegateVtxo } from './delegate-iyDum4fw.js';
|
|
1
|
+
import { a as Identity, ah as DescriptorProvider, a3 as Transaction, a4 as SignerSession, a5 as ReadonlyIdentity, aF as DescriptorSigningRequest, aG as IntentFeeConfig, aH as OffchainInput, aI as FeeAmount, aJ as OnchainInput, aK as FeeOutput, Y as BatchRegistrationRepository, Z as BatchRegistration, _ as BatchRegistrationPageFilter, P as PageRequest, D as PageResult, B as Outpoint, $ as VirtualTxRepository, a0 as VirtualTx, a1 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, g as ArkTransaction, U as WalletState, y as Contract, w as IndexerProvider, aL as ArkadeInfo, aj as OnchainProvider, i as Activity, C as ContractRepository, X as ContractFilter, I as IWallet, x as OperatorProvider, as as NetworkName, ay as SettlementConfig, aM as ContractWatcherConfig, aN as Asset, R as Recipient, aO as FeeInfo, n as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetOperatorInfoOptions, aP as GetVtxosOptions, aQ as PaginationOptions, e as GetVtxosFilter, f as GetSpendableVtxosFilter, aR as CreateContractParams, aS as GetContractsFilter, V as VirtualCoin, aT as GetSpendablePathsOptions, aU as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aV as InputExpiryFloor, aW as IssuanceParams, aX as ReissuanceParams, aY as BurnParams, aZ as RenewVtxosOptions, p as SendOnchainParams, O as OperatorInfo, a_ as NormalizedVtxoPage, A as ArkadeReader, c as ArkadeBroadcaster, d as WalletBalance, ap as ContractSyncState, at as ContractWithVtxos, a$ as WatchedScript, b0 as PathSelection, l as NewAddress, b1 as ContractEvent, b2 as AssetDetails, b3 as IssuanceResult, b4 as DelegateInfo, b5 as MigrationGlobalSkipReason, b6 as MigrationLegSkipReason, b7 as SignerStatus, ai as IReadonlyWallet, h as ActivityRegistry, ao as IReadonlyAssetManager, b8 as StorageConfig, j as IContractManager, q as IAssetManager, o as SendParams, m as IDelegateManager, b9 as IVtxoManager, a6 as Network, av as Coin, ba as SendBitcoinParams, bb as ExplorerTransaction, aC as SignedProof, aD as Proof, bc as TreeNonces, bd as TreePartialSigs, T as TxNotificationEvent, be as PendingTx, bf as EmulatorProvider, bg as Status, bh as ChainTx, aa as TxTree, bi as ArkadeService, bj as ContractVtxoEvent, bk as ExtendedContractVtxo, bl as ResolvedArkadeService, bm as resolveArkadeService, bn as PathContext } from './index-18cDMayF.js';
|
|
2
|
+
export { bo as ActivityIntent, a7 as ActivityResolver, bp as ArkIntent, bq as ArkIntentState, v as ArkProvider, br as AssetMetadata, bs as BATCH_REGISTRATION_TERMINAL_STATES, bt as BITCOIN_EMULATOR_PUBKEY, bu as BaseWalletConfig, ae as BatchFailedEvent, ac as BatchFinalizationEvent, ad as BatchFinalizedEvent, bv as BatchInfo, bw as BatchRegistrationFilter, bx as BatchRegistrationState, by as BatchSignableIdentity, a8 as BatchStartedEvent, bz as CandidateDeps, bA as ChainTxType, a2 as ChainedTxType, bB as CommitmentTx, bC as ConnectorTreeNode, bD as ContractBalance, bE as ContractEventCallback, bF as ContractHandler, aw as ContractManager, ax as ContractManagerConfig, bG as ContractScope, bH as ContractState, bI as ContractVtxo, bJ as ContractWatcher, bK as ContractWatcherEventCallback, bL as DEFAULT_ARKADE_EMULATOR_URL, bM as DEFAULT_VTXO_PAGE_SIZE, bN as DelegateManagerImpl, bO as DelegateOptions, ak as DelegateProvider, bP as DeprecatedSignerMigrationReport, bQ as DeprecatedSignerReport, bR as DigestMismatchError, bS as Discoverable, bT as DiscoveredContract, bU as DiscoveryDeps, bV as ESPLORA_URL, bW as EmulatorInfo, ar as EsploraProvider, bX as EventSourceCapable, bY as EventSourceFactory, bZ as EventSourceLike, b_ as EventSourceUnavailableError, am as ExitCaptureMode, b$ as ExitChainResolver, an as ExitDataSource, c0 as GetArkadeInfoOptions, c1 as GetUtxosOptions, c2 as GroupMembership, c3 as HandlerError, c4 as INTENT_TERMINAL_STATES, c5 as IndexerTxType, c6 as IndexerUtxo, c7 as IndexerUtxosUnsupportedError, aB as Intent, c8 as IntentCoin, c9 as IntentFilter, ca as IntentPageFilter, cb as IntentRepository, 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, 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, al as ReadonlyWalletConfig, aq as RecipientArkadeAddressContext, cw as RenewalSplit, cx as RenewalSplitContext, cy as RestArkProvider, cz as RestDelegateProvider, cA as RestEmulatorProvider, s as RestIndexerProvider, r as RestOperatorProvider, cB as ScanContractsOptions, cC as ScanResult, cD as ScheduledSession, cE as SettlementEventType, cF as SignRequest, aA as SignedIntent, cG as SignerClassification, cH as SignerSet, t as SubscriptionEvent, cI as SubscriptionFilter, u as SubscriptionHeartbeat, cJ as SubscriptionResponse, cK as SweepTxNotification, cL as TapLeaves, aE as TimeHeight, ab as TreeNoncesEvent, ag as TreeSignatureEvent, cM as TreeSignerSession, a9 as TreeSigningStartedEvent, af 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-18cDMayF.js';
|
|
3
|
+
import { b as ArkadeCashTx, c as ArkadeCashRecord, d as ArkadeCashClaimResult, W as Wallet, R as ReadonlyWallet, e as ReceiveRotatorFactory, f as ReceiveRotatorBootOpts, g as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, h as Batch } from './keyringDescriptorProvider-DL-jAiRO.js';
|
|
4
|
+
export { i as AbortError, j as ArkError, k as ArkErrorName, l as ArkadeCash, m as ArkadeCashAction, n as ArkadeCashCreateError, o as ArkadeCashOperatorMismatchError, p as ArkadeCashUnclaimedReason, q as ArkadeCashUnclaimedVtxo, r as ArkadeCashVtxoRef, s as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, t as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, N as NotifiesIncomingFunds, u as ProviderKind, v as ProviderUnavailableError, w as REGTEST_MIN_BATCH_EXPIRY_SECONDS, x as ReadonlySingleKey, S as ServerInfoSource, y as ServerResponseMismatchError, z as SingleKey, V as VtxoReservation, C as VtxoReservedError, E as WaitForIncomingFundsOptions, G as WalletCannotAllocateAddressError, J as addArkadeCashRecord, L as arkadeCashId, O as arkadeCashResolver, Q as assertValidBatchExpiry, T as createArkadeCashTracker, U as defaultBatchExpiryPolicy, X as isAddressAllocationCapable, Y as isArkError, Z as isHDAllocationCapable, _ as isHDWalletCapable, $ as maybeArkError, a0 as mergeArkadeCashRecord, a1 as resolveBatchExpiryPolicy, a2 as resolveDescriptorSigner, a3 as selectVirtualCoins, a4 as signingDescriptorIndex, a5 as strictSigningDescriptorIndex, a6 as waitForIncomingFunds } from './keyringDescriptorProvider-DL-jAiRO.js';
|
|
5
|
+
import { T as TapLeafScript, E as EncodedVtxoScript, C as CSVMultisigTapscript, R as RelativeTimelock, V as VtxoScript } from './base-C-Y5t_0F.js';
|
|
6
|
+
export { A as ArkAddress, 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-B_kcptF8.js';
|
|
8
|
+
export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-iyDum4fw.js';
|
|
10
9
|
import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
|
|
11
10
|
import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
|
|
12
11
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
@@ -94,76 +93,6 @@ declare function evaluatePrf(o: {
|
|
|
94
93
|
*/
|
|
95
94
|
declare const mnemonicFromPrf: (prfSecret: Uint8Array, words?: 12 | 24) => string;
|
|
96
95
|
|
|
97
|
-
/**
|
|
98
|
-
* In-memory single key implementation for Bitcoin transaction signing.
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```typescript
|
|
102
|
-
* // Create from hex string
|
|
103
|
-
* const key = SingleKey.fromHex('your_private_key_hex');
|
|
104
|
-
*
|
|
105
|
-
* // Create from raw bytes
|
|
106
|
-
* const key = SingleKey.fromPrivateKey(privateKeyBytes);
|
|
107
|
-
*
|
|
108
|
-
* // Create random key
|
|
109
|
-
* const randomKey = SingleKey.fromRandomBytes();
|
|
110
|
-
*
|
|
111
|
-
* // Sign a transaction
|
|
112
|
-
* const signedTx = await key.sign(transaction);
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
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;
|
|
124
|
-
/**
|
|
125
|
-
* Export the private key as a hex string.
|
|
126
|
-
*
|
|
127
|
-
* @returns The private key as a hex string
|
|
128
|
-
*/
|
|
129
|
-
toHex(): string;
|
|
130
|
-
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
131
|
-
compressedPublicKey(): Promise<Uint8Array>;
|
|
132
|
-
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
133
|
-
signerSession(): SignerSession;
|
|
134
|
-
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
135
|
-
/**
|
|
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.
|
|
143
|
-
*/
|
|
144
|
-
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
145
|
-
toReadonly(): Promise<ReadonlySingleKey>;
|
|
146
|
-
}
|
|
147
|
-
declare class ReadonlySingleKey implements ReadonlyIdentity {
|
|
148
|
-
private readonly publicKey;
|
|
149
|
-
/** Create a readonly identity from a compressed public key. */
|
|
150
|
-
constructor(publicKey: Uint8Array);
|
|
151
|
-
/**
|
|
152
|
-
* Create a ReadonlySingleKey from a compressed public key.
|
|
153
|
-
*
|
|
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
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
static fromPublicKey(publicKey: Uint8Array): ReadonlySingleKey;
|
|
163
|
-
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
164
|
-
compressedPublicKey(): Promise<Uint8Array>;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
96
|
/**
|
|
168
97
|
* Normalize a value to descriptor format.
|
|
169
98
|
* If already a descriptor, return as-is. If hex pubkey, wrap as tr(pubkey).
|
|
@@ -622,6 +551,54 @@ declare function contractFromArkContractWithAddress(encoded: string, serverPubKe
|
|
|
622
551
|
/** Check if a string is an arkcontract. */
|
|
623
552
|
declare function isArkContract(str: string): boolean;
|
|
624
553
|
|
|
554
|
+
type ArkadeCashStatus = "available" | "claimed" | "recovering" | "expired" | "exited" | "unissued";
|
|
555
|
+
interface ArkadeCashStatusReport {
|
|
556
|
+
status: ArkadeCashStatus;
|
|
557
|
+
amount: number;
|
|
558
|
+
/** Funding transactions, each with the voucher's own share of it. */
|
|
559
|
+
issues: ArkadeCashTx[];
|
|
560
|
+
/**
|
|
561
|
+
* Spending transactions, each with the voucher's own share of it (the coin's value, before
|
|
562
|
+
* any intent fee). A claim is the offchain tx that spent the coin or, for a coin settled in a
|
|
563
|
+
* batch, the commitment of that settlement.
|
|
564
|
+
*/
|
|
565
|
+
claims: ArkadeCashTx[];
|
|
566
|
+
}
|
|
567
|
+
declare function readArkadeCash(token: string, indexer: IndexerProvider, info: ArkadeInfo, onchain?: OnchainProvider): Promise<ArkadeCashStatusReport>;
|
|
568
|
+
|
|
569
|
+
type ArkadeCashRequest = {
|
|
570
|
+
action: "get";
|
|
571
|
+
token: string;
|
|
572
|
+
} | {
|
|
573
|
+
action: "create";
|
|
574
|
+
amount: number;
|
|
575
|
+
} | {
|
|
576
|
+
action: "claim";
|
|
577
|
+
token: string;
|
|
578
|
+
} | {
|
|
579
|
+
action: "reveal";
|
|
580
|
+
token: string;
|
|
581
|
+
} | {
|
|
582
|
+
action: "activities";
|
|
583
|
+
records: ArkadeCashRecord[];
|
|
584
|
+
};
|
|
585
|
+
type ArkadeCashResponse = ({
|
|
586
|
+
action: "get";
|
|
587
|
+
} & ArkadeCashStatusReport & {
|
|
588
|
+
cashId: string;
|
|
589
|
+
}) | {
|
|
590
|
+
action: "create";
|
|
591
|
+
token: string;
|
|
592
|
+
} | ({
|
|
593
|
+
action: "claim";
|
|
594
|
+
} & ArkadeCashClaimResult) | {
|
|
595
|
+
action: "reveal";
|
|
596
|
+
cashId: string;
|
|
597
|
+
} | {
|
|
598
|
+
action: "activities";
|
|
599
|
+
activities: Activity[];
|
|
600
|
+
};
|
|
601
|
+
|
|
625
602
|
/**
|
|
626
603
|
* Thrown when a descriptor-capable contract (default, delegate, or boarding)
|
|
627
604
|
* cannot be routed to any signer: its owner key (`params.pubKey`) is not this
|
|
@@ -2330,6 +2307,14 @@ type ResponseGetSpendableVtxos = ResponseEnvelope & {
|
|
|
2330
2307
|
type RequestGetBoardingUtxos = RequestEnvelope & {
|
|
2331
2308
|
type: "GET_BOARDING_UTXOS";
|
|
2332
2309
|
};
|
|
2310
|
+
type RequestArkadeCash = RequestEnvelope & {
|
|
2311
|
+
type: "ARKADE_CASH";
|
|
2312
|
+
payload: ArkadeCashRequest;
|
|
2313
|
+
};
|
|
2314
|
+
type ResponseArkadeCash = ResponseEnvelope & {
|
|
2315
|
+
type: "ARKADE_CASH";
|
|
2316
|
+
payload?: ArkadeCashResponse;
|
|
2317
|
+
};
|
|
2333
2318
|
type ResponseGetBoardingUtxos = ResponseEnvelope & {
|
|
2334
2319
|
type: "BOARDING_UTXOS";
|
|
2335
2320
|
payload: {
|
|
@@ -2960,8 +2945,8 @@ type RequestRestoreWallet = RequestEnvelope & {
|
|
|
2960
2945
|
type ResponseRestoreWallet = ResponseEnvelope & {
|
|
2961
2946
|
type: "RESTORE_WALLET_SUCCESS";
|
|
2962
2947
|
};
|
|
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);
|
|
2948
|
+
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 | RequestArkadeCash;
|
|
2949
|
+
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 | ResponseArkadeCash);
|
|
2965
2950
|
declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
|
|
2966
2951
|
readonly messageTag: string;
|
|
2967
2952
|
private wallet;
|
|
@@ -3062,9 +3047,8 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
3062
3047
|
* arkcash) are excluded by default, mirroring {@link ReadonlyWallet.getVtxos}:
|
|
3063
3048
|
* they are settled in their own isolated intent and must stay out of the
|
|
3064
3049
|
* wallet's balance / VTXO / coin-selection / pending-tx views that read this.
|
|
3065
|
-
*
|
|
3066
|
-
*
|
|
3067
|
-
* directly and does include them.
|
|
3050
|
+
* Transaction history excludes them too, as does the non-worker
|
|
3051
|
+
* `getTransactionHistory`.
|
|
3068
3052
|
*/
|
|
3069
3053
|
private getVtxosFromRepo;
|
|
3070
3054
|
/**
|
|
@@ -3080,8 +3064,7 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
3080
3064
|
* what it knows is closed — so the coins of a just-registered escrowed
|
|
3081
3065
|
* contract would count as available until the next poll.
|
|
3082
3066
|
*
|
|
3083
|
-
* Recovery-only contracts are skipped
|
|
3084
|
-
* {@link getVtxosFromRepo}).
|
|
3067
|
+
* Recovery-only contracts are skipped (see {@link getVtxosFromRepo}).
|
|
3085
3068
|
*/
|
|
3086
3069
|
private repoSnapshot;
|
|
3087
3070
|
/**
|
|
@@ -3239,6 +3222,8 @@ type MessageBusInitConfig = {
|
|
|
3239
3222
|
declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
|
|
3240
3223
|
readonly serviceWorker: ServiceWorker;
|
|
3241
3224
|
protected readonly messageTag: string;
|
|
3225
|
+
readonly arkadeCash: (request: ArkadeCashRequest) => Promise<ArkadeCashResponse | undefined>;
|
|
3226
|
+
private cashRequest;
|
|
3242
3227
|
readonly walletRepository: WalletRepository;
|
|
3243
3228
|
readonly contractRepository: ContractRepository;
|
|
3244
3229
|
readonly identity: ReadonlyIdentity;
|
|
@@ -4396,40 +4381,6 @@ declare class ArkNote implements ExtendedCoin {
|
|
|
4396
4381
|
toString(): string;
|
|
4397
4382
|
}
|
|
4398
4383
|
|
|
4399
|
-
/**
|
|
4400
|
-
* ArkadeCash is a bearer instrument for the Arkade.
|
|
4401
|
-
* It encodes a private key and contract parameters as a bech32m string,
|
|
4402
|
-
* enabling wallet-to-wallet transfers without address exchange.
|
|
4403
|
-
*
|
|
4404
|
-
* Format: arkadecash1... / tarkadecash1... (bech32m encoded)
|
|
4405
|
-
* Payload: version (1 byte) + private key (32 bytes) + server pubkey (32 bytes) + csv timelock sequence (4 bytes)
|
|
4406
|
-
*/
|
|
4407
|
-
declare class ArkadeCash {
|
|
4408
|
-
readonly csvTimelock: RelativeTimelock;
|
|
4409
|
-
readonly hrp: string;
|
|
4410
|
-
static readonly DefaultHRP = "arkadecash";
|
|
4411
|
-
/** The only prefixes minted or accepted: mainnet and test networks. */
|
|
4412
|
-
static readonly HRPs: readonly string[];
|
|
4413
|
-
static readonly Version = 0;
|
|
4414
|
-
static readonly PayloadLength: number;
|
|
4415
|
-
private readonly _privateKey;
|
|
4416
|
-
private readonly _serverPubKey;
|
|
4417
|
-
private readonly _publicKey;
|
|
4418
|
-
constructor(privateKey: Uint8Array, serverPubKey: Uint8Array, csvTimelock: RelativeTimelock, hrp?: string);
|
|
4419
|
-
/** The note's private key. Returns a fresh copy; mutating it is a no-op. */
|
|
4420
|
-
get privateKey(): Uint8Array;
|
|
4421
|
-
/** The server's public key. Returns a fresh copy; mutating it is a no-op. */
|
|
4422
|
-
get serverPubKey(): Uint8Array;
|
|
4423
|
-
/** The note's public key. Returns a fresh copy; mutating it is a no-op. */
|
|
4424
|
-
get publicKey(): Uint8Array;
|
|
4425
|
-
static generate(serverPubKey: Uint8Array, csvTimelock: RelativeTimelock, hrp?: string): ArkadeCash;
|
|
4426
|
-
static fromString(encoded: string): ArkadeCash;
|
|
4427
|
-
toString(): string;
|
|
4428
|
-
get identity(): SingleKey;
|
|
4429
|
-
get vtxoScript(): DefaultVtxo.Script;
|
|
4430
|
-
address(addressHrp: string): ArkAddress;
|
|
4431
|
-
}
|
|
4432
|
-
|
|
4433
4384
|
/**
|
|
4434
4385
|
* Arkade Batch Handler
|
|
4435
4386
|
*
|
|
@@ -6817,4 +6768,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6817
6768
|
private burnWith;
|
|
6818
6769
|
}
|
|
6819
6770
|
|
|
6820
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper,
|
|
6771
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkNote, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, Arkade, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCashClaimResult, ArkadeCashRecord, type ArkadeCashRequest, type ArkadeCashResponse, type ArkadeCashStatus, type ArkadeCashStatusReport, ArkadeCashTx, 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, BatchRegistrationPageFilter, 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, 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, IntentFeeConfig, 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, OperatorInfo, 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, 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, SignedProof, SignerSession, SignerStatus, 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, readArkadeCash, registerWalletRestoreHook, resolveAssetAmount, resolveSendAmount, sdkVersion, selectCoinsWithAsset, selectionOf, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, submitViaEmulator, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, Arkade, ArkadeCash, ArkadeCashCreateError, ArkadeCashOperatorMismatchError, AssetManager, BATCH_REGISTRATION_TERMINAL_STATES, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, CachingOperatorProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_PASSKEY_LABEL, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryBatchRegistrationRepository, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBBatchRegistrationRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, KeyringDescriptorProvider, MAX_PAGE_SIZE, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainCosignPreflightError, OnchainWallet, OversizedChangeError, P2A, PasskeyCancelled, PasskeyUnconfirmed, PaymentRouter, PrevTxUnavailableError, PrfUnavailable, REGTEST_MIN_BATCH_EXPIRY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TreeSignerSession, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, collectBatchRegistrations, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, createPrfPasskey, decodeArkContract, defaultBatchExpiryPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, evaluatePrf, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isCosignFallback, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalBatchRegistrationState, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, logExcludedVtxos, makeHandle, matchServerCheckpoints, mnemonicFromPrf, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, prfSupport, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, Arkade, ArkadeCash, ArkadeCashCreateError, ArkadeCashOperatorMismatchError, AssetManager, BATCH_REGISTRATION_TERMINAL_STATES, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, CachingOperatorProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_PASSKEY_LABEL, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryBatchRegistrationRepository, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBBatchRegistrationRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, KeyringDescriptorProvider, MAX_PAGE_SIZE, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainCosignPreflightError, OnchainWallet, OversizedChangeError, P2A, PasskeyCancelled, PasskeyUnconfirmed, PaymentRouter, PrevTxUnavailableError, PrfUnavailable, REGTEST_MIN_BATCH_EXPIRY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestEmulatorProvider, SeedIdentity, SendDeadlineExceededError, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, StaticDescriptorProvider, TreeSignerSession, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, VtxoReservedError, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WsElectrumChainSource, addArkadeCashRecord, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, arkadeCashId, arkadeCashResolver, assertFinalCommitmentMatchesValidated, assertNoAssets, assertNoSelection, assertPageRequest, assertRecipientArkadeAddress, assertSendDeadline, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, captureSendDeadline, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, collectBatchRegistrations, collectContracts, collectIntents, collectPages, collectScriptVtxos, collectTransactionHistory, collectUtxos, collectVtxos, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createArkadeCashTracker, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, createPrfPasskey, decodeArkContract, defaultBatchExpiryPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, evaluatePrf, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isCosignFallback, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalBatchRegistrationState, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, iteratePages, logExcludedVtxos, makeHandle, matchServerCheckpoints, mergeArkadeCashRecord, mnemonicFromPrf, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, pageResult, prfSupport, promisifyRequest, provisionClaimSecret, provisionRefundKey, readArkadeCash, registerWalletRestoreHook, resolveAssetAmount, resolveBatchExpiryPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, selectCoinsWithAsset, selectVirtualCoins, selectionOf, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, submitViaEmulator, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-RLD7DRSZ.js';
|
|
2
2
|
import './chunk-V3ZLL5VY.js';
|
|
3
|
-
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, IndexerUtxosUnsupportedError, RestIndexerProvider, asset_exports as asset } from './chunk-
|
|
4
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor } from './chunk-
|
|
3
|
+
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, IndexerUtxosUnsupportedError, RestIndexerProvider, asset_exports as asset } from './chunk-MWMO2ZQP.js';
|
|
4
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor } from './chunk-V2DDN4MV.js';
|
|
5
5
|
export { UnsupportedProgramVersionError, toXOnly } from './chunk-DNFTHG73.js';
|
|
6
|
-
export { ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, OnchainCosignAmbiguousError, OnchainCosignRejectedError, OnchainCosignUnsupportedError, PrevArkTxField, PrevoutTxField, Proof, ProviderUnavailableError, READ_TIMEOUT_MS, RestArkProvider, RestOperatorProvider, ServerResponseMismatchError, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNormalizedVtxos, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, isVtxoSpent, maybeArkError, resolveEventSource, sdkVersion, setArkPsbtField, toOffchainInputFeeParams } from './chunk-
|
|
6
|
+
export { ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, OnchainCosignAmbiguousError, OnchainCosignRejectedError, OnchainCosignUnsupportedError, PrevArkTxField, PrevoutTxField, Proof, ProviderUnavailableError, READ_TIMEOUT_MS, RestArkProvider, RestOperatorProvider, ServerResponseMismatchError, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, assertAllowedSighashTypes, assertNonNegativeMs, assertTimerMs, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNormalizedVtxos, isArkError, isEventSourceUnavailableError, isPastExpiry, isRetryableProviderError, isVirtualCoin, isVtxoSpent, maybeArkError, resolveEventSource, sdkVersion, setArkPsbtField, toOffchainInputFeeParams } from './chunk-VMVFRTF4.js';
|
|
7
7
|
export { ArkAddress, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, DEFAULT_ARKADE_EMULATOR_URL, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, REGTEST_EMULATOR_PUBKEY, TapTreeCoder, VtxoScript, assembleBtcdTaprootTree, decodeTapscript, defaultEmulatorPubkey, getNetwork, getSequence, networkFromArkadeInfo, networkFromOperatorInfo, networks, resolveEmulatorPubkey, scriptFromTapLeafScript, sequenceToTimelock, timelockToSequence } from './chunk-FDJ734CH.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/{keyringDescriptorProvider-DiBM4GmB.d.ts → keyringDescriptorProvider-DL-jAiRO.d.ts}
RENAMED
|
@@ -1,9 +1,79 @@
|
|
|
1
|
-
import { a3 as
|
|
1
|
+
import { a as Identity, a3 as Transaction, a4 as SignerSession, a5 as ReadonlyIdentity, a6 as Network, a7 as ActivityResolver, a8 as BatchStartedEvent, a9 as TreeSigningStartedEvent, aa as TxTree, ab as TreeNoncesEvent, ac as BatchFinalizationEvent, ad as BatchFinalizedEvent, ae as BatchFailedEvent, af as TreeTxEvent, ag as TreeSignatureEvent, n as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, ah as DescriptorProvider, j as IContractManager, k as GetNewAddressesOptions, l as NewAddress, ai as IReadonlyWallet, aj as OnchainProvider, x as OperatorProvider, w as IndexerProvider, ak as DelegateProvider, al as ReadonlyWalletConfig, Y as BatchRegistrationRepository, $ as VirtualTxRepository, am as ExitCaptureMode, an as ExitDataSource, h as ActivityRegistry, ao as IReadonlyAssetManager, ap as ContractSyncState, aq as RecipientArkadeAddressContext, G as GetOperatorInfoOptions, O as OperatorInfo, A as ArkadeReader, ar as EsploraProvider, as as NetworkName, d as WalletBalance, e as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, f as GetSpendableVtxosFilter, at as ContractWithVtxos, au as selectPendingRecoveryOutpoints, g as ArkTransaction, i as Activity, E as ExtendedCoin, av as Coin, z as ExtendedVirtualCoin, aw as ContractManager, ax as ContractManagerConfig, I as IWallet, B as Outpoint, ay as SettlementConfig, c as ArkadeBroadcaster, q as IAssetManager, az as VtxoManager, m as IDelegateManager, S as SettleParams, R as Recipient, p as SendOnchainParams, aA as SignedIntent, aB as Intent, aC as SignedProof, aD as Proof, o as SendParams, aE as TimeHeight, P as PageRequest, D as PageResult, F as ScriptVtxoCursor, H as ScriptVtxoPageOptions, J as StoredVtxo, K as VtxoRepositoryKey, L as TransactionHistoryPageFilter, M as TransactionHistoryPageCursor, Q as AtomicWalletState, U as WalletState, aF as DescriptorSigningRequest } from './index-18cDMayF.js';
|
|
2
2
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
import { R as RelativeTimelock, A as ArkAddress, C as CSVMultisigTapscript } from './base-C-Y5t_0F.js';
|
|
5
5
|
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-iyDum4fw.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* In-memory single key implementation for Bitcoin transaction signing.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Create from hex string
|
|
13
|
+
* const key = SingleKey.fromHex('your_private_key_hex');
|
|
14
|
+
*
|
|
15
|
+
* // Create from raw bytes
|
|
16
|
+
* const key = SingleKey.fromPrivateKey(privateKeyBytes);
|
|
17
|
+
*
|
|
18
|
+
* // Create random key
|
|
19
|
+
* const randomKey = SingleKey.fromRandomBytes();
|
|
20
|
+
*
|
|
21
|
+
* // Sign a transaction
|
|
22
|
+
* const signedTx = await key.sign(transaction);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare class SingleKey implements Identity {
|
|
26
|
+
private key;
|
|
27
|
+
private constructor();
|
|
28
|
+
/** Create a signing identity from raw private key bytes. */
|
|
29
|
+
static fromPrivateKey(privateKey: Uint8Array): SingleKey;
|
|
30
|
+
/** Create a signing identity from a hex-encoded private key. */
|
|
31
|
+
static fromHex(privateKeyHex: string): SingleKey;
|
|
32
|
+
/** Create a signing identity with a freshly generated random private key. */
|
|
33
|
+
static fromRandomBytes(): SingleKey;
|
|
34
|
+
/**
|
|
35
|
+
* Export the private key as a hex string.
|
|
36
|
+
*
|
|
37
|
+
* @returns The private key as a hex string
|
|
38
|
+
*/
|
|
39
|
+
toHex(): string;
|
|
40
|
+
sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
|
|
41
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
42
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
43
|
+
signerSession(): SignerSession;
|
|
44
|
+
signMessage(message: Uint8Array, signatureType?: "schnorr" | "ecdsa"): Promise<Uint8Array>;
|
|
45
|
+
/**
|
|
46
|
+
* BIP-340 sign `messageHash` with aux_rand = 0, so the signature — and
|
|
47
|
+
* anything derived from it — is reproducible from the key alone.
|
|
48
|
+
*
|
|
49
|
+
* What lets a static wallet derive a swap preimage instead of storing one
|
|
50
|
+
* (see `wallet/contractSecrets.ts`). Deliberately NOT `signMessage`, whose
|
|
51
|
+
* schnorr branch draws a random aux_rand: a preimage derived from that is
|
|
52
|
+
* unrecoverable, and the loss would only surface at claim time.
|
|
53
|
+
*/
|
|
54
|
+
signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
|
|
55
|
+
toReadonly(): Promise<ReadonlySingleKey>;
|
|
56
|
+
}
|
|
57
|
+
declare class ReadonlySingleKey implements ReadonlyIdentity {
|
|
58
|
+
private readonly publicKey;
|
|
59
|
+
/** Create a readonly identity from a compressed public key. */
|
|
60
|
+
constructor(publicKey: Uint8Array);
|
|
61
|
+
/**
|
|
62
|
+
* Create a ReadonlySingleKey from a compressed public key.
|
|
63
|
+
*
|
|
64
|
+
* @param publicKey - 33-byte compressed public key (02/03 prefix + 32-byte x coordinate)
|
|
65
|
+
* @returns A new ReadonlySingleKey instance
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* const pubkey = new Uint8Array(33); // your compressed public key
|
|
69
|
+
* const readonlyKey = ReadonlySingleKey.fromPublicKey(pubkey);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
static fromPublicKey(publicKey: Uint8Array): ReadonlySingleKey;
|
|
73
|
+
xOnlyPublicKey(): Promise<Uint8Array>;
|
|
74
|
+
compressedPublicKey(): Promise<Uint8Array>;
|
|
75
|
+
}
|
|
76
|
+
|
|
7
77
|
/** Wall-clock floor for `batchExpiry` outside regtest. */
|
|
8
78
|
declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
|
|
9
79
|
/** Wall-clock floor for `batchExpiry` on regtest (~10 blocks). */
|
|
@@ -43,6 +113,71 @@ declare function resolveBatchExpiryPolicy(network: Network, overrides?: Partial<
|
|
|
43
113
|
*/
|
|
44
114
|
declare function assertValidBatchExpiry(batchExpiry: bigint, policy: BatchExpiryPolicy): RelativeTimelock;
|
|
45
115
|
|
|
116
|
+
/**
|
|
117
|
+
* ArkadeCash is a bearer instrument for the Arkade.
|
|
118
|
+
* It encodes a private key and contract parameters as a bech32m string,
|
|
119
|
+
* enabling wallet-to-wallet transfers without address exchange.
|
|
120
|
+
*
|
|
121
|
+
* Format: arkadecash1... / tarkadecash1... (bech32m encoded)
|
|
122
|
+
* Payload: version (1 byte) + private key (32 bytes) + server pubkey (32 bytes) + csv timelock sequence (4 bytes)
|
|
123
|
+
*/
|
|
124
|
+
declare class ArkadeCash {
|
|
125
|
+
readonly csvTimelock: RelativeTimelock;
|
|
126
|
+
readonly hrp: string;
|
|
127
|
+
static readonly DefaultHRP = "arkadecash";
|
|
128
|
+
/** The only prefixes minted or accepted: mainnet and test networks. */
|
|
129
|
+
static readonly HRPs: readonly string[];
|
|
130
|
+
static readonly Version = 0;
|
|
131
|
+
static readonly PayloadLength: number;
|
|
132
|
+
private readonly _privateKey;
|
|
133
|
+
private readonly _serverPubKey;
|
|
134
|
+
private readonly _publicKey;
|
|
135
|
+
constructor(privateKey: Uint8Array, serverPubKey: Uint8Array, csvTimelock: RelativeTimelock, hrp?: string);
|
|
136
|
+
/** The note's private key. Returns a fresh copy; mutating it is a no-op. */
|
|
137
|
+
get privateKey(): Uint8Array;
|
|
138
|
+
/** The server's public key. Returns a fresh copy; mutating it is a no-op. */
|
|
139
|
+
get serverPubKey(): Uint8Array;
|
|
140
|
+
/** The note's public key. Returns a fresh copy; mutating it is a no-op. */
|
|
141
|
+
get publicKey(): Uint8Array;
|
|
142
|
+
static generate(serverPubKey: Uint8Array, csvTimelock: RelativeTimelock, hrp?: string): ArkadeCash;
|
|
143
|
+
static fromString(encoded: string): ArkadeCash;
|
|
144
|
+
toString(): string;
|
|
145
|
+
get identity(): SingleKey;
|
|
146
|
+
get vtxoScript(): DefaultVtxo.Script;
|
|
147
|
+
address(addressHrp: string): ArkAddress;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
type ArkadeCashAction = "issued" | "claimed";
|
|
151
|
+
/** One transaction of a voucher and the voucher's share of it, in sats. */
|
|
152
|
+
interface ArkadeCashTx {
|
|
153
|
+
txid: string;
|
|
154
|
+
amount: number;
|
|
155
|
+
}
|
|
156
|
+
interface ArkadeCashRecord {
|
|
157
|
+
id: string;
|
|
158
|
+
action: ArkadeCashAction;
|
|
159
|
+
createdAt: number;
|
|
160
|
+
outcome: string;
|
|
161
|
+
issues: ArkadeCashTx[];
|
|
162
|
+
claims: ArkadeCashTx[];
|
|
163
|
+
}
|
|
164
|
+
declare class ArkadeCashTracker {
|
|
165
|
+
readonly records: Map<string, ArkadeCashRecord>;
|
|
166
|
+
get(id: string): ArkadeCashRecord | undefined;
|
|
167
|
+
list(): ArkadeCashRecord[];
|
|
168
|
+
}
|
|
169
|
+
declare function createArkadeCashTracker(): ArkadeCashTracker;
|
|
170
|
+
/**
|
|
171
|
+
* Combine two records of one voucher. Transactions are unioned by txid and the earliest
|
|
172
|
+
* `createdAt` is kept. A claim outranks an issue for `action` and `outcome`; between records
|
|
173
|
+
* with the same action, `next` wins.
|
|
174
|
+
*/
|
|
175
|
+
declare function mergeArkadeCashRecord(prev: ArkadeCashRecord | undefined, next: ArkadeCashRecord): ArkadeCashRecord;
|
|
176
|
+
/** Inject a public record, merging it into any record already held for the voucher. */
|
|
177
|
+
declare function addArkadeCashRecord(records: ArkadeCashTracker, record: ArkadeCashRecord): void;
|
|
178
|
+
declare function arkadeCashId(cash: ArkadeCash): string;
|
|
179
|
+
declare function arkadeCashResolver(records: ArkadeCashTracker): ActivityResolver;
|
|
180
|
+
|
|
46
181
|
declare class ArkError extends Error {
|
|
47
182
|
readonly code: number;
|
|
48
183
|
readonly message: string;
|
|
@@ -590,6 +725,11 @@ interface ArkadeCashUnclaimedVtxo extends ArkadeCashVtxoRef {
|
|
|
590
725
|
* non-sweepable states become claimable.
|
|
591
726
|
*/
|
|
592
727
|
interface ArkadeCashClaimResult {
|
|
728
|
+
/**
|
|
729
|
+
* The Arkade transactions registered by successful sweeps, each with the sats it paid this
|
|
730
|
+
* wallet.
|
|
731
|
+
*/
|
|
732
|
+
claims?: ArkadeCashTx[];
|
|
593
733
|
/** Satoshis swept to this wallet instantly (the thin single-key sweep). */
|
|
594
734
|
swept: number;
|
|
595
735
|
/**
|
|
@@ -1590,6 +1730,14 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1590
1730
|
* purge-on-completion bound that justifies storing it in the clear.
|
|
1591
1731
|
*/
|
|
1592
1732
|
removeRecoveryContract(script: string): Promise<void>;
|
|
1733
|
+
/**
|
|
1734
|
+
* Correlate an imported voucher's settlement with the voucher record. This
|
|
1735
|
+
* is deliberately kept on wallet state rather than being inferred from the
|
|
1736
|
+
* generic recovery row, which has no safe public correlation key. The
|
|
1737
|
+
* imported contract carries no cash id, so its script is the join key:
|
|
1738
|
+
* the script is the voucher id.
|
|
1739
|
+
*/
|
|
1740
|
+
correlateArkadeCashRecovery(cashId: string, txid: string, amount: number, outcome?: string): Promise<void>;
|
|
1593
1741
|
/**
|
|
1594
1742
|
* Split the VTXOs at an arkadeCash address into three buckets: the ones the
|
|
1595
1743
|
* thin sweep can move (`spendable`), the operator-swept ones that must go
|
|
@@ -1931,4 +2079,4 @@ declare class KeyringDescriptorProvider implements DescriptorProvider {
|
|
|
1931
2079
|
private mutate;
|
|
1932
2080
|
}
|
|
1933
2081
|
|
|
1934
|
-
export { type AddressAllocationCapable as A, type BatchExpiryPolicy as B,
|
|
2082
|
+
export { maybeArkError as $, type AddressAllocationCapable as A, type BatchExpiryPolicy as B, VtxoReservedError as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D, type WaitForIncomingFundsOptions as E, ForeignDescriptorError as F, WalletCannotAllocateAddressError as G, type HDWalletCapable as H, type IncomingFunds as I, addArkadeCashRecord as J, KeyringDescriptorProvider as K, arkadeCashId as L, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as M, type NotifiesIncomingFunds as N, arkadeCashResolver as O, type ProviderConnectionState as P, assertValidBatchExpiry as Q, ReadonlyWallet as R, type ServerInfoSource as S, createArkadeCashTracker as T, defaultBatchExpiryPolicy as U, type VtxoReservation as V, Wallet as W, isAddressAllocationCapable as X, isArkError as Y, isHDAllocationCapable as Z, isHDWalletCapable as _, type HDAllocationCapable as a, mergeArkadeCashRecord as a0, resolveBatchExpiryPolicy as a1, resolveDescriptorSigner as a2, selectVirtualCoins as a3, signingDescriptorIndex as a4, strictSigningDescriptorIndex as a5, waitForIncomingFunds as a6, type ArkadeCashTx as b, type ArkadeCashRecord as c, type ArkadeCashClaimResult as d, type ReceiveRotatorFactory as e, type ReceiveRotatorBootOpts as f, type ReceiveRotatorBoot as g, Batch as h, AbortError as i, ArkError as j, ArkErrorName as k, ArkadeCash as l, type ArkadeCashAction as m, ArkadeCashCreateError as n, ArkadeCashOperatorMismatchError as o, type ArkadeCashUnclaimedReason as p, type ArkadeCashUnclaimedVtxo as q, type ArkadeCashVtxoRef as r, type BoardingUtxoGroup as s, IndexedDBWalletRepository as t, type ProviderKind as u, ProviderUnavailableError as v, REGTEST_MIN_BATCH_EXPIRY_SECONDS as w, ReadonlySingleKey as x, ServerResponseMismatchError as y, SingleKey as z };
|