@arkade-os/sdk 0.4.60 → 0.4.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/adapters/expo.cjs +5 -5
  2. package/dist/adapters/expo.d.cts +4 -4
  3. package/dist/adapters/expo.d.ts +4 -4
  4. package/dist/adapters/expo.js +3 -3
  5. package/dist/adapters/indexedDB.cjs +5 -5
  6. package/dist/adapters/indexedDB.js +4 -4
  7. package/dist/{asyncStorageTaskQueue-CqijAAPG.d.cts → asyncStorageTaskQueue-B53mOTCw.d.cts} +2 -2
  8. package/dist/{asyncStorageTaskQueue-Vsp6uk8e.d.ts → asyncStorageTaskQueue-Df-CTfTE.d.ts} +2 -2
  9. package/dist/{chunk-Y54MUBT7.js → chunk-2IZW6AEK.js} +879 -146
  10. package/dist/chunk-2IZW6AEK.js.map +1 -0
  11. package/dist/{chunk-MZNLCMUP.cjs → chunk-G53HASDV.cjs} +113 -79
  12. package/dist/chunk-G53HASDV.cjs.map +1 -0
  13. package/dist/{chunk-3Q7BBUWO.js → chunk-H2ZAJOQA.js} +4 -4
  14. package/dist/{chunk-3Q7BBUWO.js.map → chunk-H2ZAJOQA.js.map} +1 -1
  15. package/dist/{chunk-PRFL62ID.cjs → chunk-I6EDUE75.cjs} +17 -17
  16. package/dist/{chunk-PRFL62ID.cjs.map → chunk-I6EDUE75.cjs.map} +1 -1
  17. package/dist/{chunk-B66RYHTB.js → chunk-I7RLG6VX.js} +4 -4
  18. package/dist/{chunk-B66RYHTB.js.map → chunk-I7RLG6VX.js.map} +1 -1
  19. package/dist/{chunk-2DINXHGQ.js → chunk-L7S5KC5B.js} +66 -35
  20. package/dist/chunk-L7S5KC5B.js.map +1 -0
  21. package/dist/{chunk-4A4GRSTB.cjs → chunk-OH2XLTXE.cjs} +3 -3
  22. package/dist/{chunk-4A4GRSTB.cjs.map → chunk-OH2XLTXE.cjs.map} +1 -1
  23. package/dist/{chunk-2XLNQHG4.cjs → chunk-PWWA4DBL.cjs} +10 -10
  24. package/dist/{chunk-2XLNQHG4.cjs.map → chunk-PWWA4DBL.cjs.map} +1 -1
  25. package/dist/{chunk-H7JCHFM6.cjs → chunk-QRSR4HV4.cjs} +17 -17
  26. package/dist/{chunk-H7JCHFM6.cjs.map → chunk-QRSR4HV4.cjs.map} +1 -1
  27. package/dist/{chunk-FSKANUV4.js → chunk-RMBI6P4N.js} +3 -3
  28. package/dist/{chunk-FSKANUV4.js.map → chunk-RMBI6P4N.js.map} +1 -1
  29. package/dist/{chunk-JBULXTCC.js → chunk-URT2RVGB.js} +3 -3
  30. package/dist/{chunk-JBULXTCC.js.map → chunk-URT2RVGB.js.map} +1 -1
  31. package/dist/{chunk-KNS5MTTI.cjs → chunk-Z2OZMKFV.cjs} +1272 -523
  32. package/dist/chunk-Z2OZMKFV.cjs.map +1 -0
  33. package/dist/contracts/handlers/index.cjs +9 -9
  34. package/dist/contracts/handlers/index.d.cts +5 -5
  35. package/dist/contracts/handlers/index.d.ts +5 -5
  36. package/dist/contracts/handlers/index.js +2 -2
  37. package/dist/{delegate-DNEuM_nK.d.cts → delegate-BjYJJsml.d.ts} +1 -1
  38. package/dist/{delegate-DidNTsKm.d.ts → delegate-CC1gcvuC.d.cts} +1 -1
  39. package/dist/{index-BP8-zniX.d.cts → index-C888wFEV.d.ts} +102 -102
  40. package/dist/{ark-D2_yNhfz.d.cts → index-CwBr7qzV.d.cts} +3941 -3812
  41. package/dist/{ark-D2_yNhfz.d.ts → index-CwBr7qzV.d.ts} +3941 -3812
  42. package/dist/{index-DzQbNQUG.d.ts → index-Cz5_WaQP.d.cts} +102 -102
  43. package/dist/index.cjs +328 -248
  44. package/dist/index.d.cts +340 -52
  45. package/dist/index.d.ts +340 -52
  46. package/dist/index.js +4 -4
  47. package/dist/repositories/realm/index.cjs +19 -19
  48. package/dist/repositories/realm/index.d.cts +4 -4
  49. package/dist/repositories/realm/index.d.ts +4 -4
  50. package/dist/repositories/realm/index.js +5 -5
  51. package/dist/repositories/sqlite/index.cjs +18 -18
  52. package/dist/repositories/sqlite/index.d.cts +4 -4
  53. package/dist/repositories/sqlite/index.d.ts +4 -4
  54. package/dist/repositories/sqlite/index.js +5 -5
  55. package/dist/{taskRunner-9gnlYEpb.d.ts → taskRunner-BMUndClz.d.cts} +2 -2
  56. package/dist/{taskRunner-BEQNFEa4.d.cts → taskRunner-DZWUsSzA.d.ts} +2 -2
  57. package/dist/wallet/expo/background.cjs +14 -14
  58. package/dist/wallet/expo/background.d.cts +5 -5
  59. package/dist/wallet/expo/background.d.ts +5 -5
  60. package/dist/wallet/expo/background.js +6 -6
  61. package/dist/wallet/expo/index.cjs +36 -16
  62. package/dist/wallet/expo/index.cjs.map +1 -1
  63. package/dist/wallet/expo/index.d.cts +13 -6
  64. package/dist/wallet/expo/index.d.ts +13 -6
  65. package/dist/wallet/expo/index.js +27 -7
  66. package/dist/wallet/expo/index.js.map +1 -1
  67. package/dist/{wallet-ipUA1XCp.d.cts → wallet-Dpjx6CJ7.d.ts} +91 -17
  68. package/dist/{wallet-C_MYHyOj.d.ts → wallet-H3f14est.d.cts} +91 -17
  69. package/dist/worker/expo/index.cjs +9 -9
  70. package/dist/worker/expo/index.d.cts +6 -6
  71. package/dist/worker/expo/index.d.ts +6 -6
  72. package/dist/worker/expo/index.js +5 -5
  73. package/package.json +1 -1
  74. package/dist/chunk-2DINXHGQ.js.map +0 -1
  75. package/dist/chunk-KNS5MTTI.cjs.map +0 -1
  76. package/dist/chunk-MZNLCMUP.cjs.map +0 -1
  77. package/dist/chunk-Y54MUBT7.js.map +0 -1
@@ -1,7 +1,107 @@
1
- import { p as RelativeTimelock, V as VtxoScript, q as TapLeafScript, ba as ContractHandler, bl as Discoverable, cN as TapscriptDeriving } from './ark-D2_yNhfz.js';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DidNTsKm.js';
1
+ import { bb as ContractHandler, q as RelativeTimelock, bm as Discoverable, V as VtxoScript, r as TapLeafScript, cP as TapscriptDeriving } from './index-CwBr7qzV.cjs';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CC1gcvuC.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
+ /**
6
+ * Registry for contract handlers.
7
+ *
8
+ * Each contract type ("default", "vhtlc", etc.) has a handler that knows
9
+ * how to create VtxoScripts, serialize params, and select spending paths.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Register a custom handler
14
+ * contractHandlers.register(myCustomHandler);
15
+ *
16
+ * // Get handler for a type
17
+ * const handler = contractHandlers.get("vhtlc");
18
+ * const script = handler.createScript(contract.params);
19
+ * ```
20
+ */
21
+ declare class ContractHandlerRegistry {
22
+ private handlers;
23
+ /**
24
+ * Register a contract handler.
25
+ *
26
+ * @param handler - The handler to register
27
+ * @throws If a handler for this type is already registered
28
+ */
29
+ register(handler: ContractHandler<unknown>): void;
30
+ /**
31
+ * Get a handler by type.
32
+ *
33
+ * @param type - The contract type
34
+ * @returns The handler, or undefined if not found
35
+ */
36
+ get(type: string): ContractHandler<unknown> | undefined;
37
+ /**
38
+ * Get a handler by type, throwing if not found.
39
+ *
40
+ * @param type - The contract type
41
+ * @returns The handler
42
+ * @throws If no handler is registered for this type
43
+ */
44
+ getOrThrow(type: string): ContractHandler<unknown>;
45
+ /**
46
+ * Check if a handler is registered.
47
+ *
48
+ * @param type - The contract type
49
+ */
50
+ has(type: string): boolean;
51
+ /**
52
+ * Get all registered types.
53
+ */
54
+ getRegisteredTypes(): string[];
55
+ /**
56
+ * Unregister a handler (mainly for testing).
57
+ */
58
+ unregister(type: string): boolean;
59
+ /**
60
+ * Clear all handlers (mainly for testing).
61
+ */
62
+ clear(): void;
63
+ }
64
+ /**
65
+ * Global registry of contract handlers.
66
+ */
67
+ declare const contractHandlers: ContractHandlerRegistry;
68
+
69
+ /**
70
+ * Typed parameters for DefaultVtxo contracts.
71
+ */
72
+ interface DefaultContractParams {
73
+ pubKey: Uint8Array;
74
+ serverPubKey: Uint8Array;
75
+ csvTimelock: RelativeTimelock;
76
+ }
77
+ /**
78
+ * Handler for default wallet VTXOs.
79
+ *
80
+ * Default contracts use the standard forfeit + exit tapscript:
81
+ * - forfeit: (Alice + Server) multisig for collaborative spending
82
+ * - exit: (Alice) + CSV timelock for unilateral exit
83
+ */
84
+ declare const DefaultContractHandler: ContractHandler<DefaultContractParams, DefaultVtxo.Script> & Discoverable;
85
+
86
+ /**
87
+ * Typed parameters for DelegateVtxo contracts.
88
+ */
89
+ interface DelegateContractParams {
90
+ pubKey: Uint8Array;
91
+ serverPubKey: Uint8Array;
92
+ delegatePubKey: Uint8Array;
93
+ csvTimelock: RelativeTimelock;
94
+ }
95
+ /**
96
+ * Handler for delegate wallet virtual outputs.
97
+ *
98
+ * Delegate contracts extend the default tapscript with an additional delegate path:
99
+ * - forfeit: (Alice + Server) multisig for collaborative spending
100
+ * - exit: (Alice) + CSV timelock for unilateral exit
101
+ * - delegate: (Alice + Delegate + Server) multisig for delegated renewal
102
+ */
103
+ declare const DelegateContractHandler: ContractHandler<DelegateContractParams, DelegateVtxo.Script> & Discoverable;
104
+
5
105
  /** Virtual Hash Time Lock Contract (VHTLC) namespace. */
6
106
  declare namespace VHTLC {
7
107
  export interface Options {
@@ -138,106 +238,6 @@ declare namespace VHTLC {
138
238
  export { };
139
239
  }
140
240
 
141
- /**
142
- * Registry for contract handlers.
143
- *
144
- * Each contract type ("default", "vhtlc", etc.) has a handler that knows
145
- * how to create VtxoScripts, serialize params, and select spending paths.
146
- *
147
- * @example
148
- * ```typescript
149
- * // Register a custom handler
150
- * contractHandlers.register(myCustomHandler);
151
- *
152
- * // Get handler for a type
153
- * const handler = contractHandlers.get("vhtlc");
154
- * const script = handler.createScript(contract.params);
155
- * ```
156
- */
157
- declare class ContractHandlerRegistry {
158
- private handlers;
159
- /**
160
- * Register a contract handler.
161
- *
162
- * @param handler - The handler to register
163
- * @throws If a handler for this type is already registered
164
- */
165
- register(handler: ContractHandler<unknown>): void;
166
- /**
167
- * Get a handler by type.
168
- *
169
- * @param type - The contract type
170
- * @returns The handler, or undefined if not found
171
- */
172
- get(type: string): ContractHandler<unknown> | undefined;
173
- /**
174
- * Get a handler by type, throwing if not found.
175
- *
176
- * @param type - The contract type
177
- * @returns The handler
178
- * @throws If no handler is registered for this type
179
- */
180
- getOrThrow(type: string): ContractHandler<unknown>;
181
- /**
182
- * Check if a handler is registered.
183
- *
184
- * @param type - The contract type
185
- */
186
- has(type: string): boolean;
187
- /**
188
- * Get all registered types.
189
- */
190
- getRegisteredTypes(): string[];
191
- /**
192
- * Unregister a handler (mainly for testing).
193
- */
194
- unregister(type: string): boolean;
195
- /**
196
- * Clear all handlers (mainly for testing).
197
- */
198
- clear(): void;
199
- }
200
- /**
201
- * Global registry of contract handlers.
202
- */
203
- declare const contractHandlers: ContractHandlerRegistry;
204
-
205
- /**
206
- * Typed parameters for DefaultVtxo contracts.
207
- */
208
- interface DefaultContractParams {
209
- pubKey: Uint8Array;
210
- serverPubKey: Uint8Array;
211
- csvTimelock: RelativeTimelock;
212
- }
213
- /**
214
- * Handler for default wallet VTXOs.
215
- *
216
- * Default contracts use the standard forfeit + exit tapscript:
217
- * - forfeit: (Alice + Server) multisig for collaborative spending
218
- * - exit: (Alice) + CSV timelock for unilateral exit
219
- */
220
- declare const DefaultContractHandler: ContractHandler<DefaultContractParams, DefaultVtxo.Script> & Discoverable;
221
-
222
- /**
223
- * Typed parameters for DelegateVtxo contracts.
224
- */
225
- interface DelegateContractParams {
226
- pubKey: Uint8Array;
227
- serverPubKey: Uint8Array;
228
- delegatePubKey: Uint8Array;
229
- csvTimelock: RelativeTimelock;
230
- }
231
- /**
232
- * Handler for delegate wallet virtual outputs.
233
- *
234
- * Delegate contracts extend the default tapscript with an additional delegate path:
235
- * - forfeit: (Alice + Server) multisig for collaborative spending
236
- * - exit: (Alice) + CSV timelock for unilateral exit
237
- * - delegate: (Alice + Delegate + Server) multisig for delegated renewal
238
- */
239
- declare const DelegateContractHandler: ContractHandler<DelegateContractParams, DelegateVtxo.Script> & Discoverable;
240
-
241
241
  /**
242
242
  * Typed parameters for VHTLC contracts.
243
243
  */