@arkade-os/sdk 0.4.61 → 0.4.63
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 +20 -0
- 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-CIUEhv2t.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Cq9FpKv6.d.ts → asyncStorageTaskQueue-LT-xvvDN.d.ts} +2 -2
- package/dist/{chunk-FNCQJLR2.cjs → chunk-AB67CMHS.cjs} +3 -3
- package/dist/{chunk-FNCQJLR2.cjs.map → chunk-AB67CMHS.cjs.map} +1 -1
- package/dist/{chunk-3NUDA3MB.cjs → chunk-COOBS7ET.cjs} +646 -476
- package/dist/chunk-COOBS7ET.cjs.map +1 -0
- package/dist/{chunk-YVQNHELA.js → chunk-CZFAMS57.js} +3 -3
- package/dist/{chunk-YVQNHELA.js.map → chunk-CZFAMS57.js.map} +1 -1
- package/dist/{chunk-GDI2A65Z.js → chunk-FKKERGKA.js} +4 -4
- package/dist/{chunk-GDI2A65Z.js.map → chunk-FKKERGKA.js.map} +1 -1
- package/dist/{chunk-XMRB74HA.cjs → chunk-K56BNZV3.cjs} +10 -10
- package/dist/{chunk-XMRB74HA.cjs.map → chunk-K56BNZV3.cjs.map} +1 -1
- package/dist/{chunk-XLHN5L2O.js → chunk-KWW74O2F.js} +4 -4
- package/dist/{chunk-XLHN5L2O.js.map → chunk-KWW74O2F.js.map} +1 -1
- package/dist/{chunk-2JHN5RCY.cjs → chunk-LG5GY73A.cjs} +17 -17
- package/dist/{chunk-2JHN5RCY.cjs.map → chunk-LG5GY73A.cjs.map} +1 -1
- package/dist/{chunk-PVY6DMN5.js → chunk-MA32NXUV.js} +3 -3
- package/dist/{chunk-PVY6DMN5.js.map → chunk-MA32NXUV.js.map} +1 -1
- package/dist/{chunk-6O5OLYTZ.js → chunk-OAESYVZQ.js} +3 -3
- package/dist/{chunk-6O5OLYTZ.js.map → chunk-OAESYVZQ.js.map} +1 -1
- package/dist/{chunk-SF5NKAUA.cjs → chunk-OL7V43WS.cjs} +48 -48
- package/dist/{chunk-SF5NKAUA.cjs.map → chunk-OL7V43WS.cjs.map} +1 -1
- package/dist/{chunk-XFYFREPH.cjs → chunk-P6XYE27K.cjs} +17 -17
- package/dist/{chunk-XFYFREPH.cjs.map → chunk-P6XYE27K.cjs.map} +1 -1
- package/dist/{chunk-AUEXB42T.js → chunk-X7MMBB7S.js} +252 -84
- package/dist/chunk-X7MMBB7S.js.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-C4Rl6h9l.d.cts → delegate-BBQW61ym.d.cts} +1 -1
- package/dist/{delegate-BySzD37I.d.ts → delegate-Dv_9OVHv.d.ts} +1 -1
- package/dist/{index-C29VNcxC.d.ts → index-Bxe9kBFs.d.ts} +2 -2
- package/dist/{index-BcRCHnzN.d.cts → index-CFOMyVMt.d.cts} +88 -12
- package/dist/{index-BcRCHnzN.d.ts → index-CFOMyVMt.d.ts} +88 -12
- package/dist/{index-Butfkm-K.d.cts → index-aZycGEsQ.d.cts} +2 -2
- package/dist/index.cjs +274 -266
- package/dist/index.d.cts +116 -20
- package/dist/index.d.ts +116 -20
- 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 +27 -18
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +20 -3
- package/dist/repositories/sqlite/index.d.ts +20 -3
- package/dist/repositories/sqlite/index.js +13 -6
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-BTq3rMpI.d.cts → taskRunner-BJ6_AnLq.d.cts} +2 -2
- package/dist/{taskRunner-DxMJYJ7Y.d.ts → taskRunner-BQb0W1XG.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 +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-BVIfg2ic.d.ts → wallet-C2NvHjWB.d.cts} +14 -5
- package/dist/{wallet-DrSsUden.d.cts → wallet-DJUnN939.d.ts} +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 chunkOL7V43WS_cjs = require('../../chunk-OL7V43WS.cjs');
|
|
4
|
+
require('../../chunk-AB67CMHS.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 chunkOL7V43WS_cjs.ArkadeContractHandler; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "BoardingContractHandler", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkOL7V43WS_cjs.BoardingContractHandler; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DefaultContractHandler", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkOL7V43WS_cjs.DefaultContractHandler; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "DelegateContractHandler", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkOL7V43WS_cjs.DelegateContractHandler; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "VHTLCContractHandler", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkOL7V43WS_cjs.VHTLCContractHandler; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "VHTLCV2ContractHandler", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkOL7V43WS_cjs.VHTLCV2ContractHandler; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "contractHandlers", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkOL7V43WS_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-aZycGEsQ.cjs';
|
|
2
|
+
import '../../index-CFOMyVMt.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-BBQW61ym.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-Bxe9kBFs.js';
|
|
2
|
+
import '../../index-CFOMyVMt.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-Dv_9OVHv.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-OAESYVZQ.js';
|
|
2
|
+
import '../../chunk-MA32NXUV.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-CFOMyVMt.cjs';
|
|
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-CFOMyVMt.js';
|
|
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-CFOMyVMt.js';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Dv_9OVHv.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -2977,6 +2977,13 @@ interface GroupMembership {
|
|
|
2977
2977
|
label?: string;
|
|
2978
2978
|
/** App category for icon/filtering, e.g. "game". */
|
|
2979
2979
|
kind?: string;
|
|
2980
|
+
/**
|
|
2981
|
+
* Outcome of the action this membership belongs to, e.g. "failed",
|
|
2982
|
+
* "refunded" — an opaque machine token for the app to map to its own
|
|
2983
|
+
* copy or icon, not display text. Merged first-writer-wins across
|
|
2984
|
+
* resolvers sharing a `groupId`, like `label` and `kind`.
|
|
2985
|
+
*/
|
|
2986
|
+
outcome?: string;
|
|
2980
2987
|
/**
|
|
2981
2988
|
* Free-form row data. Same-group metadata is shallow-merged with
|
|
2982
2989
|
* earlier-resolver keys winning.
|
|
@@ -3013,6 +3020,12 @@ interface ActivityIntent {
|
|
|
3013
3020
|
label?: string;
|
|
3014
3021
|
/** App category for icon/filtering, e.g. "game". */
|
|
3015
3022
|
kind?: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* Resolver-declared outcome for the group, e.g. "failed", "refunded" — an
|
|
3025
|
+
* opaque machine token for the app to map to its own copy or icon, not
|
|
3026
|
+
* display text.
|
|
3027
|
+
*/
|
|
3028
|
+
outcome?: string;
|
|
3016
3029
|
/** Free-form row data, shallow-merged across the group's resolvers (first-writer-wins). */
|
|
3017
3030
|
metadata?: Record<string, unknown>;
|
|
3018
3031
|
}
|
|
@@ -5219,16 +5232,45 @@ interface WalletBalance {
|
|
|
5219
5232
|
/** Combined boarding balance (`confirmed` + `unconfirmed`) */
|
|
5220
5233
|
total: number;
|
|
5221
5234
|
};
|
|
5222
|
-
/**
|
|
5235
|
+
/** Settled (finalized) balance the wallet owns, including gated and intent-locked funds. */
|
|
5223
5236
|
settled: number;
|
|
5224
|
-
/**
|
|
5237
|
+
/** Preconfirmed (unfinalized) balance the wallet owns, on the same owned rule as {@link settled}. */
|
|
5225
5238
|
preconfirmed: number;
|
|
5226
5239
|
/**
|
|
5227
|
-
* Immediately spendable offchain balance
|
|
5228
|
-
*
|
|
5229
|
-
*
|
|
5240
|
+
* Immediately spendable offchain balance — what generic selection would
|
|
5241
|
+
* pick, so nothing counted here can be refused by `send`:
|
|
5242
|
+
* `settled + preconfirmed - gated - intentLocked`.
|
|
5230
5243
|
*/
|
|
5231
5244
|
available: number;
|
|
5245
|
+
/**
|
|
5246
|
+
* Spendable-but-for-the-gate funds: VTXOs under a contract the
|
|
5247
|
+
* generic-spending gate refuses — a VHTLC lockup, an unmarked `arkade`
|
|
5248
|
+
* program, or a type whose handler this runtime never registered. Counted in
|
|
5249
|
+
* `settled`/`preconfirmed` and `total`, never in `available`.
|
|
5250
|
+
*
|
|
5251
|
+
* Tested before {@link intentLocked}: the gate is a durable property of the
|
|
5252
|
+
* contract while an intent lock clears on its own, so a VTXO that is both is
|
|
5253
|
+
* reported here — it does not become available when the batch settles.
|
|
5254
|
+
*
|
|
5255
|
+
* Covers this bucket only: {@link recoverable} has the same owned-versus-
|
|
5256
|
+
* obtainable split under a different predicate and is not counted here.
|
|
5257
|
+
*
|
|
5258
|
+
* Subtract this from `settled + preconfirmed`, never from `total`. `total`
|
|
5259
|
+
* also carries {@link boarding}, {@link recoverable} and
|
|
5260
|
+
* {@link pendingRecovery}, which are still the user's funds — netting a
|
|
5261
|
+
* bucket out of it drops them from the figure with no signal.
|
|
5262
|
+
*/
|
|
5263
|
+
gated: number;
|
|
5264
|
+
/**
|
|
5265
|
+
* Funds committed to an in-flight (non-terminal) intent, and not already
|
|
5266
|
+
* counted in {@link gated}. Unlike `gated`, these return to `available` when
|
|
5267
|
+
* the intent reaches a terminal state.
|
|
5268
|
+
*
|
|
5269
|
+
* Reported as zero where the wallet cannot answer the question — no intent
|
|
5270
|
+
* repository, or a repository read that fails — so this under-reports into
|
|
5271
|
+
* `available` rather than misattributing.
|
|
5272
|
+
*/
|
|
5273
|
+
intentLocked: number;
|
|
5232
5274
|
/**
|
|
5233
5275
|
* Recoverable balance from subdust or expired (swept) virtual outputs —
|
|
5234
5276
|
* recoverable in principle, so a lockup whose contract refuses a spend right
|
|
@@ -5250,9 +5292,9 @@ interface WalletBalance {
|
|
|
5250
5292
|
assets: Asset[];
|
|
5251
5293
|
/**
|
|
5252
5294
|
* The subset of {@link assets} generic spending will accept, i.e. the asset
|
|
5253
|
-
* analogue of {@link available}.
|
|
5254
|
-
*
|
|
5255
|
-
*
|
|
5295
|
+
* analogue of {@link available}. `assets - availableAssets` is what is held
|
|
5296
|
+
* but not selectable, for the {@link gated} and {@link intentLocked} causes
|
|
5297
|
+
* plus recovery — assets have no per-cause split of their own.
|
|
5256
5298
|
*/
|
|
5257
5299
|
availableAssets: Asset[];
|
|
5258
5300
|
}
|
|
@@ -5320,6 +5362,31 @@ interface Recipient {
|
|
|
5320
5362
|
type: number;
|
|
5321
5363
|
payload: Uint8Array;
|
|
5322
5364
|
}>;
|
|
5365
|
+
/**
|
|
5366
|
+
* The recipient contract's tapleaf set (`VtxoScript.encode` form), published
|
|
5367
|
+
* on this output's `PSBT_OUT_TAP_TREE` so its spending paths are recoverable
|
|
5368
|
+
* from the transaction alone — an address commits only to the output key.
|
|
5369
|
+
*
|
|
5370
|
+
* Refused unless it derives the recipient address's taproot key, and it must
|
|
5371
|
+
* come from `VtxoScript.encode()`: leaf depths are ignored on read and the
|
|
5372
|
+
* tree is rebuilt in arkd's canonical shape, so a tree from another encoder
|
|
5373
|
+
* is refused even where it commits to the same address.
|
|
5374
|
+
*/
|
|
5375
|
+
tapTree?: Bytes;
|
|
5376
|
+
}
|
|
5377
|
+
/** Object form of `IWallet.send`'s arguments; the variadic form has no slot for options. */
|
|
5378
|
+
interface SendParams {
|
|
5379
|
+
/** One or more recipients — the variadic arguments of the other form. */
|
|
5380
|
+
recipients: [Recipient, ...Recipient[]];
|
|
5381
|
+
/**
|
|
5382
|
+
* Spend exactly these virtual outputs instead of letting the wallet choose.
|
|
5383
|
+
* Taken as given, like `settle({ inputs })`: nothing is added, so a shortfall
|
|
5384
|
+
* is an error rather than a top-up. Use when a contract must be funded from
|
|
5385
|
+
* coins outliving its timelock, which generic selection does not know about.
|
|
5386
|
+
*
|
|
5387
|
+
* @see IReadonlyWallet.getVtxos
|
|
5388
|
+
*/
|
|
5389
|
+
selectedVtxos?: ExtendedVirtualCoin[];
|
|
5323
5390
|
}
|
|
5324
5391
|
/**
|
|
5325
5392
|
* Known asset metadata fields.
|
|
@@ -5777,16 +5844,25 @@ interface IWallet extends IReadonlyWallet {
|
|
|
5777
5844
|
*/
|
|
5778
5845
|
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void): Promise<string>;
|
|
5779
5846
|
/**
|
|
5780
|
-
* Send bitcoin and/or assets to one or more Arkade recipients
|
|
5847
|
+
* Send bitcoin and/or assets to one or more Arkade recipients, passed
|
|
5848
|
+
* either as variadic `Recipient`s or as a single `SendParams` object —
|
|
5849
|
+
* the latter also carries the inputs to spend.
|
|
5781
5850
|
*
|
|
5782
|
-
* @param
|
|
5851
|
+
* @param args - Recipients, or a `SendParams` object
|
|
5783
5852
|
* @returns Arkade transaction id
|
|
5853
|
+
* @see SendParams
|
|
5784
5854
|
* @example
|
|
5785
5855
|
* ```typescript
|
|
5786
5856
|
* await wallet.send({ address: 'ark1q...', amount: 1000 })
|
|
5857
|
+
*
|
|
5858
|
+
* // choosing the inputs as well as the outputs
|
|
5859
|
+
* await wallet.send({
|
|
5860
|
+
* recipients: [{ address: 'ark1q...', amount: 1000 }],
|
|
5861
|
+
* selectedVtxos: mine,
|
|
5862
|
+
* })
|
|
5787
5863
|
* ```
|
|
5788
5864
|
*/
|
|
5789
|
-
send(...
|
|
5865
|
+
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
5790
5866
|
/** Asset manager bound to this wallet instance. */
|
|
5791
5867
|
assetManager: IAssetManager;
|
|
5792
5868
|
/** @returns Delegation manager, when configured. */
|
|
@@ -5859,4 +5935,4 @@ interface IReadonlyWallet {
|
|
|
5859
5935
|
clear(): Promise<void>;
|
|
5860
5936
|
}
|
|
5861
5937
|
|
|
5862
|
-
export { type
|
|
5938
|
+
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 };
|
|
@@ -2977,6 +2977,13 @@ interface GroupMembership {
|
|
|
2977
2977
|
label?: string;
|
|
2978
2978
|
/** App category for icon/filtering, e.g. "game". */
|
|
2979
2979
|
kind?: string;
|
|
2980
|
+
/**
|
|
2981
|
+
* Outcome of the action this membership belongs to, e.g. "failed",
|
|
2982
|
+
* "refunded" — an opaque machine token for the app to map to its own
|
|
2983
|
+
* copy or icon, not display text. Merged first-writer-wins across
|
|
2984
|
+
* resolvers sharing a `groupId`, like `label` and `kind`.
|
|
2985
|
+
*/
|
|
2986
|
+
outcome?: string;
|
|
2980
2987
|
/**
|
|
2981
2988
|
* Free-form row data. Same-group metadata is shallow-merged with
|
|
2982
2989
|
* earlier-resolver keys winning.
|
|
@@ -3013,6 +3020,12 @@ interface ActivityIntent {
|
|
|
3013
3020
|
label?: string;
|
|
3014
3021
|
/** App category for icon/filtering, e.g. "game". */
|
|
3015
3022
|
kind?: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* Resolver-declared outcome for the group, e.g. "failed", "refunded" — an
|
|
3025
|
+
* opaque machine token for the app to map to its own copy or icon, not
|
|
3026
|
+
* display text.
|
|
3027
|
+
*/
|
|
3028
|
+
outcome?: string;
|
|
3016
3029
|
/** Free-form row data, shallow-merged across the group's resolvers (first-writer-wins). */
|
|
3017
3030
|
metadata?: Record<string, unknown>;
|
|
3018
3031
|
}
|
|
@@ -5219,16 +5232,45 @@ interface WalletBalance {
|
|
|
5219
5232
|
/** Combined boarding balance (`confirmed` + `unconfirmed`) */
|
|
5220
5233
|
total: number;
|
|
5221
5234
|
};
|
|
5222
|
-
/**
|
|
5235
|
+
/** Settled (finalized) balance the wallet owns, including gated and intent-locked funds. */
|
|
5223
5236
|
settled: number;
|
|
5224
|
-
/**
|
|
5237
|
+
/** Preconfirmed (unfinalized) balance the wallet owns, on the same owned rule as {@link settled}. */
|
|
5225
5238
|
preconfirmed: number;
|
|
5226
5239
|
/**
|
|
5227
|
-
* Immediately spendable offchain balance
|
|
5228
|
-
*
|
|
5229
|
-
*
|
|
5240
|
+
* Immediately spendable offchain balance — what generic selection would
|
|
5241
|
+
* pick, so nothing counted here can be refused by `send`:
|
|
5242
|
+
* `settled + preconfirmed - gated - intentLocked`.
|
|
5230
5243
|
*/
|
|
5231
5244
|
available: number;
|
|
5245
|
+
/**
|
|
5246
|
+
* Spendable-but-for-the-gate funds: VTXOs under a contract the
|
|
5247
|
+
* generic-spending gate refuses — a VHTLC lockup, an unmarked `arkade`
|
|
5248
|
+
* program, or a type whose handler this runtime never registered. Counted in
|
|
5249
|
+
* `settled`/`preconfirmed` and `total`, never in `available`.
|
|
5250
|
+
*
|
|
5251
|
+
* Tested before {@link intentLocked}: the gate is a durable property of the
|
|
5252
|
+
* contract while an intent lock clears on its own, so a VTXO that is both is
|
|
5253
|
+
* reported here — it does not become available when the batch settles.
|
|
5254
|
+
*
|
|
5255
|
+
* Covers this bucket only: {@link recoverable} has the same owned-versus-
|
|
5256
|
+
* obtainable split under a different predicate and is not counted here.
|
|
5257
|
+
*
|
|
5258
|
+
* Subtract this from `settled + preconfirmed`, never from `total`. `total`
|
|
5259
|
+
* also carries {@link boarding}, {@link recoverable} and
|
|
5260
|
+
* {@link pendingRecovery}, which are still the user's funds — netting a
|
|
5261
|
+
* bucket out of it drops them from the figure with no signal.
|
|
5262
|
+
*/
|
|
5263
|
+
gated: number;
|
|
5264
|
+
/**
|
|
5265
|
+
* Funds committed to an in-flight (non-terminal) intent, and not already
|
|
5266
|
+
* counted in {@link gated}. Unlike `gated`, these return to `available` when
|
|
5267
|
+
* the intent reaches a terminal state.
|
|
5268
|
+
*
|
|
5269
|
+
* Reported as zero where the wallet cannot answer the question — no intent
|
|
5270
|
+
* repository, or a repository read that fails — so this under-reports into
|
|
5271
|
+
* `available` rather than misattributing.
|
|
5272
|
+
*/
|
|
5273
|
+
intentLocked: number;
|
|
5232
5274
|
/**
|
|
5233
5275
|
* Recoverable balance from subdust or expired (swept) virtual outputs —
|
|
5234
5276
|
* recoverable in principle, so a lockup whose contract refuses a spend right
|
|
@@ -5250,9 +5292,9 @@ interface WalletBalance {
|
|
|
5250
5292
|
assets: Asset[];
|
|
5251
5293
|
/**
|
|
5252
5294
|
* The subset of {@link assets} generic spending will accept, i.e. the asset
|
|
5253
|
-
* analogue of {@link available}.
|
|
5254
|
-
*
|
|
5255
|
-
*
|
|
5295
|
+
* analogue of {@link available}. `assets - availableAssets` is what is held
|
|
5296
|
+
* but not selectable, for the {@link gated} and {@link intentLocked} causes
|
|
5297
|
+
* plus recovery — assets have no per-cause split of their own.
|
|
5256
5298
|
*/
|
|
5257
5299
|
availableAssets: Asset[];
|
|
5258
5300
|
}
|
|
@@ -5320,6 +5362,31 @@ interface Recipient {
|
|
|
5320
5362
|
type: number;
|
|
5321
5363
|
payload: Uint8Array;
|
|
5322
5364
|
}>;
|
|
5365
|
+
/**
|
|
5366
|
+
* The recipient contract's tapleaf set (`VtxoScript.encode` form), published
|
|
5367
|
+
* on this output's `PSBT_OUT_TAP_TREE` so its spending paths are recoverable
|
|
5368
|
+
* from the transaction alone — an address commits only to the output key.
|
|
5369
|
+
*
|
|
5370
|
+
* Refused unless it derives the recipient address's taproot key, and it must
|
|
5371
|
+
* come from `VtxoScript.encode()`: leaf depths are ignored on read and the
|
|
5372
|
+
* tree is rebuilt in arkd's canonical shape, so a tree from another encoder
|
|
5373
|
+
* is refused even where it commits to the same address.
|
|
5374
|
+
*/
|
|
5375
|
+
tapTree?: Bytes;
|
|
5376
|
+
}
|
|
5377
|
+
/** Object form of `IWallet.send`'s arguments; the variadic form has no slot for options. */
|
|
5378
|
+
interface SendParams {
|
|
5379
|
+
/** One or more recipients — the variadic arguments of the other form. */
|
|
5380
|
+
recipients: [Recipient, ...Recipient[]];
|
|
5381
|
+
/**
|
|
5382
|
+
* Spend exactly these virtual outputs instead of letting the wallet choose.
|
|
5383
|
+
* Taken as given, like `settle({ inputs })`: nothing is added, so a shortfall
|
|
5384
|
+
* is an error rather than a top-up. Use when a contract must be funded from
|
|
5385
|
+
* coins outliving its timelock, which generic selection does not know about.
|
|
5386
|
+
*
|
|
5387
|
+
* @see IReadonlyWallet.getVtxos
|
|
5388
|
+
*/
|
|
5389
|
+
selectedVtxos?: ExtendedVirtualCoin[];
|
|
5323
5390
|
}
|
|
5324
5391
|
/**
|
|
5325
5392
|
* Known asset metadata fields.
|
|
@@ -5777,16 +5844,25 @@ interface IWallet extends IReadonlyWallet {
|
|
|
5777
5844
|
*/
|
|
5778
5845
|
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void): Promise<string>;
|
|
5779
5846
|
/**
|
|
5780
|
-
* Send bitcoin and/or assets to one or more Arkade recipients
|
|
5847
|
+
* Send bitcoin and/or assets to one or more Arkade recipients, passed
|
|
5848
|
+
* either as variadic `Recipient`s or as a single `SendParams` object —
|
|
5849
|
+
* the latter also carries the inputs to spend.
|
|
5781
5850
|
*
|
|
5782
|
-
* @param
|
|
5851
|
+
* @param args - Recipients, or a `SendParams` object
|
|
5783
5852
|
* @returns Arkade transaction id
|
|
5853
|
+
* @see SendParams
|
|
5784
5854
|
* @example
|
|
5785
5855
|
* ```typescript
|
|
5786
5856
|
* await wallet.send({ address: 'ark1q...', amount: 1000 })
|
|
5857
|
+
*
|
|
5858
|
+
* // choosing the inputs as well as the outputs
|
|
5859
|
+
* await wallet.send({
|
|
5860
|
+
* recipients: [{ address: 'ark1q...', amount: 1000 }],
|
|
5861
|
+
* selectedVtxos: mine,
|
|
5862
|
+
* })
|
|
5787
5863
|
* ```
|
|
5788
5864
|
*/
|
|
5789
|
-
send(...
|
|
5865
|
+
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
5790
5866
|
/** Asset manager bound to this wallet instance. */
|
|
5791
5867
|
assetManager: IAssetManager;
|
|
5792
5868
|
/** @returns Delegation manager, when configured. */
|
|
@@ -5859,4 +5935,4 @@ interface IReadonlyWallet {
|
|
|
5859
5935
|
clear(): Promise<void>;
|
|
5860
5936
|
}
|
|
5861
5937
|
|
|
5862
|
-
export { type
|
|
5938
|
+
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-CFOMyVMt.cjs';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BBQW61ym.cjs';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|