@arkade-os/sdk 0.4.40 → 0.4.41

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.
Files changed (78) hide show
  1. package/README.md +24 -0
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{ark-BaZ6da8C.d.cts → ark-CSqMJczW.d.cts} +95 -1
  9. package/dist/{ark-BaZ6da8C.d.ts → ark-CSqMJczW.d.ts} +95 -1
  10. package/dist/{asyncStorageTaskQueue-trKcQM7q.d.cts → asyncStorageTaskQueue-79XdGsdW.d.cts} +2 -2
  11. package/dist/{asyncStorageTaskQueue-CvV50MjV.d.ts → asyncStorageTaskQueue-SZPrhw23.d.ts} +2 -2
  12. package/dist/{chunk-GUTKJMSF.cjs → chunk-32YKLQPS.cjs} +29 -29
  13. package/dist/{chunk-GUTKJMSF.cjs.map → chunk-32YKLQPS.cjs.map} +1 -1
  14. package/dist/{chunk-I4Z6KKUH.cjs → chunk-3MPXMLP4.cjs} +365 -208
  15. package/dist/chunk-3MPXMLP4.cjs.map +1 -0
  16. package/dist/{chunk-GF6NPAOJ.js → chunk-5XAYUPK4.js} +4 -4
  17. package/dist/{chunk-GF6NPAOJ.js.map → chunk-5XAYUPK4.js.map} +1 -1
  18. package/dist/{chunk-6EZY43WE.cjs → chunk-ALISWEQ5.cjs} +9 -9
  19. package/dist/{chunk-6EZY43WE.cjs.map → chunk-ALISWEQ5.cjs.map} +1 -1
  20. package/dist/{chunk-OUVTG72A.js → chunk-BE5MUB7T.js} +5 -3
  21. package/dist/chunk-BE5MUB7T.js.map +1 -0
  22. package/dist/{chunk-I2O4Q2EL.js → chunk-D5MQYYYF.js} +184 -30
  23. package/dist/chunk-D5MQYYYF.js.map +1 -0
  24. package/dist/{chunk-SWJBV4UB.js → chunk-DDG4RE5F.js} +4 -4
  25. package/dist/{chunk-SWJBV4UB.js.map → chunk-DDG4RE5F.js.map} +1 -1
  26. package/dist/{chunk-CMPJR3HS.cjs → chunk-HXDZ2QTW.cjs} +5 -3
  27. package/dist/chunk-HXDZ2QTW.cjs.map +1 -0
  28. package/dist/{chunk-TSG74BHI.cjs → chunk-KNASU3QI.cjs} +7 -7
  29. package/dist/{chunk-TSG74BHI.cjs.map → chunk-KNASU3QI.cjs.map} +1 -1
  30. package/dist/{chunk-5TSUGRHP.js → chunk-MYI333YH.js} +3 -3
  31. package/dist/{chunk-5TSUGRHP.js.map → chunk-MYI333YH.js.map} +1 -1
  32. package/dist/{chunk-GWISMFO5.cjs → chunk-WBF3FNS3.cjs} +14 -14
  33. package/dist/{chunk-GWISMFO5.cjs.map → chunk-WBF3FNS3.cjs.map} +1 -1
  34. package/dist/{chunk-CUSABEUQ.js → chunk-YNEDJTX2.js} +3 -3
  35. package/dist/{chunk-CUSABEUQ.js.map → chunk-YNEDJTX2.js.map} +1 -1
  36. package/dist/contracts/handlers/index.cjs +7 -7
  37. package/dist/contracts/handlers/index.d.cts +3 -3
  38. package/dist/contracts/handlers/index.d.ts +3 -3
  39. package/dist/contracts/handlers/index.js +2 -2
  40. package/dist/{delegate-ClaZWxlA.d.ts → delegate-BTn9BK8E.d.ts} +1 -1
  41. package/dist/{delegate-Bt5H1gbW.d.cts → delegate-Bqwe-kbj.d.cts} +1 -1
  42. package/dist/{index-D6kIRfBy.d.cts → index-aYiHTMkX.d.cts} +2 -2
  43. package/dist/{index-ByYBDr1g.d.ts → index-kITujXlS.d.ts} +2 -2
  44. package/dist/index.cjs +157 -141
  45. package/dist/index.d.cts +11 -8
  46. package/dist/index.d.ts +11 -8
  47. package/dist/index.js +4 -4
  48. package/dist/repositories/realm/index.cjs +13 -13
  49. package/dist/repositories/realm/index.d.cts +1 -1
  50. package/dist/repositories/realm/index.d.ts +1 -1
  51. package/dist/repositories/realm/index.js +4 -4
  52. package/dist/repositories/sqlite/index.cjs +13 -13
  53. package/dist/repositories/sqlite/index.d.cts +1 -1
  54. package/dist/repositories/sqlite/index.d.ts +1 -1
  55. package/dist/repositories/sqlite/index.js +4 -4
  56. package/dist/{taskRunner-Bwss4MUW.d.ts → taskRunner-BuBAZQwB.d.ts} +2 -2
  57. package/dist/{taskRunner-D7SuOTOa.d.cts → taskRunner-DRHElPMG.d.cts} +2 -2
  58. package/dist/wallet/expo/background.cjs +14 -14
  59. package/dist/wallet/expo/background.d.cts +3 -3
  60. package/dist/wallet/expo/background.d.ts +3 -3
  61. package/dist/wallet/expo/background.js +6 -6
  62. package/dist/wallet/expo/index.cjs +44 -14
  63. package/dist/wallet/expo/index.cjs.map +1 -1
  64. package/dist/wallet/expo/index.d.cts +14 -4
  65. package/dist/wallet/expo/index.d.ts +14 -4
  66. package/dist/wallet/expo/index.js +36 -6
  67. package/dist/wallet/expo/index.js.map +1 -1
  68. package/dist/{wallet-V5C4Nlhz.d.cts → wallet-BZgRfnAE.d.cts} +15 -2
  69. package/dist/{wallet-l-2dKXVh.d.ts → wallet-CTEQpKG9.d.ts} +15 -2
  70. package/dist/worker/expo/index.cjs +9 -9
  71. package/dist/worker/expo/index.d.cts +4 -4
  72. package/dist/worker/expo/index.d.ts +4 -4
  73. package/dist/worker/expo/index.js +5 -5
  74. package/package.json +1 -1
  75. package/dist/chunk-CMPJR3HS.cjs.map +0 -1
  76. package/dist/chunk-I2O4Q2EL.js.map +0 -1
  77. package/dist/chunk-I4Z6KKUH.cjs.map +0 -1
  78. package/dist/chunk-OUVTG72A.js.map +0 -1
package/README.md CHANGED
@@ -360,6 +360,30 @@ const txid = await wallet.send({
360
360
  })
361
361
  ```
362
362
 
363
+ ### Activity history
364
+
365
+ Group the wallet's transaction history into labelled, logical activities. Register an
366
+ `ActivityResolver` object; its optional `prepare()` can refresh correlation data, and
367
+ its synchronous `resolve(tx)` returns memberships. `getActivityHistory()` buckets
368
+ the transactions into `Activity` rows. The `boarding` built-in is pre-registered,
369
+ and a transaction can belong to multiple groups (e.g. a batched settlement).
370
+
371
+ ```typescript
372
+ // Tag your app's transactions (correlate by txid however you track them)
373
+ wallet.activity.use({
374
+ id: 'my-app',
375
+ resolve: (tx) => {
376
+ const action = myActions.get(tx.key.arkTxid)
377
+ return action ? [{ groupId: action.id, label: action.label, kind: 'app' }] : undefined
378
+ },
379
+ })
380
+
381
+ // Built-ins (boarding) + your resolver; txs grouped oldest-first per activity
382
+ const activities = await wallet.getActivityHistory()
383
+ // amount is signed sats: positive received, negative sent; same-key change rows are excluded
384
+ // each Activity: { id, intent?, txs, amount, createdAt, settled }
385
+ ```
386
+
363
387
  ### Assets (Issue, Reissue, Burn, Send)
364
388
 
365
389
  The wallet's `assetManager` lets you create and manage assets on Arkade. The `send` method supports sending assets.
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkGWISMFO5_cjs = require('../chunk-GWISMFO5.cjs');
4
- require('../chunk-6EZY43WE.cjs');
5
- require('../chunk-CMPJR3HS.cjs');
3
+ var chunkWBF3FNS3_cjs = require('../chunk-WBF3FNS3.cjs');
4
+ require('../chunk-ALISWEQ5.cjs');
5
+ require('../chunk-HXDZ2QTW.cjs');
6
6
  require('../chunk-5BLDMQED.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "ExpoArkProvider", {
11
11
  enumerable: true,
12
- get: function () { return chunkGWISMFO5_cjs.ExpoArkProvider; }
12
+ get: function () { return chunkWBF3FNS3_cjs.ExpoArkProvider; }
13
13
  });
14
14
  Object.defineProperty(exports, "ExpoIndexerProvider", {
15
15
  enumerable: true,
16
- get: function () { return chunkGWISMFO5_cjs.ExpoIndexerProvider; }
16
+ get: function () { return chunkWBF3FNS3_cjs.ExpoIndexerProvider; }
17
17
  });
18
18
  //# sourceMappingURL=expo.cjs.map
19
19
  //# sourceMappingURL=expo.cjs.map
@@ -1,5 +1,5 @@
1
- import { j as RestArkProvider, h as SettlementEvent, T as TxNotification, k as RestIndexerProvider, l as SubscriptionResponse } from '../ark-BaZ6da8C.cjs';
2
- export { m as ArkProvider, n as IndexerProvider } from '../ark-BaZ6da8C.cjs';
1
+ import { l as RestArkProvider, j as SettlementEvent, T as TxNotification, m as RestIndexerProvider, n as SubscriptionResponse } from '../ark-CSqMJczW.cjs';
2
+ export { o as ArkProvider, p as IndexerProvider } from '../ark-CSqMJczW.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';
@@ -1,5 +1,5 @@
1
- import { j as RestArkProvider, h as SettlementEvent, T as TxNotification, k as RestIndexerProvider, l as SubscriptionResponse } from '../ark-BaZ6da8C.js';
2
- export { m as ArkProvider, n as IndexerProvider } from '../ark-BaZ6da8C.js';
1
+ import { l as RestArkProvider, j as SettlementEvent, T as TxNotification, m as RestIndexerProvider, n as SubscriptionResponse } from '../ark-CSqMJczW.js';
2
+ export { o as ArkProvider, p as IndexerProvider } from '../ark-CSqMJczW.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';
@@ -1,6 +1,6 @@
1
- export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-SWJBV4UB.js';
2
- import '../chunk-GF6NPAOJ.js';
3
- import '../chunk-OUVTG72A.js';
1
+ export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-DDG4RE5F.js';
2
+ import '../chunk-5XAYUPK4.js';
3
+ import '../chunk-BE5MUB7T.js';
4
4
  import '../chunk-NSBPE2FW.js';
5
5
  //# sourceMappingURL=expo.js.map
6
6
  //# sourceMappingURL=expo.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkI4Z6KKUH_cjs = require('../chunk-I4Z6KKUH.cjs');
4
- require('../chunk-6EZY43WE.cjs');
5
- require('../chunk-GUTKJMSF.cjs');
6
- require('../chunk-CMPJR3HS.cjs');
3
+ var chunk3MPXMLP4_cjs = require('../chunk-3MPXMLP4.cjs');
4
+ require('../chunk-ALISWEQ5.cjs');
5
+ require('../chunk-32YKLQPS.cjs');
6
+ require('../chunk-HXDZ2QTW.cjs');
7
7
  require('../chunk-5BLDMQED.cjs');
8
8
 
9
9
  // src/storage/indexedDB.ts
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
11
11
  dbName;
12
12
  version;
13
13
  db = null;
14
- constructor(dbName, version = chunkI4Z6KKUH_cjs.DB_VERSION) {
14
+ constructor(dbName, version = chunk3MPXMLP4_cjs.DB_VERSION) {
15
15
  this.dbName = dbName;
16
16
  this.version = version;
17
17
  }
@@ -1,7 +1,7 @@
1
- import { DB_VERSION } from '../chunk-I2O4Q2EL.js';
2
- import '../chunk-GF6NPAOJ.js';
3
- import '../chunk-CUSABEUQ.js';
4
- import '../chunk-OUVTG72A.js';
1
+ import { DB_VERSION } from '../chunk-D5MQYYYF.js';
2
+ import '../chunk-5XAYUPK4.js';
3
+ import '../chunk-YNEDJTX2.js';
4
+ import '../chunk-BE5MUB7T.js';
5
5
  import '../chunk-NSBPE2FW.js';
6
6
 
7
7
  // src/storage/indexedDB.ts
@@ -1384,6 +1384,7 @@ interface Network {
1384
1384
  scriptHash: number;
1385
1385
  wif: number;
1386
1386
  }
1387
+ declare const getNetwork: (network: NetworkName) => Network;
1387
1388
  declare const networks: {
1388
1389
  bitcoin: Network;
1389
1390
  testnet: Network;
@@ -2914,6 +2915,90 @@ declare class DelegateManagerImpl implements IDelegateManager {
2914
2915
  declare const DelegatorManagerImpl: typeof DelegateManagerImpl;
2915
2916
  type DelegatorManagerImpl = DelegateManagerImpl;
2916
2917
 
2918
+ /** One transaction's participation in one logical action. */
2919
+ interface GroupMembership {
2920
+ /**
2921
+ * Stable id of the action; txs sharing it group together. Third-party
2922
+ * resolvers should namespace it (`"vendor:thing"`) to avoid colliding with
2923
+ * other resolvers' groups. SDK built-ins use namespaced ids such as `boarding:`.
2924
+ * A membership with an empty groupId is dropped.
2925
+ */
2926
+ groupId: string;
2927
+ /** Human label for the action, e.g. "Dice game". */
2928
+ label?: string;
2929
+ /** App category for icon/filtering, e.g. "game". */
2930
+ kind?: string;
2931
+ /**
2932
+ * Free-form row data. Same-group metadata is shallow-merged with
2933
+ * earlier-resolver keys winning.
2934
+ */
2935
+ metadata?: Record<string, unknown>;
2936
+ /**
2937
+ * This tx's unsigned sat contribution to this group. Defaults to the tx's
2938
+ * full amount; the builder applies direction. Use it to split a batched tx
2939
+ * across groups. Same-key receive rows paired with a sent row are treated
2940
+ * as change and excluded from `Activity.amount`. A membership with a
2941
+ * non-finite amount (NaN/Infinity) is dropped.
2942
+ */
2943
+ amount?: number;
2944
+ }
2945
+ /** A pluggable resolver keyed by `id`. */
2946
+ interface ActivityResolver {
2947
+ /**
2948
+ * Registry key — override or remove by it. Namespace it (`"vendor:games"`)
2949
+ * so independent libraries don't clobber each other; `use()` overwrites
2950
+ * silently on a duplicate id.
2951
+ */
2952
+ id: string;
2953
+ /**
2954
+ * Load correlation data before `resolve` runs. If it rejects, this resolver
2955
+ * contributes no memberships.
2956
+ */
2957
+ prepare?(): Promise<void>;
2958
+ /** Pure and synchronous. The groups this tx belongs to, or undefined to leave it plain. */
2959
+ resolve(tx: ArkTransaction): GroupMembership[] | undefined;
2960
+ }
2961
+ /** The non-id, non-amount part of a {@link GroupMembership}. */
2962
+ interface ActivityIntent {
2963
+ /** Human label for the action, e.g. "Dice game". */
2964
+ label?: string;
2965
+ /** App category for icon/filtering, e.g. "game". */
2966
+ kind?: string;
2967
+ /** Free-form row data, shallow-merged across the group's resolvers (first-writer-wins). */
2968
+ metadata?: Record<string, unknown>;
2969
+ }
2970
+ /** One logical activity. */
2971
+ interface Activity {
2972
+ /** The groupId, or the natural tx key for untagged rows. */
2973
+ id: string;
2974
+ /** Merged intent for the group, if any resolver tagged it. */
2975
+ intent?: ActivityIntent;
2976
+ /** Member txs, oldest-first. */
2977
+ txs: ArkTransaction[];
2978
+ /** Signed net sats: positive received, negative sent; same-key change rows are excluded. */
2979
+ amount: number;
2980
+ /** Earliest member createdAt (ms since epoch). */
2981
+ createdAt: number;
2982
+ /** True once every member tx is settled. */
2983
+ settled: boolean;
2984
+ }
2985
+ /** Resolver registry keyed by id. */
2986
+ declare class ActivityRegistry {
2987
+ private readonly resolvers;
2988
+ /** Add a resolver, or override an existing one with the same id (kept in place). */
2989
+ use(resolver: ActivityResolver): void;
2990
+ /** Remove a resolver (built-in or custom) by id. */
2991
+ remove(id: string): void;
2992
+ /** The registered resolver ids, in registration order. */
2993
+ list(): string[];
2994
+ /** All registered resolvers, in registration (priority) order. */
2995
+ all(): ActivityResolver[];
2996
+ }
2997
+ /** Built-in resolver: labels on-chain boarding (deposit) transactions. */
2998
+ declare function boardingResolver(): ActivityResolver;
2999
+ /** Default registry with SDK built-ins. */
3000
+ declare function createDefaultActivityRegistry(): ActivityRegistry;
3001
+
2917
3002
  /**
2918
3003
  * Wallet receive-address strategy.
2919
3004
  *
@@ -3685,6 +3770,10 @@ interface IReadonlyWallet {
3685
3770
  getBoardingUtxos(): Promise<ExtendedCoin[]>;
3686
3771
  /** @returns Wallet transaction history derived from boarding and Arkade activity. */
3687
3772
  getTransactionHistory(): Promise<ArkTransaction[]>;
3773
+ /** Resolvers that group/label {@link getActivityHistory} rows. */
3774
+ readonly activity: ActivityRegistry;
3775
+ /** @returns Wallet history grouped into logical activities with signed net amounts. */
3776
+ getActivityHistory(): Promise<Activity[]>;
3688
3777
  /**
3689
3778
  * Get the contract manager associated with this wallet.
3690
3779
  * This is useful for querying contract state and watching for contract events.
@@ -3694,6 +3783,11 @@ interface IReadonlyWallet {
3694
3783
  getContractManager(): Promise<IContractManager>;
3695
3784
  /** Readonly asset manager bound to this wallet instance. */
3696
3785
  assetManager: IReadonlyAssetManager;
3786
+ /**
3787
+ * Wipe all locally persisted wallet data (VTXOs, UTXOs, history, sync
3788
+ * cursor, contracts).
3789
+ */
3790
+ clear(): Promise<void>;
3697
3791
  }
3698
3792
 
3699
3793
  type PaginationOptions = {
@@ -4445,4 +4539,4 @@ declare namespace ProtoTypes {
4445
4539
  export { };
4446
4540
  }
4447
4541
 
4448
- export { CSVMultisigTapscript as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type BatchFailedEvent as D, type ExtendedVirtualCoin as E, type TreeTxEvent as F, type GetVtxosFilter as G, type TreeSignatureEvent as H, type IWallet as I, type DescriptorProvider as J, type IReadonlyWallet as K, type ReadonlyIdentity as L, type DelegateProvider as M, type Network as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IReadonlyAssetManager as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type NetworkName as U, VtxoScript as V, type WalletRepository as W, type ArkInfo as X, ArkAddress as Y, type Coin as Z, ContractManager as _, type Identity as a, DigestMismatchError as a$, type SettlementConfig as a0, VtxoManager as a1, type SignerSession as a2, type SignedIntent as a3, Intent as a4, type DescriptorSigningRequest as a5, Transaction as a6, type IntentFeeConfig as a7, type OffchainInput as a8, FeeAmount as a9, type Outpoint as aA, type ChainTx as aB, type PathContext as aC, type ArkTapscript as aD, type Asset as aE, type AssetMetadata as aF, type BaseWalletConfig as aG, type BatchInfo as aH, type BatchSignableIdentity as aI, CLTVMultisigTapscript as aJ, ChainTxType as aK, type CommitmentTx as aL, ConditionCSVMultisigTapscript as aM, ConditionMultisigTapscript as aN, type ContractBalance as aO, type ContractEventCallback as aP, type ContractHandler as aQ, type ContractManagerConfig as aR, type ContractState as aS, type ContractVtxo as aT, ContractWatcher as aU, DelegateManagerImpl as aV, type DelegateOptions as aW, DelegatorManagerImpl as aX, type DelegatorProvider as aY, type DeprecatedSignerMigrationReport as aZ, type DeprecatedSignerReport as a_, type OnchainInput as aa, type FeeOutput as ab, type ContractWatcherConfig as ac, type FeeInfo as ad, type CreateContractParams as ae, type GetContractsFilter as af, type GetSpendablePathsOptions as ag, type GetAllSpendingPathsOptions as ah, type IssuanceParams as ai, type ReissuanceParams as aj, type BurnParams as ak, type RenewVtxosOptions as al, type ContractWithVtxos as am, type PathSelection as an, type ContractEvent as ao, type AssetDetails as ap, type IssuanceResult as aq, type DelegateInfo as ar, type MigrationGlobalSkipReason as as, type MigrationLegSkipReason as at, type SignerStatus as au, type StorageConfig as av, type IVtxoManager as aw, type ExplorerTransaction as ax, type EncodedVtxoScript as ay, type Status as az, type WalletConfig as b, type Discoverable as b0, type DiscoveredContract as b1, type DiscoveryDeps as b2, ESPLORA_URL as b3, EsploraProvider as b4, type ExtendedContractVtxo as b5, type HandlerError as b6, type IDelegatorManager as b7, IndexerTxType as b8, type KnownMetadata as b9, type Tx as bA, type TxHistoryRecord as bB, type TxKey as bC, type TxTreeNode as bD, TxType as bE, type VirtualStatus as bF, type Vtxo as bG, type VtxoChain as bH, type VtxoType as bI, type WalletMode as bJ, classifyAgainstSignerSet as bK, classifyContractSigner as bL, decodeTapscript as bM, getSequence as bN, isBatchSignable as bO, isCooperativelyMigratable as bP, isDiscoverable as bQ, isExpired as bR, isRecoverable as bS, isSpendable as bT, isSubdust as bU, isVtxoExpiringSoon as bV, networks as bW, signerSetFromInfo as bX, toXOnlySignerHex as bY, type MigrateDeprecatedSignerOptions as ba, type MigrationLegReport as bb, type MigrationVtxoRef as bc, MultisigTapscript as bd, type Nonces as be, type Output as bf, type PageResponse as bg, type PaginationOptions as bh, PartialSig as bi, type ProviderClass as bj, RestDelegateProvider as bk, RestDelegatorProvider as bl, type ScanContractsOptions as bm, type ScanResult as bn, type ScheduledSession as bo, SettlementEventType as bp, type SignRequest as bq, type SignerClassification as br, type SignerSet as bs, type SubscriptionEvent as bt, type SubscriptionHeartbeat as bu, type TapLeaves as bv, TapTreeCoder as bw, TapscriptType as bx, type TreeNonces as by, type TreePartialSigs as bz, type WalletBalance as c, type ExtendedCoin as d, type IContractManager as e, type IDelegateManager as f, type SettleParams as g, type SettlementEvent as h, type IAssetManager as i, RestArkProvider as j, RestIndexerProvider as k, type SubscriptionResponse as l, type ArkProvider as m, type IndexerProvider as n, type RelativeTimelock as o, type TapLeafScript as p, type VirtualCoin as q, type Contract as r, type VtxoRepositoryKey as s, type WalletState as t, type ContractFilter as u, type TreeSigningStartedEvent as v, TxTree as w, type TreeNoncesEvent as x, type BatchFinalizationEvent as y, type BatchFinalizedEvent as z };
4542
+ export { type Coin as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type BatchFinalizationEvent as D, type ExtendedVirtualCoin as E, type BatchFinalizedEvent as F, type GetVtxosFilter as G, type BatchFailedEvent as H, type IWallet as I, type TreeTxEvent as J, type TreeSignatureEvent as K, type DescriptorProvider as L, type IReadonlyWallet as M, type ReadonlyIdentity as N, type Network as O, type OnchainProvider as P, type DelegateProvider as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type ReadonlyWalletConfig as U, VtxoScript as V, type WalletRepository as W, type IReadonlyAssetManager as X, type NetworkName as Y, type ArkInfo as Z, ArkAddress as _, type Identity as a, DelegatorManagerImpl as a$, ContractManager as a0, CSVMultisigTapscript as a1, type SettlementConfig as a2, VtxoManager as a3, type SignerSession as a4, type SignedIntent as a5, Intent as a6, type DescriptorSigningRequest as a7, Transaction as a8, type IntentFeeConfig as a9, type EncodedVtxoScript as aA, type Status as aB, type Outpoint as aC, type ChainTx as aD, type PathContext as aE, type ActivityIntent as aF, type ActivityResolver as aG, type ArkTapscript as aH, type Asset as aI, type AssetMetadata as aJ, type BaseWalletConfig as aK, type BatchInfo as aL, type BatchSignableIdentity as aM, CLTVMultisigTapscript as aN, ChainTxType as aO, type CommitmentTx as aP, ConditionCSVMultisigTapscript as aQ, ConditionMultisigTapscript as aR, type ContractBalance as aS, type ContractEventCallback as aT, type ContractHandler as aU, type ContractManagerConfig as aV, type ContractState as aW, type ContractVtxo as aX, ContractWatcher as aY, DelegateManagerImpl as aZ, type DelegateOptions as a_, type OffchainInput as aa, FeeAmount as ab, type OnchainInput as ac, type FeeOutput as ad, type ContractWatcherConfig as ae, type FeeInfo as af, type CreateContractParams as ag, type GetContractsFilter as ah, type GetSpendablePathsOptions as ai, type GetAllSpendingPathsOptions as aj, type IssuanceParams as ak, type ReissuanceParams as al, type BurnParams as am, type RenewVtxosOptions as an, type ContractWithVtxos as ao, type PathSelection as ap, type ContractEvent as aq, type AssetDetails as ar, type IssuanceResult as as, type DelegateInfo as at, type MigrationGlobalSkipReason as au, type MigrationLegSkipReason as av, type SignerStatus as aw, type StorageConfig as ax, type IVtxoManager as ay, type ExplorerTransaction as az, type WalletConfig as b, isSpendable as b$, type DelegatorProvider as b0, type DeprecatedSignerMigrationReport as b1, type DeprecatedSignerReport as b2, DigestMismatchError as b3, type Discoverable as b4, type DiscoveredContract as b5, type DiscoveryDeps as b6, ESPLORA_URL as b7, EsploraProvider as b8, type ExtendedContractVtxo as b9, type TapLeaves as bA, TapTreeCoder as bB, TapscriptType as bC, type TreeNonces as bD, type TreePartialSigs as bE, type Tx as bF, type TxHistoryRecord as bG, type TxKey as bH, type TxTreeNode as bI, TxType as bJ, type VirtualStatus as bK, type Vtxo as bL, type VtxoChain as bM, type VtxoType as bN, type WalletMode as bO, boardingResolver as bP, classifyAgainstSignerSet as bQ, classifyContractSigner as bR, createDefaultActivityRegistry as bS, decodeTapscript as bT, getNetwork as bU, getSequence as bV, isBatchSignable as bW, isCooperativelyMigratable as bX, isDiscoverable as bY, isExpired as bZ, isRecoverable as b_, type GroupMembership as ba, type HandlerError as bb, type IDelegatorManager as bc, IndexerTxType as bd, type KnownMetadata as be, type MigrateDeprecatedSignerOptions as bf, type MigrationLegReport as bg, type MigrationVtxoRef as bh, MultisigTapscript as bi, type Nonces as bj, type Output as bk, type PageResponse as bl, type PaginationOptions as bm, PartialSig as bn, type ProviderClass 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 WalletBalance as c, isSubdust as c0, isVtxoExpiringSoon as c1, networks as c2, signerSetFromInfo as c3, toXOnlySignerHex as c4, type ExtendedCoin as d, ActivityRegistry as e, type Activity as f, type IContractManager as g, type IDelegateManager as h, type SettleParams as i, type SettlementEvent 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 VtxoRepositoryKey as u, type WalletState as v, type ContractFilter as w, type TreeSigningStartedEvent as x, TxTree as y, type TreeNoncesEvent as z };
@@ -1384,6 +1384,7 @@ interface Network {
1384
1384
  scriptHash: number;
1385
1385
  wif: number;
1386
1386
  }
1387
+ declare const getNetwork: (network: NetworkName) => Network;
1387
1388
  declare const networks: {
1388
1389
  bitcoin: Network;
1389
1390
  testnet: Network;
@@ -2914,6 +2915,90 @@ declare class DelegateManagerImpl implements IDelegateManager {
2914
2915
  declare const DelegatorManagerImpl: typeof DelegateManagerImpl;
2915
2916
  type DelegatorManagerImpl = DelegateManagerImpl;
2916
2917
 
2918
+ /** One transaction's participation in one logical action. */
2919
+ interface GroupMembership {
2920
+ /**
2921
+ * Stable id of the action; txs sharing it group together. Third-party
2922
+ * resolvers should namespace it (`"vendor:thing"`) to avoid colliding with
2923
+ * other resolvers' groups. SDK built-ins use namespaced ids such as `boarding:`.
2924
+ * A membership with an empty groupId is dropped.
2925
+ */
2926
+ groupId: string;
2927
+ /** Human label for the action, e.g. "Dice game". */
2928
+ label?: string;
2929
+ /** App category for icon/filtering, e.g. "game". */
2930
+ kind?: string;
2931
+ /**
2932
+ * Free-form row data. Same-group metadata is shallow-merged with
2933
+ * earlier-resolver keys winning.
2934
+ */
2935
+ metadata?: Record<string, unknown>;
2936
+ /**
2937
+ * This tx's unsigned sat contribution to this group. Defaults to the tx's
2938
+ * full amount; the builder applies direction. Use it to split a batched tx
2939
+ * across groups. Same-key receive rows paired with a sent row are treated
2940
+ * as change and excluded from `Activity.amount`. A membership with a
2941
+ * non-finite amount (NaN/Infinity) is dropped.
2942
+ */
2943
+ amount?: number;
2944
+ }
2945
+ /** A pluggable resolver keyed by `id`. */
2946
+ interface ActivityResolver {
2947
+ /**
2948
+ * Registry key — override or remove by it. Namespace it (`"vendor:games"`)
2949
+ * so independent libraries don't clobber each other; `use()` overwrites
2950
+ * silently on a duplicate id.
2951
+ */
2952
+ id: string;
2953
+ /**
2954
+ * Load correlation data before `resolve` runs. If it rejects, this resolver
2955
+ * contributes no memberships.
2956
+ */
2957
+ prepare?(): Promise<void>;
2958
+ /** Pure and synchronous. The groups this tx belongs to, or undefined to leave it plain. */
2959
+ resolve(tx: ArkTransaction): GroupMembership[] | undefined;
2960
+ }
2961
+ /** The non-id, non-amount part of a {@link GroupMembership}. */
2962
+ interface ActivityIntent {
2963
+ /** Human label for the action, e.g. "Dice game". */
2964
+ label?: string;
2965
+ /** App category for icon/filtering, e.g. "game". */
2966
+ kind?: string;
2967
+ /** Free-form row data, shallow-merged across the group's resolvers (first-writer-wins). */
2968
+ metadata?: Record<string, unknown>;
2969
+ }
2970
+ /** One logical activity. */
2971
+ interface Activity {
2972
+ /** The groupId, or the natural tx key for untagged rows. */
2973
+ id: string;
2974
+ /** Merged intent for the group, if any resolver tagged it. */
2975
+ intent?: ActivityIntent;
2976
+ /** Member txs, oldest-first. */
2977
+ txs: ArkTransaction[];
2978
+ /** Signed net sats: positive received, negative sent; same-key change rows are excluded. */
2979
+ amount: number;
2980
+ /** Earliest member createdAt (ms since epoch). */
2981
+ createdAt: number;
2982
+ /** True once every member tx is settled. */
2983
+ settled: boolean;
2984
+ }
2985
+ /** Resolver registry keyed by id. */
2986
+ declare class ActivityRegistry {
2987
+ private readonly resolvers;
2988
+ /** Add a resolver, or override an existing one with the same id (kept in place). */
2989
+ use(resolver: ActivityResolver): void;
2990
+ /** Remove a resolver (built-in or custom) by id. */
2991
+ remove(id: string): void;
2992
+ /** The registered resolver ids, in registration order. */
2993
+ list(): string[];
2994
+ /** All registered resolvers, in registration (priority) order. */
2995
+ all(): ActivityResolver[];
2996
+ }
2997
+ /** Built-in resolver: labels on-chain boarding (deposit) transactions. */
2998
+ declare function boardingResolver(): ActivityResolver;
2999
+ /** Default registry with SDK built-ins. */
3000
+ declare function createDefaultActivityRegistry(): ActivityRegistry;
3001
+
2917
3002
  /**
2918
3003
  * Wallet receive-address strategy.
2919
3004
  *
@@ -3685,6 +3770,10 @@ interface IReadonlyWallet {
3685
3770
  getBoardingUtxos(): Promise<ExtendedCoin[]>;
3686
3771
  /** @returns Wallet transaction history derived from boarding and Arkade activity. */
3687
3772
  getTransactionHistory(): Promise<ArkTransaction[]>;
3773
+ /** Resolvers that group/label {@link getActivityHistory} rows. */
3774
+ readonly activity: ActivityRegistry;
3775
+ /** @returns Wallet history grouped into logical activities with signed net amounts. */
3776
+ getActivityHistory(): Promise<Activity[]>;
3688
3777
  /**
3689
3778
  * Get the contract manager associated with this wallet.
3690
3779
  * This is useful for querying contract state and watching for contract events.
@@ -3694,6 +3783,11 @@ interface IReadonlyWallet {
3694
3783
  getContractManager(): Promise<IContractManager>;
3695
3784
  /** Readonly asset manager bound to this wallet instance. */
3696
3785
  assetManager: IReadonlyAssetManager;
3786
+ /**
3787
+ * Wipe all locally persisted wallet data (VTXOs, UTXOs, history, sync
3788
+ * cursor, contracts).
3789
+ */
3790
+ clear(): Promise<void>;
3697
3791
  }
3698
3792
 
3699
3793
  type PaginationOptions = {
@@ -4445,4 +4539,4 @@ declare namespace ProtoTypes {
4445
4539
  export { };
4446
4540
  }
4447
4541
 
4448
- export { CSVMultisigTapscript as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type BatchFailedEvent as D, type ExtendedVirtualCoin as E, type TreeTxEvent as F, type GetVtxosFilter as G, type TreeSignatureEvent as H, type IWallet as I, type DescriptorProvider as J, type IReadonlyWallet as K, type ReadonlyIdentity as L, type DelegateProvider as M, type Network as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IReadonlyAssetManager as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type NetworkName as U, VtxoScript as V, type WalletRepository as W, type ArkInfo as X, ArkAddress as Y, type Coin as Z, ContractManager as _, type Identity as a, DigestMismatchError as a$, type SettlementConfig as a0, VtxoManager as a1, type SignerSession as a2, type SignedIntent as a3, Intent as a4, type DescriptorSigningRequest as a5, Transaction as a6, type IntentFeeConfig as a7, type OffchainInput as a8, FeeAmount as a9, type Outpoint as aA, type ChainTx as aB, type PathContext as aC, type ArkTapscript as aD, type Asset as aE, type AssetMetadata as aF, type BaseWalletConfig as aG, type BatchInfo as aH, type BatchSignableIdentity as aI, CLTVMultisigTapscript as aJ, ChainTxType as aK, type CommitmentTx as aL, ConditionCSVMultisigTapscript as aM, ConditionMultisigTapscript as aN, type ContractBalance as aO, type ContractEventCallback as aP, type ContractHandler as aQ, type ContractManagerConfig as aR, type ContractState as aS, type ContractVtxo as aT, ContractWatcher as aU, DelegateManagerImpl as aV, type DelegateOptions as aW, DelegatorManagerImpl as aX, type DelegatorProvider as aY, type DeprecatedSignerMigrationReport as aZ, type DeprecatedSignerReport as a_, type OnchainInput as aa, type FeeOutput as ab, type ContractWatcherConfig as ac, type FeeInfo as ad, type CreateContractParams as ae, type GetContractsFilter as af, type GetSpendablePathsOptions as ag, type GetAllSpendingPathsOptions as ah, type IssuanceParams as ai, type ReissuanceParams as aj, type BurnParams as ak, type RenewVtxosOptions as al, type ContractWithVtxos as am, type PathSelection as an, type ContractEvent as ao, type AssetDetails as ap, type IssuanceResult as aq, type DelegateInfo as ar, type MigrationGlobalSkipReason as as, type MigrationLegSkipReason as at, type SignerStatus as au, type StorageConfig as av, type IVtxoManager as aw, type ExplorerTransaction as ax, type EncodedVtxoScript as ay, type Status as az, type WalletConfig as b, type Discoverable as b0, type DiscoveredContract as b1, type DiscoveryDeps as b2, ESPLORA_URL as b3, EsploraProvider as b4, type ExtendedContractVtxo as b5, type HandlerError as b6, type IDelegatorManager as b7, IndexerTxType as b8, type KnownMetadata as b9, type Tx as bA, type TxHistoryRecord as bB, type TxKey as bC, type TxTreeNode as bD, TxType as bE, type VirtualStatus as bF, type Vtxo as bG, type VtxoChain as bH, type VtxoType as bI, type WalletMode as bJ, classifyAgainstSignerSet as bK, classifyContractSigner as bL, decodeTapscript as bM, getSequence as bN, isBatchSignable as bO, isCooperativelyMigratable as bP, isDiscoverable as bQ, isExpired as bR, isRecoverable as bS, isSpendable as bT, isSubdust as bU, isVtxoExpiringSoon as bV, networks as bW, signerSetFromInfo as bX, toXOnlySignerHex as bY, type MigrateDeprecatedSignerOptions as ba, type MigrationLegReport as bb, type MigrationVtxoRef as bc, MultisigTapscript as bd, type Nonces as be, type Output as bf, type PageResponse as bg, type PaginationOptions as bh, PartialSig as bi, type ProviderClass as bj, RestDelegateProvider as bk, RestDelegatorProvider as bl, type ScanContractsOptions as bm, type ScanResult as bn, type ScheduledSession as bo, SettlementEventType as bp, type SignRequest as bq, type SignerClassification as br, type SignerSet as bs, type SubscriptionEvent as bt, type SubscriptionHeartbeat as bu, type TapLeaves as bv, TapTreeCoder as bw, TapscriptType as bx, type TreeNonces as by, type TreePartialSigs as bz, type WalletBalance as c, type ExtendedCoin as d, type IContractManager as e, type IDelegateManager as f, type SettleParams as g, type SettlementEvent as h, type IAssetManager as i, RestArkProvider as j, RestIndexerProvider as k, type SubscriptionResponse as l, type ArkProvider as m, type IndexerProvider as n, type RelativeTimelock as o, type TapLeafScript as p, type VirtualCoin as q, type Contract as r, type VtxoRepositoryKey as s, type WalletState as t, type ContractFilter as u, type TreeSigningStartedEvent as v, TxTree as w, type TreeNoncesEvent as x, type BatchFinalizationEvent as y, type BatchFinalizedEvent as z };
4542
+ export { type Coin as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type BatchFinalizationEvent as D, type ExtendedVirtualCoin as E, type BatchFinalizedEvent as F, type GetVtxosFilter as G, type BatchFailedEvent as H, type IWallet as I, type TreeTxEvent as J, type TreeSignatureEvent as K, type DescriptorProvider as L, type IReadonlyWallet as M, type ReadonlyIdentity as N, type Network as O, type OnchainProvider as P, type DelegateProvider as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type ReadonlyWalletConfig as U, VtxoScript as V, type WalletRepository as W, type IReadonlyAssetManager as X, type NetworkName as Y, type ArkInfo as Z, ArkAddress as _, type Identity as a, DelegatorManagerImpl as a$, ContractManager as a0, CSVMultisigTapscript as a1, type SettlementConfig as a2, VtxoManager as a3, type SignerSession as a4, type SignedIntent as a5, Intent as a6, type DescriptorSigningRequest as a7, Transaction as a8, type IntentFeeConfig as a9, type EncodedVtxoScript as aA, type Status as aB, type Outpoint as aC, type ChainTx as aD, type PathContext as aE, type ActivityIntent as aF, type ActivityResolver as aG, type ArkTapscript as aH, type Asset as aI, type AssetMetadata as aJ, type BaseWalletConfig as aK, type BatchInfo as aL, type BatchSignableIdentity as aM, CLTVMultisigTapscript as aN, ChainTxType as aO, type CommitmentTx as aP, ConditionCSVMultisigTapscript as aQ, ConditionMultisigTapscript as aR, type ContractBalance as aS, type ContractEventCallback as aT, type ContractHandler as aU, type ContractManagerConfig as aV, type ContractState as aW, type ContractVtxo as aX, ContractWatcher as aY, DelegateManagerImpl as aZ, type DelegateOptions as a_, type OffchainInput as aa, FeeAmount as ab, type OnchainInput as ac, type FeeOutput as ad, type ContractWatcherConfig as ae, type FeeInfo as af, type CreateContractParams as ag, type GetContractsFilter as ah, type GetSpendablePathsOptions as ai, type GetAllSpendingPathsOptions as aj, type IssuanceParams as ak, type ReissuanceParams as al, type BurnParams as am, type RenewVtxosOptions as an, type ContractWithVtxos as ao, type PathSelection as ap, type ContractEvent as aq, type AssetDetails as ar, type IssuanceResult as as, type DelegateInfo as at, type MigrationGlobalSkipReason as au, type MigrationLegSkipReason as av, type SignerStatus as aw, type StorageConfig as ax, type IVtxoManager as ay, type ExplorerTransaction as az, type WalletConfig as b, isSpendable as b$, type DelegatorProvider as b0, type DeprecatedSignerMigrationReport as b1, type DeprecatedSignerReport as b2, DigestMismatchError as b3, type Discoverable as b4, type DiscoveredContract as b5, type DiscoveryDeps as b6, ESPLORA_URL as b7, EsploraProvider as b8, type ExtendedContractVtxo as b9, type TapLeaves as bA, TapTreeCoder as bB, TapscriptType as bC, type TreeNonces as bD, type TreePartialSigs as bE, type Tx as bF, type TxHistoryRecord as bG, type TxKey as bH, type TxTreeNode as bI, TxType as bJ, type VirtualStatus as bK, type Vtxo as bL, type VtxoChain as bM, type VtxoType as bN, type WalletMode as bO, boardingResolver as bP, classifyAgainstSignerSet as bQ, classifyContractSigner as bR, createDefaultActivityRegistry as bS, decodeTapscript as bT, getNetwork as bU, getSequence as bV, isBatchSignable as bW, isCooperativelyMigratable as bX, isDiscoverable as bY, isExpired as bZ, isRecoverable as b_, type GroupMembership as ba, type HandlerError as bb, type IDelegatorManager as bc, IndexerTxType as bd, type KnownMetadata as be, type MigrateDeprecatedSignerOptions as bf, type MigrationLegReport as bg, type MigrationVtxoRef as bh, MultisigTapscript as bi, type Nonces as bj, type Output as bk, type PageResponse as bl, type PaginationOptions as bm, PartialSig as bn, type ProviderClass 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 WalletBalance as c, isSubdust as c0, isVtxoExpiringSoon as c1, networks as c2, signerSetFromInfo as c3, toXOnlySignerHex as c4, type ExtendedCoin as d, ActivityRegistry as e, type Activity as f, type IContractManager as g, type IDelegateManager as h, type SettleParams as i, type SettlementEvent 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 VtxoRepositoryKey as u, type WalletState as v, type ContractFilter as w, type TreeSigningStartedEvent as x, TxTree as y, type TreeNoncesEvent as z };
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, b as TaskItem, d as TaskResult } from './taskRunner-D7SuOTOa.cjs';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-DRHElPMG.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 { type AsyncStorageLike as A, AsyncStorageTaskQueue as a };
49
+ export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, b as TaskItem, d as TaskResult } from './taskRunner-Bwss4MUW.js';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-BuBAZQwB.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 { type AsyncStorageLike as A, AsyncStorageTaskQueue as a };
49
+ export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkCMPJR3HS_cjs = require('./chunk-CMPJR3HS.cjs');
3
+ var chunkHXDZ2QTW_cjs = require('./chunk-HXDZ2QTW.cjs');
4
4
  var base = require('@scure/base');
5
5
  var descriptorsScure = require('@bitcoinerlab/descriptors-scure');
6
6
  var btcSigner = require('@scure/btc-signer');
@@ -73,14 +73,14 @@ var ContractHandlerRegistry = class {
73
73
  var contractHandlers = new ContractHandlerRegistry();
74
74
  exports.DefaultVtxo = void 0;
75
75
  ((DefaultVtxo2) => {
76
- class Script2 extends chunkCMPJR3HS_cjs.VtxoScript {
76
+ class Script2 extends chunkHXDZ2QTW_cjs.VtxoScript {
77
77
  /** Create the default virtual output script with one forfeit path and one exit path. */
78
78
  constructor(options) {
79
79
  const { pubKey, serverPubKey, csvTimelock } = options;
80
- const forfeitScript = chunkCMPJR3HS_cjs.MultisigTapscript.encode({
80
+ const forfeitScript = chunkHXDZ2QTW_cjs.MultisigTapscript.encode({
81
81
  pubkeys: [pubKey, serverPubKey]
82
82
  }).script;
83
- const exitScript = chunkCMPJR3HS_cjs.CSVMultisigTapscript.encode({
83
+ const exitScript = chunkHXDZ2QTW_cjs.CSVMultisigTapscript.encode({
84
84
  timelock: csvTimelock,
85
85
  pubkeys: [pubKey]
86
86
  }).script;
@@ -248,7 +248,7 @@ function isCltvSatisfied(context, locktime) {
248
248
  function isCsvSpendable(context, sequence) {
249
249
  if (sequence === void 0) return true;
250
250
  if (!context.vtxo) return false;
251
- const timelock = chunkCMPJR3HS_cjs.sequenceToTimelock(sequence);
251
+ const timelock = chunkHXDZ2QTW_cjs.sequenceToTimelock(sequence);
252
252
  if (timelock.type === "blocks") {
253
253
  if (context.blockHeight === void 0 || context.vtxo.status.block_height === void 0) {
254
254
  return false;
@@ -300,11 +300,11 @@ var DefaultContractHandler = {
300
300
  return {
301
301
  pubKey: base.hex.encode(params.pubKey),
302
302
  serverPubKey: base.hex.encode(params.serverPubKey),
303
- csvTimelock: chunkCMPJR3HS_cjs.timelockToSequence(params.csvTimelock).toString()
303
+ csvTimelock: chunkHXDZ2QTW_cjs.timelockToSequence(params.csvTimelock).toString()
304
304
  };
305
305
  },
306
306
  deserializeParams(params) {
307
- const csvTimelock = params.csvTimelock !== void 0 && params.csvTimelock !== "" ? chunkCMPJR3HS_cjs.sequenceToTimelock(Number(params.csvTimelock)) : exports.DefaultVtxo.Script.DEFAULT_TIMELOCK;
307
+ const csvTimelock = params.csvTimelock !== void 0 && params.csvTimelock !== "" ? chunkHXDZ2QTW_cjs.sequenceToTimelock(Number(params.csvTimelock)) : exports.DefaultVtxo.Script.DEFAULT_TIMELOCK;
308
308
  return {
309
309
  pubKey: extractPubKeyBytes(params.pubKey),
310
310
  serverPubKey: extractPubKeyBytes(params.serverPubKey),
@@ -381,7 +381,7 @@ var DefaultContractHandler = {
381
381
  params: {
382
382
  pubKey: base.hex.encode(pubKey),
383
383
  serverPubKey: base.hex.encode(c.serverPubKey),
384
- csvTimelock: chunkCMPJR3HS_cjs.timelockToSequence(c.csvTimelock).toString()
384
+ csvTimelock: chunkHXDZ2QTW_cjs.timelockToSequence(c.csvTimelock).toString()
385
385
  },
386
386
  script: c.scriptHex,
387
387
  address: c.script.address(deps.network.hrp, c.serverPubKey).encode(),
@@ -398,12 +398,12 @@ var DefaultContractHandler = {
398
398
  };
399
399
  exports.DelegateVtxo = void 0;
400
400
  ((DelegateVtxo2) => {
401
- class Script2 extends chunkCMPJR3HS_cjs.VtxoScript {
401
+ class Script2 extends chunkHXDZ2QTW_cjs.VtxoScript {
402
402
  /** Create a delegated virtual output script with forfeit, exit, and delegate paths. */
403
403
  constructor(options) {
404
404
  const defaultVtxo = new exports.DefaultVtxo.Script(options);
405
405
  const { delegatePubKey, pubKey, serverPubKey } = options;
406
- const delegateScript = chunkCMPJR3HS_cjs.MultisigTapscript.encode({
406
+ const delegateScript = chunkHXDZ2QTW_cjs.MultisigTapscript.encode({
407
407
  pubkeys: [pubKey, delegatePubKey, serverPubKey]
408
408
  }).script;
409
409
  super([...defaultVtxo.scripts, delegateScript]);
@@ -441,11 +441,11 @@ var DelegateContractHandler = {
441
441
  pubKey: base.hex.encode(params.pubKey),
442
442
  serverPubKey: base.hex.encode(params.serverPubKey),
443
443
  delegatePubKey: base.hex.encode(params.delegatePubKey),
444
- csvTimelock: chunkCMPJR3HS_cjs.timelockToSequence(params.csvTimelock).toString()
444
+ csvTimelock: chunkHXDZ2QTW_cjs.timelockToSequence(params.csvTimelock).toString()
445
445
  };
446
446
  },
447
447
  deserializeParams(params) {
448
- const csvTimelock = chunkCMPJR3HS_cjs.sequenceToTimelock(Number(params.csvTimelock));
448
+ const csvTimelock = chunkHXDZ2QTW_cjs.sequenceToTimelock(Number(params.csvTimelock));
449
449
  return {
450
450
  pubKey: base.hex.decode(params.pubKey),
451
451
  serverPubKey: base.hex.decode(params.serverPubKey),
@@ -529,7 +529,7 @@ var DelegateContractHandler = {
529
529
  pubKey: base.hex.encode(pubKey),
530
530
  serverPubKey: base.hex.encode(c.serverPubKey),
531
531
  delegatePubKey: base.hex.encode(deps.delegatePubKey),
532
- csvTimelock: chunkCMPJR3HS_cjs.timelockToSequence(c.csvTimelock).toString()
532
+ csvTimelock: chunkHXDZ2QTW_cjs.timelockToSequence(c.csvTimelock).toString()
533
533
  },
534
534
  script: c.scriptHex,
535
535
  address: c.script.address(deps.network.hrp, c.serverPubKey).encode(),
@@ -546,7 +546,7 @@ var DelegateContractHandler = {
546
546
  };
547
547
  exports.VHTLC = void 0;
548
548
  ((VHTLC2) => {
549
- class Script2 extends chunkCMPJR3HS_cjs.VtxoScript {
549
+ class Script2 extends chunkHXDZ2QTW_cjs.VtxoScript {
550
550
  /** Create a VHTLC script from the supplied participant keys, hash, and timelocks. */
551
551
  constructor(options) {
552
552
  validateOptions(options);
@@ -561,27 +561,27 @@ exports.VHTLC = void 0;
561
561
  unilateralRefundWithoutReceiverDelay
562
562
  } = options;
563
563
  const conditionScript = preimageConditionScript(preimageHash);
564
- const claimScript = chunkCMPJR3HS_cjs.ConditionMultisigTapscript.encode({
564
+ const claimScript = chunkHXDZ2QTW_cjs.ConditionMultisigTapscript.encode({
565
565
  conditionScript,
566
566
  pubkeys: [receiver, server]
567
567
  }).script;
568
- const refundScript = chunkCMPJR3HS_cjs.MultisigTapscript.encode({
568
+ const refundScript = chunkHXDZ2QTW_cjs.MultisigTapscript.encode({
569
569
  pubkeys: [sender, receiver, server]
570
570
  }).script;
571
- const refundWithoutReceiverScript = chunkCMPJR3HS_cjs.CLTVMultisigTapscript.encode({
571
+ const refundWithoutReceiverScript = chunkHXDZ2QTW_cjs.CLTVMultisigTapscript.encode({
572
572
  absoluteTimelock: refundLocktime,
573
573
  pubkeys: [sender, server]
574
574
  }).script;
575
- const unilateralClaimScript = chunkCMPJR3HS_cjs.ConditionCSVMultisigTapscript.encode({
575
+ const unilateralClaimScript = chunkHXDZ2QTW_cjs.ConditionCSVMultisigTapscript.encode({
576
576
  conditionScript,
577
577
  timelock: unilateralClaimDelay,
578
578
  pubkeys: [receiver]
579
579
  }).script;
580
- const unilateralRefundScript = chunkCMPJR3HS_cjs.CSVMultisigTapscript.encode({
580
+ const unilateralRefundScript = chunkHXDZ2QTW_cjs.CSVMultisigTapscript.encode({
581
581
  timelock: unilateralRefundDelay,
582
582
  pubkeys: [sender, receiver]
583
583
  }).script;
584
- const unilateralRefundWithoutReceiverScript = chunkCMPJR3HS_cjs.CSVMultisigTapscript.encode({
584
+ const unilateralRefundWithoutReceiverScript = chunkHXDZ2QTW_cjs.CSVMultisigTapscript.encode({
585
585
  timelock: unilateralRefundWithoutReceiverDelay,
586
586
  pubkeys: [sender]
587
587
  }).script;
@@ -708,9 +708,9 @@ var VHTLCContractHandler = {
708
708
  server: base.hex.encode(params.server),
709
709
  hash: base.hex.encode(params.preimageHash),
710
710
  refundLocktime: params.refundLocktime.toString(),
711
- claimDelay: chunkCMPJR3HS_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
712
- refundDelay: chunkCMPJR3HS_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
713
- refundNoReceiverDelay: chunkCMPJR3HS_cjs.timelockToSequence(
711
+ claimDelay: chunkHXDZ2QTW_cjs.timelockToSequence(params.unilateralClaimDelay).toString(),
712
+ refundDelay: chunkHXDZ2QTW_cjs.timelockToSequence(params.unilateralRefundDelay).toString(),
713
+ refundNoReceiverDelay: chunkHXDZ2QTW_cjs.timelockToSequence(
714
714
  params.unilateralRefundWithoutReceiverDelay
715
715
  ).toString()
716
716
  };
@@ -722,9 +722,9 @@ var VHTLCContractHandler = {
722
722
  server: base.hex.decode(params.server),
723
723
  preimageHash: base.hex.decode(params.hash),
724
724
  refundLocktime: BigInt(params.refundLocktime),
725
- unilateralClaimDelay: chunkCMPJR3HS_cjs.sequenceToTimelock(Number(params.claimDelay)),
726
- unilateralRefundDelay: chunkCMPJR3HS_cjs.sequenceToTimelock(Number(params.refundDelay)),
727
- unilateralRefundWithoutReceiverDelay: chunkCMPJR3HS_cjs.sequenceToTimelock(
725
+ unilateralClaimDelay: chunkHXDZ2QTW_cjs.sequenceToTimelock(Number(params.claimDelay)),
726
+ unilateralRefundDelay: chunkHXDZ2QTW_cjs.sequenceToTimelock(Number(params.refundDelay)),
727
+ unilateralRefundWithoutReceiverDelay: chunkHXDZ2QTW_cjs.sequenceToTimelock(
728
728
  Number(params.refundNoReceiverDelay)
729
729
  )
730
730
  };
@@ -917,7 +917,7 @@ var BoardingContractHandler = {
917
917
  const coins = await deps.onchainProvider.getCoins(onchainAddress);
918
918
  if (coins.length === 0) return [];
919
919
  const scriptHex = base.hex.encode(script.pkScript);
920
- const boardingSeq = chunkCMPJR3HS_cjs.timelockToSequence(deps.boardingTimelock);
920
+ const boardingSeq = chunkHXDZ2QTW_cjs.timelockToSequence(deps.boardingTimelock);
921
921
  return [
922
922
  {
923
923
  type: "boarding",
@@ -966,5 +966,5 @@ exports.descriptorIsOurs = descriptorIsOurs;
966
966
  exports.isCltvSatisfied = isCltvSatisfied;
967
967
  exports.isCsvSpendable = isCsvSpendable;
968
968
  exports.isMainnetDescriptor = isMainnetDescriptor;
969
- //# sourceMappingURL=chunk-GUTKJMSF.cjs.map
970
- //# sourceMappingURL=chunk-GUTKJMSF.cjs.map
969
+ //# sourceMappingURL=chunk-32YKLQPS.cjs.map
970
+ //# sourceMappingURL=chunk-32YKLQPS.cjs.map