@arkade-os/sdk 0.4.61 → 0.4.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-BWDxp3Dr.d.cts → asyncStorageTaskQueue-B53mOTCw.d.cts} +1 -1
- package/dist/{asyncStorageTaskQueue-Cq9FpKv6.d.ts → asyncStorageTaskQueue-Df-CTfTE.d.ts} +1 -1
- package/dist/{chunk-AUEXB42T.js → chunk-2IZW6AEK.js} +247 -84
- package/dist/chunk-2IZW6AEK.js.map +1 -0
- package/dist/{chunk-SF5NKAUA.cjs → chunk-G53HASDV.cjs} +48 -48
- package/dist/{chunk-SF5NKAUA.cjs.map → chunk-G53HASDV.cjs.map} +1 -1
- package/dist/{chunk-GDI2A65Z.js → chunk-H2ZAJOQA.js} +4 -4
- package/dist/{chunk-GDI2A65Z.js.map → chunk-H2ZAJOQA.js.map} +1 -1
- package/dist/{chunk-2JHN5RCY.cjs → chunk-I6EDUE75.cjs} +17 -17
- package/dist/{chunk-2JHN5RCY.cjs.map → chunk-I6EDUE75.cjs.map} +1 -1
- package/dist/{chunk-XLHN5L2O.js → chunk-I7RLG6VX.js} +4 -4
- package/dist/{chunk-XLHN5L2O.js.map → chunk-I7RLG6VX.js.map} +1 -1
- package/dist/{chunk-6O5OLYTZ.js → chunk-L7S5KC5B.js} +3 -3
- package/dist/{chunk-6O5OLYTZ.js.map → chunk-L7S5KC5B.js.map} +1 -1
- package/dist/{chunk-FNCQJLR2.cjs → chunk-OH2XLTXE.cjs} +3 -3
- package/dist/{chunk-FNCQJLR2.cjs.map → chunk-OH2XLTXE.cjs.map} +1 -1
- package/dist/{chunk-XMRB74HA.cjs → chunk-PWWA4DBL.cjs} +10 -10
- package/dist/{chunk-XMRB74HA.cjs.map → chunk-PWWA4DBL.cjs.map} +1 -1
- package/dist/{chunk-XFYFREPH.cjs → chunk-QRSR4HV4.cjs} +17 -17
- package/dist/{chunk-XFYFREPH.cjs.map → chunk-QRSR4HV4.cjs.map} +1 -1
- package/dist/{chunk-YVQNHELA.js → chunk-RMBI6P4N.js} +3 -3
- package/dist/{chunk-YVQNHELA.js.map → chunk-RMBI6P4N.js.map} +1 -1
- package/dist/{chunk-PVY6DMN5.js → chunk-URT2RVGB.js} +3 -3
- package/dist/{chunk-PVY6DMN5.js.map → chunk-URT2RVGB.js.map} +1 -1
- package/dist/{chunk-3NUDA3MB.cjs → chunk-Z2OZMKFV.cjs} +641 -476
- package/dist/chunk-Z2OZMKFV.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-BySzD37I.d.ts → delegate-BjYJJsml.d.ts} +1 -1
- package/dist/{delegate-C4Rl6h9l.d.cts → delegate-CC1gcvuC.d.cts} +1 -1
- package/dist/{index-C29VNcxC.d.ts → index-C888wFEV.d.ts} +2 -2
- package/dist/{index-BcRCHnzN.d.cts → index-CwBr7qzV.d.cts} +71 -12
- package/dist/{index-BcRCHnzN.d.ts → index-CwBr7qzV.d.ts} +71 -12
- package/dist/{index-Butfkm-K.d.cts → index-Cz5_WaQP.d.cts} +2 -2
- package/dist/index.cjs +274 -266
- package/dist/index.d.cts +105 -19
- package/dist/index.d.ts +105 -19
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-BTq3rMpI.d.cts → taskRunner-BMUndClz.d.cts} +1 -1
- package/dist/{taskRunner-DxMJYJ7Y.d.ts → taskRunner-DZWUsSzA.d.ts} +1 -1
- 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 +16 -16
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +5 -5
- package/dist/wallet/expo/index.d.ts +5 -5
- package/dist/wallet/expo/index.js +7 -7
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-DrSsUden.d.cts → wallet-Dpjx6CJ7.d.ts} +14 -5
- package/dist/{wallet-BVIfg2ic.d.ts → wallet-H3f14est.d.cts} +14 -5
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-3NUDA3MB.cjs.map +0 -1
- package/dist/chunk-AUEXB42T.js.map +0 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkG53HASDV_cjs = require('../../chunk-G53HASDV.cjs');
|
|
4
|
+
require('../../chunk-OH2XLTXE.cjs');
|
|
5
5
|
require('../../chunk-5BLDMQED.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "ArkadeContractHandler", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkG53HASDV_cjs.ArkadeContractHandler; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "BoardingContractHandler", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkG53HASDV_cjs.BoardingContractHandler; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DefaultContractHandler", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkG53HASDV_cjs.DefaultContractHandler; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "DelegateContractHandler", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkG53HASDV_cjs.DelegateContractHandler; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "VHTLCContractHandler", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkG53HASDV_cjs.VHTLCContractHandler; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "VHTLCV2ContractHandler", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkG53HASDV_cjs.VHTLCV2ContractHandler; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "contractHandlers", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkG53HASDV_cjs.contractHandlers; }
|
|
36
36
|
});
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|
|
38
38
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-
|
|
2
|
-
import '../../index-
|
|
1
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-Cz5_WaQP.cjs';
|
|
2
|
+
import '../../index-CwBr7qzV.cjs';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-CC1gcvuC.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-
|
|
2
|
-
import '../../index-
|
|
1
|
+
export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-C888wFEV.js';
|
|
2
|
+
import '../../index-CwBr7qzV.js';
|
|
3
3
|
import '@scure/btc-signer/utils.js';
|
|
4
4
|
import '@scure/btc-signer/transaction.js';
|
|
5
5
|
import '@scure/btc-signer';
|
|
6
6
|
import '@scure/btc-signer/psbt.js';
|
|
7
|
-
import '../../delegate-
|
|
7
|
+
import '../../delegate-BjYJJsml.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-L7S5KC5B.js';
|
|
2
|
+
import '../../chunk-URT2RVGB.js';
|
|
3
3
|
import '../../chunk-NSBPE2FW.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import {
|
|
2
|
+
import { q as RelativeTimelock, V as VtxoScript, r as TapLeafScript } from './index-CwBr7qzV.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DefaultVtxo is the default implementation of a VtxoScript.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
2
|
-
import {
|
|
2
|
+
import { q as RelativeTimelock, V as VtxoScript, r as TapLeafScript } from './index-CwBr7qzV.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DefaultVtxo is the default implementation of a VtxoScript.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { bb as ContractHandler, q as RelativeTimelock, bm as Discoverable, V as VtxoScript, r as TapLeafScript, cP as TapscriptDeriving } from './index-CwBr7qzV.js';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BjYJJsml.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -5219,16 +5219,41 @@ interface WalletBalance {
|
|
|
5219
5219
|
/** Combined boarding balance (`confirmed` + `unconfirmed`) */
|
|
5220
5220
|
total: number;
|
|
5221
5221
|
};
|
|
5222
|
-
/**
|
|
5222
|
+
/** Settled (finalized) balance the wallet owns, including gated and intent-locked funds. */
|
|
5223
5223
|
settled: number;
|
|
5224
|
-
/**
|
|
5224
|
+
/** Preconfirmed (unfinalized) balance the wallet owns, on the same owned rule as {@link settled}. */
|
|
5225
5225
|
preconfirmed: number;
|
|
5226
5226
|
/**
|
|
5227
|
-
* Immediately spendable offchain balance
|
|
5228
|
-
*
|
|
5229
|
-
*
|
|
5227
|
+
* Immediately spendable offchain balance — what generic selection would
|
|
5228
|
+
* pick, so nothing counted here can be refused by `send`:
|
|
5229
|
+
* `settled + preconfirmed - gated - intentLocked`.
|
|
5230
5230
|
*/
|
|
5231
5231
|
available: number;
|
|
5232
|
+
/**
|
|
5233
|
+
* Spendable-but-for-the-gate funds: VTXOs under a contract the
|
|
5234
|
+
* generic-spending gate refuses — a VHTLC lockup, an unmarked `arkade`
|
|
5235
|
+
* program, or a type whose handler this runtime never registered. Counted in
|
|
5236
|
+
* `settled`/`preconfirmed` and `total`, never in `available`.
|
|
5237
|
+
*
|
|
5238
|
+
* Tested before {@link intentLocked}: the gate is a durable property of the
|
|
5239
|
+
* contract while an intent lock clears on its own, so a VTXO that is both is
|
|
5240
|
+
* reported here — it does not become available when the batch settles.
|
|
5241
|
+
*
|
|
5242
|
+
* Covers this bucket only: {@link recoverable} has the same owned-versus-
|
|
5243
|
+
* obtainable split under a different predicate and is not counted here, so
|
|
5244
|
+
* `total - gated` still carries a recoverable component.
|
|
5245
|
+
*/
|
|
5246
|
+
gated: number;
|
|
5247
|
+
/**
|
|
5248
|
+
* Funds committed to an in-flight (non-terminal) intent, and not already
|
|
5249
|
+
* counted in {@link gated}. Unlike `gated`, these return to `available` when
|
|
5250
|
+
* the intent reaches a terminal state.
|
|
5251
|
+
*
|
|
5252
|
+
* Reported as zero where the wallet cannot answer the question — no intent
|
|
5253
|
+
* repository, or a repository read that fails — so this under-reports into
|
|
5254
|
+
* `available` rather than misattributing.
|
|
5255
|
+
*/
|
|
5256
|
+
intentLocked: number;
|
|
5232
5257
|
/**
|
|
5233
5258
|
* Recoverable balance from subdust or expired (swept) virtual outputs —
|
|
5234
5259
|
* recoverable in principle, so a lockup whose contract refuses a spend right
|
|
@@ -5250,9 +5275,9 @@ interface WalletBalance {
|
|
|
5250
5275
|
assets: Asset[];
|
|
5251
5276
|
/**
|
|
5252
5277
|
* The subset of {@link assets} generic spending will accept, i.e. the asset
|
|
5253
|
-
* analogue of {@link available}.
|
|
5254
|
-
*
|
|
5255
|
-
*
|
|
5278
|
+
* analogue of {@link available}. `assets - availableAssets` is what is held
|
|
5279
|
+
* but not selectable, for the {@link gated} and {@link intentLocked} causes
|
|
5280
|
+
* plus recovery — assets have no per-cause split of their own.
|
|
5256
5281
|
*/
|
|
5257
5282
|
availableAssets: Asset[];
|
|
5258
5283
|
}
|
|
@@ -5320,6 +5345,31 @@ interface Recipient {
|
|
|
5320
5345
|
type: number;
|
|
5321
5346
|
payload: Uint8Array;
|
|
5322
5347
|
}>;
|
|
5348
|
+
/**
|
|
5349
|
+
* The recipient contract's tapleaf set (`VtxoScript.encode` form), published
|
|
5350
|
+
* on this output's `PSBT_OUT_TAP_TREE` so its spending paths are recoverable
|
|
5351
|
+
* from the transaction alone — an address commits only to the output key.
|
|
5352
|
+
*
|
|
5353
|
+
* Refused unless it derives the recipient address's taproot key, and it must
|
|
5354
|
+
* come from `VtxoScript.encode()`: leaf depths are ignored on read and the
|
|
5355
|
+
* tree is rebuilt in arkd's canonical shape, so a tree from another encoder
|
|
5356
|
+
* is refused even where it commits to the same address.
|
|
5357
|
+
*/
|
|
5358
|
+
tapTree?: Bytes;
|
|
5359
|
+
}
|
|
5360
|
+
/** Object form of `IWallet.send`'s arguments; the variadic form has no slot for options. */
|
|
5361
|
+
interface SendParams {
|
|
5362
|
+
/** One or more recipients — the variadic arguments of the other form. */
|
|
5363
|
+
recipients: [Recipient, ...Recipient[]];
|
|
5364
|
+
/**
|
|
5365
|
+
* Spend exactly these virtual outputs instead of letting the wallet choose.
|
|
5366
|
+
* Taken as given, like `settle({ inputs })`: nothing is added, so a shortfall
|
|
5367
|
+
* is an error rather than a top-up. Use when a contract must be funded from
|
|
5368
|
+
* coins outliving its timelock, which generic selection does not know about.
|
|
5369
|
+
*
|
|
5370
|
+
* @see IReadonlyWallet.getVtxos
|
|
5371
|
+
*/
|
|
5372
|
+
selectedVtxos?: ExtendedVirtualCoin[];
|
|
5323
5373
|
}
|
|
5324
5374
|
/**
|
|
5325
5375
|
* Known asset metadata fields.
|
|
@@ -5777,16 +5827,25 @@ interface IWallet extends IReadonlyWallet {
|
|
|
5777
5827
|
*/
|
|
5778
5828
|
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void): Promise<string>;
|
|
5779
5829
|
/**
|
|
5780
|
-
* Send bitcoin and/or assets to one or more Arkade recipients
|
|
5830
|
+
* Send bitcoin and/or assets to one or more Arkade recipients, passed
|
|
5831
|
+
* either as variadic `Recipient`s or as a single `SendParams` object —
|
|
5832
|
+
* the latter also carries the inputs to spend.
|
|
5781
5833
|
*
|
|
5782
|
-
* @param
|
|
5834
|
+
* @param args - Recipients, or a `SendParams` object
|
|
5783
5835
|
* @returns Arkade transaction id
|
|
5836
|
+
* @see SendParams
|
|
5784
5837
|
* @example
|
|
5785
5838
|
* ```typescript
|
|
5786
5839
|
* await wallet.send({ address: 'ark1q...', amount: 1000 })
|
|
5840
|
+
*
|
|
5841
|
+
* // choosing the inputs as well as the outputs
|
|
5842
|
+
* await wallet.send({
|
|
5843
|
+
* recipients: [{ address: 'ark1q...', amount: 1000 }],
|
|
5844
|
+
* selectedVtxos: mine,
|
|
5845
|
+
* })
|
|
5787
5846
|
* ```
|
|
5788
5847
|
*/
|
|
5789
|
-
send(...
|
|
5848
|
+
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
5790
5849
|
/** Asset manager bound to this wallet instance. */
|
|
5791
5850
|
assetManager: IAssetManager;
|
|
5792
5851
|
/** @returns Delegation manager, when configured. */
|
|
@@ -5859,4 +5918,4 @@ interface IReadonlyWallet {
|
|
|
5859
5918
|
clear(): Promise<void>;
|
|
5860
5919
|
}
|
|
5861
5920
|
|
|
5862
|
-
export { type
|
|
5921
|
+
export { type TreeTxEvent as $, type ArkTransaction as A, type IntentFilter as B, type ContractRepository as C, type VirtualTxRepository as D, type ExtendedCoin as E, type VirtualTx as F, type GetVtxosFilter as G, type VtxoBranch as H, type IWallet as I, ChainedTxType as J, type DescriptorProvider as K, type Network as L, CSVMultisigTapscript as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchStartedEvent as P, type TreeSigningStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, TxTree as U, VtxoScript as V, type WalletRepository as W, type TreeNoncesEvent as X, type BatchFinalizationEvent as Y, type BatchFinalizedEvent as Z, type BatchFailedEvent as _, type Identity as a, BITCOIN_EMULATOR_PUBKEY as a$, type TreeSignatureEvent as a0, type IReadonlyWallet as a1, type ReadonlyIdentity as a2, type OnchainProvider as a3, type DelegateProvider as a4, type ReadonlyWalletConfig as a5, type ExitCaptureMode as a6, type ExitDataSource as a7, type IReadonlyAssetManager as a8, type ContractSyncState as a9, type GetContractsFilter as aA, type GetSpendablePathsOptions as aB, type GetAllSpendingPathsOptions as aC, type IssuanceParams as aD, type ReissuanceParams as aE, type BurnParams as aF, type RenewVtxosOptions as aG, type PathSelection as aH, type ContractEvent as aI, type AssetDetails as aJ, type IssuanceResult as aK, type DelegateInfo as aL, type MigrationGlobalSkipReason as aM, type MigrationLegSkipReason as aN, type SignerStatus as aO, type StorageConfig as aP, type IVtxoManager as aQ, type ExplorerTransaction as aR, type EncodedVtxoScript as aS, type Status as aT, type ChainTx as aU, type PathContext as aV, type ActivityIntent as aW, type ActivityResolver as aX, type ArkIntentState as aY, type ArkTapscript as aZ, type AssetMetadata as a_, type RecipientAddressContext as aa, type NetworkName as ab, type ArkInfo as ac, ArkAddress as ad, type ContractWithVtxos as ae, selectPendingRecoveryOutpoints as af, type Coin as ag, ContractManager as ah, type ContractManagerConfig as ai, type SettlementConfig as aj, VtxoManager as ak, type SignerSession as al, type SignedIntent as am, Intent as an, type TimeHeight as ao, type DescriptorSigningRequest as ap, Transaction as aq, type IntentFeeConfig as ar, type OffchainInput as as, FeeAmount as at, type OnchainInput as au, type FeeOutput as av, type ContractWatcherConfig as aw, type Asset as ax, type FeeInfo as ay, type CreateContractParams as az, type WalletConfig as b, TapTreeCoder as b$, type BaseWalletConfig as b0, type BatchInfo as b1, type BatchSignableIdentity as b2, CLTVMultisigTapscript as b3, type CandidateDeps as b4, ChainTxType as b5, type CommitmentTx as b6, ConditionCSVMultisigTapscript as b7, ConditionMultisigTapscript as b8, type ContractBalance as b9, INTENT_TERMINAL_STATES as bA, IndexerTxType as bB, type KnownMetadata as bC, MUTINYNET_EMULATOR_PUBKEY as bD, type MigrateDeprecatedSignerOptions as bE, type MigrationLegReport as bF, type MigrationVtxoRef as bG, MultisigTapscript as bH, type Nonces as bI, type Output as bJ, type PageResponse as bK, type PaginationOptions as bL, PartialSig as bM, type ProviderClass as bN, REGTEST_EMULATOR_PUBKEY as bO, RestDelegateProvider as bP, RestDelegatorProvider as bQ, type ScanContractsOptions as bR, type ScanResult as bS, type ScheduledSession as bT, SettlementEventType as bU, type SignRequest as bV, type SignerClassification as bW, type SignerSet as bX, type SubscriptionEvent as bY, type SubscriptionHeartbeat as bZ, type TapLeaves as b_, type ContractEventCallback as ba, type ContractHandler as bb, type ContractState as bc, type ContractVtxo as bd, ContractWatcher as be, DelegateManagerImpl as bf, type DelegateOptions as bg, DelegatorManagerImpl as bh, type DelegatorProvider as bi, type DeprecatedSignerMigrationReport as bj, type DeprecatedSignerReport as bk, DigestMismatchError as bl, type Discoverable as bm, type DiscoveredContract as bn, type DiscoveryDeps as bo, ESPLORA_URL as bp, EsploraProvider as bq, type EventSourceCapable as br, type EventSourceFactory as bs, type EventSourceLike as bt, EventSourceUnavailableError as bu, type ExitChainResolver as bv, type ExtendedContractVtxo as bw, type GroupMembership as bx, type HandlerError as by, type IDelegatorManager as bz, type WalletBalance as c, TapscriptType as c0, type TreeNonces as c1, type TreePartialSigs as c2, type Tx as c3, type TxHistoryRecord as c4, type TxKey as c5, type TxTag as c6, type TxTreeNode as c7, TxType as c8, type VirtualStatus as c9, isExpired as cA, isPastExpiry as cB, isRecoverable as cC, isSigningIdentity as cD, isSpendable as cE, isSubdust as cF, isTerminalIntentState as cG, isVirtualCoin as cH, isVtxoExpiringSoon as cI, networks as cJ, resolveEmulatorPubkey as cK, resolveEventSource as cL, scriptFromTapLeafScript as cM, signerSetFromInfo as cN, toXOnlySignerHex as cO, type TapscriptDeriving as cP, type Vtxo as ca, type VtxoChain as cb, type VtxoType as cc, type WalletMode as cd, assetMintResolver as ce, boardingResolver as cf, canRecoverOnchain as cg, canSpendOffchain as ch, classifyAgainstSignerSet as ci, classifyContractSigner as cj, collabExitResolver as ck, configureEventSource as cl, createDefaultActivityRegistry as cm, createExitChainResolver as cn, decodeTapscript as co, defaultEmulatorPubkey as cp, getConfiguredEventSource as cq, getNetwork as cr, getRandomId as cs, getSequence as ct, hasCandidates as cu, hasTerminalSpend as cv, isBatchSignable as cw, isCooperativelyMigratable as cx, isDiscoverable as cy, isEventSourceUnavailableError as cz, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type SendParams as j, type IAssetManager as k, RestArkProvider as l, RestIndexerProvider as m, type SubscriptionResponse as n, type ArkProvider as o, type IndexerProvider as p, type RelativeTimelock as q, type TapLeafScript as r, type VirtualCoin as s, type Contract as t, type ExtendedVirtualCoin as u, type VtxoRepositoryKey as v, type WalletState as w, type ContractFilter as x, type IntentRepository as y, type ArkIntent as z };
|
|
@@ -5219,16 +5219,41 @@ interface WalletBalance {
|
|
|
5219
5219
|
/** Combined boarding balance (`confirmed` + `unconfirmed`) */
|
|
5220
5220
|
total: number;
|
|
5221
5221
|
};
|
|
5222
|
-
/**
|
|
5222
|
+
/** Settled (finalized) balance the wallet owns, including gated and intent-locked funds. */
|
|
5223
5223
|
settled: number;
|
|
5224
|
-
/**
|
|
5224
|
+
/** Preconfirmed (unfinalized) balance the wallet owns, on the same owned rule as {@link settled}. */
|
|
5225
5225
|
preconfirmed: number;
|
|
5226
5226
|
/**
|
|
5227
|
-
* Immediately spendable offchain balance
|
|
5228
|
-
*
|
|
5229
|
-
*
|
|
5227
|
+
* Immediately spendable offchain balance — what generic selection would
|
|
5228
|
+
* pick, so nothing counted here can be refused by `send`:
|
|
5229
|
+
* `settled + preconfirmed - gated - intentLocked`.
|
|
5230
5230
|
*/
|
|
5231
5231
|
available: number;
|
|
5232
|
+
/**
|
|
5233
|
+
* Spendable-but-for-the-gate funds: VTXOs under a contract the
|
|
5234
|
+
* generic-spending gate refuses — a VHTLC lockup, an unmarked `arkade`
|
|
5235
|
+
* program, or a type whose handler this runtime never registered. Counted in
|
|
5236
|
+
* `settled`/`preconfirmed` and `total`, never in `available`.
|
|
5237
|
+
*
|
|
5238
|
+
* Tested before {@link intentLocked}: the gate is a durable property of the
|
|
5239
|
+
* contract while an intent lock clears on its own, so a VTXO that is both is
|
|
5240
|
+
* reported here — it does not become available when the batch settles.
|
|
5241
|
+
*
|
|
5242
|
+
* Covers this bucket only: {@link recoverable} has the same owned-versus-
|
|
5243
|
+
* obtainable split under a different predicate and is not counted here, so
|
|
5244
|
+
* `total - gated` still carries a recoverable component.
|
|
5245
|
+
*/
|
|
5246
|
+
gated: number;
|
|
5247
|
+
/**
|
|
5248
|
+
* Funds committed to an in-flight (non-terminal) intent, and not already
|
|
5249
|
+
* counted in {@link gated}. Unlike `gated`, these return to `available` when
|
|
5250
|
+
* the intent reaches a terminal state.
|
|
5251
|
+
*
|
|
5252
|
+
* Reported as zero where the wallet cannot answer the question — no intent
|
|
5253
|
+
* repository, or a repository read that fails — so this under-reports into
|
|
5254
|
+
* `available` rather than misattributing.
|
|
5255
|
+
*/
|
|
5256
|
+
intentLocked: number;
|
|
5232
5257
|
/**
|
|
5233
5258
|
* Recoverable balance from subdust or expired (swept) virtual outputs —
|
|
5234
5259
|
* recoverable in principle, so a lockup whose contract refuses a spend right
|
|
@@ -5250,9 +5275,9 @@ interface WalletBalance {
|
|
|
5250
5275
|
assets: Asset[];
|
|
5251
5276
|
/**
|
|
5252
5277
|
* The subset of {@link assets} generic spending will accept, i.e. the asset
|
|
5253
|
-
* analogue of {@link available}.
|
|
5254
|
-
*
|
|
5255
|
-
*
|
|
5278
|
+
* analogue of {@link available}. `assets - availableAssets` is what is held
|
|
5279
|
+
* but not selectable, for the {@link gated} and {@link intentLocked} causes
|
|
5280
|
+
* plus recovery — assets have no per-cause split of their own.
|
|
5256
5281
|
*/
|
|
5257
5282
|
availableAssets: Asset[];
|
|
5258
5283
|
}
|
|
@@ -5320,6 +5345,31 @@ interface Recipient {
|
|
|
5320
5345
|
type: number;
|
|
5321
5346
|
payload: Uint8Array;
|
|
5322
5347
|
}>;
|
|
5348
|
+
/**
|
|
5349
|
+
* The recipient contract's tapleaf set (`VtxoScript.encode` form), published
|
|
5350
|
+
* on this output's `PSBT_OUT_TAP_TREE` so its spending paths are recoverable
|
|
5351
|
+
* from the transaction alone — an address commits only to the output key.
|
|
5352
|
+
*
|
|
5353
|
+
* Refused unless it derives the recipient address's taproot key, and it must
|
|
5354
|
+
* come from `VtxoScript.encode()`: leaf depths are ignored on read and the
|
|
5355
|
+
* tree is rebuilt in arkd's canonical shape, so a tree from another encoder
|
|
5356
|
+
* is refused even where it commits to the same address.
|
|
5357
|
+
*/
|
|
5358
|
+
tapTree?: Bytes;
|
|
5359
|
+
}
|
|
5360
|
+
/** Object form of `IWallet.send`'s arguments; the variadic form has no slot for options. */
|
|
5361
|
+
interface SendParams {
|
|
5362
|
+
/** One or more recipients — the variadic arguments of the other form. */
|
|
5363
|
+
recipients: [Recipient, ...Recipient[]];
|
|
5364
|
+
/**
|
|
5365
|
+
* Spend exactly these virtual outputs instead of letting the wallet choose.
|
|
5366
|
+
* Taken as given, like `settle({ inputs })`: nothing is added, so a shortfall
|
|
5367
|
+
* is an error rather than a top-up. Use when a contract must be funded from
|
|
5368
|
+
* coins outliving its timelock, which generic selection does not know about.
|
|
5369
|
+
*
|
|
5370
|
+
* @see IReadonlyWallet.getVtxos
|
|
5371
|
+
*/
|
|
5372
|
+
selectedVtxos?: ExtendedVirtualCoin[];
|
|
5323
5373
|
}
|
|
5324
5374
|
/**
|
|
5325
5375
|
* Known asset metadata fields.
|
|
@@ -5777,16 +5827,25 @@ interface IWallet extends IReadonlyWallet {
|
|
|
5777
5827
|
*/
|
|
5778
5828
|
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void): Promise<string>;
|
|
5779
5829
|
/**
|
|
5780
|
-
* Send bitcoin and/or assets to one or more Arkade recipients
|
|
5830
|
+
* Send bitcoin and/or assets to one or more Arkade recipients, passed
|
|
5831
|
+
* either as variadic `Recipient`s or as a single `SendParams` object —
|
|
5832
|
+
* the latter also carries the inputs to spend.
|
|
5781
5833
|
*
|
|
5782
|
-
* @param
|
|
5834
|
+
* @param args - Recipients, or a `SendParams` object
|
|
5783
5835
|
* @returns Arkade transaction id
|
|
5836
|
+
* @see SendParams
|
|
5784
5837
|
* @example
|
|
5785
5838
|
* ```typescript
|
|
5786
5839
|
* await wallet.send({ address: 'ark1q...', amount: 1000 })
|
|
5840
|
+
*
|
|
5841
|
+
* // choosing the inputs as well as the outputs
|
|
5842
|
+
* await wallet.send({
|
|
5843
|
+
* recipients: [{ address: 'ark1q...', amount: 1000 }],
|
|
5844
|
+
* selectedVtxos: mine,
|
|
5845
|
+
* })
|
|
5787
5846
|
* ```
|
|
5788
5847
|
*/
|
|
5789
|
-
send(...
|
|
5848
|
+
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
5790
5849
|
/** Asset manager bound to this wallet instance. */
|
|
5791
5850
|
assetManager: IAssetManager;
|
|
5792
5851
|
/** @returns Delegation manager, when configured. */
|
|
@@ -5859,4 +5918,4 @@ interface IReadonlyWallet {
|
|
|
5859
5918
|
clear(): Promise<void>;
|
|
5860
5919
|
}
|
|
5861
5920
|
|
|
5862
|
-
export { type
|
|
5921
|
+
export { type TreeTxEvent as $, type ArkTransaction as A, type IntentFilter as B, type ContractRepository as C, type VirtualTxRepository as D, type ExtendedCoin as E, type VirtualTx as F, type GetVtxosFilter as G, type VtxoBranch as H, type IWallet as I, ChainedTxType as J, type DescriptorProvider as K, type Network as L, CSVMultisigTapscript as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchStartedEvent as P, type TreeSigningStartedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, TxTree as U, VtxoScript as V, type WalletRepository as W, type TreeNoncesEvent as X, type BatchFinalizationEvent as Y, type BatchFinalizedEvent as Z, type BatchFailedEvent as _, type Identity as a, BITCOIN_EMULATOR_PUBKEY as a$, type TreeSignatureEvent as a0, type IReadonlyWallet as a1, type ReadonlyIdentity as a2, type OnchainProvider as a3, type DelegateProvider as a4, type ReadonlyWalletConfig as a5, type ExitCaptureMode as a6, type ExitDataSource as a7, type IReadonlyAssetManager as a8, type ContractSyncState as a9, type GetContractsFilter as aA, type GetSpendablePathsOptions as aB, type GetAllSpendingPathsOptions as aC, type IssuanceParams as aD, type ReissuanceParams as aE, type BurnParams as aF, type RenewVtxosOptions as aG, type PathSelection as aH, type ContractEvent as aI, type AssetDetails as aJ, type IssuanceResult as aK, type DelegateInfo as aL, type MigrationGlobalSkipReason as aM, type MigrationLegSkipReason as aN, type SignerStatus as aO, type StorageConfig as aP, type IVtxoManager as aQ, type ExplorerTransaction as aR, type EncodedVtxoScript as aS, type Status as aT, type ChainTx as aU, type PathContext as aV, type ActivityIntent as aW, type ActivityResolver as aX, type ArkIntentState as aY, type ArkTapscript as aZ, type AssetMetadata as a_, type RecipientAddressContext as aa, type NetworkName as ab, type ArkInfo as ac, ArkAddress as ad, type ContractWithVtxos as ae, selectPendingRecoveryOutpoints as af, type Coin as ag, ContractManager as ah, type ContractManagerConfig as ai, type SettlementConfig as aj, VtxoManager as ak, type SignerSession as al, type SignedIntent as am, Intent as an, type TimeHeight as ao, type DescriptorSigningRequest as ap, Transaction as aq, type IntentFeeConfig as ar, type OffchainInput as as, FeeAmount as at, type OnchainInput as au, type FeeOutput as av, type ContractWatcherConfig as aw, type Asset as ax, type FeeInfo as ay, type CreateContractParams as az, type WalletConfig as b, TapTreeCoder as b$, type BaseWalletConfig as b0, type BatchInfo as b1, type BatchSignableIdentity as b2, CLTVMultisigTapscript as b3, type CandidateDeps as b4, ChainTxType as b5, type CommitmentTx as b6, ConditionCSVMultisigTapscript as b7, ConditionMultisigTapscript as b8, type ContractBalance as b9, INTENT_TERMINAL_STATES as bA, IndexerTxType as bB, type KnownMetadata as bC, MUTINYNET_EMULATOR_PUBKEY as bD, type MigrateDeprecatedSignerOptions as bE, type MigrationLegReport as bF, type MigrationVtxoRef as bG, MultisigTapscript as bH, type Nonces as bI, type Output as bJ, type PageResponse as bK, type PaginationOptions as bL, PartialSig as bM, type ProviderClass as bN, REGTEST_EMULATOR_PUBKEY as bO, RestDelegateProvider as bP, RestDelegatorProvider as bQ, type ScanContractsOptions as bR, type ScanResult as bS, type ScheduledSession as bT, SettlementEventType as bU, type SignRequest as bV, type SignerClassification as bW, type SignerSet as bX, type SubscriptionEvent as bY, type SubscriptionHeartbeat as bZ, type TapLeaves as b_, type ContractEventCallback as ba, type ContractHandler as bb, type ContractState as bc, type ContractVtxo as bd, ContractWatcher as be, DelegateManagerImpl as bf, type DelegateOptions as bg, DelegatorManagerImpl as bh, type DelegatorProvider as bi, type DeprecatedSignerMigrationReport as bj, type DeprecatedSignerReport as bk, DigestMismatchError as bl, type Discoverable as bm, type DiscoveredContract as bn, type DiscoveryDeps as bo, ESPLORA_URL as bp, EsploraProvider as bq, type EventSourceCapable as br, type EventSourceFactory as bs, type EventSourceLike as bt, EventSourceUnavailableError as bu, type ExitChainResolver as bv, type ExtendedContractVtxo as bw, type GroupMembership as bx, type HandlerError as by, type IDelegatorManager as bz, type WalletBalance as c, TapscriptType as c0, type TreeNonces as c1, type TreePartialSigs as c2, type Tx as c3, type TxHistoryRecord as c4, type TxKey as c5, type TxTag as c6, type TxTreeNode as c7, TxType as c8, type VirtualStatus as c9, isExpired as cA, isPastExpiry as cB, isRecoverable as cC, isSigningIdentity as cD, isSpendable as cE, isSubdust as cF, isTerminalIntentState as cG, isVirtualCoin as cH, isVtxoExpiringSoon as cI, networks as cJ, resolveEmulatorPubkey as cK, resolveEventSource as cL, scriptFromTapLeafScript as cM, signerSetFromInfo as cN, toXOnlySignerHex as cO, type TapscriptDeriving as cP, type Vtxo as ca, type VtxoChain as cb, type VtxoType as cc, type WalletMode as cd, assetMintResolver as ce, boardingResolver as cf, canRecoverOnchain as cg, canSpendOffchain as ch, classifyAgainstSignerSet as ci, classifyContractSigner as cj, collabExitResolver as ck, configureEventSource as cl, createDefaultActivityRegistry as cm, createExitChainResolver as cn, decodeTapscript as co, defaultEmulatorPubkey as cp, getConfiguredEventSource as cq, getNetwork as cr, getRandomId as cs, getSequence as ct, hasCandidates as cu, hasTerminalSpend as cv, isBatchSignable as cw, isCooperativelyMigratable as cx, isDiscoverable as cy, isEventSourceUnavailableError as cz, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type SendParams as j, type IAssetManager as k, RestArkProvider as l, RestIndexerProvider as m, type SubscriptionResponse as n, type ArkProvider as o, type IndexerProvider as p, type RelativeTimelock as q, type TapLeafScript as r, type VirtualCoin as s, type Contract as t, type ExtendedVirtualCoin as u, type VtxoRepositoryKey as v, type WalletState as w, type ContractFilter as x, type IntentRepository as y, type ArkIntent as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { bb as ContractHandler, q as RelativeTimelock, bm as Discoverable, V as VtxoScript, r as TapLeafScript, cP as TapscriptDeriving } from './index-CwBr7qzV.cjs';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CC1gcvuC.cjs';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|