@arkade-os/sdk 0.5.0-rc.1 → 0.5.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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/{asyncStorageTaskQueue-DqGRG66E.d.cts → asyncStorageTaskQueue-BuDvgWh6.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-DAs_n1xr.d.ts → asyncStorageTaskQueue-C5rBYlru.d.ts} +2 -2
- package/dist/{chunk-ZPSUBAWQ.js → chunk-3R476TDV.js} +3 -3
- package/dist/{chunk-ZPSUBAWQ.js.map → chunk-3R476TDV.js.map} +1 -1
- package/dist/{chunk-Q5WQ4Y2I.cjs → chunk-43FKNLX4.cjs} +49 -49
- package/dist/{chunk-Q5WQ4Y2I.cjs.map → chunk-43FKNLX4.cjs.map} +1 -1
- package/dist/{chunk-SG4XYCS7.js → chunk-4PKLULWT.js} +3 -3
- package/dist/{chunk-SG4XYCS7.js.map → chunk-4PKLULWT.js.map} +1 -1
- package/dist/{chunk-LPK4UBNJ.js → chunk-6DNR46C7.js} +4 -4
- package/dist/{chunk-LPK4UBNJ.js.map → chunk-6DNR46C7.js.map} +1 -1
- package/dist/{chunk-MXY23OPP.cjs → chunk-D25O4EGY.cjs} +10 -10
- package/dist/{chunk-MXY23OPP.cjs.map → chunk-D25O4EGY.cjs.map} +1 -1
- package/dist/{chunk-YEUXBECG.cjs → chunk-GMZZQXV5.cjs} +512 -441
- package/dist/chunk-GMZZQXV5.cjs.map +1 -0
- package/dist/{chunk-KB7OP3FG.cjs → chunk-HLCGYOIH.cjs} +17 -17
- package/dist/{chunk-KB7OP3FG.cjs.map → chunk-HLCGYOIH.cjs.map} +1 -1
- package/dist/{chunk-6COJWPBO.js → chunk-ISO4TI5J.js} +4 -4
- package/dist/{chunk-6COJWPBO.js.map → chunk-ISO4TI5J.js.map} +1 -1
- package/dist/{chunk-RZ2NGS6A.cjs → chunk-JZWLXNHV.cjs} +3 -3
- package/dist/{chunk-RZ2NGS6A.cjs.map → chunk-JZWLXNHV.cjs.map} +1 -1
- package/dist/{chunk-WQIWUTYS.cjs → chunk-NVZJSKZS.cjs} +17 -17
- package/dist/{chunk-WQIWUTYS.cjs.map → chunk-NVZJSKZS.cjs.map} +1 -1
- package/dist/{chunk-MEJSBJVH.js → chunk-ZOTXDOS5.js} +4 -4
- package/dist/{chunk-MEJSBJVH.js.map → chunk-ZOTXDOS5.js.map} +1 -1
- package/dist/{chunk-VTE3NYVD.js → chunk-ZRNQV6HV.js} +74 -8
- package/dist/chunk-ZRNQV6HV.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-CZzIduW4.d.cts → delegate-1yp1HyP7.d.cts} +1 -1
- package/dist/{delegate-B9Bmrns7.d.ts → delegate-BAX5QftB.d.ts} +1 -1
- package/dist/{hdWalletCapable-Cr5nGpK5.d.ts → hdWalletCapable-CmEU0NP1.d.ts} +3 -3
- package/dist/{hdWalletCapable-BIl3yLVM.d.cts → hdWalletCapable-eJgaT-ec.d.cts} +3 -3
- package/dist/{index-DQ1Hb2w_.d.ts → index-Bem5vKzX.d.ts} +3 -3
- package/dist/{index-DnNIOqHS.d.cts → index-DUxufw76.d.cts} +1 -1
- package/dist/{index-DnNIOqHS.d.ts → index-DUxufw76.d.ts} +1 -1
- package/dist/{index-Ci5MmNnK.d.cts → index-W_oMcOmG.d.cts} +3 -3
- package/dist/index.cjs +315 -295
- package/dist/index.d.cts +64 -14
- package/dist/index.d.ts +64 -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-F7wNJcF3.d.ts → taskRunner-D_iPiZIi.d.ts} +2 -2
- package/dist/{taskRunner-BDb5Ee2J.d.cts → taskRunner-Dr3NStc0.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 +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- 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 +1 -1
- package/dist/chunk-VTE3NYVD.js.map +0 -1
- package/dist/chunk-YEUXBECG.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-
|
|
2
|
-
export {
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-
|
|
4
|
-
export {
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-
|
|
6
|
-
export {
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-DUxufw76.cjs';
|
|
2
|
+
export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a3 as BatchFailedEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Z as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, U as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, am as ContractManager, an as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractWatcher, br as DEFAULT_VTXO_PAGE_SIZE, bs as DelegateManagerImpl, bt as DelegateOptions, aa as DelegateProvider, bu as DelegatorManagerImpl, bv as DelegatorProvider, bw as DeprecatedSignerMigrationReport, bx as DeprecatedSignerReport, by as DigestMismatchError, bz as Discoverable, bA as DiscoveredContract, bB as DiscoveryDeps, bC as ESPLORA_URL, bD as EsploraProvider, bE as EventSourceCapable, bF as EventSourceFactory, bG as EventSourceLike, bH as EventSourceUnavailableError, ac as ExitCaptureMode, bI as ExitChainResolver, ad as ExitDataSource, bJ as ExtendedContractVtxo, bK as GroupMembership, bL as HandlerError, bM as IDelegatorManager, bN as INTENT_TERMINAL_STATES, bO as IndexerTxType, bP as IntentCoin, bQ as KnownMetadata, bR as MUTINYNET_EMULATOR_PUBKEY, bS as MigrateDeprecatedSignerOptions, bT as MigrationLegReport, bU as MigrationVtxoRef, bV as MultisigTapscript, bW as NewAddressType, bX as Nonces, bY as Output, bZ as PageResponse, b_ as PartialSig, b$ as PrevTxSource, c0 as PrevTxUnavailableError, c1 as ProviderClass, c2 as REGTEST_EMULATOR_PUBKEY, c3 as RawTxSource, ab as ReadonlyWalletConfig, ag as RecipientArkadeAddressContext, r as RestArkProvider, c4 as RestDelegateProvider, c5 as RestDelegatorProvider, s as RestIndexerProvider, c6 as ScanContractsOptions, c7 as ScanResult, c8 as ScheduledSession, c9 as SettlementEventType, ca as SignRequest, cb as SignerClassification, cc as SignerSet, cd as SubscriptionEvent, ce as SubscriptionHeartbeat, t as SubscriptionResponse, cf as SweepTxNotification, cg as TapLeaves, ch as TapTreeCoder, ci as TapscriptType, at as TimeHeight, a0 as TreeNoncesEvent, a5 as TreeSignatureEvent, _ as TreeSigningStartedEvent, a4 as TreeTxEvent, cj as Tx, ck as TxHistoryRecord, cl as TxKey, cm as TxNotification, cn as TxTag, co as TxTreeNode, cp as TxType, cq as VirtualStatus, cr as Vtxo, cs as VtxoChain, ap as VtxoManager, ct as VtxoType, b as WalletConfig, cu as WalletMode, cv as WithPrevTx, cw as assertAllowedSighashTypes, cx as assertRecipientArkadeAddress, cy as assetMintResolver, cz as attachPrevArkTxs, cA as attachPrevoutTxs, cB as boardingResolver, cC as canRecoverOnchain, cD as canSpendOffchain, cE as canSweepOnchain, cF as classifyAgainstSignerSet, cG as classifyContractSigner, cH as collabExitResolver, cI as configureEventSource, cJ as createDefaultActivityRegistry, cK as createExitChainResolver, cL as decodeTapscript, cM as defaultEmulatorPubkey, cN as getAllNormalizedVtxos, cO as getConfiguredEventSource, cP as getNetwork, cQ as getNormalizedVtxos, cR as getRandomId, cS as getSequence, cT as hasCandidates, cU as hasTerminalSpend, cV as isBatchSignable, cW as isCooperativelyMigratable, cX as isDiscoverable, cY as isEventSourceUnavailableError, cZ as isExpired, c_ as isPastExpiry, c$ as isRecoverable, d0 as isSigningIdentity, d1 as isSpendable, d2 as isSubdust, d3 as isTerminalIntentState, d4 as isVirtualCoin, d5 as isVtxoExpiringSoon, d6 as networkFromArkadeInfo, d7 as networks, d8 as resolveEmulatorPubkey, d9 as resolveEventSource, da as resolvePrevTxs, db as scriptFromTapLeafScript, dc as signerSetFromInfo, dd as toXOnlySignerHex, de as withPrevTxs } from './index-DUxufw76.cjs';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-eJgaT-ec.cjs';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-eJgaT-ec.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-W_oMcOmG.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 VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-W_oMcOmG.cjs';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-1yp1HyP7.cjs';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-1yp1HyP7.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';
|
|
@@ -6219,6 +6219,25 @@ interface RouteQuote {
|
|
|
6219
6219
|
fee: number;
|
|
6220
6220
|
/** `amount + fee` — what leaves the wallet. */
|
|
6221
6221
|
total: number;
|
|
6222
|
+
/**
|
|
6223
|
+
* @experimental The asset shape is provisional. The v2 swap client models
|
|
6224
|
+
* assets as `give`/`take`/`amountOn` over `AssetRef`, and the two
|
|
6225
|
+
* vocabularies are expected to converge on v0.5; do not treat this field as
|
|
6226
|
+
* stable 0.4.x API.
|
|
6227
|
+
*
|
|
6228
|
+
* The asset view; absent means BTC only. The sats fields keep their
|
|
6229
|
+
* meaning — an asset rides a sats-carrying output, so `amount` is the
|
|
6230
|
+
* carrier, not zero.
|
|
6231
|
+
*
|
|
6232
|
+
* A pair, not a triple: on a cross-asset route these name DIFFERENT
|
|
6233
|
+
* assets, so `total = amount + fee` cannot hold across the two units —
|
|
6234
|
+
* which forces the purchase price into `fee`. Prefer `assets.spent` for a
|
|
6235
|
+
* cost display.
|
|
6236
|
+
*/
|
|
6237
|
+
assets?: {
|
|
6238
|
+
delivered: Asset;
|
|
6239
|
+
spent: Asset;
|
|
6240
|
+
};
|
|
6222
6241
|
/** Execute. Returns an observable handle, never a bare result. */
|
|
6223
6242
|
send(): Promise<PaymentHandle>;
|
|
6224
6243
|
meta?: Record<string, unknown>;
|
|
@@ -6235,14 +6254,18 @@ interface RouterContext {
|
|
|
6235
6254
|
wallet: Wallet;
|
|
6236
6255
|
prefs: RouterPreferences;
|
|
6237
6256
|
}
|
|
6238
|
-
/**
|
|
6239
|
-
*
|
|
6240
|
-
* `amount` supplements or overrides any amount encoded in `raw`. */
|
|
6257
|
+
/** Mirrors {@link Recipient}: an Arkade address is the same string for BTC and
|
|
6258
|
+
* for an asset, so the AMOUNT names the asset, never the target. */
|
|
6241
6259
|
interface PaymentRequest {
|
|
6242
6260
|
/** Raw target: bare address/invoice, or a BIP21 URI. */
|
|
6243
6261
|
raw: string;
|
|
6244
6262
|
/** Explicit sats; supplements/overrides any amount encoded in `raw`. */
|
|
6245
6263
|
amount?: number;
|
|
6264
|
+
/** @experimental — provisional, see {@link RouteQuote.assets}.
|
|
6265
|
+
*
|
|
6266
|
+
* Additive: an asset transfer also moves sats, so a 500 USDX request
|
|
6267
|
+
* legitimately has both. A rail that cannot deliver assets must REFUSE. */
|
|
6268
|
+
assets?: Asset[];
|
|
6246
6269
|
}
|
|
6247
6270
|
/** A payment rail — registered by id, mirrors the ActivityRegistry resolver shape. */
|
|
6248
6271
|
interface PaymentRail {
|
|
@@ -6310,6 +6333,14 @@ declare function resolveSendAmount(railId: string, raw: string, amount?: number)
|
|
|
6310
6333
|
* distinction is left to `resolveSendAmount` at quote time.
|
|
6311
6334
|
*/
|
|
6312
6335
|
declare function tryResolveSendAmount(raw: string, amount?: number): number | undefined;
|
|
6336
|
+
/** The assets a request asks for — `[]` when it names none. */
|
|
6337
|
+
declare function assetsOf(req: PaymentRequest): Asset[];
|
|
6338
|
+
/** For a BTC-only rail: refusing is what leaves the router free to rank an
|
|
6339
|
+
* asset-capable one, instead of paying the carrier and dropping the asset. */
|
|
6340
|
+
declare function assertNoAssets(railId: string, req: PaymentRequest): void;
|
|
6341
|
+
/** Exactly one: `Wallet.send` takes a list because one output can carry
|
|
6342
|
+
* several, but a routed PAYMENT is one thing being paid. */
|
|
6343
|
+
declare function resolveAssetAmount(railId: string, req: PaymentRequest): Asset;
|
|
6313
6344
|
|
|
6314
6345
|
type Update = {
|
|
6315
6346
|
status: PaymentStatus;
|
|
@@ -6358,9 +6389,23 @@ declare class PaymentRouter {
|
|
|
6358
6389
|
* The only rail that is receiver-exact for free: an off-chain send delivers the
|
|
6359
6390
|
* full amount and carries no counterparty or on-chain fee, so `fee` is 0 and
|
|
6360
6391
|
* `total` equals `amount` (see {@link RouteQuote}).
|
|
6392
|
+
*
|
|
6393
|
+
* BTC only: a request naming an asset drops this rail rather than paying its
|
|
6394
|
+
* sats and dropping the asset, leaving `ark-asset` to rank.
|
|
6361
6395
|
*/
|
|
6362
6396
|
declare function arkRail(): PaymentRail;
|
|
6363
6397
|
|
|
6398
|
+
/** The sats carrier an asset rides on; mirrors `Recipient.amount`'s default. */
|
|
6399
|
+
declare const ASSET_CARRIER_SATS = 330;
|
|
6400
|
+
/**
|
|
6401
|
+
* Off-chain Arkade send of an ASSET — the sibling of `ark`.
|
|
6402
|
+
*
|
|
6403
|
+
* They split on `available()` rather than `match()` because both legitimately
|
|
6404
|
+
* match the address; which one can pay is a question about the amount, so
|
|
6405
|
+
* `options()` returns exactly one and their relative priority is immaterial.
|
|
6406
|
+
*/
|
|
6407
|
+
declare function arkAssetRail(): PaymentRail;
|
|
6408
|
+
|
|
6364
6409
|
/**
|
|
6365
6410
|
* On-chain BTC send via collaborative exit — the Wallet-only on-chain path (no
|
|
6366
6411
|
* swap). Matches a bare BTC address or the on-chain part of a unified BIP21 URI
|
|
@@ -6380,8 +6425,13 @@ declare function arkRail(): PaymentRail;
|
|
|
6380
6425
|
declare function onchainRail(): PaymentRail;
|
|
6381
6426
|
|
|
6382
6427
|
/**
|
|
6383
|
-
* Default payment router with the Wallet-only rails: `ark` (off-chain send)
|
|
6384
|
-
* `
|
|
6428
|
+
* Default payment router with the Wallet-only rails: `ark` (off-chain BTC send),
|
|
6429
|
+
* `ark-asset` (off-chain asset send) and `onchain` (collaborative exit).
|
|
6430
|
+
* Solver-routed rails live in `@arkade-os/swap` and are registered by the app.
|
|
6431
|
+
*
|
|
6432
|
+
* The default priority is `["ark", "ark-asset", "onchain"]`.
|
|
6433
|
+
* `ark` and `ark-asset` never compete — the amount decides which is
|
|
6434
|
+
* available — so their order between themselves is immaterial.
|
|
6385
6435
|
*/
|
|
6386
6436
|
declare function createDefaultPaymentRouter(wallet: Wallet): PaymentRouter;
|
|
6387
6437
|
|
|
@@ -6660,4 +6710,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6660
6710
|
burn(params: BurnParams): Promise<string>;
|
|
6661
6711
|
}
|
|
6662
6712
|
|
|
6663
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
6713
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-
|
|
2
|
-
export {
|
|
3
|
-
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-
|
|
4
|
-
export {
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-
|
|
6
|
-
export {
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-DUxufw76.js';
|
|
2
|
+
export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a3 as BatchFailedEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Z as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, U as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, am as ContractManager, an as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractWatcher, br as DEFAULT_VTXO_PAGE_SIZE, bs as DelegateManagerImpl, bt as DelegateOptions, aa as DelegateProvider, bu as DelegatorManagerImpl, bv as DelegatorProvider, bw as DeprecatedSignerMigrationReport, bx as DeprecatedSignerReport, by as DigestMismatchError, bz as Discoverable, bA as DiscoveredContract, bB as DiscoveryDeps, bC as ESPLORA_URL, bD as EsploraProvider, bE as EventSourceCapable, bF as EventSourceFactory, bG as EventSourceLike, bH as EventSourceUnavailableError, ac as ExitCaptureMode, bI as ExitChainResolver, ad as ExitDataSource, bJ as ExtendedContractVtxo, bK as GroupMembership, bL as HandlerError, bM as IDelegatorManager, bN as INTENT_TERMINAL_STATES, bO as IndexerTxType, bP as IntentCoin, bQ as KnownMetadata, bR as MUTINYNET_EMULATOR_PUBKEY, bS as MigrateDeprecatedSignerOptions, bT as MigrationLegReport, bU as MigrationVtxoRef, bV as MultisigTapscript, bW as NewAddressType, bX as Nonces, bY as Output, bZ as PageResponse, b_ as PartialSig, b$ as PrevTxSource, c0 as PrevTxUnavailableError, c1 as ProviderClass, c2 as REGTEST_EMULATOR_PUBKEY, c3 as RawTxSource, ab as ReadonlyWalletConfig, ag as RecipientArkadeAddressContext, r as RestArkProvider, c4 as RestDelegateProvider, c5 as RestDelegatorProvider, s as RestIndexerProvider, c6 as ScanContractsOptions, c7 as ScanResult, c8 as ScheduledSession, c9 as SettlementEventType, ca as SignRequest, cb as SignerClassification, cc as SignerSet, cd as SubscriptionEvent, ce as SubscriptionHeartbeat, t as SubscriptionResponse, cf as SweepTxNotification, cg as TapLeaves, ch as TapTreeCoder, ci as TapscriptType, at as TimeHeight, a0 as TreeNoncesEvent, a5 as TreeSignatureEvent, _ as TreeSigningStartedEvent, a4 as TreeTxEvent, cj as Tx, ck as TxHistoryRecord, cl as TxKey, cm as TxNotification, cn as TxTag, co as TxTreeNode, cp as TxType, cq as VirtualStatus, cr as Vtxo, cs as VtxoChain, ap as VtxoManager, ct as VtxoType, b as WalletConfig, cu as WalletMode, cv as WithPrevTx, cw as assertAllowedSighashTypes, cx as assertRecipientArkadeAddress, cy as assetMintResolver, cz as attachPrevArkTxs, cA as attachPrevoutTxs, cB as boardingResolver, cC as canRecoverOnchain, cD as canSpendOffchain, cE as canSweepOnchain, cF as classifyAgainstSignerSet, cG as classifyContractSigner, cH as collabExitResolver, cI as configureEventSource, cJ as createDefaultActivityRegistry, cK as createExitChainResolver, cL as decodeTapscript, cM as defaultEmulatorPubkey, cN as getAllNormalizedVtxos, cO as getConfiguredEventSource, cP as getNetwork, cQ as getNormalizedVtxos, cR as getRandomId, cS as getSequence, cT as hasCandidates, cU as hasTerminalSpend, cV as isBatchSignable, cW as isCooperativelyMigratable, cX as isDiscoverable, cY as isEventSourceUnavailableError, cZ as isExpired, c_ as isPastExpiry, c$ as isRecoverable, d0 as isSigningIdentity, d1 as isSpendable, d2 as isSubdust, d3 as isTerminalIntentState, d4 as isVirtualCoin, d5 as isVtxoExpiringSoon, d6 as networkFromArkadeInfo, d7 as networks, d8 as resolveEmulatorPubkey, d9 as resolveEventSource, da as resolvePrevTxs, db as scriptFromTapLeafScript, dc as signerSetFromInfo, dd as toXOnlySignerHex, de as withPrevTxs } from './index-DUxufw76.js';
|
|
3
|
+
import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-CmEU0NP1.js';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-CmEU0NP1.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-Bem5vKzX.js';
|
|
6
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-Bem5vKzX.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-BAX5QftB.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-BAX5QftB.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';
|
|
@@ -6219,6 +6219,25 @@ interface RouteQuote {
|
|
|
6219
6219
|
fee: number;
|
|
6220
6220
|
/** `amount + fee` — what leaves the wallet. */
|
|
6221
6221
|
total: number;
|
|
6222
|
+
/**
|
|
6223
|
+
* @experimental The asset shape is provisional. The v2 swap client models
|
|
6224
|
+
* assets as `give`/`take`/`amountOn` over `AssetRef`, and the two
|
|
6225
|
+
* vocabularies are expected to converge on v0.5; do not treat this field as
|
|
6226
|
+
* stable 0.4.x API.
|
|
6227
|
+
*
|
|
6228
|
+
* The asset view; absent means BTC only. The sats fields keep their
|
|
6229
|
+
* meaning — an asset rides a sats-carrying output, so `amount` is the
|
|
6230
|
+
* carrier, not zero.
|
|
6231
|
+
*
|
|
6232
|
+
* A pair, not a triple: on a cross-asset route these name DIFFERENT
|
|
6233
|
+
* assets, so `total = amount + fee` cannot hold across the two units —
|
|
6234
|
+
* which forces the purchase price into `fee`. Prefer `assets.spent` for a
|
|
6235
|
+
* cost display.
|
|
6236
|
+
*/
|
|
6237
|
+
assets?: {
|
|
6238
|
+
delivered: Asset;
|
|
6239
|
+
spent: Asset;
|
|
6240
|
+
};
|
|
6222
6241
|
/** Execute. Returns an observable handle, never a bare result. */
|
|
6223
6242
|
send(): Promise<PaymentHandle>;
|
|
6224
6243
|
meta?: Record<string, unknown>;
|
|
@@ -6235,14 +6254,18 @@ interface RouterContext {
|
|
|
6235
6254
|
wallet: Wallet;
|
|
6236
6255
|
prefs: RouterPreferences;
|
|
6237
6256
|
}
|
|
6238
|
-
/**
|
|
6239
|
-
*
|
|
6240
|
-
* `amount` supplements or overrides any amount encoded in `raw`. */
|
|
6257
|
+
/** Mirrors {@link Recipient}: an Arkade address is the same string for BTC and
|
|
6258
|
+
* for an asset, so the AMOUNT names the asset, never the target. */
|
|
6241
6259
|
interface PaymentRequest {
|
|
6242
6260
|
/** Raw target: bare address/invoice, or a BIP21 URI. */
|
|
6243
6261
|
raw: string;
|
|
6244
6262
|
/** Explicit sats; supplements/overrides any amount encoded in `raw`. */
|
|
6245
6263
|
amount?: number;
|
|
6264
|
+
/** @experimental — provisional, see {@link RouteQuote.assets}.
|
|
6265
|
+
*
|
|
6266
|
+
* Additive: an asset transfer also moves sats, so a 500 USDX request
|
|
6267
|
+
* legitimately has both. A rail that cannot deliver assets must REFUSE. */
|
|
6268
|
+
assets?: Asset[];
|
|
6246
6269
|
}
|
|
6247
6270
|
/** A payment rail — registered by id, mirrors the ActivityRegistry resolver shape. */
|
|
6248
6271
|
interface PaymentRail {
|
|
@@ -6310,6 +6333,14 @@ declare function resolveSendAmount(railId: string, raw: string, amount?: number)
|
|
|
6310
6333
|
* distinction is left to `resolveSendAmount` at quote time.
|
|
6311
6334
|
*/
|
|
6312
6335
|
declare function tryResolveSendAmount(raw: string, amount?: number): number | undefined;
|
|
6336
|
+
/** The assets a request asks for — `[]` when it names none. */
|
|
6337
|
+
declare function assetsOf(req: PaymentRequest): Asset[];
|
|
6338
|
+
/** For a BTC-only rail: refusing is what leaves the router free to rank an
|
|
6339
|
+
* asset-capable one, instead of paying the carrier and dropping the asset. */
|
|
6340
|
+
declare function assertNoAssets(railId: string, req: PaymentRequest): void;
|
|
6341
|
+
/** Exactly one: `Wallet.send` takes a list because one output can carry
|
|
6342
|
+
* several, but a routed PAYMENT is one thing being paid. */
|
|
6343
|
+
declare function resolveAssetAmount(railId: string, req: PaymentRequest): Asset;
|
|
6313
6344
|
|
|
6314
6345
|
type Update = {
|
|
6315
6346
|
status: PaymentStatus;
|
|
@@ -6358,9 +6389,23 @@ declare class PaymentRouter {
|
|
|
6358
6389
|
* The only rail that is receiver-exact for free: an off-chain send delivers the
|
|
6359
6390
|
* full amount and carries no counterparty or on-chain fee, so `fee` is 0 and
|
|
6360
6391
|
* `total` equals `amount` (see {@link RouteQuote}).
|
|
6392
|
+
*
|
|
6393
|
+
* BTC only: a request naming an asset drops this rail rather than paying its
|
|
6394
|
+
* sats and dropping the asset, leaving `ark-asset` to rank.
|
|
6361
6395
|
*/
|
|
6362
6396
|
declare function arkRail(): PaymentRail;
|
|
6363
6397
|
|
|
6398
|
+
/** The sats carrier an asset rides on; mirrors `Recipient.amount`'s default. */
|
|
6399
|
+
declare const ASSET_CARRIER_SATS = 330;
|
|
6400
|
+
/**
|
|
6401
|
+
* Off-chain Arkade send of an ASSET — the sibling of `ark`.
|
|
6402
|
+
*
|
|
6403
|
+
* They split on `available()` rather than `match()` because both legitimately
|
|
6404
|
+
* match the address; which one can pay is a question about the amount, so
|
|
6405
|
+
* `options()` returns exactly one and their relative priority is immaterial.
|
|
6406
|
+
*/
|
|
6407
|
+
declare function arkAssetRail(): PaymentRail;
|
|
6408
|
+
|
|
6364
6409
|
/**
|
|
6365
6410
|
* On-chain BTC send via collaborative exit — the Wallet-only on-chain path (no
|
|
6366
6411
|
* swap). Matches a bare BTC address or the on-chain part of a unified BIP21 URI
|
|
@@ -6380,8 +6425,13 @@ declare function arkRail(): PaymentRail;
|
|
|
6380
6425
|
declare function onchainRail(): PaymentRail;
|
|
6381
6426
|
|
|
6382
6427
|
/**
|
|
6383
|
-
* Default payment router with the Wallet-only rails: `ark` (off-chain send)
|
|
6384
|
-
* `
|
|
6428
|
+
* Default payment router with the Wallet-only rails: `ark` (off-chain BTC send),
|
|
6429
|
+
* `ark-asset` (off-chain asset send) and `onchain` (collaborative exit).
|
|
6430
|
+
* Solver-routed rails live in `@arkade-os/swap` and are registered by the app.
|
|
6431
|
+
*
|
|
6432
|
+
* The default priority is `["ark", "ark-asset", "onchain"]`.
|
|
6433
|
+
* `ark` and `ark-asset` never compete — the amount decides which is
|
|
6434
|
+
* available — so their order between themselves is immaterial.
|
|
6385
6435
|
*/
|
|
6386
6436
|
declare function createDefaultPaymentRouter(wallet: Wallet): PaymentRouter;
|
|
6387
6437
|
|
|
@@ -6660,4 +6710,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
6660
6710
|
burn(params: BurnParams): Promise<string>;
|
|
6661
6711
|
}
|
|
6662
6712
|
|
|
6663
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
6713
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertRecipientArkadeAddress, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, withPrevTxs } from './chunk-
|
|
2
|
-
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-
|
|
3
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-
|
|
4
|
-
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-
|
|
1
|
+
export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertRecipientArkadeAddress, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, withPrevTxs } from './chunk-ZRNQV6HV.js';
|
|
2
|
+
export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-4PKLULWT.js';
|
|
3
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-3R476TDV.js';
|
|
4
|
+
export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-ISO4TI5J.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 chunkGMZZQXV5_cjs = require('../../chunk-GMZZQXV5.cjs');
|
|
4
|
+
require('../../chunk-NVZJSKZS.cjs');
|
|
5
|
+
require('../../chunk-43FKNLX4.cjs');
|
|
6
|
+
require('../../chunk-JZWLXNHV.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 = chunkGMZZQXV5_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 (!chunkGMZZQXV5_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 = chunkGMZZQXV5_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(chunkGMZZQXV5_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 ?? chunkGMZZQXV5_cjs.scriptFromArkAddress(obj.address)
|
|
238
238
|
};
|
|
239
|
-
return
|
|
239
|
+
return chunkGMZZQXV5_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 chunkGMZZQXV5_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 = chunkGMZZQXV5_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
|
|
274
274
|
}
|
|
275
275
|
return tx;
|
|
276
276
|
}
|
|
@@ -450,7 +450,7 @@ var RealmIntentRepository = class {
|
|
|
450
450
|
const clashes = [
|
|
451
451
|
...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
|
|
452
452
|
].map(toIntent);
|
|
453
|
-
|
|
453
|
+
chunkGMZZQXV5_cjs.assertIntentIdUnique(intent, clashes);
|
|
454
454
|
}
|
|
455
455
|
this.realm.create(
|
|
456
456
|
"ArkIntent",
|
|
@@ -479,14 +479,14 @@ var RealmIntentRepository = class {
|
|
|
479
479
|
}
|
|
480
480
|
async getIntents(filter) {
|
|
481
481
|
const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
|
|
482
|
-
const out = filter ? all.filter((i) =>
|
|
483
|
-
const { skip, end } =
|
|
482
|
+
const out = filter ? all.filter((i) => chunkGMZZQXV5_cjs.intentMatchesFilter(i, filter)) : all;
|
|
483
|
+
const { skip, end } = chunkGMZZQXV5_cjs.intentPageBounds(filter, out.length);
|
|
484
484
|
return out.slice(skip, end);
|
|
485
485
|
}
|
|
486
486
|
async getLockedVtxoOutpoints() {
|
|
487
487
|
const out = [];
|
|
488
488
|
for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
|
|
489
|
-
if (!
|
|
489
|
+
if (!chunkGMZZQXV5_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
|
|
490
490
|
return out;
|
|
491
491
|
}
|
|
492
492
|
async [Symbol.asyncDispose]() {
|
|
@@ -528,7 +528,7 @@ var RealmVirtualTxRepository = class {
|
|
|
528
528
|
txid: t.txid,
|
|
529
529
|
psbt: t.psbt ?? prev?.psbt ?? null,
|
|
530
530
|
expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
|
|
531
|
-
type:
|
|
531
|
+
type: chunkGMZZQXV5_cjs.mergeChainedTxType(t.type, prev?.type)
|
|
532
532
|
},
|
|
533
533
|
"modified"
|
|
534
534
|
);
|
|
@@ -762,7 +762,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
762
762
|
for (let i = 0; i < newVtxos.length; i++) {
|
|
763
763
|
const newVtxo = newVtxos[i];
|
|
764
764
|
if (!newVtxo.script) {
|
|
765
|
-
newVtxo.script =
|
|
765
|
+
newVtxo.script = chunkGMZZQXV5_cjs.scriptFromArkAddress(newVtxo.address);
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
const oldHasVirtualTx = Array.isArray(oldRealm?.schema) && oldRealm.schema.some((s) => s.name === "ArkVirtualTx");
|
|
@@ -779,7 +779,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
|
|
|
779
779
|
|
|
780
780
|
Object.defineProperty(exports, "ChainedTxType", {
|
|
781
781
|
enumerable: true,
|
|
782
|
-
get: function () { return
|
|
782
|
+
get: function () { return chunkGMZZQXV5_cjs.ChainedTxType; }
|
|
783
783
|
});
|
|
784
784
|
exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
|
|
785
785
|
exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, C as ContractRepository, H as ContractFilter, z as Contract, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch } from '../../index-
|
|
2
|
-
export { U as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, C as ContractRepository, H as ContractFilter, z as Contract, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch } from '../../index-DUxufw76.cjs';
|
|
2
|
+
export { U as ChainedTxType } from '../../index-DUxufw76.cjs';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, C as ContractRepository, H as ContractFilter, z as Contract, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch } from '../../index-
|
|
2
|
-
export { U as ChainedTxType } from '../../index-
|
|
1
|
+
import { W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, C as ContractRepository, H as ContractFilter, z as Contract, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch } from '../../index-DUxufw76.js';
|
|
2
|
+
export { U as ChainedTxType } from '../../index-DUxufw76.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-
|
|
2
|
-
export { ChainedTxType } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-ZRNQV6HV.js';
|
|
2
|
+
export { ChainedTxType } from '../../chunk-ZRNQV6HV.js';
|
|
3
|
+
import '../../chunk-4PKLULWT.js';
|
|
4
|
+
import '../../chunk-3R476TDV.js';
|
|
5
|
+
import '../../chunk-ISO4TI5J.js';
|
|
6
6
|
import '../../chunk-NSBPE2FW.js';
|
|
7
7
|
|
|
8
8
|
// src/repositories/realm/walletRepository.ts
|