@buildonspark/spark-sdk 0.5.0 → 0.5.1

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 (81) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/bare/index.cjs +1608 -3635
  3. package/dist/bare/index.d.cts +27 -435
  4. package/dist/bare/index.d.ts +27 -435
  5. package/dist/bare/index.js +1608 -3634
  6. package/dist/{chunk-RU434ZAE.js → chunk-F3BFSHVR.js} +357 -391
  7. package/dist/{chunk-UYEB2VPG.js → chunk-IOIEBLMK.js} +7 -1
  8. package/dist/{chunk-EU3I7GFB.js → chunk-STB6WMU7.js} +1 -1
  9. package/dist/{chunk-JE3MXMPW.js → chunk-UTECVGQQ.js} +93 -202
  10. package/dist/{chunk-ZP6Z6DFX.js → chunk-YFVVYZCS.js} +37 -5
  11. package/dist/{client-D1dLzWu0.d.ts → client-C9kc4cog.d.cts} +9 -3
  12. package/dist/{client-CVn0R_eM.d.cts → client-eyjf4knu.d.ts} +9 -3
  13. package/dist/graphql/objects/index.cjs +7 -1
  14. package/dist/graphql/objects/index.d.cts +3 -3
  15. package/dist/graphql/objects/index.d.ts +3 -3
  16. package/dist/graphql/objects/index.js +1 -1
  17. package/dist/index.browser.d.ts +27 -435
  18. package/dist/index.browser.js +1613 -3639
  19. package/dist/index.node.cjs +1613 -3640
  20. package/dist/index.node.d.cts +7 -8
  21. package/dist/index.node.d.ts +7 -8
  22. package/dist/index.node.js +5 -7
  23. package/dist/native/index.react-native.cjs +1613 -3640
  24. package/dist/native/index.react-native.d.cts +27 -435
  25. package/dist/native/index.react-native.d.ts +27 -435
  26. package/dist/native/index.react-native.js +1613 -3639
  27. package/dist/proto/spark.cjs +93 -202
  28. package/dist/proto/spark.d.cts +1 -1
  29. package/dist/proto/spark.d.ts +1 -1
  30. package/dist/proto/spark.js +1 -1
  31. package/dist/proto/spark_token.cjs +36 -4
  32. package/dist/proto/spark_token.d.cts +4 -1
  33. package/dist/proto/spark_token.d.ts +4 -1
  34. package/dist/proto/spark_token.js +2 -2
  35. package/dist/{spark-2Fxnvl8K.d.cts → spark-d6w3BLGZ.d.cts} +10 -328
  36. package/dist/{spark-2Fxnvl8K.d.ts → spark-d6w3BLGZ.d.ts} +10 -328
  37. package/dist/{spark-wallet.node-DlhZiDgY.d.ts → spark-wallet.node-MReThHBY.d.ts} +6 -7
  38. package/dist/{spark-wallet.node-xKJXzAEd.d.cts → spark-wallet.node-eR0svGws.d.cts} +6 -7
  39. package/dist/tests/test-utils.cjs +409 -2429
  40. package/dist/tests/test-utils.d.cts +3 -3
  41. package/dist/tests/test-utils.d.ts +3 -3
  42. package/dist/tests/test-utils.js +5 -5
  43. package/dist/types/index.cjs +100 -203
  44. package/dist/types/index.d.cts +2 -2
  45. package/dist/types/index.d.ts +2 -2
  46. package/dist/types/index.js +3 -3
  47. package/package.json +3 -3
  48. package/src/graphql/client.ts +36 -1
  49. package/src/graphql/objects/LightningSendRequestStatus.ts +25 -13
  50. package/src/proto/common.ts +1 -1
  51. package/src/proto/google/protobuf/descriptor.ts +1 -1
  52. package/src/proto/google/protobuf/duration.ts +1 -1
  53. package/src/proto/google/protobuf/empty.ts +1 -1
  54. package/src/proto/google/protobuf/timestamp.ts +1 -1
  55. package/src/proto/mock.ts +1 -1
  56. package/src/proto/spark.ts +113 -446
  57. package/src/proto/spark_authn.ts +1 -1
  58. package/src/proto/spark_token.ts +41 -2
  59. package/src/proto/validate/validate.ts +1 -1
  60. package/src/services/connection/connection.ts +23 -60
  61. package/src/services/coop-exit.ts +3 -5
  62. package/src/services/deposit.ts +1 -1
  63. package/src/services/lightning.ts +1 -1
  64. package/src/services/signing.ts +5 -6
  65. package/src/services/transfer.ts +250 -240
  66. package/src/services/wallet-config.ts +22 -5
  67. package/src/spark-wallet/proto-descriptors.ts +1 -1
  68. package/src/spark-wallet/proto-reflection.ts +0 -2
  69. package/src/spark-wallet/spark-wallet.ts +2 -2
  70. package/src/spark_descriptors.pb +0 -0
  71. package/src/tests/bufbuild-reflection.test.ts +2 -3
  72. package/src/tests/integration/coop-exit.test.ts +6 -1
  73. package/src/tests/integration/htlc.test.ts +5 -0
  74. package/src/tests/integration/lightning.test.ts +24 -4
  75. package/src/tests/integration/time-sync.test.ts +18 -0
  76. package/src/tests/integration/transfer.test.ts +42 -7
  77. package/src/tests/ssp-client-retry.test.ts +161 -0
  78. package/src/tests/token-hashing.test.ts +92 -0
  79. package/src/utils/token-hashing.ts +4 -51
  80. package/src/utils/transaction.ts +1 -2
  81. package/src/utils/unilateral-exit.ts +139 -142
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @buildonspark/spark-sdk
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - **Retry gateway errors**
8
+ - Retry on 502, 503, 504 errors as these can temporarily occur when the service is autoscaling
9
+ - Includes exponential backoff with a max of 5 retries and a base delay of 1000ms
10
+
11
+ **Direct refund transactions**
12
+ - Do not construct the directRefundTx if the node timelock is 0
13
+
14
+ **Lightning**
15
+ - Added missing lightning send status
16
+
17
+ **Token transaction v3**
18
+ - Default to token transaction v3
19
+
20
+ **Query token transcations**
21
+ - Lower the default page size to 50
22
+
23
+ **Miscellaneous tweaks**
24
+ - Remove unused proof map in claim transfer flow
25
+ - Only derive the public key once when signing
26
+ - Update sats transfer flows to use Promise.all instead of looping through sequentially
27
+ - Update grpc HTTP/2 header parsing
28
+
3
29
  ## 0.5.0
4
30
 
5
31
  ### Minor Changes