@arkade-os/sdk 0.4.49-rc.0 → 0.4.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +3 -3
- package/dist/adapters/indexedDB.js +2 -2
- package/dist/{ark-Bz4VxTY7.d.cts → ark-ApoclKQZ.d.cts} +60 -53
- package/dist/{ark-Bz4VxTY7.d.ts → ark-ApoclKQZ.d.ts} +60 -53
- package/dist/{asyncStorageTaskQueue-UIyDWZ_d.d.ts → asyncStorageTaskQueue-BCWmdVg8.d.ts} +2 -2
- package/dist/{asyncStorageTaskQueue-BgQaK3El.d.cts → asyncStorageTaskQueue-CIjgv1co.d.cts} +2 -2
- package/dist/{chunk-R3LGVLKP.cjs → chunk-6BQTROB4.cjs} +139 -148
- package/dist/chunk-6BQTROB4.cjs.map +1 -0
- package/dist/{chunk-27DACHF6.js → chunk-7WSVP7DK.js} +3 -3
- package/dist/{chunk-27DACHF6.js.map → chunk-7WSVP7DK.js.map} +1 -1
- package/dist/{chunk-ITT2S4O3.js → chunk-AA4Q2J57.js} +3 -3
- package/dist/chunk-AA4Q2J57.js.map +1 -0
- package/dist/{chunk-XWZY6NHJ.cjs → chunk-Q4K2RSMY.cjs} +7 -7
- package/dist/{chunk-XWZY6NHJ.cjs.map → chunk-Q4K2RSMY.cjs.map} +1 -1
- package/dist/{chunk-RNNCQHAI.cjs → chunk-SIAVTHMZ.cjs} +3 -3
- package/dist/chunk-SIAVTHMZ.cjs.map +1 -0
- package/dist/{chunk-T2IVKSZP.js → chunk-SNTSB6M2.js} +34 -43
- package/dist/chunk-SNTSB6M2.js.map +1 -0
- package/dist/{chunk-EEYMJVF6.cjs → chunk-TO3SR7TY.cjs} +11 -11
- package/dist/{chunk-EEYMJVF6.cjs.map → chunk-TO3SR7TY.cjs.map} +1 -1
- package/dist/{chunk-COB6VP4M.js → chunk-ZXRSSBCF.js} +3 -3
- package/dist/{chunk-COB6VP4M.js.map → chunk-ZXRSSBCF.js.map} +1 -1
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/{delegate-D_7Gh5H4.d.cts → delegate-CCHPwQft.d.cts} +1 -1
- package/dist/{delegate-BoIZ4Sjj.d.ts → delegate-hJYMZN1D.d.ts} +1 -1
- package/dist/{index-Cu6QYjYT.d.ts → index-5Y9h9OnO.d.ts} +2 -2
- package/dist/{index-jAMA6NXc.d.cts → index-8jE1XJpT.d.cts} +2 -2
- package/dist/index.cjs +145 -145
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +2 -2
- package/dist/repositories/realm/index.cjs +17 -17
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +3 -3
- package/dist/repositories/sqlite/index.cjs +16 -16
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +3 -3
- package/dist/{taskRunner-Ck0AouQU.d.cts → taskRunner-C3YLaM2x.d.cts} +2 -2
- package/dist/{taskRunner-bs1AE_BL.d.ts → taskRunner-ChvV6Xrh.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +12 -12
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +4 -4
- package/dist/wallet/expo/index.cjs +12 -12
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +3 -3
- package/dist/{wallet-CJ_8yiIz.d.ts → wallet-B260BTJs.d.cts} +2 -2
- package/dist/{wallet-CkTb2epm.d.cts → wallet-DIH0gVfW.d.ts} +2 -2
- package/dist/worker/expo/index.cjs +7 -7
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-ITT2S4O3.js.map +0 -1
- package/dist/chunk-R3LGVLKP.cjs.map +0 -1
- package/dist/chunk-RNNCQHAI.cjs.map +0 -1
- package/dist/chunk-T2IVKSZP.js.map +0 -1
package/dist/adapters/expo.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkTO3SR7TY_cjs = require('../chunk-TO3SR7TY.cjs');
|
|
4
|
+
require('../chunk-SIAVTHMZ.cjs');
|
|
5
5
|
require('../chunk-E7HB3GKK.cjs');
|
|
6
6
|
require('../chunk-5BLDMQED.cjs');
|
|
7
7
|
|
|
@@ -9,11 +9,11 @@ require('../chunk-5BLDMQED.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ExpoArkProvider", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkTO3SR7TY_cjs.ExpoArkProvider; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "ExpoIndexerProvider", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkTO3SR7TY_cjs.ExpoIndexerProvider; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=expo.cjs.map
|
|
19
19
|
//# sourceMappingURL=expo.cjs.map
|
package/dist/adapters/expo.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-
|
|
2
|
-
export { n as ArkProvider, o as IndexerProvider } from '../ark-
|
|
1
|
+
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-ApoclKQZ.cjs';
|
|
2
|
+
export { n as ArkProvider, o as IndexerProvider } from '../ark-ApoclKQZ.cjs';
|
|
3
3
|
import '@scure/btc-signer/transaction.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
package/dist/adapters/expo.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-
|
|
2
|
-
export { n as ArkProvider, o as IndexerProvider } from '../ark-
|
|
1
|
+
import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-ApoclKQZ.js';
|
|
2
|
+
export { n as ArkProvider, o as IndexerProvider } from '../ark-ApoclKQZ.js';
|
|
3
3
|
import '@scure/btc-signer/transaction.js';
|
|
4
4
|
import '@scure/btc-signer/utils.js';
|
|
5
5
|
import '@scure/btc-signer/psbt.js';
|
package/dist/adapters/expo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-ZXRSSBCF.js';
|
|
2
|
+
import '../chunk-AA4Q2J57.js';
|
|
3
3
|
import '../chunk-EFNLTS6Q.js';
|
|
4
4
|
import '../chunk-NSBPE2FW.js';
|
|
5
5
|
//# sourceMappingURL=expo.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk6BQTROB4_cjs = require('../chunk-6BQTROB4.cjs');
|
|
4
|
+
require('../chunk-SIAVTHMZ.cjs');
|
|
5
5
|
require('../chunk-LJQ2VQBE.cjs');
|
|
6
6
|
require('../chunk-E7HB3GKK.cjs');
|
|
7
7
|
require('../chunk-5BLDMQED.cjs');
|
|
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
|
|
|
11
11
|
dbName;
|
|
12
12
|
version;
|
|
13
13
|
db = null;
|
|
14
|
-
constructor(dbName, version =
|
|
14
|
+
constructor(dbName, version = chunk6BQTROB4_cjs.DB_VERSION) {
|
|
15
15
|
this.dbName = dbName;
|
|
16
16
|
this.version = version;
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DB_VERSION } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { DB_VERSION } from '../chunk-SNTSB6M2.js';
|
|
2
|
+
import '../chunk-AA4Q2J57.js';
|
|
3
3
|
import '../chunk-MBSYQ3WX.js';
|
|
4
4
|
import '../chunk-EFNLTS6Q.js';
|
|
5
5
|
import '../chunk-NSBPE2FW.js';
|
|
@@ -1890,22 +1890,30 @@ interface VirtualTxRepository extends AsyncDisposable {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
|
|
1892
1892
|
type RefreshVtxosOptions = {
|
|
1893
|
+
/**
|
|
1894
|
+
* Narrow the refresh to these scripts. A subset query, so the
|
|
1895
|
+
* cursor is not advanced: contracts outside the list may have data
|
|
1896
|
+
* we'd skip.
|
|
1897
|
+
*/
|
|
1893
1898
|
scripts?: string[];
|
|
1899
|
+
/**
|
|
1900
|
+
* Time window overriding the cursor-derived one. The cursor never
|
|
1901
|
+
* advances on a windowed query because the window may skip data
|
|
1902
|
+
* outside its bounds.
|
|
1903
|
+
*/
|
|
1894
1904
|
after?: number;
|
|
1905
|
+
/** @see after */
|
|
1895
1906
|
before?: number;
|
|
1896
1907
|
/**
|
|
1897
1908
|
* When true and `scripts` is not set, refresh every contract in
|
|
1898
|
-
* the repository
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
1909
|
+
* the repository rather than the watcher's watched set — which
|
|
1910
|
+
* differs only for rows the watcher never registered, since
|
|
1911
|
+
* retirement doesn't narrow that set
|
|
1912
|
+
* (see {@link ContractWatcher.getWatchedContracts}).
|
|
1902
1913
|
*
|
|
1903
|
-
* Because this is a *superset* of the
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
* Ignored when `scripts` is set (the explicit list already
|
|
1908
|
-
* specifies what to refresh, regardless of contract state).
|
|
1914
|
+
* Because this is a *superset* of the watched set, the cursor
|
|
1915
|
+
* invariant still holds and the cursor advances normally (unless
|
|
1916
|
+
* `after` / `before` is also supplied).
|
|
1909
1917
|
*
|
|
1910
1918
|
* @defaultValue `false`
|
|
1911
1919
|
*/
|
|
@@ -2044,11 +2052,14 @@ interface IContractManager extends Disposable {
|
|
|
2044
2052
|
*/
|
|
2045
2053
|
updateContract(script: string, updates: Partial<Omit<Contract, "script" | "createdAt">>): Promise<Contract>;
|
|
2046
2054
|
/**
|
|
2047
|
-
* Convenience helper to update only the contract state.
|
|
2055
|
+
* Convenience helper to update only the contract state. Note
|
|
2056
|
+
* `inactive` does not stop watching; see {@link ContractState} and
|
|
2057
|
+
* {@link deleteContract}.
|
|
2048
2058
|
*/
|
|
2049
2059
|
setContractState(script: string, state: ContractState): Promise<void>;
|
|
2050
2060
|
/**
|
|
2051
|
-
* Delete a contract by script and stop watching it
|
|
2061
|
+
* Delete a contract by script and stop watching it. This — not
|
|
2062
|
+
* retiring via {@link setContractState} — is the stop-watching path.
|
|
2052
2063
|
*/
|
|
2053
2064
|
deleteContract(script: string): Promise<void>;
|
|
2054
2065
|
/**
|
|
@@ -2251,8 +2262,8 @@ declare class ContractManager implements IContractManager {
|
|
|
2251
2262
|
* Static factory method for creating a new ContractManager.
|
|
2252
2263
|
* Initialize the manager by loading persisted contracts and starting to watch.
|
|
2253
2264
|
*
|
|
2254
|
-
* After initialization, the manager automatically watches
|
|
2255
|
-
*
|
|
2265
|
+
* After initialization, the manager automatically watches every persisted
|
|
2266
|
+
* contract. Use `onContractEvent()` to register event callbacks.
|
|
2256
2267
|
*
|
|
2257
2268
|
* @param config ContractManagerConfig
|
|
2258
2269
|
*/
|
|
@@ -2398,11 +2409,15 @@ declare class ContractManager implements IContractManager {
|
|
|
2398
2409
|
*/
|
|
2399
2410
|
updateContractParams(script: string, updates: Contract["params"]): Promise<Contract>;
|
|
2400
2411
|
/**
|
|
2401
|
-
* Set a contract's state.
|
|
2412
|
+
* Set a contract's state. Retiring (`inactive`) keeps it watched;
|
|
2413
|
+
* see {@link ContractState}. To stop watching, use
|
|
2414
|
+
* {@link deleteContract}.
|
|
2402
2415
|
*/
|
|
2403
2416
|
setContractState(script: string, state: ContractState): Promise<void>;
|
|
2404
2417
|
/**
|
|
2405
|
-
* Delete a contract.
|
|
2418
|
+
* Delete a contract. Also removes it from the watcher — the only way
|
|
2419
|
+
* to stop watching a contract (retiring it via
|
|
2420
|
+
* {@link setContractState} does not).
|
|
2406
2421
|
*
|
|
2407
2422
|
* @param script - Contract script
|
|
2408
2423
|
*/
|
|
@@ -2442,22 +2457,10 @@ declare class ContractManager implements IContractManager {
|
|
|
2442
2457
|
/**
|
|
2443
2458
|
* Force refresh virtual outputs from the indexer.
|
|
2444
2459
|
*
|
|
2445
|
-
* Without options, re-fetches
|
|
2446
|
-
*
|
|
2447
|
-
*
|
|
2448
|
-
*
|
|
2449
|
-
* cursor is not advanced because contracts outside the list may
|
|
2450
|
-
* have data we'd skip).
|
|
2451
|
-
*
|
|
2452
|
-
* `includeInactive: true` (and no `scripts`) widens the refresh to
|
|
2453
|
-
* every contract in the repository, including ones marked
|
|
2454
|
-
* `inactive` and ones that have dropped out of the watcher's
|
|
2455
|
-
* active set. This is a *superset* of the watched set, so the
|
|
2456
|
-
* cursor invariant still holds and the cursor advances normally.
|
|
2457
|
-
*
|
|
2458
|
-
* `after` / `before` apply a caller-supplied time window. The
|
|
2459
|
-
* cursor never advances on a windowed query because the window
|
|
2460
|
-
* may skip data outside its bounds.
|
|
2460
|
+
* Without options, re-fetches the watcher's watched set and
|
|
2461
|
+
* advances the global cursor. Each option narrows or widens that
|
|
2462
|
+
* scope and may hold the cursor back — see
|
|
2463
|
+
* {@link RefreshVtxosOptions}.
|
|
2461
2464
|
*/
|
|
2462
2465
|
refreshVtxos(opts?: RefreshVtxosOptions): Promise<void>;
|
|
2463
2466
|
refreshOutpoints(outpoints: Outpoint[]): Promise<void>;
|
|
@@ -2478,11 +2481,10 @@ declare class ContractManager implements IContractManager {
|
|
|
2478
2481
|
* Sync virtual outputs for the given contracts against the indexer.
|
|
2479
2482
|
*
|
|
2480
2483
|
* When `options.contracts` is omitted the sync covers the full
|
|
2481
|
-
* watched set (
|
|
2482
|
-
*
|
|
2483
|
-
*
|
|
2484
|
-
*
|
|
2485
|
-
* pick up.
|
|
2484
|
+
* watched set ({@link ContractWatcher.getWatchedContracts}) and the
|
|
2485
|
+
* global cursor is advanced on success. Passing an explicit subset
|
|
2486
|
+
* leaves the cursor alone so a narrow poll can't hide data that
|
|
2487
|
+
* other contracts still need to pick up.
|
|
2486
2488
|
*/
|
|
2487
2489
|
private syncContracts;
|
|
2488
2490
|
/**
|
|
@@ -2516,7 +2518,12 @@ declare class ContractManager implements IContractManager {
|
|
|
2516
2518
|
}
|
|
2517
2519
|
|
|
2518
2520
|
/**
|
|
2519
|
-
* Contract state
|
|
2521
|
+
* Contract lifecycle state. Both states stay monitored — the watcher
|
|
2522
|
+
* subscribes and sweeps every registered contract regardless
|
|
2523
|
+
* (see {@link ContractWatcher.getWatchedContracts}), because a retired
|
|
2524
|
+
* receive address can still be paid. `inactive` only demotes a contract
|
|
2525
|
+
* out of receive-address selection; it does **not** unsubscribe it.
|
|
2526
|
+
* Use {@link IContractManager.deleteContract} to stop watching.
|
|
2520
2527
|
*/
|
|
2521
2528
|
type ContractState = "active" | "inactive";
|
|
2522
2529
|
/**
|
|
@@ -2985,10 +2992,10 @@ declare class ContractWatcher {
|
|
|
2985
2992
|
/**
|
|
2986
2993
|
* Add a contract to be watched.
|
|
2987
2994
|
*
|
|
2988
|
-
*
|
|
2995
|
+
* Once watching, every contract is subscribed and polled whatever
|
|
2996
|
+
* its state.
|
|
2989
2997
|
*
|
|
2990
|
-
*
|
|
2991
|
-
* (which may cause them to be watched even if inactive).
|
|
2998
|
+
* @see getWatchedContracts
|
|
2992
2999
|
*/
|
|
2993
3000
|
addContract(contract: Contract): Promise<void>;
|
|
2994
3001
|
/**
|
|
@@ -3012,15 +3019,15 @@ declare class ContractWatcher {
|
|
|
3012
3019
|
*/
|
|
3013
3020
|
getAllContracts(): Contract[];
|
|
3014
3021
|
/**
|
|
3015
|
-
*
|
|
3016
|
-
* - all active contracts, plus
|
|
3017
|
-
* - inactive contracts that still hold known virtual outputs
|
|
3018
|
-
* (the subscription keeps watching them so `vtxo_spent` events for
|
|
3019
|
-
* those unspent outputs are still observed).
|
|
3022
|
+
* Every registered contract, retired (`inactive`) ones included.
|
|
3020
3023
|
*
|
|
3021
|
-
*
|
|
3022
|
-
*
|
|
3023
|
-
*
|
|
3024
|
+
* Feeds both the subscription and the indexer sweep scope, so
|
|
3025
|
+
* narrowing it drops a contract from every background channel at
|
|
3026
|
+
* once. Nothing may be narrowed out: an Ark receive address can be
|
|
3027
|
+
* paid again after the wallet has rotated past it, and a payment
|
|
3028
|
+
* that lands outside every background channel is invisible until
|
|
3029
|
+
* some foreground read happens to sweep it. Retirement therefore
|
|
3030
|
+
* governs receive-address selection, not coverage.
|
|
3024
3031
|
*/
|
|
3025
3032
|
getWatchedContracts(): Contract[];
|
|
3026
3033
|
/**
|
|
@@ -3029,7 +3036,7 @@ declare class ContractWatcher {
|
|
|
3029
3036
|
*/
|
|
3030
3037
|
private getContractVtxos;
|
|
3031
3038
|
/**
|
|
3032
|
-
* Start watching for virtual output events across all
|
|
3039
|
+
* Start watching for virtual output events across all watched contracts.
|
|
3033
3040
|
*/
|
|
3034
3041
|
startWatching(callback: ContractEventCallback): Promise<() => void>;
|
|
3035
3042
|
/**
|
|
@@ -3045,7 +3052,7 @@ declare class ContractWatcher {
|
|
|
3045
3052
|
*/
|
|
3046
3053
|
getConnectionState(): ConnectionState;
|
|
3047
3054
|
/**
|
|
3048
|
-
* Force a poll of all
|
|
3055
|
+
* Force a poll of all watched contracts.
|
|
3049
3056
|
* Useful for manual refresh or after app resume.
|
|
3050
3057
|
*/
|
|
3051
3058
|
forcePoll(): Promise<void>;
|
|
@@ -3091,7 +3098,7 @@ declare class ContractWatcher {
|
|
|
3091
3098
|
/**
|
|
3092
3099
|
* Update the subscription with scripts that should be watched.
|
|
3093
3100
|
*
|
|
3094
|
-
*
|
|
3101
|
+
* @see getWatchedContracts
|
|
3095
3102
|
*/
|
|
3096
3103
|
private updateSubscription;
|
|
3097
3104
|
/**
|
|
@@ -5027,4 +5034,4 @@ declare namespace ProtoTypes {
|
|
|
5027
5034
|
export { };
|
|
5028
5035
|
}
|
|
5029
5036
|
|
|
5030
|
-
export { type
|
|
5037
|
+
export { type NetworkName as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type TreeTxEvent as D, type ExtendedCoin as E, type TreeSignatureEvent as F, type GetVtxosFilter as G, type DescriptorProvider as H, type IWallet as I, type IReadonlyWallet as J, type ReadonlyIdentity as K, type Network as L, type DelegateProvider as M, type NormalizedExtendedVirtualCoin as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IntentRepository as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type VirtualTxRepository as U, VtxoScript as V, type WalletRepository as W, type ExitCaptureMode as X, type ExitDataSource as Y, type IReadonlyAssetManager as Z, type ContractSyncState as _, type Identity as a, ChainTxType as a$, type ArkInfo as a0, ArkAddress as a1, type Coin as a2, ContractManager as a3, CSVMultisigTapscript as a4, type SettlementConfig as a5, VtxoManager as a6, type SignerSession as a7, type SignedIntent as a8, Intent as a9, type BurnParams as aA, type RenewVtxosOptions as aB, type ContractWithVtxos as aC, type PathSelection as aD, type ContractEvent as aE, type AssetDetails as aF, type IssuanceResult as aG, type DelegateInfo as aH, type MigrationGlobalSkipReason as aI, type MigrationLegSkipReason as aJ, type SignerStatus as aK, type StorageConfig as aL, type IVtxoManager as aM, type ExplorerTransaction as aN, type EncodedVtxoScript as aO, type Status as aP, type ChainTx as aQ, type PathContext as aR, type ActivityIntent as aS, type ActivityResolver as aT, type ArkIntentState as aU, type ArkTapscript as aV, type AssetMetadata as aW, type BaseWalletConfig as aX, type BatchInfo as aY, type BatchSignableIdentity as aZ, CLTVMultisigTapscript as a_, type TimeHeight as aa, type VtxoRepositoryKey as ab, type WalletState as ac, type ContractFilter as ad, type ArkIntent as ae, type IntentFilter as af, type Outpoint as ag, type VirtualTx as ah, type VtxoBranch as ai, ChainedTxType as aj, type DescriptorSigningRequest as ak, Transaction as al, type IntentFeeConfig as am, type OffchainInput as an, FeeAmount as ao, type OnchainInput as ap, type FeeOutput as aq, type ContractWatcherConfig as ar, type Asset as as, type FeeInfo as at, type CreateContractParams as au, type GetContractsFilter as av, type GetSpendablePathsOptions as aw, type GetAllSpendingPathsOptions as ax, type IssuanceParams as ay, type ReissuanceParams as az, type WalletConfig as b, type VtxoChain as b$, type CommitmentTx as b0, ConditionCSVMultisigTapscript as b1, ConditionMultisigTapscript as b2, type ContractBalance as b3, type ContractEventCallback as b4, type ContractHandler as b5, type ContractManagerConfig as b6, type ContractState as b7, type ContractVtxo as b8, ContractWatcher as b9, type PageResponse as bA, type PaginationOptions as bB, PartialSig as bC, type ProviderClass as bD, RestDelegateProvider as bE, RestDelegatorProvider as bF, type ScanContractsOptions as bG, type ScanResult as bH, type ScheduledSession as bI, SettlementEventType as bJ, type SignRequest as bK, type SignerClassification as bL, type SignerSet as bM, type SubscriptionEvent as bN, type SubscriptionHeartbeat as bO, type TapLeaves as bP, TapTreeCoder as bQ, TapscriptType as bR, type TreeNonces as bS, type TreePartialSigs as bT, type Tx as bU, type TxHistoryRecord as bV, type TxKey as bW, type TxTreeNode as bX, TxType as bY, type VirtualStatus as bZ, type Vtxo as b_, DelegateManagerImpl as ba, type DelegateOptions as bb, DelegatorManagerImpl as bc, type DelegatorProvider as bd, type DeprecatedSignerMigrationReport as be, type DeprecatedSignerReport as bf, DigestMismatchError as bg, type Discoverable as bh, type DiscoveredContract as bi, type DiscoveryDeps as bj, ESPLORA_URL as bk, EsploraProvider as bl, type ExitChainResolver as bm, type ExtendedContractVtxo as bn, type GroupMembership as bo, type HandlerError as bp, type IDelegatorManager as bq, INTENT_TERMINAL_STATES as br, IndexerTxType as bs, type KnownMetadata as bt, type MigrateDeprecatedSignerOptions as bu, type MigrationLegReport as bv, type MigrationVtxoRef as bw, MultisigTapscript as bx, type Nonces as by, type Output as bz, type WalletBalance as c, type VtxoType as c0, type WalletMode as c1, boardingResolver as c2, canRecoverOnchain as c3, canSpendOffchain as c4, classifyAgainstSignerSet as c5, classifyContractSigner as c6, createDefaultActivityRegistry as c7, createExitChainResolver as c8, decodeTapscript as c9, getNetwork as ca, getSequence as cb, hasTerminalSpend as cc, isBatchSignable as cd, isCooperativelyMigratable as ce, isDiscoverable as cf, isExpired as cg, isPastExpiry as ch, isRecoverable as ci, isSpendable as cj, isSubdust as ck, isTerminalIntentState as cl, isVirtualCoin as cm, isVtxoExpiringSoon as cn, networks as co, signerSetFromInfo as cp, toXOnlySignerHex as cq, type TapscriptDeriving as cr, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type TreeSigningStartedEvent as u, TxTree as v, type TreeNoncesEvent as w, type BatchFinalizationEvent as x, type BatchFinalizedEvent as y, type BatchFailedEvent as z };
|
|
@@ -1890,22 +1890,30 @@ interface VirtualTxRepository extends AsyncDisposable {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
|
|
1892
1892
|
type RefreshVtxosOptions = {
|
|
1893
|
+
/**
|
|
1894
|
+
* Narrow the refresh to these scripts. A subset query, so the
|
|
1895
|
+
* cursor is not advanced: contracts outside the list may have data
|
|
1896
|
+
* we'd skip.
|
|
1897
|
+
*/
|
|
1893
1898
|
scripts?: string[];
|
|
1899
|
+
/**
|
|
1900
|
+
* Time window overriding the cursor-derived one. The cursor never
|
|
1901
|
+
* advances on a windowed query because the window may skip data
|
|
1902
|
+
* outside its bounds.
|
|
1903
|
+
*/
|
|
1894
1904
|
after?: number;
|
|
1905
|
+
/** @see after */
|
|
1895
1906
|
before?: number;
|
|
1896
1907
|
/**
|
|
1897
1908
|
* When true and `scripts` is not set, refresh every contract in
|
|
1898
|
-
* the repository
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
1909
|
+
* the repository rather than the watcher's watched set — which
|
|
1910
|
+
* differs only for rows the watcher never registered, since
|
|
1911
|
+
* retirement doesn't narrow that set
|
|
1912
|
+
* (see {@link ContractWatcher.getWatchedContracts}).
|
|
1902
1913
|
*
|
|
1903
|
-
* Because this is a *superset* of the
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
* Ignored when `scripts` is set (the explicit list already
|
|
1908
|
-
* specifies what to refresh, regardless of contract state).
|
|
1914
|
+
* Because this is a *superset* of the watched set, the cursor
|
|
1915
|
+
* invariant still holds and the cursor advances normally (unless
|
|
1916
|
+
* `after` / `before` is also supplied).
|
|
1909
1917
|
*
|
|
1910
1918
|
* @defaultValue `false`
|
|
1911
1919
|
*/
|
|
@@ -2044,11 +2052,14 @@ interface IContractManager extends Disposable {
|
|
|
2044
2052
|
*/
|
|
2045
2053
|
updateContract(script: string, updates: Partial<Omit<Contract, "script" | "createdAt">>): Promise<Contract>;
|
|
2046
2054
|
/**
|
|
2047
|
-
* Convenience helper to update only the contract state.
|
|
2055
|
+
* Convenience helper to update only the contract state. Note
|
|
2056
|
+
* `inactive` does not stop watching; see {@link ContractState} and
|
|
2057
|
+
* {@link deleteContract}.
|
|
2048
2058
|
*/
|
|
2049
2059
|
setContractState(script: string, state: ContractState): Promise<void>;
|
|
2050
2060
|
/**
|
|
2051
|
-
* Delete a contract by script and stop watching it
|
|
2061
|
+
* Delete a contract by script and stop watching it. This — not
|
|
2062
|
+
* retiring via {@link setContractState} — is the stop-watching path.
|
|
2052
2063
|
*/
|
|
2053
2064
|
deleteContract(script: string): Promise<void>;
|
|
2054
2065
|
/**
|
|
@@ -2251,8 +2262,8 @@ declare class ContractManager implements IContractManager {
|
|
|
2251
2262
|
* Static factory method for creating a new ContractManager.
|
|
2252
2263
|
* Initialize the manager by loading persisted contracts and starting to watch.
|
|
2253
2264
|
*
|
|
2254
|
-
* After initialization, the manager automatically watches
|
|
2255
|
-
*
|
|
2265
|
+
* After initialization, the manager automatically watches every persisted
|
|
2266
|
+
* contract. Use `onContractEvent()` to register event callbacks.
|
|
2256
2267
|
*
|
|
2257
2268
|
* @param config ContractManagerConfig
|
|
2258
2269
|
*/
|
|
@@ -2398,11 +2409,15 @@ declare class ContractManager implements IContractManager {
|
|
|
2398
2409
|
*/
|
|
2399
2410
|
updateContractParams(script: string, updates: Contract["params"]): Promise<Contract>;
|
|
2400
2411
|
/**
|
|
2401
|
-
* Set a contract's state.
|
|
2412
|
+
* Set a contract's state. Retiring (`inactive`) keeps it watched;
|
|
2413
|
+
* see {@link ContractState}. To stop watching, use
|
|
2414
|
+
* {@link deleteContract}.
|
|
2402
2415
|
*/
|
|
2403
2416
|
setContractState(script: string, state: ContractState): Promise<void>;
|
|
2404
2417
|
/**
|
|
2405
|
-
* Delete a contract.
|
|
2418
|
+
* Delete a contract. Also removes it from the watcher — the only way
|
|
2419
|
+
* to stop watching a contract (retiring it via
|
|
2420
|
+
* {@link setContractState} does not).
|
|
2406
2421
|
*
|
|
2407
2422
|
* @param script - Contract script
|
|
2408
2423
|
*/
|
|
@@ -2442,22 +2457,10 @@ declare class ContractManager implements IContractManager {
|
|
|
2442
2457
|
/**
|
|
2443
2458
|
* Force refresh virtual outputs from the indexer.
|
|
2444
2459
|
*
|
|
2445
|
-
* Without options, re-fetches
|
|
2446
|
-
*
|
|
2447
|
-
*
|
|
2448
|
-
*
|
|
2449
|
-
* cursor is not advanced because contracts outside the list may
|
|
2450
|
-
* have data we'd skip).
|
|
2451
|
-
*
|
|
2452
|
-
* `includeInactive: true` (and no `scripts`) widens the refresh to
|
|
2453
|
-
* every contract in the repository, including ones marked
|
|
2454
|
-
* `inactive` and ones that have dropped out of the watcher's
|
|
2455
|
-
* active set. This is a *superset* of the watched set, so the
|
|
2456
|
-
* cursor invariant still holds and the cursor advances normally.
|
|
2457
|
-
*
|
|
2458
|
-
* `after` / `before` apply a caller-supplied time window. The
|
|
2459
|
-
* cursor never advances on a windowed query because the window
|
|
2460
|
-
* may skip data outside its bounds.
|
|
2460
|
+
* Without options, re-fetches the watcher's watched set and
|
|
2461
|
+
* advances the global cursor. Each option narrows or widens that
|
|
2462
|
+
* scope and may hold the cursor back — see
|
|
2463
|
+
* {@link RefreshVtxosOptions}.
|
|
2461
2464
|
*/
|
|
2462
2465
|
refreshVtxos(opts?: RefreshVtxosOptions): Promise<void>;
|
|
2463
2466
|
refreshOutpoints(outpoints: Outpoint[]): Promise<void>;
|
|
@@ -2478,11 +2481,10 @@ declare class ContractManager implements IContractManager {
|
|
|
2478
2481
|
* Sync virtual outputs for the given contracts against the indexer.
|
|
2479
2482
|
*
|
|
2480
2483
|
* When `options.contracts` is omitted the sync covers the full
|
|
2481
|
-
* watched set (
|
|
2482
|
-
*
|
|
2483
|
-
*
|
|
2484
|
-
*
|
|
2485
|
-
* pick up.
|
|
2484
|
+
* watched set ({@link ContractWatcher.getWatchedContracts}) and the
|
|
2485
|
+
* global cursor is advanced on success. Passing an explicit subset
|
|
2486
|
+
* leaves the cursor alone so a narrow poll can't hide data that
|
|
2487
|
+
* other contracts still need to pick up.
|
|
2486
2488
|
*/
|
|
2487
2489
|
private syncContracts;
|
|
2488
2490
|
/**
|
|
@@ -2516,7 +2518,12 @@ declare class ContractManager implements IContractManager {
|
|
|
2516
2518
|
}
|
|
2517
2519
|
|
|
2518
2520
|
/**
|
|
2519
|
-
* Contract state
|
|
2521
|
+
* Contract lifecycle state. Both states stay monitored — the watcher
|
|
2522
|
+
* subscribes and sweeps every registered contract regardless
|
|
2523
|
+
* (see {@link ContractWatcher.getWatchedContracts}), because a retired
|
|
2524
|
+
* receive address can still be paid. `inactive` only demotes a contract
|
|
2525
|
+
* out of receive-address selection; it does **not** unsubscribe it.
|
|
2526
|
+
* Use {@link IContractManager.deleteContract} to stop watching.
|
|
2520
2527
|
*/
|
|
2521
2528
|
type ContractState = "active" | "inactive";
|
|
2522
2529
|
/**
|
|
@@ -2985,10 +2992,10 @@ declare class ContractWatcher {
|
|
|
2985
2992
|
/**
|
|
2986
2993
|
* Add a contract to be watched.
|
|
2987
2994
|
*
|
|
2988
|
-
*
|
|
2995
|
+
* Once watching, every contract is subscribed and polled whatever
|
|
2996
|
+
* its state.
|
|
2989
2997
|
*
|
|
2990
|
-
*
|
|
2991
|
-
* (which may cause them to be watched even if inactive).
|
|
2998
|
+
* @see getWatchedContracts
|
|
2992
2999
|
*/
|
|
2993
3000
|
addContract(contract: Contract): Promise<void>;
|
|
2994
3001
|
/**
|
|
@@ -3012,15 +3019,15 @@ declare class ContractWatcher {
|
|
|
3012
3019
|
*/
|
|
3013
3020
|
getAllContracts(): Contract[];
|
|
3014
3021
|
/**
|
|
3015
|
-
*
|
|
3016
|
-
* - all active contracts, plus
|
|
3017
|
-
* - inactive contracts that still hold known virtual outputs
|
|
3018
|
-
* (the subscription keeps watching them so `vtxo_spent` events for
|
|
3019
|
-
* those unspent outputs are still observed).
|
|
3022
|
+
* Every registered contract, retired (`inactive`) ones included.
|
|
3020
3023
|
*
|
|
3021
|
-
*
|
|
3022
|
-
*
|
|
3023
|
-
*
|
|
3024
|
+
* Feeds both the subscription and the indexer sweep scope, so
|
|
3025
|
+
* narrowing it drops a contract from every background channel at
|
|
3026
|
+
* once. Nothing may be narrowed out: an Ark receive address can be
|
|
3027
|
+
* paid again after the wallet has rotated past it, and a payment
|
|
3028
|
+
* that lands outside every background channel is invisible until
|
|
3029
|
+
* some foreground read happens to sweep it. Retirement therefore
|
|
3030
|
+
* governs receive-address selection, not coverage.
|
|
3024
3031
|
*/
|
|
3025
3032
|
getWatchedContracts(): Contract[];
|
|
3026
3033
|
/**
|
|
@@ -3029,7 +3036,7 @@ declare class ContractWatcher {
|
|
|
3029
3036
|
*/
|
|
3030
3037
|
private getContractVtxos;
|
|
3031
3038
|
/**
|
|
3032
|
-
* Start watching for virtual output events across all
|
|
3039
|
+
* Start watching for virtual output events across all watched contracts.
|
|
3033
3040
|
*/
|
|
3034
3041
|
startWatching(callback: ContractEventCallback): Promise<() => void>;
|
|
3035
3042
|
/**
|
|
@@ -3045,7 +3052,7 @@ declare class ContractWatcher {
|
|
|
3045
3052
|
*/
|
|
3046
3053
|
getConnectionState(): ConnectionState;
|
|
3047
3054
|
/**
|
|
3048
|
-
* Force a poll of all
|
|
3055
|
+
* Force a poll of all watched contracts.
|
|
3049
3056
|
* Useful for manual refresh or after app resume.
|
|
3050
3057
|
*/
|
|
3051
3058
|
forcePoll(): Promise<void>;
|
|
@@ -3091,7 +3098,7 @@ declare class ContractWatcher {
|
|
|
3091
3098
|
/**
|
|
3092
3099
|
* Update the subscription with scripts that should be watched.
|
|
3093
3100
|
*
|
|
3094
|
-
*
|
|
3101
|
+
* @see getWatchedContracts
|
|
3095
3102
|
*/
|
|
3096
3103
|
private updateSubscription;
|
|
3097
3104
|
/**
|
|
@@ -5027,4 +5034,4 @@ declare namespace ProtoTypes {
|
|
|
5027
5034
|
export { };
|
|
5028
5035
|
}
|
|
5029
5036
|
|
|
5030
|
-
export { type
|
|
5037
|
+
export { type NetworkName as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type TreeTxEvent as D, type ExtendedCoin as E, type TreeSignatureEvent as F, type GetVtxosFilter as G, type DescriptorProvider as H, type IWallet as I, type IReadonlyWallet as J, type ReadonlyIdentity as K, type Network as L, type DelegateProvider as M, type NormalizedExtendedVirtualCoin as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IntentRepository as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type VirtualTxRepository as U, VtxoScript as V, type WalletRepository as W, type ExitCaptureMode as X, type ExitDataSource as Y, type IReadonlyAssetManager as Z, type ContractSyncState as _, type Identity as a, ChainTxType as a$, type ArkInfo as a0, ArkAddress as a1, type Coin as a2, ContractManager as a3, CSVMultisigTapscript as a4, type SettlementConfig as a5, VtxoManager as a6, type SignerSession as a7, type SignedIntent as a8, Intent as a9, type BurnParams as aA, type RenewVtxosOptions as aB, type ContractWithVtxos as aC, type PathSelection as aD, type ContractEvent as aE, type AssetDetails as aF, type IssuanceResult as aG, type DelegateInfo as aH, type MigrationGlobalSkipReason as aI, type MigrationLegSkipReason as aJ, type SignerStatus as aK, type StorageConfig as aL, type IVtxoManager as aM, type ExplorerTransaction as aN, type EncodedVtxoScript as aO, type Status as aP, type ChainTx as aQ, type PathContext as aR, type ActivityIntent as aS, type ActivityResolver as aT, type ArkIntentState as aU, type ArkTapscript as aV, type AssetMetadata as aW, type BaseWalletConfig as aX, type BatchInfo as aY, type BatchSignableIdentity as aZ, CLTVMultisigTapscript as a_, type TimeHeight as aa, type VtxoRepositoryKey as ab, type WalletState as ac, type ContractFilter as ad, type ArkIntent as ae, type IntentFilter as af, type Outpoint as ag, type VirtualTx as ah, type VtxoBranch as ai, ChainedTxType as aj, type DescriptorSigningRequest as ak, Transaction as al, type IntentFeeConfig as am, type OffchainInput as an, FeeAmount as ao, type OnchainInput as ap, type FeeOutput as aq, type ContractWatcherConfig as ar, type Asset as as, type FeeInfo as at, type CreateContractParams as au, type GetContractsFilter as av, type GetSpendablePathsOptions as aw, type GetAllSpendingPathsOptions as ax, type IssuanceParams as ay, type ReissuanceParams as az, type WalletConfig as b, type VtxoChain as b$, type CommitmentTx as b0, ConditionCSVMultisigTapscript as b1, ConditionMultisigTapscript as b2, type ContractBalance as b3, type ContractEventCallback as b4, type ContractHandler as b5, type ContractManagerConfig as b6, type ContractState as b7, type ContractVtxo as b8, ContractWatcher as b9, type PageResponse as bA, type PaginationOptions as bB, PartialSig as bC, type ProviderClass as bD, RestDelegateProvider as bE, RestDelegatorProvider as bF, type ScanContractsOptions as bG, type ScanResult as bH, type ScheduledSession as bI, SettlementEventType as bJ, type SignRequest as bK, type SignerClassification as bL, type SignerSet as bM, type SubscriptionEvent as bN, type SubscriptionHeartbeat as bO, type TapLeaves as bP, TapTreeCoder as bQ, TapscriptType as bR, type TreeNonces as bS, type TreePartialSigs as bT, type Tx as bU, type TxHistoryRecord as bV, type TxKey as bW, type TxTreeNode as bX, TxType as bY, type VirtualStatus as bZ, type Vtxo as b_, DelegateManagerImpl as ba, type DelegateOptions as bb, DelegatorManagerImpl as bc, type DelegatorProvider as bd, type DeprecatedSignerMigrationReport as be, type DeprecatedSignerReport as bf, DigestMismatchError as bg, type Discoverable as bh, type DiscoveredContract as bi, type DiscoveryDeps as bj, ESPLORA_URL as bk, EsploraProvider as bl, type ExitChainResolver as bm, type ExtendedContractVtxo as bn, type GroupMembership as bo, type HandlerError as bp, type IDelegatorManager as bq, INTENT_TERMINAL_STATES as br, IndexerTxType as bs, type KnownMetadata as bt, type MigrateDeprecatedSignerOptions as bu, type MigrationLegReport as bv, type MigrationVtxoRef as bw, MultisigTapscript as bx, type Nonces as by, type Output as bz, type WalletBalance as c, type VtxoType as c0, type WalletMode as c1, boardingResolver as c2, canRecoverOnchain as c3, canSpendOffchain as c4, classifyAgainstSignerSet as c5, classifyContractSigner as c6, createDefaultActivityRegistry as c7, createExitChainResolver as c8, decodeTapscript as c9, getNetwork as ca, getSequence as cb, hasTerminalSpend as cc, isBatchSignable as cd, isCooperativelyMigratable as ce, isDiscoverable as cf, isExpired as cg, isPastExpiry as ch, isRecoverable as ci, isSpendable as cj, isSubdust as ck, isTerminalIntentState as cl, isVirtualCoin as cm, isVtxoExpiringSoon as cn, networks as co, signerSetFromInfo as cp, toXOnlySignerHex as cq, type TapscriptDeriving as cr, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type TreeSigningStartedEvent as u, TxTree as v, type TreeNoncesEvent as w, type BatchFinalizationEvent as x, type BatchFinalizedEvent as y, type BatchFailedEvent as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-ChvV6Xrh.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Minimal async key-value storage interface.
|
|
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
|
|
|
46
46
|
private writeList;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-C3YLaM2x.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Minimal async key-value storage interface.
|
|
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
|
|
|
46
46
|
private writeList;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|