@arkade-os/sdk 0.5.0 → 0.5.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 +10 -6
- 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/{asyncStorageTaskQueue-qRRQUOE8.d.cts → asyncStorageTaskQueue-BtEc3Qca.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-BFv2O1y1.d.ts → asyncStorageTaskQueue-DIn7bTqN.d.ts} +2 -2
- package/dist/{chunk-AU77RYOC.cjs → chunk-2OCYL6BJ.cjs} +1177 -864
- package/dist/chunk-2OCYL6BJ.cjs.map +1 -0
- package/dist/{chunk-K2E6X6JT.js → chunk-2QRUQXLS.js} +4 -4
- package/dist/{chunk-K2E6X6JT.js.map → chunk-2QRUQXLS.js.map} +1 -1
- package/dist/{chunk-IQWLFYT2.cjs → chunk-64R7CRKN.cjs} +18 -18
- package/dist/{chunk-IQWLFYT2.cjs.map → chunk-64R7CRKN.cjs.map} +1 -1
- package/dist/{chunk-GWJWXVUB.js → chunk-AJWXVQYG.js} +692 -379
- package/dist/chunk-AJWXVQYG.js.map +1 -0
- package/dist/{chunk-UUSKJOSX.cjs → chunk-GGKR4O5X.cjs} +3 -3
- package/dist/{chunk-UUSKJOSX.cjs.map → chunk-GGKR4O5X.cjs.map} +1 -1
- package/dist/{chunk-ZOEB53NQ.js → chunk-HKG26NUT.js} +3 -3
- package/dist/{chunk-ZOEB53NQ.js.map → chunk-HKG26NUT.js.map} +1 -1
- package/dist/{chunk-K352GMVL.js → chunk-LWRMSC4M.js} +3 -3
- package/dist/{chunk-K352GMVL.js.map → chunk-LWRMSC4M.js.map} +1 -1
- package/dist/{chunk-TZSKLERU.js → chunk-MOBDJ7U2.js} +4 -4
- package/dist/{chunk-TZSKLERU.js.map → chunk-MOBDJ7U2.js.map} +1 -1
- package/dist/{chunk-GN2K4WBP.cjs → chunk-OM6FJ76H.cjs} +48 -48
- package/dist/{chunk-GN2K4WBP.cjs.map → chunk-OM6FJ76H.cjs.map} +1 -1
- package/dist/{chunk-GOM26K6H.cjs → chunk-PVFQFQBY.cjs} +10 -10
- package/dist/{chunk-GOM26K6H.cjs.map → chunk-PVFQFQBY.cjs.map} +1 -1
- package/dist/{chunk-JT5YVMCJ.cjs → chunk-TAIWH3HG.cjs} +16 -16
- package/dist/{chunk-JT5YVMCJ.cjs.map → chunk-TAIWH3HG.cjs.map} +1 -1
- package/dist/{chunk-HABGVRLF.js → chunk-U5XG7SWA.js} +3 -3
- package/dist/{chunk-HABGVRLF.js.map → chunk-U5XG7SWA.js.map} +1 -1
- 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-B5BmYkEY.d.cts → delegate-CaL8EN4Q.d.cts} +1 -1
- package/dist/{delegate-DNbiUgy8.d.ts → delegate-Jd4zs88Q.d.ts} +1 -1
- package/dist/{index-B4QuO9sH.d.cts → index-BwdGzNSn.d.cts} +2 -2
- package/dist/{index-CYeyT3kn.d.ts → index-D-xqVzf8.d.ts} +2 -2
- package/dist/{index-CZw-MMfY.d.cts → index-DdKxfC29.d.cts} +35 -17
- package/dist/{index-CZw-MMfY.d.ts → index-DdKxfC29.d.ts} +35 -17
- package/dist/index.cjs +313 -313
- package/dist/index.d.cts +100 -26
- package/dist/index.d.ts +100 -26
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +35 -35
- 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 +33 -33
- 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-B3SLvUfL.d.cts → taskRunner-67YSEpsz.d.cts} +2 -2
- package/dist/{taskRunner-wm1bhmtP.d.ts → taskRunner-ZyGGjtIq.d.ts} +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 +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/{wallet-DGLXuwXT.d.ts → wallet-B8LW7cV1.d.cts} +7 -6
- package/dist/{wallet-DCZ2-Bea.d.cts → wallet-bFS7VybL.d.ts} +7 -6
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-AU77RYOC.cjs.map +0 -1
- package/dist/chunk-GWJWXVUB.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ah as ReadonlyIdentity, a as Identity, a4 as DescriptorSigningRequest, a5 as Transaction,
|
|
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 './wallet-
|
|
4
|
-
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveDescriptorSigner, O as selectVirtualCoins, Q as signingDescriptorIndex, T as strictSigningDescriptorIndex, U as waitForIncomingFunds } from './wallet-
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue,
|
|
6
|
-
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { ah as ReadonlyIdentity, a as Identity, a4 as DescriptorSigningRequest, a5 as Transaction, aB as SignerSession, a3 as DescriptorProvider, aF as IntentFeeConfig, aG as OffchainInput, aH as FeeAmount, aI as OnchainInput, aJ as FeeOutput, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, P as PageRequest, F as PageResult, O as Outpoint, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch, W as WalletRepository, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, B as Contract, C as ContractRepository, X as ContractFilter, I as IWallet, v as ArkProvider, ar as NetworkName, ai as OnchainProvider, az as SettlementConfig, aK as ContractWatcherConfig, aL as Asset, R as Recipient, aM as FeeInfo, o as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetArkadeInfoOptions, aN as GetVtxosOptions, aO as PaginationOptions, f as GetVtxosFilter, g as GetSpendableVtxosFilter, aP as CreateContractParams, aQ as GetContractsFilter, z as VirtualCoin, aR as GetSpendablePathsOptions, aS as GetAllSpendingPathsOptions, l as GetNewAddressesOptions, aT as InputExpiryFloor, aU as IssuanceParams, aV as ReissuanceParams, aW as BurnParams, aX as RenewVtxosOptions, A as ArkadeInfo, aY as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ao as ContractSyncState, at as ContractWithVtxos, aZ as WatchedScript, a_ as PathSelection, m as NewAddress, a$ as ContractEvent, b0 as AssetDetails, b1 as IssuanceResult, b2 as DelegateInfo, b3 as MigrationGlobalSkipReason, b4 as MigrationLegSkipReason, b5 as SignerStatus, ag as IReadonlyWallet, i as ActivityRegistry, an as IReadonlyAssetManager, b6 as StorageConfig, j as Activity, k as IContractManager, q as IAssetManager, p as SendParams, n as IDelegateManager, b7 as IVtxoManager, a6 as Network, av as Coin, b8 as SendBitcoinParams, b9 as ExplorerTransaction, aC as SignedIntent, aD as Intent, ba as TreeNonces, bb as TreePartialSigs, T as TxNotificationEvent, bc as PendingTx, y as TapLeafScript, bd as EncodedVtxoScript, ay as CSVMultisigTapscript, x as RelativeTimelock, be as EmulatorProvider, V as VtxoScript, bf as Status, as as ArkAddress, bg as ChainTx, w as IndexerProvider, a9 as TxTree, bh as ArkadeService, bi as ContractVtxoEvent, bj as ExtendedContractVtxo, bk as ResolvedArkadeService, bl as resolveArkadeService, bm as PathContext } from './index-DdKxfC29.cjs';
|
|
2
|
+
export { bn as ActivityIntent, bo as ActivityResolver, bp as ArkIntentState, bq as ArkTapscript, br as AssetMetadata, bs as BITCOIN_EMULATOR_PUBKEY, bt as BaseWalletConfig, ad as BatchFailedEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, bu as BatchInfo, bv as BatchSignableIdentity, a7 as BatchStartedEvent, bw as CLTVMultisigTapscript, bx as CandidateDeps, by as ChainTxType, a2 as ChainedTxType, bz as CommitmentTx, bA as ConditionCSVMultisigTapscript, bB as ConditionMultisigTapscript, bC as ConnectorTreeNode, bD as ContractBalance, bE as ContractEventCallback, bF as ContractHandler, aw as ContractManager, ax as ContractManagerConfig, bG as ContractState, bH as ContractVtxo, bI as ContractWatcher, bJ as ContractWatcherEventCallback, bK as DEFAULT_ARKADE_EMULATOR_URL, bL as DEFAULT_VTXO_PAGE_SIZE, bM as DelegateManagerImpl, bN as DelegateOptions, aj as DelegateProvider, bO as DeprecatedSignerMigrationReport, bP as DeprecatedSignerReport, bQ as DigestMismatchError, bR as Discoverable, bS as DiscoveredContract, bT as DiscoveryDeps, bU as ESPLORA_URL, bV as EmulatorInfo, aq as EsploraProvider, bW as EventSourceCapable, bX as EventSourceFactory, bY as EventSourceLike, bZ as EventSourceUnavailableError, al as ExitCaptureMode, b_ as ExitChainResolver, am as ExitDataSource, b$ as GroupMembership, c0 as HandlerError, c1 as INTENT_TERMINAL_STATES, c2 as IndexerTxType, c3 as IntentCoin, c4 as IntentFilter, c5 as KnownMetadata, c6 as MAX_PAGE_SIZE, c7 as MUTINYNET_EMULATOR_PUBKEY, c8 as MigrateDeprecatedSignerOptions, c9 as MigrationLegReport, ca as MigrationVtxoRef, cb as MultisigTapscript, cc as NewAddressType, cd as Nonces, ce as Output, cf as PageResponse, cg as PartialSig, ch as PrevTxSource, ci as PrevTxUnavailableError, cj as ProviderClass, ck as REGTEST_EMULATOR_PUBKEY, cl as RawTxSource, ak as ReadonlyWalletConfig, ap as RecipientArkadeAddressContext, cm as RenewalSplit, cn as RenewalSplitContext, r as RestArkProvider, co as RestDelegateProvider, cp as RestEmulatorProvider, s as RestIndexerProvider, cq as ScanContractsOptions, cr as ScanResult, cs as ScheduledSession, ct as SettlementEventType, cu as SignRequest, cv as SignerClassification, cw as SignerSet, t as SubscriptionEvent, cx as SubscriptionFilter, u as SubscriptionHeartbeat, cy as SubscriptionResponse, cz as SweepTxNotification, cA as TapLeaves, cB as TapTreeCoder, cC as TapscriptType, aE as TimeHeight, aa as TreeNoncesEvent, af as TreeSignatureEvent, a8 as TreeSigningStartedEvent, ae as TreeTxEvent, cD as Tx, cE as TxHistoryRecord, cF as TxKey, cG as TxNotification, cH as TxTag, cI as TxTreeNode, cJ as TxType, cK as Vtxo, cL as VtxoChain, aA as VtxoManager, cM as VtxoType, b as WalletConfig, cN as WalletMode, cO as WithPrevTx, cP as assertAllowedSighashTypes, cQ as assertPageRequest, cR as assertRecipientArkadeAddress, cS as assetMintResolver, cT as attachPrevArkTxs, cU as attachPrevoutTxs, cV as boardingResolver, cW as canRecoverOnchain, cX as canSpendOffchain, cY as canSweepOnchain, cZ as classifyAgainstSignerSet, c_ as classifyContractSigner, c$ as collabExitResolver, d0 as collectContracts, d1 as collectIntents, d2 as collectPages, d3 as collectScriptVtxos, d4 as collectTransactionHistory, d5 as collectUtxos, d6 as collectVtxos, d7 as configureEventSource, d8 as createDefaultActivityRegistry, d9 as createExitChainResolver, da as decodeTapscript, db as defaultEmulatorPubkey, dc as getAllNormalizedVtxos, dd as getConfiguredEventSource, de as getNetwork, df as getNormalizedVtxos, dg as getRandomId, dh as getSequence, di as hasCandidates, dj as isBatchSignable, dk as isContractVtxoEvent, dl as isCooperativelyMigratable, dm as isDiscoverable, dn as isEventSourceUnavailableError, dp as isPastExpiry, dq as isSigningIdentity, dr as isSubdust, ds as isTerminalIntentState, dt as isVirtualCoin, du as isVtxoExpiringSoon, dv as isVtxoSpent, dw as iteratePages, dx as networkFromArkadeInfo, dy as networks, dz as pageResult, dA as resolveEmulatorPubkey, dB as resolveEventSource, dC as resolvePrevTxs, dD as scriptFromTapLeafScript, dE as signerSetFromInfo, dF as toOffchainInputFeeParams, dG as toXOnlySignerHex, dH as withPrevTxs } from './index-DdKxfC29.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 './wallet-B8LW7cV1.cjs';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveDescriptorSigner, O as selectVirtualCoins, Q as signingDescriptorIndex, T as strictSigningDescriptorIndex, U as waitForIncomingFunds } from './wallet-B8LW7cV1.cjs';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, d as ArkadeFunction, I as InputDef, e as ArkadeValueType, C as CompiledProgramFunction, f as ArkadeArgType, g as ArkadeContractParams, h as ArkadeSegment, i as AsmToken, j as InputRef, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, l as TweakedSigner, U as UnsupportedProgramVersionError, W as WitnessRef, m as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, n as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-BwdGzNSn.cjs';
|
|
6
|
+
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-BwdGzNSn.cjs';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-CaL8EN4Q.cjs';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-CaL8EN4Q.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';
|
|
@@ -2788,10 +2788,16 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2788
2788
|
private indexerProvider;
|
|
2789
2789
|
private walletRepository;
|
|
2790
2790
|
private incomingFundsSubscription;
|
|
2791
|
+
private incomingFundsRegistrations;
|
|
2791
2792
|
private contractEventsSubscription;
|
|
2792
2793
|
private onNextTick;
|
|
2793
2794
|
private channel;
|
|
2794
2795
|
private incomingFundsEpoch;
|
|
2796
|
+
/**
|
|
2797
|
+
* Supersedes older initializers without touching `incomingFundsEpoch`, so a
|
|
2798
|
+
* re-init that fails before registering leaves the live subscription delivering.
|
|
2799
|
+
*/
|
|
2800
|
+
private initEpoch;
|
|
2795
2801
|
private contractEventsEpoch;
|
|
2796
2802
|
private boardingEpoch;
|
|
2797
2803
|
/** Per-request progress callbacks: ends with the handler, not with a re-init. */
|
|
@@ -2835,6 +2841,7 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2835
2841
|
private handleGetBalance;
|
|
2836
2842
|
private getBoardingUtxosForBalance;
|
|
2837
2843
|
private onWalletInitialized;
|
|
2844
|
+
private registerIncomingFunds;
|
|
2838
2845
|
/**
|
|
2839
2846
|
* Refresh boarding inputs and transaction history. The virtual outputs come
|
|
2840
2847
|
* from the contract manager, which runs before this. Shared by
|
|
@@ -2845,8 +2852,9 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2845
2852
|
* off the caller's path. @see RequestInitWallet.payload.lazyBoarding
|
|
2846
2853
|
*/
|
|
2847
2854
|
private refreshCachedData;
|
|
2848
|
-
/**
|
|
2849
|
-
private
|
|
2855
|
+
/** History rows plus the address they are stored under. Does not write. */
|
|
2856
|
+
private loadHistoryCache;
|
|
2857
|
+
private storeHistoryCache;
|
|
2850
2858
|
/**
|
|
2851
2859
|
* @param gen - set by a background caller; each write here is skipped once it goes stale.
|
|
2852
2860
|
* The fetch saves the fetched rows itself, before control returns, so that one write is
|
|
@@ -3671,6 +3679,13 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3671
3679
|
spent: boolean;
|
|
3672
3680
|
txid: string;
|
|
3673
3681
|
}[]>;
|
|
3682
|
+
/** Reads `vout`'s script alone: another output of a tx someone else built (their change, a
|
|
3683
|
+
* service's fee address) can have a history Fulcrum answers empty and electrs refuses. */
|
|
3684
|
+
getTxOutspend(txid: string, vout: number): Promise<{
|
|
3685
|
+
spent: boolean;
|
|
3686
|
+
txid: string;
|
|
3687
|
+
}>;
|
|
3688
|
+
private resolveOutspends;
|
|
3674
3689
|
getTransactions(address: string): Promise<ExplorerTransaction[]>;
|
|
3675
3690
|
/**
|
|
3676
3691
|
* Resolve a list of `{tx_hash, height}` entries (as returned by the
|
|
@@ -5430,25 +5445,60 @@ type ArgsTuple<I extends readonly InputDef[]> = {
|
|
|
5430
5445
|
type FnArgs<F extends ArkadeFunction> = F extends {
|
|
5431
5446
|
inputs: infer I extends readonly InputDef[];
|
|
5432
5447
|
} ? ArgsTuple<I> : [];
|
|
5448
|
+
/** A contract's functions returning `R`: typed per function for a literal program, else loose. */
|
|
5449
|
+
type FunctionMap<P extends Program, R> = string extends keyof P["functions"] ? Record<string, (...args: ArkadeArgValue[]) => R> : {
|
|
5450
|
+
[K in keyof P["functions"]]: (...args: FnArgs<P["functions"][K]>) => R;
|
|
5451
|
+
};
|
|
5433
5452
|
/**
|
|
5434
5453
|
* The statically-typed `functions` map of a contract: precisely typed per function for a literal
|
|
5435
5454
|
* program, the loose {@link CallableFunctions} for the widened {@link Program}.
|
|
5436
5455
|
*/
|
|
5437
|
-
type ContractFunctions<P extends Program> =
|
|
5438
|
-
|
|
5439
|
-
|
|
5456
|
+
type ContractFunctions<P extends Program> = FunctionMap<P, ArkadeTransactionBuilder>;
|
|
5457
|
+
/** The statically-typed `unlock` map of a contract, typed like {@link ContractFunctions}. */
|
|
5458
|
+
type ContractUnlockers<P extends Program> = FunctionMap<P, ArkadeUnlocker>;
|
|
5440
5459
|
/** A spendable coin (VTXO) — outpoint + value. */
|
|
5441
5460
|
interface Utxo {
|
|
5442
5461
|
txid: string;
|
|
5443
5462
|
vout: number;
|
|
5444
5463
|
value: number;
|
|
5445
5464
|
/**
|
|
5446
|
-
*
|
|
5465
|
+
* The coin's scriptPubKey (hex), as {@link ArkadeContract.getUtxos} returns it. When set,
|
|
5466
|
+
* `.from()` refuses the coin unless it matches the contract spending it.
|
|
5467
|
+
*/
|
|
5468
|
+
script?: string;
|
|
5469
|
+
/**
|
|
5470
|
+
* Whether the server swept the coin's batch, as {@link ArkadeContract.getUtxos} reports it. A
|
|
5471
|
+
* swept coin can't be spent offchain, so `.from()` refuses it; recover it into a batch instead.
|
|
5472
|
+
*/
|
|
5473
|
+
isSwept?: boolean;
|
|
5474
|
+
/**
|
|
5475
|
+
* When a virtual coin's batch expires, as {@link ArkadeContract.getUtxos} reports it. From that
|
|
5476
|
+
* moment on, `.from()` refuses the coin. A coin without it, such as an onchain one, is never
|
|
5477
|
+
* refused for expiry; height-based expiry isn't checked, since that needs the chain tip.
|
|
5478
|
+
*/
|
|
5479
|
+
expiresAt?: Date;
|
|
5480
|
+
/**
|
|
5481
|
+
* Assets the coin carries, as {@link ArkadeContract.getUtxos} reports them. arkd refuses an
|
|
5482
|
+
* input whose assets the spend does not route, so `send()` needs a `.withAsset()` input or a
|
|
5483
|
+
* caller's asset packet for such a coin, and selection without `.from()` skips it otherwise.
|
|
5484
|
+
*/
|
|
5485
|
+
assets?: readonly Asset[];
|
|
5486
|
+
/**
|
|
5487
|
+
* Raw bytes of the ark tx that created this VTXO, attached as its input's PrevArkTx. Overrides
|
|
5447
5488
|
* the indexer-resolved value; supply it when the tx isn't indexable yet (a recursive covenant
|
|
5448
5489
|
* spending an ark tx the caller just built).
|
|
5449
5490
|
*/
|
|
5450
5491
|
sourceTx?: Uint8Array;
|
|
5451
5492
|
}
|
|
5493
|
+
/**
|
|
5494
|
+
* A contract function bound to its call arguments, from `contract.unlock.<name>(...args)`.
|
|
5495
|
+
* Pass it to {@link ArkadeTransactionBuilder.from} to spend coins through that function.
|
|
5496
|
+
*/
|
|
5497
|
+
interface ArkadeUnlocker {
|
|
5498
|
+
readonly contract: ArkadeContract<any>;
|
|
5499
|
+
readonly fn: CompiledProgramFunction;
|
|
5500
|
+
readonly args: Record<string, ArkadeArgValue>;
|
|
5501
|
+
}
|
|
5452
5502
|
/**
|
|
5453
5503
|
* An asset-group transfer attached to a spend: which inputs supply the asset and
|
|
5454
5504
|
* which outputs receive it. Encoded into the asset Packet alongside the emulator
|
|
@@ -5635,6 +5685,11 @@ declare class Arkade {
|
|
|
5635
5685
|
* artifacts reserve the server key and exit delay to the connected server.
|
|
5636
5686
|
*/
|
|
5637
5687
|
contract<const P extends Program>(program: P, args?: Record<string, ArkadeParamValue>): ArkadeContract<P>;
|
|
5688
|
+
/**
|
|
5689
|
+
* Start a spend with no function of its own: each `.from(coins, contract.unlock.<name>(...))`
|
|
5690
|
+
* names the function its coins are spent through.
|
|
5691
|
+
*/
|
|
5692
|
+
transaction(): ArkadeTransactionBuilder;
|
|
5638
5693
|
}
|
|
5639
5694
|
/** A resolved, instantiated Arkade contract. */
|
|
5640
5695
|
declare class ArkadeContract<P extends Program = Program> {
|
|
@@ -5663,6 +5718,8 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5663
5718
|
get pkScript(): Uint8Array;
|
|
5664
5719
|
/** Callable spending paths: `functions.<name>(...args)` (see {@link ContractFunctions}). */
|
|
5665
5720
|
get functions(): ContractFunctions<P>;
|
|
5721
|
+
/** Spending paths bound to their arguments, for `.from(coins, contract.unlock.<name>(...))`. */
|
|
5722
|
+
get unlock(): ContractUnlockers<P>;
|
|
5666
5723
|
/**
|
|
5667
5724
|
* The `createContract` payload (serialized program, args, keys, script, address), for
|
|
5668
5725
|
* registering through a manager the client does not hold.
|
|
@@ -5716,25 +5773,33 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5716
5773
|
getBalance(): Promise<bigint>;
|
|
5717
5774
|
}
|
|
5718
5775
|
/**
|
|
5719
|
-
* Fluent builder for a single spend. Obtained from `contract.functions.<name>(...)
|
|
5720
|
-
* chain `.from()`/`.to()` then `.send()`
|
|
5776
|
+
* Fluent builder for a single spend. Obtained from `contract.functions.<name>(...)`, or from
|
|
5777
|
+
* `ark.transaction()` with no function of its own; chain `.from()`/`.to()` then `.send()`
|
|
5778
|
+
* (broadcast) or `.build()` (assemble only).
|
|
5721
5779
|
*/
|
|
5722
5780
|
declare class ArkadeTransactionBuilder {
|
|
5723
|
-
private readonly
|
|
5724
|
-
private readonly
|
|
5725
|
-
private readonly args;
|
|
5781
|
+
private readonly client;
|
|
5782
|
+
private readonly unlocker?;
|
|
5726
5783
|
private readonly outputs;
|
|
5727
5784
|
private readonly fundingCoins;
|
|
5728
5785
|
private readonly assetSpecs;
|
|
5729
5786
|
private readonly extraPackets;
|
|
5730
|
-
private
|
|
5787
|
+
private readonly inputs;
|
|
5731
5788
|
private changeScript?;
|
|
5732
5789
|
/** @internal */
|
|
5733
|
-
constructor(
|
|
5734
|
-
|
|
5790
|
+
constructor(client: Arkade, unlocker?: ArkadeUnlocker | undefined);
|
|
5791
|
+
/**
|
|
5792
|
+
* Spend coins through this builder's function, or through `unlocker`
|
|
5793
|
+
* (`other.unlock.<name>(...args)`, same client), which `ark.transaction()` requires. Calls add
|
|
5794
|
+
* up; contract coins come first, in call order, then `.fund()` inputs.
|
|
5795
|
+
*
|
|
5796
|
+
* Every coin's script sees the same outputs: "output 0 pays X" passes once for all of them.
|
|
5797
|
+
* For one payment per coin, the contract must check `INSPECTNUMINPUTS` or `PUSHCURRENTINPUTINDEX`.
|
|
5798
|
+
*/
|
|
5799
|
+
from(coins: Utxo | Utxo[], unlocker?: ArkadeUnlocker | undefined): this;
|
|
5735
5800
|
/**
|
|
5736
5801
|
* Add extra inputs the caller funds (e.g. a taker's own coins in a swap).
|
|
5737
|
-
* These
|
|
5802
|
+
* These come after the contract coins and are signed with the client identity.
|
|
5738
5803
|
*/
|
|
5739
5804
|
fund(coins: ArkTxInput[]): this;
|
|
5740
5805
|
/** Transfer an asset group: which inputs supply it and which outputs receive it. */
|
|
@@ -5751,15 +5816,22 @@ declare class ArkadeTransactionBuilder {
|
|
|
5751
5816
|
arkTx: Transaction;
|
|
5752
5817
|
checkpoints: Transaction[];
|
|
5753
5818
|
}>;
|
|
5819
|
+
private assemble;
|
|
5754
5820
|
/** Build, submit and return the finalized transaction. */
|
|
5755
5821
|
send(): Promise<ArkadeSpendResult>;
|
|
5756
5822
|
/** Sign the client-owned inputs of the ark tx (no-op when there are none). */
|
|
5757
5823
|
private signArk;
|
|
5758
|
-
/**
|
|
5824
|
+
/** The functions this spend goes through: the `.from()` ones, else this builder's own. */
|
|
5825
|
+
private unlockers;
|
|
5826
|
+
/** Indexes of inputs the client owns and must sign (contract inputs + funded inputs). */
|
|
5759
5827
|
private userInputIndexes;
|
|
5760
5828
|
private selectCoin;
|
|
5829
|
+
/**
|
|
5830
|
+
* Whether input `vin`'s assets are routed: by a `.withAsset()` input, or a caller's asset packet.
|
|
5831
|
+
* A caller's packet counts for every input, unread; arkd checks what it actually routes.
|
|
5832
|
+
*/
|
|
5833
|
+
private routesAssetsFrom;
|
|
5761
5834
|
private buildAssetPacket;
|
|
5762
|
-
private witnessBytes;
|
|
5763
5835
|
}
|
|
5764
5836
|
|
|
5765
5837
|
/**
|
|
@@ -5811,12 +5883,14 @@ declare const index_ArkadeService: typeof ArkadeService;
|
|
|
5811
5883
|
type index_ArkadeSpendResult = ArkadeSpendResult;
|
|
5812
5884
|
type index_ArkadeTransactionBuilder = ArkadeTransactionBuilder;
|
|
5813
5885
|
declare const index_ArkadeTransactionBuilder: typeof ArkadeTransactionBuilder;
|
|
5886
|
+
type index_ArkadeUnlocker = ArkadeUnlocker;
|
|
5814
5887
|
declare const index_AsmToken: typeof AsmToken;
|
|
5815
5888
|
type index_AssetSpec = AssetSpec;
|
|
5816
5889
|
type index_CallableFunctions = CallableFunctions;
|
|
5817
5890
|
declare const index_CompiledProgramFunction: typeof CompiledProgramFunction;
|
|
5818
5891
|
type index_ContractArtifact = ContractArtifact;
|
|
5819
5892
|
type index_ContractFunctions<P extends Program> = ContractFunctions<P>;
|
|
5893
|
+
type index_ContractUnlockers<P extends Program> = ContractUnlockers<P>;
|
|
5820
5894
|
declare const index_InputDef: typeof InputDef;
|
|
5821
5895
|
declare const index_InputRef: typeof InputRef;
|
|
5822
5896
|
declare const index_OP: typeof OP;
|
|
@@ -5855,7 +5929,7 @@ declare const index_toASM: typeof toASM;
|
|
|
5855
5929
|
declare const index_validateProgram: typeof validateProgram;
|
|
5856
5930
|
declare const index_witnessRefToBytes: typeof witnessRefToBytes;
|
|
5857
5931
|
declare namespace index {
|
|
5858
|
-
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5932
|
+
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, type index_ArkadeUnlocker as ArkadeUnlocker, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, type index_ContractUnlockers as ContractUnlockers, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5859
5933
|
}
|
|
5860
5934
|
|
|
5861
5935
|
/** Known BIP21 parameters including Arkade-specific extensions. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ah as ReadonlyIdentity, a as Identity, a4 as DescriptorSigningRequest, a5 as Transaction,
|
|
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 './wallet-
|
|
4
|
-
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveDescriptorSigner, O as selectVirtualCoins, Q as signingDescriptorIndex, T as strictSigningDescriptorIndex, U as waitForIncomingFunds } from './wallet-
|
|
5
|
-
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue,
|
|
6
|
-
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-
|
|
7
|
-
import { D as DefaultVtxo } from './delegate-
|
|
8
|
-
export { a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { ah as ReadonlyIdentity, a as Identity, a4 as DescriptorSigningRequest, a5 as Transaction, aB as SignerSession, a3 as DescriptorProvider, aF as IntentFeeConfig, aG as OffchainInput, aH as FeeAmount, aI as OnchainInput, aJ as FeeOutput, Y as IntentRepository, Z as ArkIntent, _ as IntentPageFilter, P as PageRequest, F as PageResult, O as Outpoint, $ as VirtualTxRepository, a0 as VirtualTx, a1 as VtxoBranch, W as WalletRepository, D as ExtendedVirtualCoin, H as ScriptVtxoCursor, J as ScriptVtxoPageOptions, K as StoredVtxo, L as VtxoRepositoryKey, E as ExtendedCoin, M as TransactionHistoryPageFilter, Q as TransactionHistoryPageCursor, h as ArkTransaction, U as WalletState, B as Contract, C as ContractRepository, X as ContractFilter, I as IWallet, v as ArkProvider, ar as NetworkName, ai as OnchainProvider, az as SettlementConfig, aK as ContractWatcherConfig, aL as Asset, R as Recipient, aM as FeeInfo, o as SettlementEvent, N as NormalizedExtendedVirtualCoin, S as SettleParams, G as GetArkadeInfoOptions, aN as GetVtxosOptions, aO as PaginationOptions, f as GetVtxosFilter, g as GetSpendableVtxosFilter, aP as CreateContractParams, aQ as GetContractsFilter, z as VirtualCoin, aR as GetSpendablePathsOptions, aS as GetAllSpendingPathsOptions, l as GetNewAddressesOptions, aT as InputExpiryFloor, aU as IssuanceParams, aV as ReissuanceParams, aW as BurnParams, aX as RenewVtxosOptions, A as ArkadeInfo, aY as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, ao as ContractSyncState, at as ContractWithVtxos, aZ as WatchedScript, a_ as PathSelection, m as NewAddress, a$ as ContractEvent, b0 as AssetDetails, b1 as IssuanceResult, b2 as DelegateInfo, b3 as MigrationGlobalSkipReason, b4 as MigrationLegSkipReason, b5 as SignerStatus, ag as IReadonlyWallet, i as ActivityRegistry, an as IReadonlyAssetManager, b6 as StorageConfig, j as Activity, k as IContractManager, q as IAssetManager, p as SendParams, n as IDelegateManager, b7 as IVtxoManager, a6 as Network, av as Coin, b8 as SendBitcoinParams, b9 as ExplorerTransaction, aC as SignedIntent, aD as Intent, ba as TreeNonces, bb as TreePartialSigs, T as TxNotificationEvent, bc as PendingTx, y as TapLeafScript, bd as EncodedVtxoScript, ay as CSVMultisigTapscript, x as RelativeTimelock, be as EmulatorProvider, V as VtxoScript, bf as Status, as as ArkAddress, bg as ChainTx, w as IndexerProvider, a9 as TxTree, bh as ArkadeService, bi as ContractVtxoEvent, bj as ExtendedContractVtxo, bk as ResolvedArkadeService, bl as resolveArkadeService, bm as PathContext } from './index-DdKxfC29.js';
|
|
2
|
+
export { bn as ActivityIntent, bo as ActivityResolver, bp as ArkIntentState, bq as ArkTapscript, br as AssetMetadata, bs as BITCOIN_EMULATOR_PUBKEY, bt as BaseWalletConfig, ad as BatchFailedEvent, ab as BatchFinalizationEvent, ac as BatchFinalizedEvent, bu as BatchInfo, bv as BatchSignableIdentity, a7 as BatchStartedEvent, bw as CLTVMultisigTapscript, bx as CandidateDeps, by as ChainTxType, a2 as ChainedTxType, bz as CommitmentTx, bA as ConditionCSVMultisigTapscript, bB as ConditionMultisigTapscript, bC as ConnectorTreeNode, bD as ContractBalance, bE as ContractEventCallback, bF as ContractHandler, aw as ContractManager, ax as ContractManagerConfig, bG as ContractState, bH as ContractVtxo, bI as ContractWatcher, bJ as ContractWatcherEventCallback, bK as DEFAULT_ARKADE_EMULATOR_URL, bL as DEFAULT_VTXO_PAGE_SIZE, bM as DelegateManagerImpl, bN as DelegateOptions, aj as DelegateProvider, bO as DeprecatedSignerMigrationReport, bP as DeprecatedSignerReport, bQ as DigestMismatchError, bR as Discoverable, bS as DiscoveredContract, bT as DiscoveryDeps, bU as ESPLORA_URL, bV as EmulatorInfo, aq as EsploraProvider, bW as EventSourceCapable, bX as EventSourceFactory, bY as EventSourceLike, bZ as EventSourceUnavailableError, al as ExitCaptureMode, b_ as ExitChainResolver, am as ExitDataSource, b$ as GroupMembership, c0 as HandlerError, c1 as INTENT_TERMINAL_STATES, c2 as IndexerTxType, c3 as IntentCoin, c4 as IntentFilter, c5 as KnownMetadata, c6 as MAX_PAGE_SIZE, c7 as MUTINYNET_EMULATOR_PUBKEY, c8 as MigrateDeprecatedSignerOptions, c9 as MigrationLegReport, ca as MigrationVtxoRef, cb as MultisigTapscript, cc as NewAddressType, cd as Nonces, ce as Output, cf as PageResponse, cg as PartialSig, ch as PrevTxSource, ci as PrevTxUnavailableError, cj as ProviderClass, ck as REGTEST_EMULATOR_PUBKEY, cl as RawTxSource, ak as ReadonlyWalletConfig, ap as RecipientArkadeAddressContext, cm as RenewalSplit, cn as RenewalSplitContext, r as RestArkProvider, co as RestDelegateProvider, cp as RestEmulatorProvider, s as RestIndexerProvider, cq as ScanContractsOptions, cr as ScanResult, cs as ScheduledSession, ct as SettlementEventType, cu as SignRequest, cv as SignerClassification, cw as SignerSet, t as SubscriptionEvent, cx as SubscriptionFilter, u as SubscriptionHeartbeat, cy as SubscriptionResponse, cz as SweepTxNotification, cA as TapLeaves, cB as TapTreeCoder, cC as TapscriptType, aE as TimeHeight, aa as TreeNoncesEvent, af as TreeSignatureEvent, a8 as TreeSigningStartedEvent, ae as TreeTxEvent, cD as Tx, cE as TxHistoryRecord, cF as TxKey, cG as TxNotification, cH as TxTag, cI as TxTreeNode, cJ as TxType, cK as Vtxo, cL as VtxoChain, aA as VtxoManager, cM as VtxoType, b as WalletConfig, cN as WalletMode, cO as WithPrevTx, cP as assertAllowedSighashTypes, cQ as assertPageRequest, cR as assertRecipientArkadeAddress, cS as assetMintResolver, cT as attachPrevArkTxs, cU as attachPrevoutTxs, cV as boardingResolver, cW as canRecoverOnchain, cX as canSpendOffchain, cY as canSweepOnchain, cZ as classifyAgainstSignerSet, c_ as classifyContractSigner, c$ as collabExitResolver, d0 as collectContracts, d1 as collectIntents, d2 as collectPages, d3 as collectScriptVtxos, d4 as collectTransactionHistory, d5 as collectUtxos, d6 as collectVtxos, d7 as configureEventSource, d8 as createDefaultActivityRegistry, d9 as createExitChainResolver, da as decodeTapscript, db as defaultEmulatorPubkey, dc as getAllNormalizedVtxos, dd as getConfiguredEventSource, de as getNetwork, df as getNormalizedVtxos, dg as getRandomId, dh as getSequence, di as hasCandidates, dj as isBatchSignable, dk as isContractVtxoEvent, dl as isCooperativelyMigratable, dm as isDiscoverable, dn as isEventSourceUnavailableError, dp as isPastExpiry, dq as isSigningIdentity, dr as isSubdust, ds as isTerminalIntentState, dt as isVirtualCoin, du as isVtxoExpiringSoon, dv as isVtxoSpent, dw as iteratePages, dx as networkFromArkadeInfo, dy as networks, dz as pageResult, dA as resolveEmulatorPubkey, dB as resolveEventSource, dC as resolvePrevTxs, dD as scriptFromTapLeafScript, dE as signerSetFromInfo, dF as toOffchainInputFeeParams, dG as toXOnlySignerHex, dH as withPrevTxs } from './index-DdKxfC29.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 './wallet-bFS7VybL.js';
|
|
4
|
+
export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashOperatorMismatchError, l as ArkadeCashUnclaimedReason, m as ArkadeCashUnclaimedVtxo, n as ArkadeCashVtxoRef, o as BoardingUtxoGroup, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, p as IndexedDBWalletRepository, K as KeyringDescriptorProvider, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, q as ProviderKind, r as ProviderUnavailableError, s as REGTEST_MIN_BATCH_EXPIRY_SECONDS, S as ServerInfoSource, t as ServerResponseMismatchError, V as VtxoReservation, u as VtxoReservedError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as defaultBatchExpiryPolicy, z as isAddressAllocationCapable, C as isArkError, E as isHDAllocationCapable, G as isHDWalletCapable, J as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveDescriptorSigner, O as selectVirtualCoins, Q as signingDescriptorIndex, T as strictSigningDescriptorIndex, U as waitForIncomingFunds } from './wallet-bFS7VybL.js';
|
|
5
|
+
import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, d as ArkadeFunction, I as InputDef, e as ArkadeValueType, C as CompiledProgramFunction, f as ArkadeArgType, g as ArkadeContractParams, h as ArkadeSegment, i as AsmToken, j as InputRef, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, l as TweakedSigner, U as UnsupportedProgramVersionError, W as WitnessRef, m as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, n as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-D-xqVzf8.js';
|
|
6
|
+
export { o as ArkadeContractHandler, B as BoardingContractHandler, q as BoardingContractParams, D as DefaultContractHandler, t as DefaultContractParams, u as DelegateContractHandler, x as DelegateContractParams, V as VHTLC, y as VHTLCContractHandler, z as VHTLCContractParams, E as VHTLCV2ContractHandler, F as VHTLCV2ContractParams, G as contractHandlers } from './index-D-xqVzf8.js';
|
|
7
|
+
import { D as DefaultVtxo } from './delegate-Jd4zs88Q.js';
|
|
8
|
+
export { a as DelegateVtxo } from './delegate-Jd4zs88Q.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';
|
|
@@ -2788,10 +2788,16 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2788
2788
|
private indexerProvider;
|
|
2789
2789
|
private walletRepository;
|
|
2790
2790
|
private incomingFundsSubscription;
|
|
2791
|
+
private incomingFundsRegistrations;
|
|
2791
2792
|
private contractEventsSubscription;
|
|
2792
2793
|
private onNextTick;
|
|
2793
2794
|
private channel;
|
|
2794
2795
|
private incomingFundsEpoch;
|
|
2796
|
+
/**
|
|
2797
|
+
* Supersedes older initializers without touching `incomingFundsEpoch`, so a
|
|
2798
|
+
* re-init that fails before registering leaves the live subscription delivering.
|
|
2799
|
+
*/
|
|
2800
|
+
private initEpoch;
|
|
2795
2801
|
private contractEventsEpoch;
|
|
2796
2802
|
private boardingEpoch;
|
|
2797
2803
|
/** Per-request progress callbacks: ends with the handler, not with a re-init. */
|
|
@@ -2835,6 +2841,7 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2835
2841
|
private handleGetBalance;
|
|
2836
2842
|
private getBoardingUtxosForBalance;
|
|
2837
2843
|
private onWalletInitialized;
|
|
2844
|
+
private registerIncomingFunds;
|
|
2838
2845
|
/**
|
|
2839
2846
|
* Refresh boarding inputs and transaction history. The virtual outputs come
|
|
2840
2847
|
* from the contract manager, which runs before this. Shared by
|
|
@@ -2845,8 +2852,9 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
|
|
|
2845
2852
|
* off the caller's path. @see RequestInitWallet.payload.lazyBoarding
|
|
2846
2853
|
*/
|
|
2847
2854
|
private refreshCachedData;
|
|
2848
|
-
/**
|
|
2849
|
-
private
|
|
2855
|
+
/** History rows plus the address they are stored under. Does not write. */
|
|
2856
|
+
private loadHistoryCache;
|
|
2857
|
+
private storeHistoryCache;
|
|
2850
2858
|
/**
|
|
2851
2859
|
* @param gen - set by a background caller; each write here is skipped once it goes stale.
|
|
2852
2860
|
* The fetch saves the fetched rows itself, before control returns, so that one write is
|
|
@@ -3671,6 +3679,13 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
|
|
|
3671
3679
|
spent: boolean;
|
|
3672
3680
|
txid: string;
|
|
3673
3681
|
}[]>;
|
|
3682
|
+
/** Reads `vout`'s script alone: another output of a tx someone else built (their change, a
|
|
3683
|
+
* service's fee address) can have a history Fulcrum answers empty and electrs refuses. */
|
|
3684
|
+
getTxOutspend(txid: string, vout: number): Promise<{
|
|
3685
|
+
spent: boolean;
|
|
3686
|
+
txid: string;
|
|
3687
|
+
}>;
|
|
3688
|
+
private resolveOutspends;
|
|
3674
3689
|
getTransactions(address: string): Promise<ExplorerTransaction[]>;
|
|
3675
3690
|
/**
|
|
3676
3691
|
* Resolve a list of `{tx_hash, height}` entries (as returned by the
|
|
@@ -5430,25 +5445,60 @@ type ArgsTuple<I extends readonly InputDef[]> = {
|
|
|
5430
5445
|
type FnArgs<F extends ArkadeFunction> = F extends {
|
|
5431
5446
|
inputs: infer I extends readonly InputDef[];
|
|
5432
5447
|
} ? ArgsTuple<I> : [];
|
|
5448
|
+
/** A contract's functions returning `R`: typed per function for a literal program, else loose. */
|
|
5449
|
+
type FunctionMap<P extends Program, R> = string extends keyof P["functions"] ? Record<string, (...args: ArkadeArgValue[]) => R> : {
|
|
5450
|
+
[K in keyof P["functions"]]: (...args: FnArgs<P["functions"][K]>) => R;
|
|
5451
|
+
};
|
|
5433
5452
|
/**
|
|
5434
5453
|
* The statically-typed `functions` map of a contract: precisely typed per function for a literal
|
|
5435
5454
|
* program, the loose {@link CallableFunctions} for the widened {@link Program}.
|
|
5436
5455
|
*/
|
|
5437
|
-
type ContractFunctions<P extends Program> =
|
|
5438
|
-
|
|
5439
|
-
|
|
5456
|
+
type ContractFunctions<P extends Program> = FunctionMap<P, ArkadeTransactionBuilder>;
|
|
5457
|
+
/** The statically-typed `unlock` map of a contract, typed like {@link ContractFunctions}. */
|
|
5458
|
+
type ContractUnlockers<P extends Program> = FunctionMap<P, ArkadeUnlocker>;
|
|
5440
5459
|
/** A spendable coin (VTXO) — outpoint + value. */
|
|
5441
5460
|
interface Utxo {
|
|
5442
5461
|
txid: string;
|
|
5443
5462
|
vout: number;
|
|
5444
5463
|
value: number;
|
|
5445
5464
|
/**
|
|
5446
|
-
*
|
|
5465
|
+
* The coin's scriptPubKey (hex), as {@link ArkadeContract.getUtxos} returns it. When set,
|
|
5466
|
+
* `.from()` refuses the coin unless it matches the contract spending it.
|
|
5467
|
+
*/
|
|
5468
|
+
script?: string;
|
|
5469
|
+
/**
|
|
5470
|
+
* Whether the server swept the coin's batch, as {@link ArkadeContract.getUtxos} reports it. A
|
|
5471
|
+
* swept coin can't be spent offchain, so `.from()` refuses it; recover it into a batch instead.
|
|
5472
|
+
*/
|
|
5473
|
+
isSwept?: boolean;
|
|
5474
|
+
/**
|
|
5475
|
+
* When a virtual coin's batch expires, as {@link ArkadeContract.getUtxos} reports it. From that
|
|
5476
|
+
* moment on, `.from()` refuses the coin. A coin without it, such as an onchain one, is never
|
|
5477
|
+
* refused for expiry; height-based expiry isn't checked, since that needs the chain tip.
|
|
5478
|
+
*/
|
|
5479
|
+
expiresAt?: Date;
|
|
5480
|
+
/**
|
|
5481
|
+
* Assets the coin carries, as {@link ArkadeContract.getUtxos} reports them. arkd refuses an
|
|
5482
|
+
* input whose assets the spend does not route, so `send()` needs a `.withAsset()` input or a
|
|
5483
|
+
* caller's asset packet for such a coin, and selection without `.from()` skips it otherwise.
|
|
5484
|
+
*/
|
|
5485
|
+
assets?: readonly Asset[];
|
|
5486
|
+
/**
|
|
5487
|
+
* Raw bytes of the ark tx that created this VTXO, attached as its input's PrevArkTx. Overrides
|
|
5447
5488
|
* the indexer-resolved value; supply it when the tx isn't indexable yet (a recursive covenant
|
|
5448
5489
|
* spending an ark tx the caller just built).
|
|
5449
5490
|
*/
|
|
5450
5491
|
sourceTx?: Uint8Array;
|
|
5451
5492
|
}
|
|
5493
|
+
/**
|
|
5494
|
+
* A contract function bound to its call arguments, from `contract.unlock.<name>(...args)`.
|
|
5495
|
+
* Pass it to {@link ArkadeTransactionBuilder.from} to spend coins through that function.
|
|
5496
|
+
*/
|
|
5497
|
+
interface ArkadeUnlocker {
|
|
5498
|
+
readonly contract: ArkadeContract<any>;
|
|
5499
|
+
readonly fn: CompiledProgramFunction;
|
|
5500
|
+
readonly args: Record<string, ArkadeArgValue>;
|
|
5501
|
+
}
|
|
5452
5502
|
/**
|
|
5453
5503
|
* An asset-group transfer attached to a spend: which inputs supply the asset and
|
|
5454
5504
|
* which outputs receive it. Encoded into the asset Packet alongside the emulator
|
|
@@ -5635,6 +5685,11 @@ declare class Arkade {
|
|
|
5635
5685
|
* artifacts reserve the server key and exit delay to the connected server.
|
|
5636
5686
|
*/
|
|
5637
5687
|
contract<const P extends Program>(program: P, args?: Record<string, ArkadeParamValue>): ArkadeContract<P>;
|
|
5688
|
+
/**
|
|
5689
|
+
* Start a spend with no function of its own: each `.from(coins, contract.unlock.<name>(...))`
|
|
5690
|
+
* names the function its coins are spent through.
|
|
5691
|
+
*/
|
|
5692
|
+
transaction(): ArkadeTransactionBuilder;
|
|
5638
5693
|
}
|
|
5639
5694
|
/** A resolved, instantiated Arkade contract. */
|
|
5640
5695
|
declare class ArkadeContract<P extends Program = Program> {
|
|
@@ -5663,6 +5718,8 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5663
5718
|
get pkScript(): Uint8Array;
|
|
5664
5719
|
/** Callable spending paths: `functions.<name>(...args)` (see {@link ContractFunctions}). */
|
|
5665
5720
|
get functions(): ContractFunctions<P>;
|
|
5721
|
+
/** Spending paths bound to their arguments, for `.from(coins, contract.unlock.<name>(...))`. */
|
|
5722
|
+
get unlock(): ContractUnlockers<P>;
|
|
5666
5723
|
/**
|
|
5667
5724
|
* The `createContract` payload (serialized program, args, keys, script, address), for
|
|
5668
5725
|
* registering through a manager the client does not hold.
|
|
@@ -5716,25 +5773,33 @@ declare class ArkadeContract<P extends Program = Program> {
|
|
|
5716
5773
|
getBalance(): Promise<bigint>;
|
|
5717
5774
|
}
|
|
5718
5775
|
/**
|
|
5719
|
-
* Fluent builder for a single spend. Obtained from `contract.functions.<name>(...)
|
|
5720
|
-
* chain `.from()`/`.to()` then `.send()`
|
|
5776
|
+
* Fluent builder for a single spend. Obtained from `contract.functions.<name>(...)`, or from
|
|
5777
|
+
* `ark.transaction()` with no function of its own; chain `.from()`/`.to()` then `.send()`
|
|
5778
|
+
* (broadcast) or `.build()` (assemble only).
|
|
5721
5779
|
*/
|
|
5722
5780
|
declare class ArkadeTransactionBuilder {
|
|
5723
|
-
private readonly
|
|
5724
|
-
private readonly
|
|
5725
|
-
private readonly args;
|
|
5781
|
+
private readonly client;
|
|
5782
|
+
private readonly unlocker?;
|
|
5726
5783
|
private readonly outputs;
|
|
5727
5784
|
private readonly fundingCoins;
|
|
5728
5785
|
private readonly assetSpecs;
|
|
5729
5786
|
private readonly extraPackets;
|
|
5730
|
-
private
|
|
5787
|
+
private readonly inputs;
|
|
5731
5788
|
private changeScript?;
|
|
5732
5789
|
/** @internal */
|
|
5733
|
-
constructor(
|
|
5734
|
-
|
|
5790
|
+
constructor(client: Arkade, unlocker?: ArkadeUnlocker | undefined);
|
|
5791
|
+
/**
|
|
5792
|
+
* Spend coins through this builder's function, or through `unlocker`
|
|
5793
|
+
* (`other.unlock.<name>(...args)`, same client), which `ark.transaction()` requires. Calls add
|
|
5794
|
+
* up; contract coins come first, in call order, then `.fund()` inputs.
|
|
5795
|
+
*
|
|
5796
|
+
* Every coin's script sees the same outputs: "output 0 pays X" passes once for all of them.
|
|
5797
|
+
* For one payment per coin, the contract must check `INSPECTNUMINPUTS` or `PUSHCURRENTINPUTINDEX`.
|
|
5798
|
+
*/
|
|
5799
|
+
from(coins: Utxo | Utxo[], unlocker?: ArkadeUnlocker | undefined): this;
|
|
5735
5800
|
/**
|
|
5736
5801
|
* Add extra inputs the caller funds (e.g. a taker's own coins in a swap).
|
|
5737
|
-
* These
|
|
5802
|
+
* These come after the contract coins and are signed with the client identity.
|
|
5738
5803
|
*/
|
|
5739
5804
|
fund(coins: ArkTxInput[]): this;
|
|
5740
5805
|
/** Transfer an asset group: which inputs supply it and which outputs receive it. */
|
|
@@ -5751,15 +5816,22 @@ declare class ArkadeTransactionBuilder {
|
|
|
5751
5816
|
arkTx: Transaction;
|
|
5752
5817
|
checkpoints: Transaction[];
|
|
5753
5818
|
}>;
|
|
5819
|
+
private assemble;
|
|
5754
5820
|
/** Build, submit and return the finalized transaction. */
|
|
5755
5821
|
send(): Promise<ArkadeSpendResult>;
|
|
5756
5822
|
/** Sign the client-owned inputs of the ark tx (no-op when there are none). */
|
|
5757
5823
|
private signArk;
|
|
5758
|
-
/**
|
|
5824
|
+
/** The functions this spend goes through: the `.from()` ones, else this builder's own. */
|
|
5825
|
+
private unlockers;
|
|
5826
|
+
/** Indexes of inputs the client owns and must sign (contract inputs + funded inputs). */
|
|
5759
5827
|
private userInputIndexes;
|
|
5760
5828
|
private selectCoin;
|
|
5829
|
+
/**
|
|
5830
|
+
* Whether input `vin`'s assets are routed: by a `.withAsset()` input, or a caller's asset packet.
|
|
5831
|
+
* A caller's packet counts for every input, unread; arkd checks what it actually routes.
|
|
5832
|
+
*/
|
|
5833
|
+
private routesAssetsFrom;
|
|
5761
5834
|
private buildAssetPacket;
|
|
5762
|
-
private witnessBytes;
|
|
5763
5835
|
}
|
|
5764
5836
|
|
|
5765
5837
|
/**
|
|
@@ -5811,12 +5883,14 @@ declare const index_ArkadeService: typeof ArkadeService;
|
|
|
5811
5883
|
type index_ArkadeSpendResult = ArkadeSpendResult;
|
|
5812
5884
|
type index_ArkadeTransactionBuilder = ArkadeTransactionBuilder;
|
|
5813
5885
|
declare const index_ArkadeTransactionBuilder: typeof ArkadeTransactionBuilder;
|
|
5886
|
+
type index_ArkadeUnlocker = ArkadeUnlocker;
|
|
5814
5887
|
declare const index_AsmToken: typeof AsmToken;
|
|
5815
5888
|
type index_AssetSpec = AssetSpec;
|
|
5816
5889
|
type index_CallableFunctions = CallableFunctions;
|
|
5817
5890
|
declare const index_CompiledProgramFunction: typeof CompiledProgramFunction;
|
|
5818
5891
|
type index_ContractArtifact = ContractArtifact;
|
|
5819
5892
|
type index_ContractFunctions<P extends Program> = ContractFunctions<P>;
|
|
5893
|
+
type index_ContractUnlockers<P extends Program> = ContractUnlockers<P>;
|
|
5820
5894
|
declare const index_InputDef: typeof InputDef;
|
|
5821
5895
|
declare const index_InputRef: typeof InputRef;
|
|
5822
5896
|
declare const index_OP: typeof OP;
|
|
@@ -5855,7 +5929,7 @@ declare const index_toASM: typeof toASM;
|
|
|
5855
5929
|
declare const index_validateProgram: typeof validateProgram;
|
|
5856
5930
|
declare const index_witnessRefToBytes: typeof witnessRefToBytes;
|
|
5857
5931
|
declare namespace index {
|
|
5858
|
-
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5932
|
+
export { index_ARKADE_OP as ARKADE_OP, index_ARKADE_OPCODES as ARKADE_OPCODES, index_ARKADE_OPCODE_NAMES as ARKADE_OPCODE_NAMES, index_ARKADE_OPCODE_VALUES as ARKADE_OPCODE_VALUES, index_ARKADE_OPS as ARKADE_OPS, index_Arkade as Arkade, index_ArkadeArgType as ArkadeArgType, index_ArkadeArgValue as ArkadeArgValue, type index_ArkadeBatchInput as ArkadeBatchInput, type index_ArkadeConnectOptions as ArkadeConnectOptions, type index_ArkadeConnectProviderOptions as ArkadeConnectProviderOptions, type index_ArkadeConnectServiceOptions as ArkadeConnectServiceOptions, index_ArkadeContract as ArkadeContract, type index_ArkadeContractEvent as ArkadeContractEvent, type index_ArkadeContractEventType as ArkadeContractEventType, index_ArkadeContractParams as ArkadeContractParams, type index_ArkadeContractSubscription as ArkadeContractSubscription, type index_ArkadeExtendedCoin as ArkadeExtendedCoin, type index_ArkadeExtendedVirtualCoin as ArkadeExtendedVirtualCoin, index_ArkadeFunction as ArkadeFunction, index_ArkadeParamValue as ArkadeParamValue, index_ArkadeProgramScript as ArkadeProgramScript, index_ArkadeScript as ArkadeScript, type index_ArkadeScriptOP as ArkadeScriptOP, type index_ArkadeScriptType as ArkadeScriptType, index_ArkadeSegment as ArkadeSegment, type index_ArkadeServerProvider as ArkadeServerProvider, index_ArkadeService as ArkadeService, type index_ArkadeSpendResult as ArkadeSpendResult, index_ArkadeTransactionBuilder as ArkadeTransactionBuilder, type index_ArkadeUnlocker as ArkadeUnlocker, index_AsmToken as AsmToken, type index_AssetSpec as AssetSpec, bignum as BigNum, type index_CallableFunctions as CallableFunctions, index_CompiledProgramFunction as CompiledProgramFunction, type index_ContractArtifact as ContractArtifact, type index_ContractFunctions as ContractFunctions, type index_ContractUnlockers as ContractUnlockers, index_InputDef as InputDef, index_InputRef as InputRef, index_OP as OP, index_OPCODE_NAMES as OPCODE_NAMES, index_OPCODE_VALUES as OPCODE_VALUES, index_Program as Program, index_ProgramKeys as ProgramKeys, index_ResolvedArkadeService as ResolvedArkadeService, index_SUPPORTED_PROGRAM_VERSION as SUPPORTED_PROGRAM_VERSION, index_Script as Script, index_ScriptType as ScriptType, index_SignerRef as SignerRef, index_TapscriptSegment as TapscriptSegment, index_TweakedSigner as TweakedSigner, index_UnsupportedProgramVersionError as UnsupportedProgramVersionError, type index_Utxo as Utxo, index_WitnessRef as WitnessRef, index_arkadeScriptHash as arkadeScriptHash, index_arkadeWitnessHash as arkadeWitnessHash, index_asmToBytes as asmToBytes, index_bytesToASM as bytesToASM, index_computeArkadeScriptPublicKey as computeArkadeScriptPublicKey, index_createArkadeBatchHandler as createArkadeBatchHandler, index_deserializeArkadeContractParams as deserializeArkadeContractParams, index_fromASM as fromASM, index_getOpcodeName as getOpcodeName, index_getOpcodeValue as getOpcodeValue, index_isContractArtifact as isContractArtifact, index_parseArtifact as parseArtifact, index_programFromArtifact as programFromArtifact, index_resolveArkadeService as resolveArkadeService, index_resolveAsm as resolveAsm, index_serializeArkadeContractParams as serializeArkadeContractParams, index_stringifyArtifact as stringifyArtifact, index_toASM as toASM, index_validateProgram as validateProgram, index_witnessRefToBytes as witnessRefToBytes };
|
|
5859
5933
|
}
|
|
5860
5934
|
|
|
5861
5935
|
/** Known BIP21 parameters including Arkade-specific extensions. */
|