@arkade-os/sdk 0.4.32 → 0.4.33

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 (75) hide show
  1. package/dist/adapters/expo.cjs +4 -4
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +2 -2
  5. package/dist/adapters/indexedDB.cjs +4 -4
  6. package/dist/adapters/indexedDB.js +3 -3
  7. package/dist/{ark-ibLW4Hte.d.cts → ark-DEsDMYGv.d.cts} +17 -4
  8. package/dist/{ark-ibLW4Hte.d.ts → ark-DEsDMYGv.d.ts} +17 -4
  9. package/dist/{asyncStorageTaskQueue-BEOFPNc0.d.ts → asyncStorageTaskQueue-CMrTYlKG.d.ts} +1 -1
  10. package/dist/{asyncStorageTaskQueue-VGHXWR9F.d.cts → asyncStorageTaskQueue-D8T1VXEx.d.cts} +1 -1
  11. package/dist/{chunk-GIGILVVP.cjs → chunk-5CCRRL5S.cjs} +8 -8
  12. package/dist/{chunk-GIGILVVP.cjs.map → chunk-5CCRRL5S.cjs.map} +1 -1
  13. package/dist/{chunk-KQK4PP6L.cjs → chunk-7K3ROJF6.cjs} +276 -131
  14. package/dist/chunk-7K3ROJF6.cjs.map +1 -0
  15. package/dist/{chunk-YA4G7RFB.js → chunk-AOJUURHM.js} +30 -6
  16. package/dist/chunk-AOJUURHM.js.map +1 -0
  17. package/dist/{chunk-SHEBNWOQ.js → chunk-BU3BU6XK.js} +3 -3
  18. package/dist/{chunk-SHEBNWOQ.js.map → chunk-BU3BU6XK.js.map} +1 -1
  19. package/dist/{chunk-XROGFOPX.js → chunk-DSS2GQUG.js} +185 -40
  20. package/dist/chunk-DSS2GQUG.js.map +1 -0
  21. package/dist/{chunk-6NWNOLL3.js → chunk-E22HEKLN.js} +3 -3
  22. package/dist/chunk-E22HEKLN.js.map +1 -0
  23. package/dist/{chunk-IEO3XDKI.cjs → chunk-GYSK5R57.cjs} +32 -5
  24. package/dist/chunk-GYSK5R57.cjs.map +1 -0
  25. package/dist/{chunk-I2UIKZM5.cjs → chunk-HAVA4XB7.cjs} +7 -7
  26. package/dist/{chunk-I2UIKZM5.cjs.map → chunk-HAVA4XB7.cjs.map} +1 -1
  27. package/dist/{chunk-ABWRLTX5.js → chunk-L6ZETTX3.js} +3 -3
  28. package/dist/{chunk-ABWRLTX5.js.map → chunk-L6ZETTX3.js.map} +1 -1
  29. package/dist/{chunk-6FLL2Q36.cjs → chunk-SPDNHPM4.cjs} +3 -3
  30. package/dist/chunk-SPDNHPM4.cjs.map +1 -0
  31. package/dist/contracts/handlers/index.cjs +9 -5
  32. package/dist/contracts/handlers/index.d.cts +3 -3
  33. package/dist/contracts/handlers/index.d.ts +3 -3
  34. package/dist/contracts/handlers/index.js +1 -1
  35. package/dist/{delegate-BvNTw44a.d.cts → delegate-BJeBNP5a.d.cts} +10 -2
  36. package/dist/{delegate-BXaR1RNG.d.ts → delegate-EXN2mfkb.d.ts} +10 -2
  37. package/dist/{index-BusKawmy.d.ts → index-BG2ooYKO.d.ts} +57 -3
  38. package/dist/{index-C-5Tw7VA.d.cts → index-DHjEeHEp.d.cts} +57 -3
  39. package/dist/index.cjs +125 -113
  40. package/dist/index.d.cts +33 -9
  41. package/dist/index.d.ts +33 -9
  42. package/dist/index.js +3 -3
  43. package/dist/repositories/realm/index.cjs +12 -12
  44. package/dist/repositories/realm/index.d.cts +1 -1
  45. package/dist/repositories/realm/index.d.ts +1 -1
  46. package/dist/repositories/realm/index.js +3 -3
  47. package/dist/repositories/sqlite/index.cjs +12 -12
  48. package/dist/repositories/sqlite/index.d.cts +1 -1
  49. package/dist/repositories/sqlite/index.d.ts +1 -1
  50. package/dist/repositories/sqlite/index.js +3 -3
  51. package/dist/{taskRunner-B1igKGAo.d.ts → taskRunner-B7lBU45X.d.ts} +1 -1
  52. package/dist/{taskRunner-By92TQ1m.d.cts → taskRunner-pIGyarFG.d.cts} +1 -1
  53. package/dist/wallet/expo/background.cjs +13 -13
  54. package/dist/wallet/expo/background.d.cts +3 -3
  55. package/dist/wallet/expo/background.d.ts +3 -3
  56. package/dist/wallet/expo/background.js +5 -5
  57. package/dist/wallet/expo/index.cjs +13 -13
  58. package/dist/wallet/expo/index.cjs.map +1 -1
  59. package/dist/wallet/expo/index.d.cts +4 -4
  60. package/dist/wallet/expo/index.d.ts +4 -4
  61. package/dist/wallet/expo/index.js +5 -5
  62. package/dist/wallet/expo/index.js.map +1 -1
  63. package/dist/{wallet-CyM4F7Bs.d.ts → wallet-C4L_X0i6.d.ts} +2 -2
  64. package/dist/{wallet-B_rxgQTu.d.cts → wallet-D4Dll5Gu.d.cts} +2 -2
  65. package/dist/worker/expo/index.cjs +8 -8
  66. package/dist/worker/expo/index.d.cts +4 -4
  67. package/dist/worker/expo/index.d.ts +4 -4
  68. package/dist/worker/expo/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/chunk-6FLL2Q36.cjs.map +0 -1
  71. package/dist/chunk-6NWNOLL3.js.map +0 -1
  72. package/dist/chunk-IEO3XDKI.cjs.map +0 -1
  73. package/dist/chunk-KQK4PP6L.cjs.map +0 -1
  74. package/dist/chunk-XROGFOPX.js.map +0 -1
  75. package/dist/chunk-YA4G7RFB.js.map +0 -1
@@ -1,7 +1,7 @@
1
- export { D as DefaultContractHandler, a as DefaultContractParams, b as DelegateContractHandler, c as DelegateContractParams, d as VHTLCContractHandler, e as VHTLCContractParams, f as contractHandlers } from '../../index-BusKawmy.js';
2
- import '../../ark-ibLW4Hte.js';
1
+ export { B as BoardingContractHandler, a as BoardingContractParams, D as DefaultContractHandler, b as DefaultContractParams, c as DelegateContractHandler, d as DelegateContractParams, e as VHTLCContractHandler, f as VHTLCContractParams, g as contractHandlers } from '../../index-BG2ooYKO.js';
2
+ import '../../ark-DEsDMYGv.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';
6
6
  import '@scure/btc-signer';
7
- import '../../delegate-BXaR1RNG.js';
7
+ import '../../delegate-EXN2mfkb.js';
@@ -1,4 +1,4 @@
1
- export { DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, contractHandlers } from '../../chunk-YA4G7RFB.js';
1
+ export { BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, contractHandlers } from '../../chunk-AOJUURHM.js';
2
2
  import '../../chunk-TU3LVAPX.js';
3
3
  import '../../chunk-NSBPE2FW.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript } from './ark-ibLW4Hte.cjs';
2
+ import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript } from './ark-DEsDMYGv.cjs';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -15,7 +15,7 @@ declare namespace DefaultVtxo {
15
15
  interface Options {
16
16
  pubKey: Bytes;
17
17
  serverPubKey: Bytes;
18
- csvTimelock?: RelativeTimelock;
18
+ csvTimelock: RelativeTimelock;
19
19
  }
20
20
  /**
21
21
  * DefaultVtxo.Script is the class letting to create the vtxo script.
@@ -24,6 +24,10 @@ declare namespace DefaultVtxo {
24
24
  * const vtxoScript = new DefaultVtxo.Script({
25
25
  * pubKey: new Uint8Array(32),
26
26
  * serverPubKey: new Uint8Array(32),
27
+ * csvTimelock: {
28
+ * value: 605184n,
29
+ * type: "seconds"
30
+ * }
27
31
  * });
28
32
  *
29
33
  * console.log("script pub key:", vtxoScript.pkScript)
@@ -61,6 +65,10 @@ declare namespace DelegateVtxo {
61
65
  * pubKey: new Uint8Array(32),
62
66
  * serverPubKey: new Uint8Array(32),
63
67
  * delegatePubKey: new Uint8Array(32),
68
+ * csvTimelock: {
69
+ * value: 605184n,
70
+ * type: "seconds"
71
+ * }
64
72
  * });
65
73
  *
66
74
  * console.log("script pub key:", vtxoScript.pkScript)
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript } from './ark-ibLW4Hte.js';
2
+ import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript } from './ark-DEsDMYGv.js';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -15,7 +15,7 @@ declare namespace DefaultVtxo {
15
15
  interface Options {
16
16
  pubKey: Bytes;
17
17
  serverPubKey: Bytes;
18
- csvTimelock?: RelativeTimelock;
18
+ csvTimelock: RelativeTimelock;
19
19
  }
20
20
  /**
21
21
  * DefaultVtxo.Script is the class letting to create the vtxo script.
@@ -24,6 +24,10 @@ declare namespace DefaultVtxo {
24
24
  * const vtxoScript = new DefaultVtxo.Script({
25
25
  * pubKey: new Uint8Array(32),
26
26
  * serverPubKey: new Uint8Array(32),
27
+ * csvTimelock: {
28
+ * value: 605184n,
29
+ * type: "seconds"
30
+ * }
27
31
  * });
28
32
  *
29
33
  * console.log("script pub key:", vtxoScript.pkScript)
@@ -61,6 +65,10 @@ declare namespace DelegateVtxo {
61
65
  * pubKey: new Uint8Array(32),
62
66
  * serverPubKey: new Uint8Array(32),
63
67
  * delegatePubKey: new Uint8Array(32),
68
+ * csvTimelock: {
69
+ * value: 605184n,
70
+ * type: "seconds"
71
+ * }
64
72
  * });
65
73
  *
66
74
  * console.log("script pub key:", vtxoScript.pkScript)
@@ -1,5 +1,5 @@
1
- import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript, aM as ContractHandler, aV as Discoverable } from './ark-ibLW4Hte.js';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BXaR1RNG.js';
1
+ import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript, aN as ContractHandler, aW as Discoverable } from './ark-DEsDMYGv.js';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-EXN2mfkb.js';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /** Virtual Hash Time Lock Contract (VHTLC) namespace. */
@@ -196,4 +196,58 @@ interface VHTLCContractParams {
196
196
  */
197
197
  declare const VHTLCContractHandler: ContractHandler<VHTLCContractParams, VHTLC.Script>;
198
198
 
199
- export { DefaultContractHandler as D, VHTLC as V, type DefaultContractParams as a, DelegateContractHandler as b, type DelegateContractParams as c, VHTLCContractHandler as d, type VHTLCContractParams as e, contractHandlers as f };
199
+ /**
200
+ * Typed parameters for boarding contracts.
201
+ *
202
+ * Boarding reuses the exact `default` contract parameter shape
203
+ * (`pubKey` / `serverPubKey` / `csvTimelock`) rather than inventing
204
+ * boarding-specific names — the boarding semantics come from the
205
+ * contract type and from populating `csvTimelock` with the server's
206
+ * boarding-exit delay (`ArkInfo.boardingExitDelay`) instead of the
207
+ * offchain unilateral-exit delay.
208
+ */
209
+ type BoardingContractParams = DefaultContractParams;
210
+ /**
211
+ * Handler for the boarding contract (registered type `boarding`).
212
+ *
213
+ * The boarding contract derives the on-chain Bitcoin address used to
214
+ * board funds onto Arkade. It shares the exact `DefaultVtxo.Script`
215
+ * shape with the `default` contract — a Taproot output co-owned by the
216
+ * wallet and the Ark server, with a CSV exit path back to the wallet —
217
+ * and therefore reuses the `default` handler's path logic (forfeit via
218
+ * server cooperation, exit after the boarding CSV).
219
+ *
220
+ * Boarding semantics come entirely from the contract type and from
221
+ * sourcing the CSV timelock from the server's boarding-exit delay
222
+ * (`ArkInfo.boardingExitDelay`), not from renamed parameters. The
223
+ * offchain `default` contract is built from `ArkInfo.unilateralExitDelay`
224
+ * instead, so the two share a script shape but differ in their CSV
225
+ * timelock value. Parameters round-trip through the same
226
+ * `timelockToSequence` / `sequenceToTimelock` helpers and BIP68 sequence
227
+ * encoding as `default` / `delegate`.
228
+ *
229
+ * Unlike `default` / `delegate`, the boarding handler deliberately does
230
+ * **not** implement {@link Discoverable.discoverAt}: branch/index
231
+ * selection for HD wallets is owned by the wallet / address-provider
232
+ * layer, which hands this handler an already-derived pubkey. As a result
233
+ * `isDiscoverable(BoardingContractHandler)` is `false`.
234
+ *
235
+ * Identity & the default/boarding collision: a contract's `script` (pkScript)
236
+ * is its unique identity — a script owns exactly one repository row. `boarding`
237
+ * is a first-class type with its own row **when its script is distinct** from
238
+ * the wallet's `default` baseline — the real-world case, since a sound Ark
239
+ * server keeps boardingExitDelay strictly longer than unilateralExitDelay (equal
240
+ * delays would expose the provider to a double-spend). Should those delays ever
241
+ * coincide (a misconfigured/malicious server), the boarding script is
242
+ * byte-identical to the default script and the wallet coalesces the single
243
+ * shared row onto the `default` type ("default wins"; see `ensureWalletContract`)
244
+ * rather than persisting a second row. Either way the funds are equally spendable
245
+ * through the shared `DefaultVtxo.Script` paths. Consumers must NOT rely on
246
+ * `contract.type === "boarding"` to identify the boarding purpose — resolve the
247
+ * boarding script via `wallet.getBoardingAddress()` / `wallet.boardingTapscript`
248
+ * (which never depend on the persisted contract's type) and match by script when
249
+ * needed.
250
+ */
251
+ declare const BoardingContractHandler: ContractHandler<BoardingContractParams, DefaultVtxo.Script>;
252
+
253
+ export { BoardingContractHandler as B, DefaultContractHandler as D, VHTLC as V, type BoardingContractParams as a, type DefaultContractParams as b, DelegateContractHandler as c, type DelegateContractParams as d, VHTLCContractHandler as e, type VHTLCContractParams as f, contractHandlers as g };
@@ -1,5 +1,5 @@
1
- import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript, aM as ContractHandler, aV as Discoverable } from './ark-ibLW4Hte.cjs';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BvNTw44a.cjs';
1
+ import { o as RelativeTimelock, V as VtxoScript, p as TapLeafScript, aN as ContractHandler, aW as Discoverable } from './ark-DEsDMYGv.cjs';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BJeBNP5a.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /** Virtual Hash Time Lock Contract (VHTLC) namespace. */
@@ -196,4 +196,58 @@ interface VHTLCContractParams {
196
196
  */
197
197
  declare const VHTLCContractHandler: ContractHandler<VHTLCContractParams, VHTLC.Script>;
198
198
 
199
- export { DefaultContractHandler as D, VHTLC as V, type DefaultContractParams as a, DelegateContractHandler as b, type DelegateContractParams as c, VHTLCContractHandler as d, type VHTLCContractParams as e, contractHandlers as f };
199
+ /**
200
+ * Typed parameters for boarding contracts.
201
+ *
202
+ * Boarding reuses the exact `default` contract parameter shape
203
+ * (`pubKey` / `serverPubKey` / `csvTimelock`) rather than inventing
204
+ * boarding-specific names — the boarding semantics come from the
205
+ * contract type and from populating `csvTimelock` with the server's
206
+ * boarding-exit delay (`ArkInfo.boardingExitDelay`) instead of the
207
+ * offchain unilateral-exit delay.
208
+ */
209
+ type BoardingContractParams = DefaultContractParams;
210
+ /**
211
+ * Handler for the boarding contract (registered type `boarding`).
212
+ *
213
+ * The boarding contract derives the on-chain Bitcoin address used to
214
+ * board funds onto Arkade. It shares the exact `DefaultVtxo.Script`
215
+ * shape with the `default` contract — a Taproot output co-owned by the
216
+ * wallet and the Ark server, with a CSV exit path back to the wallet —
217
+ * and therefore reuses the `default` handler's path logic (forfeit via
218
+ * server cooperation, exit after the boarding CSV).
219
+ *
220
+ * Boarding semantics come entirely from the contract type and from
221
+ * sourcing the CSV timelock from the server's boarding-exit delay
222
+ * (`ArkInfo.boardingExitDelay`), not from renamed parameters. The
223
+ * offchain `default` contract is built from `ArkInfo.unilateralExitDelay`
224
+ * instead, so the two share a script shape but differ in their CSV
225
+ * timelock value. Parameters round-trip through the same
226
+ * `timelockToSequence` / `sequenceToTimelock` helpers and BIP68 sequence
227
+ * encoding as `default` / `delegate`.
228
+ *
229
+ * Unlike `default` / `delegate`, the boarding handler deliberately does
230
+ * **not** implement {@link Discoverable.discoverAt}: branch/index
231
+ * selection for HD wallets is owned by the wallet / address-provider
232
+ * layer, which hands this handler an already-derived pubkey. As a result
233
+ * `isDiscoverable(BoardingContractHandler)` is `false`.
234
+ *
235
+ * Identity & the default/boarding collision: a contract's `script` (pkScript)
236
+ * is its unique identity — a script owns exactly one repository row. `boarding`
237
+ * is a first-class type with its own row **when its script is distinct** from
238
+ * the wallet's `default` baseline — the real-world case, since a sound Ark
239
+ * server keeps boardingExitDelay strictly longer than unilateralExitDelay (equal
240
+ * delays would expose the provider to a double-spend). Should those delays ever
241
+ * coincide (a misconfigured/malicious server), the boarding script is
242
+ * byte-identical to the default script and the wallet coalesces the single
243
+ * shared row onto the `default` type ("default wins"; see `ensureWalletContract`)
244
+ * rather than persisting a second row. Either way the funds are equally spendable
245
+ * through the shared `DefaultVtxo.Script` paths. Consumers must NOT rely on
246
+ * `contract.type === "boarding"` to identify the boarding purpose — resolve the
247
+ * boarding script via `wallet.getBoardingAddress()` / `wallet.boardingTapscript`
248
+ * (which never depend on the persisted contract's type) and match by script when
249
+ * needed.
250
+ */
251
+ declare const BoardingContractHandler: ContractHandler<BoardingContractParams, DefaultVtxo.Script>;
252
+
253
+ export { BoardingContractHandler as B, DefaultContractHandler as D, VHTLC as V, type BoardingContractParams as a, type DefaultContractParams as b, DelegateContractHandler as c, type DelegateContractParams as d, VHTLCContractHandler as e, type VHTLCContractParams as f, contractHandlers as g };