@arkade-os/sdk 0.5.0-rc.3 → 0.5.0-rc.4

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 (118) hide show
  1. package/README.md +12 -67
  2. package/dist/adapters/expo.cjs +5 -6
  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 -4
  6. package/dist/{asyncStorageTaskQueue-DAs_n1xr.d.ts → asyncStorageTaskQueue-BCiOgs5x.d.ts} +1 -1
  7. package/dist/{asyncStorageTaskQueue-DqGRG66E.d.cts → asyncStorageTaskQueue-CTIwKrt5.d.cts} +1 -1
  8. package/dist/{chunk-7W6FHWYN.js → chunk-4EZOMPAO.js} +14 -38
  9. package/dist/chunk-4EZOMPAO.js.map +1 -0
  10. package/dist/{chunk-BCT7DT2J.cjs → chunk-5NLJUXXQ.cjs} +10 -10
  11. package/dist/{chunk-BCT7DT2J.cjs.map → chunk-5NLJUXXQ.cjs.map} +1 -1
  12. package/dist/{chunk-UJTYUYY4.cjs → chunk-C5Y2R63Z.cjs} +25 -71
  13. package/dist/chunk-C5Y2R63Z.cjs.map +1 -0
  14. package/dist/{chunk-ROD5H7RX.js → chunk-CIBGIZUW.js} +4 -4
  15. package/dist/{chunk-ROD5H7RX.js.map → chunk-CIBGIZUW.js.map} +1 -1
  16. package/dist/{chunk-UCSTNXB4.cjs → chunk-F7HJO5GT.cjs} +61 -85
  17. package/dist/chunk-F7HJO5GT.cjs.map +1 -0
  18. package/dist/{chunk-HSG2GQTM.js → chunk-GLZNJFAT.js} +24 -66
  19. package/dist/chunk-GLZNJFAT.js.map +1 -0
  20. package/dist/{chunk-43XGA362.cjs → chunk-GPJSGLWM.cjs} +17 -17
  21. package/dist/{chunk-43XGA362.cjs.map → chunk-GPJSGLWM.cjs.map} +1 -1
  22. package/dist/{chunk-G4UPMCKW.js → chunk-MOWSLXGO.js} +4 -4
  23. package/dist/{chunk-G4UPMCKW.js.map → chunk-MOWSLXGO.js.map} +1 -1
  24. package/dist/{chunk-VQCDDGRW.js → chunk-PYTAH2NY.js} +167 -703
  25. package/dist/chunk-PYTAH2NY.js.map +1 -0
  26. package/dist/{chunk-L4HZK4KK.cjs → chunk-SYRQJS5N.cjs} +18 -19
  27. package/dist/chunk-SYRQJS5N.cjs.map +1 -0
  28. package/dist/{chunk-ERUAQGYF.js → chunk-XHASFSDU.js} +3 -4
  29. package/dist/chunk-XHASFSDU.js.map +1 -0
  30. package/dist/{chunk-FSF2PGTR.cjs → chunk-ZHLYFRYY.cjs} +583 -1128
  31. package/dist/chunk-ZHLYFRYY.cjs.map +1 -0
  32. package/dist/contracts/handlers/index.cjs +9 -10
  33. package/dist/contracts/handlers/index.d.cts +3 -3
  34. package/dist/contracts/handlers/index.d.ts +3 -3
  35. package/dist/contracts/handlers/index.js +2 -3
  36. package/dist/{delegate-CZzIduW4.d.cts → delegate-CpQIgTs7.d.cts} +1 -1
  37. package/dist/{delegate-B9Bmrns7.d.ts → delegate-Dv-us16c.d.ts} +1 -1
  38. package/dist/{hdWalletCapable-Cr5nGpK5.d.ts → hdWalletCapable-BC4Fmmht.d.ts} +6 -24
  39. package/dist/{hdWalletCapable-BIl3yLVM.d.cts → hdWalletCapable-DotEa5rZ.d.cts} +6 -24
  40. package/dist/{index-DnNIOqHS.d.cts → index-Czz9HSqE.d.cts} +21 -220
  41. package/dist/{index-DnNIOqHS.d.ts → index-Czz9HSqE.d.ts} +21 -220
  42. package/dist/{index-DQ1Hb2w_.d.ts → index-DUkvXxpt.d.ts} +2 -2
  43. package/dist/{index-Ci5MmNnK.d.cts → index-DdJt5fRc.d.cts} +2 -2
  44. package/dist/index.cjs +291 -340
  45. package/dist/index.d.cts +58 -223
  46. package/dist/index.d.ts +58 -223
  47. package/dist/index.js +4 -5
  48. package/dist/repositories/realm/index.cjs +57 -24
  49. package/dist/repositories/realm/index.cjs.map +1 -1
  50. package/dist/repositories/realm/index.d.cts +12 -4
  51. package/dist/repositories/realm/index.d.ts +12 -4
  52. package/dist/repositories/realm/index.js +43 -10
  53. package/dist/repositories/realm/index.js.map +1 -1
  54. package/dist/repositories/sqlite/index.cjs +103 -33
  55. package/dist/repositories/sqlite/index.cjs.map +1 -1
  56. package/dist/repositories/sqlite/index.d.cts +12 -2
  57. package/dist/repositories/sqlite/index.d.ts +12 -2
  58. package/dist/repositories/sqlite/index.js +90 -20
  59. package/dist/repositories/sqlite/index.js.map +1 -1
  60. package/dist/{taskRunner-BDb5Ee2J.d.cts → taskRunner-7E_Rx8bD.d.cts} +1 -1
  61. package/dist/{taskRunner-F7wNJcF3.d.ts → taskRunner-DUId1UJ8.d.ts} +1 -1
  62. package/dist/wallet/expo/background.cjs +14 -15
  63. package/dist/wallet/expo/background.cjs.map +1 -1
  64. package/dist/wallet/expo/background.d.cts +3 -3
  65. package/dist/wallet/expo/background.d.ts +3 -3
  66. package/dist/wallet/expo/background.js +6 -7
  67. package/dist/wallet/expo/background.js.map +1 -1
  68. package/dist/wallet/expo/index.cjs +15 -23
  69. package/dist/wallet/expo/index.cjs.map +1 -1
  70. package/dist/wallet/expo/index.d.cts +4 -7
  71. package/dist/wallet/expo/index.d.ts +4 -7
  72. package/dist/wallet/expo/index.js +7 -15
  73. package/dist/wallet/expo/index.js.map +1 -1
  74. package/dist/worker/expo/index.cjs +9 -10
  75. package/dist/worker/expo/index.cjs.map +1 -1
  76. package/dist/worker/expo/index.d.cts +4 -4
  77. package/dist/worker/expo/index.d.ts +4 -4
  78. package/dist/worker/expo/index.js +5 -6
  79. package/dist/worker/expo/index.js.map +1 -1
  80. package/package.json +4 -42
  81. package/dist/adapters/asyncStorage.cjs +0 -48
  82. package/dist/adapters/asyncStorage.cjs.map +0 -1
  83. package/dist/adapters/asyncStorage.d.cts +0 -16
  84. package/dist/adapters/asyncStorage.d.ts +0 -16
  85. package/dist/adapters/asyncStorage.js +0 -46
  86. package/dist/adapters/asyncStorage.js.map +0 -1
  87. package/dist/adapters/fileSystem.cjs +0 -116
  88. package/dist/adapters/fileSystem.cjs.map +0 -1
  89. package/dist/adapters/fileSystem.d.cts +0 -17
  90. package/dist/adapters/fileSystem.d.ts +0 -17
  91. package/dist/adapters/fileSystem.js +0 -93
  92. package/dist/adapters/fileSystem.js.map +0 -1
  93. package/dist/adapters/indexedDB.cjs +0 -103
  94. package/dist/adapters/indexedDB.cjs.map +0 -1
  95. package/dist/adapters/indexedDB.d.cts +0 -18
  96. package/dist/adapters/indexedDB.d.ts +0 -18
  97. package/dist/adapters/indexedDB.js +0 -101
  98. package/dist/adapters/indexedDB.js.map +0 -1
  99. package/dist/adapters/localStorage.cjs +0 -50
  100. package/dist/adapters/localStorage.cjs.map +0 -1
  101. package/dist/adapters/localStorage.d.cts +0 -14
  102. package/dist/adapters/localStorage.d.ts +0 -14
  103. package/dist/adapters/localStorage.js +0 -48
  104. package/dist/adapters/localStorage.js.map +0 -1
  105. package/dist/chunk-5BLDMQED.cjs +0 -18
  106. package/dist/chunk-5BLDMQED.cjs.map +0 -1
  107. package/dist/chunk-7W6FHWYN.js.map +0 -1
  108. package/dist/chunk-ERUAQGYF.js.map +0 -1
  109. package/dist/chunk-FSF2PGTR.cjs.map +0 -1
  110. package/dist/chunk-HSG2GQTM.js.map +0 -1
  111. package/dist/chunk-L4HZK4KK.cjs.map +0 -1
  112. package/dist/chunk-NSBPE2FW.js +0 -15
  113. package/dist/chunk-NSBPE2FW.js.map +0 -1
  114. package/dist/chunk-UCSTNXB4.cjs.map +0 -1
  115. package/dist/chunk-UJTYUYY4.cjs.map +0 -1
  116. package/dist/chunk-VQCDDGRW.js.map +0 -1
  117. package/dist/index-C0IanN1m.d.cts +0 -11
  118. package/dist/index-C0IanN1m.d.ts +0 -11
package/README.md CHANGED
@@ -591,7 +591,6 @@ Access the `VtxoManager` from the wallet after configuring `settlementConfig`:
591
591
  const manager = await wallet.getVtxoManager()
592
592
  ```
593
593
 
594
- > **Migration from `renewalConfig`:** Directly initializing a `VtxoManager` with `renewalConfig` is still supported but deprecated. Prefer `settlementConfig` where `vtxoThreshold` is expressed in **seconds** instead of milliseconds.
595
594
 
596
595
  #### Renewal: Prevent Expiration
597
596
 
@@ -1109,72 +1108,17 @@ examples.
1109
1108
 
1110
1109
  ### Repositories (Storage)
1111
1110
 
1112
- The `StorageAdapter` API is deprecated. Use repositories instead. If you omit `storage`, the SDK uses IndexedDB repositories with the default database name.
1113
-
1114
- #### Migration from v1 StorageAdapter
1115
-
1116
- > [!WARNING]
1117
- > If you previously used the v1 `StorageAdapter`-based repositories, migrate
1118
- > data into the new IndexedDB repositories before use:
1119
- >
1120
- > ```typescript
1121
- > import {
1122
- > IndexedDBWalletRepository,
1123
- > IndexedDBContractRepository,
1124
- > getMigrationStatus,
1125
- > migrateWalletRepository,
1126
- > rollbackMigration,
1127
- > } from '@arkade-os/sdk'
1128
- > import { IndexedDBStorageAdapter } from '@arkade-os/sdk/adapters/indexedDB'
1129
- >
1130
- > const oldStorage = new IndexedDBStorageAdapter('legacy-wallet', 1)
1131
- > const newDbName = 'my-app-db'
1132
- > const walletRepository = new IndexedDBWalletRepository(newDbName)
1133
- >
1134
- > // Check migration status before running
1135
- > const status = await getMigrationStatus('wallet', oldStorage)
1136
- > // status: "not-needed" | "pending" | "in-progress" | "done"
1137
- >
1138
- > if (status === 'pending' || status === 'in-progress') {
1139
- > try {
1140
- > await migrateWalletRepository(oldStorage, walletRepository, {
1141
- > onchain: [ 'address-1', 'address-2' ],
1142
- > offchain: [ 'onboarding-address-1' ],
1143
- > })
1144
- > } catch (err) {
1145
- > // Reset migration flag so the next attempt starts clean
1146
- > await rollbackMigration('wallet', oldStorage)
1147
- > throw err
1148
- > }
1149
- > }
1150
- > ```
1151
- >
1152
- > **Migration status helpers:**
1153
- >
1154
- > | Helper | Description |
1155
- > |--------|-------------|
1156
- > | `getMigrationStatus(repoType, adapter)` | Returns `"not-needed"` (no legacy DB), `"pending"`, `"in-progress"` (interrupted), or `"done"` |
1157
- > | `requiresMigration(repoType, adapter)` | Returns `true` if status is `"pending"` or `"in-progress"` |
1158
- > | `rollbackMigration(repoType, adapter)` | Removes the migration flag so migration can re-run from scratch |
1159
- > | `MIGRATION_KEY(repoType)` | Returns the storage key used for the migration flag |
1160
- >
1161
- > `migrateWalletRepository` sets an `"in-progress"` flag before copying data.
1162
- > If the process crashes mid-way, the flag remains as `"in-progress"` so the
1163
- > next call to `getMigrationStatus` can detect the partial migration. Old data
1164
- > is never deleted — re-running migration after a rollback is safe.
1165
- >
1166
- > Anything related to contract repository migration must be handled by the
1167
- > package that created the contracts. The SDK doesn't manage external contracts
1168
- > in V1; data persisted by other packages remains untouched in its original
1169
- > location.
1111
+ Use repository implementations via `StorageConfig`. If you omit `storage`, the
1112
+ SDK uses IndexedDB repositories with the default database name.
1170
1113
 
1171
1114
  #### Repository Versioning
1172
1115
 
1173
- `WalletRepository`, `ContractRepository`, and `AssetSwapRepository` (in
1174
- `@arkade-os/swap`) each declare a `readonly version` field with a literal
1175
- type. All built-in implementations set this to the current version. If you
1176
- maintain a custom repository implementation, TypeScript will produce a compile
1177
- error when the version is bumped, signaling that a semantic update is required:
1116
+ `WalletRepository`, `ContractRepository`, `IntentRepository`,
1117
+ `VirtualTxRepository`, and `AssetSwapRepository` (in `@arkade-os/swap`) each
1118
+ declare a `readonly version` field with a literal type. All built-in
1119
+ implementations set this to the current version. If you maintain a custom
1120
+ repository implementation, TypeScript will produce a compile error when the
1121
+ version is bumped, signaling that a semantic update is required:
1178
1122
 
1179
1123
  ```typescript
1180
1124
  import { WalletRepository } from '@arkade-os/sdk'
@@ -1283,6 +1227,7 @@ const wallet = await Wallet.create({
1283
1227
  })
1284
1228
  ```
1285
1229
 
1230
+ ### Using with Node.js
1286
1231
  ### Using with Node.js
1287
1232
 
1288
1233
  Node.js does not provide a global `EventSource` implementation (24.x has one behind `--experimental-eventsource`). The SDK relies on `EventSource` for Server-Sent Events during settlement (onboarding/offboarding) and contract watching, so tell it which one to use:
@@ -1406,7 +1351,7 @@ When you call `wallet.notifyIncomingFunds()` or use `waitForIncomingFunds()`, it
1406
1351
 
1407
1352
  HD wallets (`walletMode: 'hd'`, or an explicit HD `DescriptorProvider`) also watch a band of *unused* offchain receive scripts around their allocation watermark, so a payment to an address that some other party issued from the same seed — a merchant backend such as BTCPay Server, or the .NET SDK driving the same wallet — arrives without the user calling `restore()`. `lookAheadWindow` (default `20`) is the per-side width of that band: the wallet watches `[watermark - N, watermark + N]`. Speculative entries are subscription-only; they become contract rows, and enter balances, only once funded.
1408
1353
 
1409
- The issuer, not the wallet, picks the contract shape, so each index is watched at *every* variant the wallet could own there: `default` and `delegate`, crossed with the unilateral-exit timelock matrix and the operator's current plus deprecated signers. That is the candidate set `restore()` probes too, so watching and restoring cover identical scripts.
1354
+ The issuer, not the wallet, picks the contract shape, so each index is watched at *every* variant the wallet could own there: `default` and `delegate`, crossed with the unilateral-exit timelock matrix and the operator's active plus retired signers. That is the candidate set `restore()` probes too, so watching and restoring cover identical scripts.
1410
1355
 
1411
1356
  ```typescript
1412
1357
  const wallet = await Wallet.create({
@@ -1471,7 +1416,7 @@ const paths = manager.getSpendablePaths({
1471
1416
  contractScript: contract.script,
1472
1417
  vtxo,
1473
1418
  collaborative: true,
1474
- walletPubKey: myPubKey,
1419
+ walletDescriptor: myDescriptor,
1475
1420
  })
1476
1421
  if (paths.length > 0) {
1477
1422
  console.log('Contract is spendable via:', paths[0].leaf)
@@ -1481,7 +1426,7 @@ if (paths.length > 0) {
1481
1426
  const allPaths = await manager.getAllSpendingPaths({
1482
1427
  contractScript: contract.script,
1483
1428
  collaborative: true,
1484
- walletPubKey: myPubKey,
1429
+ walletDescriptor: myDescriptor,
1485
1430
  })
1486
1431
 
1487
1432
  // Fetch contracts together with their current virtual outputs
@@ -1,19 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunk43XGA362_cjs = require('../chunk-43XGA362.cjs');
4
- require('../chunk-L4HZK4KK.cjs');
5
- require('../chunk-UJTYUYY4.cjs');
6
- require('../chunk-5BLDMQED.cjs');
3
+ var chunkGPJSGLWM_cjs = require('../chunk-GPJSGLWM.cjs');
4
+ require('../chunk-SYRQJS5N.cjs');
5
+ require('../chunk-C5Y2R63Z.cjs');
7
6
 
8
7
 
9
8
 
10
9
  Object.defineProperty(exports, "ExpoArkProvider", {
11
10
  enumerable: true,
12
- get: function () { return chunk43XGA362_cjs.ExpoArkProvider; }
11
+ get: function () { return chunkGPJSGLWM_cjs.ExpoArkProvider; }
13
12
  });
14
13
  Object.defineProperty(exports, "ExpoIndexerProvider", {
15
14
  enumerable: true,
16
- get: function () { return chunk43XGA362_cjs.ExpoIndexerProvider; }
15
+ get: function () { return chunkGPJSGLWM_cjs.ExpoIndexerProvider; }
17
16
  });
18
17
  //# sourceMappingURL=expo.cjs.map
19
18
  //# sourceMappingURL=expo.cjs.map
@@ -1,5 +1,5 @@
1
- import { r as RestArkProvider, o as SettlementEvent, T as TxNotificationEvent, s as RestIndexerProvider, t as SubscriptionResponse } from '../index-DnNIOqHS.cjs';
2
- export { u as ArkProvider, v as IndexerProvider } from '../index-DnNIOqHS.cjs';
1
+ import { q as RestArkProvider, n as SettlementEvent, T as TxNotificationEvent, r as RestIndexerProvider, s as SubscriptionResponse } from '../index-Czz9HSqE.cjs';
2
+ export { t as ArkProvider, u as IndexerProvider } from '../index-Czz9HSqE.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
@@ -1,5 +1,5 @@
1
- import { r as RestArkProvider, o as SettlementEvent, T as TxNotificationEvent, s as RestIndexerProvider, t as SubscriptionResponse } from '../index-DnNIOqHS.js';
2
- export { u as ArkProvider, v as IndexerProvider } from '../index-DnNIOqHS.js';
1
+ import { q as RestArkProvider, n as SettlementEvent, T as TxNotificationEvent, r as RestIndexerProvider, s as SubscriptionResponse } from '../index-Czz9HSqE.js';
2
+ export { t as ArkProvider, u as IndexerProvider } from '../index-Czz9HSqE.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
@@ -1,6 +1,5 @@
1
- export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-G4UPMCKW.js';
2
- import '../chunk-ERUAQGYF.js';
3
- import '../chunk-HSG2GQTM.js';
4
- import '../chunk-NSBPE2FW.js';
1
+ export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-MOWSLXGO.js';
2
+ import '../chunk-XHASFSDU.js';
3
+ import '../chunk-GLZNJFAT.js';
5
4
  //# sourceMappingURL=expo.js.map
6
5
  //# sourceMappingURL=expo.js.map
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, a as TaskItem, b as TaskResult } from './taskRunner-F7wNJcF3.js';
1
+ import { c as TaskQueue, a as TaskItem, b as TaskResult } from './taskRunner-DUId1UJ8.js';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, a as TaskItem, b as TaskResult } from './taskRunner-BDb5Ee2J.cjs';
1
+ import { c as TaskQueue, a as TaskItem, b as TaskResult } from './taskRunner-7E_Rx8bD.cjs';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -1,5 +1,4 @@
1
- import { VtxoScript, MultisigTapscript, CSVMultisigTapscript, timelockToSequence, sequenceToTimelock, ConditionMultisigTapscript, CLTVMultisigTapscript, ConditionCSVMultisigTapscript, SCRIPT_QUERY_CHUNK_SIZE, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-HSG2GQTM.js';
2
- import { __export } from './chunk-NSBPE2FW.js';
1
+ import { __export, VtxoScript, MultisigTapscript, CSVMultisigTapscript, timelockToSequence, sequenceToTimelock, ConditionMultisigTapscript, CLTVMultisigTapscript, ConditionCSVMultisigTapscript, SCRIPT_QUERY_CHUNK_SIZE, getNormalizedVtxos, DEFAULT_PAGE_SIZE } from './chunk-GLZNJFAT.js';
3
2
  import { hex } from '@scure/base';
4
3
  import { networks, expand } from '@bitcoinerlab/descriptors-scure';
5
4
  import { ScriptNum, OP, Script } from '@scure/btc-signer';
@@ -266,21 +265,8 @@ function resolveRole(contract, context) {
266
265
  }
267
266
  return void 0;
268
267
  };
269
- if (context.walletDescriptor) {
270
- const walletDescriptorKey = extractRawPubKey(context.walletDescriptor);
271
- const matchedRole = matchRole(walletDescriptorKey);
272
- if (matchedRole) {
273
- return matchedRole;
274
- }
275
- if (!walletDescriptorKey && context.walletPubKey) {
276
- return matchRole(extractRawPubKey(context.walletPubKey));
277
- }
278
- return void 0;
279
- }
280
- if (context.walletPubKey) {
281
- return matchRole(extractRawPubKey(context.walletPubKey));
282
- }
283
- return void 0;
268
+ if (!context.walletDescriptor) return void 0;
269
+ return matchRole(extractRawPubKey(context.walletDescriptor));
284
270
  }
285
271
  function extractPubKeyBytes(value) {
286
272
  return hex.decode(extractPubKey(normalizeToDescriptor(value)));
@@ -1867,7 +1853,7 @@ var VHTLCContractHandler = {
1867
1853
  * Select spending path based on context.
1868
1854
  *
1869
1855
  * Role is determined from `context.role` or by matching
1870
- * `context.walletDescriptor` (preferred) / `context.walletPubKey`
1856
+ * `context.walletDescriptor`
1871
1857
  * against sender/receiver in contract params.
1872
1858
  */
1873
1859
  selectPath(script, contract, context) {
@@ -1914,7 +1900,7 @@ var VHTLCContractHandler = {
1914
1900
  * Get all possible spending paths (no timelock checks).
1915
1901
  *
1916
1902
  * Role is determined from `context.role` or by matching
1917
- * `context.walletDescriptor` (preferred) / `context.walletPubKey`
1903
+ * `context.walletDescriptor`
1918
1904
  * against sender/receiver in contract params.
1919
1905
  */
1920
1906
  getAllSpendingPaths(script, contract, context) {
@@ -2229,7 +2215,7 @@ var VHTLCV2ContractHandler = {
2229
2215
  * Select spending path based on context.
2230
2216
  *
2231
2217
  * Role is determined from `context.role` or by matching
2232
- * `context.walletDescriptor` (preferred) / `context.walletPubKey`
2218
+ * `context.walletDescriptor`
2233
2219
  * against sender/receiver in contract params.
2234
2220
  */
2235
2221
  selectPath(script, contract, context) {
@@ -2276,7 +2262,7 @@ var VHTLCV2ContractHandler = {
2276
2262
  * Get all possible spending paths (no timelock checks).
2277
2263
  *
2278
2264
  * Role is determined from `context.role` or by matching
2279
- * `context.walletDescriptor` (preferred) / `context.walletPubKey`
2265
+ * `context.walletDescriptor`
2280
2266
  * against sender/receiver in contract params.
2281
2267
  */
2282
2268
  getAllSpendingPaths(script, contract, context) {
@@ -2850,22 +2836,12 @@ function deserializeArkadeContractParams(params) {
2850
2836
 
2851
2837
  // src/contracts/handlers/arkade.ts
2852
2838
  function walletKeyFrom(context) {
2853
- const extract = (value) => {
2854
- if (!isDescriptor(value)) return value.toLowerCase();
2855
- try {
2856
- return extractPubKey(value).toLowerCase();
2857
- } catch {
2858
- return void 0;
2859
- }
2860
- };
2861
- if (context.walletDescriptor) {
2862
- const key = extract(context.walletDescriptor);
2863
- if (key) return key;
2864
- }
2865
- if (context.walletPubKey) {
2866
- return extract(context.walletPubKey);
2839
+ if (!context.walletDescriptor) return void 0;
2840
+ try {
2841
+ return extractPubKey(context.walletDescriptor).toLowerCase();
2842
+ } catch {
2843
+ return void 0;
2867
2844
  }
2868
- return void 0;
2869
2845
  }
2870
2846
  function staticWitness(fn, script) {
2871
2847
  const refs = fn.def.tapscript.witness ?? [];
@@ -2987,5 +2963,5 @@ contractHandlers.register(BoardingContractHandler);
2987
2963
  contractHandlers.register(ArkadeContractHandler);
2988
2964
 
2989
2965
  export { ARKADE_OP, ARKADE_OPCODES, ARKADE_OPCODE_NAMES, ARKADE_OPCODE_VALUES, ARKADE_OPS, ArkadeContractHandler, ArkadeProgramScript, ArkadeScript, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, OPCODE_NAMES, OPCODE_VALUES, SUPPORTED_PROGRAM_VERSION, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, WALLET_RECEIVE_SOURCE, arkadeScriptHash, arkadeWitnessHash, asmToBytes, bignum_exports, bytesToASM, computeArkadeScriptPublicKey, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, descriptorIsOurs, deserializeArkadeContractParams, fromASM, getOpcodeName, getOpcodeValue, identityDescriptor, inputName, isCltvSatisfied, isCsvSpendable, isMainnetDescriptor, normalizeToDescriptor, parseArtifact, parseHDDescriptor, resolveAsm, serializeArkadeContractParams, speculativeReceiveMetadata, stringifyArtifact, toASM, toXOnly, validateProgram, witnessRefToBytes };
2990
- //# sourceMappingURL=chunk-7W6FHWYN.js.map
2991
- //# sourceMappingURL=chunk-7W6FHWYN.js.map
2966
+ //# sourceMappingURL=chunk-4EZOMPAO.js.map
2967
+ //# sourceMappingURL=chunk-4EZOMPAO.js.map