@buildonspark/spark-sdk 0.0.7 → 0.0.9

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 (107) hide show
  1. package/dist/LightningSendRequest-CNJFhLVc.d.cts +374 -0
  2. package/dist/LightningSendRequest-CNJFhLVc.d.ts +374 -0
  3. package/dist/auto-bind.d.ts +7 -0
  4. package/dist/auto-bind.js +41 -0
  5. package/dist/auto-bind.js.map +1 -0
  6. package/dist/chunk-5SAJ52IV.js +10309 -0
  7. package/dist/chunk-COXVABEU.js +1524 -0
  8. package/dist/chunk-F4JW24C4.js +78 -0
  9. package/dist/chunk-H4A2WXR3.js +331 -0
  10. package/dist/chunk-HTNOFUHX.js +1547 -0
  11. package/dist/chunk-JQFHUW4I.js +21 -0
  12. package/dist/chunk-K3Y7DVLD.js +19 -0
  13. package/dist/chunk-NDKNVHGP.js +127 -0
  14. package/dist/chunk-PMVJGQCP.js +627 -0
  15. package/dist/chunk-QX3ZJH2S.js +527 -0
  16. package/dist/chunk-SL2YOBVM.js +127 -0
  17. package/dist/chunk-SWCOMKD6.js +333 -0
  18. package/dist/chunk-SWFFNBSR.js +1244 -0
  19. package/dist/chunk-WLK5POBV.js +527 -0
  20. package/dist/chunk-WZ74TD7N.js +660 -0
  21. package/dist/chunk-WZYVI3M3.js +1244 -0
  22. package/dist/chunk-ZGU3XW7W.js +78 -0
  23. package/dist/connection-BgWj7Hnd.d.cts +77 -0
  24. package/dist/connection-BgbVJtzh.d.ts +77 -0
  25. package/dist/connection-DX-9yFl8.d.ts +77 -0
  26. package/dist/connection-hITj9Mgk.d.cts +77 -0
  27. package/dist/graphql/objects/index.cjs +626 -0
  28. package/dist/graphql/objects/index.d.cts +140 -0
  29. package/dist/index.cjs +17202 -0
  30. package/dist/index.d.cts +413 -0
  31. package/dist/index.d.ts +413 -0
  32. package/dist/index.js +3390 -0
  33. package/dist/proto/spark.cjs +10451 -0
  34. package/dist/proto/spark.d.cts +3 -0
  35. package/dist/services/config.d.ts +2 -0
  36. package/dist/services/config.js +5 -0
  37. package/dist/services/config.js.map +1 -1
  38. package/dist/services/connection.d.ts +2 -1
  39. package/dist/services/connection.js +25 -13
  40. package/dist/services/connection.js.map +1 -1
  41. package/dist/services/index.cjs +12503 -0
  42. package/dist/services/index.d.cts +23 -0
  43. package/dist/services/index.d.ts +23 -0
  44. package/dist/services/index.js +17 -0
  45. package/dist/services/lightning.js +16 -4
  46. package/dist/services/lightning.js.map +1 -1
  47. package/dist/services/lrc20.d.ts +5 -0
  48. package/dist/services/lrc20.js +27 -0
  49. package/dist/services/lrc20.js.map +1 -0
  50. package/dist/services/token-transactions.js +27 -3
  51. package/dist/services/token-transactions.js.map +1 -1
  52. package/dist/services/transfer.d.ts +1 -0
  53. package/dist/services/transfer.js +109 -3
  54. package/dist/services/transfer.js.map +1 -1
  55. package/dist/services/tree-creation.d.ts +0 -1
  56. package/dist/services/tree-creation.js +4 -9
  57. package/dist/services/tree-creation.js.map +1 -1
  58. package/dist/signer/signer.cjs +894 -0
  59. package/dist/signer/signer.d.cts +5 -0
  60. package/dist/signer/signer.d.ts +2 -0
  61. package/dist/signer/signer.js +9 -3
  62. package/dist/signer/signer.js.map +1 -1
  63. package/dist/signer-BaC_ZP1g.d.ts +138 -0
  64. package/dist/signer-C6h1OnSQ.d.cts +138 -0
  65. package/dist/signer-CO4owhHI.d.ts +154 -0
  66. package/dist/signer-DDkpXvNZ.d.cts +154 -0
  67. package/dist/spark-BUTdOtMz.d.cts +1170 -0
  68. package/dist/spark-BUTdOtMz.d.ts +1170 -0
  69. package/dist/spark-sdk.d.ts +25 -18
  70. package/dist/spark-sdk.js +257 -142
  71. package/dist/spark-sdk.js.map +1 -1
  72. package/dist/tests/adaptor-signature.test.js +1 -2
  73. package/dist/tests/adaptor-signature.test.js.map +1 -1
  74. package/dist/tests/coop-exit.test.js.map +1 -1
  75. package/dist/tests/lightning.test.js.map +1 -1
  76. package/dist/tests/test-util.cjs +12269 -0
  77. package/dist/tests/test-util.d.cts +90 -0
  78. package/dist/tests/test-util.d.ts +19 -0
  79. package/dist/tests/test-util.js +19 -0
  80. package/dist/tests/test-util.js.map +1 -1
  81. package/dist/tests/transfer.test.js.map +1 -1
  82. package/dist/types/grpc.d.ts +6 -0
  83. package/dist/types/grpc.js +2 -0
  84. package/dist/types/grpc.js.map +1 -0
  85. package/dist/utils/index.cjs +1825 -0
  86. package/dist/utils/index.d.cts +280 -0
  87. package/dist/utils/keys.d.ts +2 -0
  88. package/dist/utils/keys.js +4 -0
  89. package/dist/utils/keys.js.map +1 -1
  90. package/dist/utils/network.d.ts +17 -0
  91. package/dist/utils/network.js +16 -0
  92. package/dist/utils/network.js.map +1 -1
  93. package/dist/utils/response-validation.js.map +1 -1
  94. package/dist/utils/token-hashing.js +1 -2
  95. package/dist/utils/token-hashing.js.map +1 -1
  96. package/dist/utils/transaction.d.ts +3 -5
  97. package/dist/utils/transaction.js +14 -16
  98. package/dist/utils/transaction.js.map +1 -1
  99. package/dist/utils/wasm-wrapper.js +4 -4
  100. package/dist/utils/wasm-wrapper.js.map +1 -1
  101. package/dist/wasm/spark_bindings.js +7 -3
  102. package/dist/wasm/spark_bindings.js.map +1 -1
  103. package/dist/wasm/spark_bindings_bg.wasm +0 -0
  104. package/package.json +14 -2
  105. package/dist/tests/jest.setup.d.ts +0 -1
  106. package/dist/tests/jest.setup.js +0 -8
  107. package/dist/tests/jest.setup.js.map +0 -1
@@ -0,0 +1,140 @@
1
+ import { P as PageInfo, C as CurrencyAmount, B as BitcoinNetwork } from '../../LightningSendRequest-CNJFhLVc.cjs';
2
+ export { a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimateInput, d as CoopExitFeeEstimateOutput, e as CoopExitRequest, f as CurrencyUnit, I as Invoice, L as Leaf, i as LeavesSwapRequest, j as LightningReceiveFeeEstimateOutput, l as LightningReceiveRequest, m as LightningReceiveRequestStatus, n as LightningSendFeeEstimateOutput, p as LightningSendRequest, q as LightningSendRequestStatus, R as RequestCoopExitInput, r as RequestLeavesSwapInput, s as RequestLightningReceiveInput, t as RequestLightningSendInput, S as SparkCoopExitRequestStatus, u as SparkLeavesSwapRequestStatus, v as SparkTransferToLeavesConnection, w as SwapLeaf, T as Transfer, U as UserLeafInput, g as getCoopExitRequestQuery, h as getLeavesSwapRequestQuery, k as getLightningReceiveRequestQuery, o as getLightningSendRequestQuery } from '../../LightningSendRequest-CNJFhLVc.cjs';
3
+ import { Query } from '@lightsparkdev/core';
4
+
5
+ interface CompleteCoopExitOutput {
6
+ requestId: string;
7
+ }
8
+
9
+ interface CompleteLeavesSwapOutput {
10
+ requestId: string;
11
+ }
12
+
13
+ interface CompleteSeedReleaseInput {
14
+ phoneNumber: string;
15
+ code: string;
16
+ }
17
+
18
+ interface CompleteSeedReleaseOutput {
19
+ seed: string;
20
+ }
21
+
22
+ interface Connection {
23
+ /**
24
+ * The total count of objects in this connection, using the current filters. It is different from the
25
+ * number of objects returned in the current page (in the `entities` field).
26
+ **/
27
+ count: number;
28
+ /** An object that holds pagination information about the objects in this connection. **/
29
+ pageInfo: PageInfo;
30
+ /** The typename of the object **/
31
+ typename: string;
32
+ }
33
+
34
+ /** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
35
+ interface Entity {
36
+ /**
37
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
38
+ * string.
39
+ **/
40
+ id: string;
41
+ /** The date and time when the entity was first created. **/
42
+ createdAt: string;
43
+ /** The date and time when the entity was last updated. **/
44
+ updatedAt: string;
45
+ /** The typename of the object **/
46
+ typename: string;
47
+ }
48
+
49
+ interface GetChallengeInput {
50
+ publicKey: string;
51
+ }
52
+
53
+ interface GetChallengeOutput {
54
+ protectedChallenge: string;
55
+ }
56
+
57
+ interface LeavesSwapFeeEstimateInput {
58
+ totalAmountSats: number;
59
+ }
60
+
61
+ interface LeavesSwapFeeEstimateOutput {
62
+ feeEstimate: CurrencyAmount;
63
+ }
64
+
65
+ interface LightningReceiveFeeEstimateInput {
66
+ network: BitcoinNetwork;
67
+ amountSats: number;
68
+ }
69
+
70
+ interface LightningSendFeeEstimateInput {
71
+ encodedInvoice: string;
72
+ }
73
+
74
+ interface NotifyReceiverTransferInput {
75
+ phoneNumber: string;
76
+ amountSats: number;
77
+ }
78
+
79
+ interface Provider {
80
+ accountId: string;
81
+ jwt: string;
82
+ }
83
+
84
+ interface RequestCoopExitOutput {
85
+ requestId: string;
86
+ }
87
+
88
+ interface RequestLeavesSwapOutput {
89
+ requestId: string;
90
+ }
91
+
92
+ interface RequestLightningReceiveOutput {
93
+ requestId: string;
94
+ }
95
+
96
+ interface RequestLightningSendOutput {
97
+ requestId: string;
98
+ }
99
+
100
+ interface SparkWalletUser {
101
+ /**
102
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
103
+ * string.
104
+ **/
105
+ id: string;
106
+ /** The date and time when the entity was first created. **/
107
+ createdAt: string;
108
+ /** The date and time when the entity was last updated. **/
109
+ updatedAt: string;
110
+ /** The identity public key of the user. **/
111
+ identityPublicKey: string;
112
+ /** The typename of the object **/
113
+ typename: string;
114
+ }
115
+ declare const getSparkWalletUserQuery: (id: string) => Query<SparkWalletUser>;
116
+
117
+ interface StartSeedReleaseInput {
118
+ phoneNumber: string;
119
+ }
120
+
121
+ interface VerifyChallengeInput {
122
+ protectedChallenge: string;
123
+ signature: string;
124
+ identityPublicKey: string;
125
+ provider?: Provider | undefined;
126
+ }
127
+
128
+ interface VerifyChallengeOutput {
129
+ validUntil: string;
130
+ }
131
+
132
+ interface WalletUserIdentityPublicKeyInput {
133
+ phoneNumber: string;
134
+ }
135
+
136
+ interface WalletUserIdentityPublicKeyOutput {
137
+ identityPublicKey: string;
138
+ }
139
+
140
+ export { BitcoinNetwork, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, CurrencyAmount, type Entity, type GetChallengeInput, type GetChallengeOutput, type LeavesSwapFeeEstimateInput, type LeavesSwapFeeEstimateOutput, type LightningReceiveFeeEstimateInput, type LightningSendFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, type SparkWalletUser, type StartSeedReleaseInput, type VerifyChallengeInput, type VerifyChallengeOutput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getSparkWalletUserQuery };