@lightsparkdev/lightspark-sdk 0.1.6

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 (223) hide show
  1. package/.fossa.yml +6 -0
  2. package/.prettierrc +1 -0
  3. package/.turbo/turbo-build.log +19 -0
  4. package/.turbo/turbo-lint.log +3 -0
  5. package/CHANGELOG.md +49 -0
  6. package/LICENSE +201 -0
  7. package/README.md +137 -0
  8. package/dist/Withdrawal-17e1c8af.d.ts +1672 -0
  9. package/dist/Withdrawal-27a4d10d.d.ts +1672 -0
  10. package/dist/chunk-3VRI7CHE.js +5508 -0
  11. package/dist/chunk-AGEUDR2V.js +4498 -0
  12. package/dist/chunk-N27QHRE4.js +5508 -0
  13. package/dist/client-3bba3f64.d.ts +1302 -0
  14. package/dist/index.cjs +6633 -0
  15. package/dist/index.d.ts +15 -0
  16. package/dist/index.js +1177 -0
  17. package/dist/objects/index.cjs +5347 -0
  18. package/dist/objects/index.d.ts +3 -0
  19. package/dist/objects/index.js +88 -0
  20. package/examples/node-scripts/authHelpers.ts +20 -0
  21. package/examples/node-scripts/createInvoice.ts +64 -0
  22. package/examples/node-scripts/example.ts +288 -0
  23. package/examples/node-scripts/getAccountDashboard.ts +24 -0
  24. package/examples/node-scripts/getNodeChannels.ts +34 -0
  25. package/examples/node-scripts/internalAuthHelpers.ts +26 -0
  26. package/examples/node-scripts/internal_example.ts +296 -0
  27. package/examples/node-scripts/package-lock.json +887 -0
  28. package/examples/node-scripts/package.json +22 -0
  29. package/examples/node-scripts/prettyPrintJsonForDocs.ts +62 -0
  30. package/examples/node-scripts/tsconfig.json +27 -0
  31. package/examples/oauth-example/README.md +19 -0
  32. package/examples/oauth-example/package-lock.json +16071 -0
  33. package/examples/oauth-example/package.json +50 -0
  34. package/examples/oauth-example/public/favicon.ico +0 -0
  35. package/examples/oauth-example/public/index.html +43 -0
  36. package/examples/oauth-example/public/logo192.png +0 -0
  37. package/examples/oauth-example/public/logo512.png +0 -0
  38. package/examples/oauth-example/public/manifest.json +25 -0
  39. package/examples/oauth-example/public/robots.txt +3 -0
  40. package/examples/oauth-example/src/App.css +7 -0
  41. package/examples/oauth-example/src/App.test.tsx +12 -0
  42. package/examples/oauth-example/src/App.tsx +16 -0
  43. package/examples/oauth-example/src/auth/AuthContext.ts +8 -0
  44. package/examples/oauth-example/src/auth/AuthProvider.tsx +44 -0
  45. package/examples/oauth-example/src/auth/RequireAuth.tsx +19 -0
  46. package/examples/oauth-example/src/auth/oauthProvider.ts +35 -0
  47. package/examples/oauth-example/src/components/Button.tsx +39 -0
  48. package/examples/oauth-example/src/components/CurrencyAmount.tsx +117 -0
  49. package/examples/oauth-example/src/components/Dashboard.tsx +158 -0
  50. package/examples/oauth-example/src/components/Table.tsx +22 -0
  51. package/examples/oauth-example/src/hooks/useAccountInfo.tsx +31 -0
  52. package/examples/oauth-example/src/icons/BitcoinB.tsx +20 -0
  53. package/examples/oauth-example/src/icons/Icon.tsx +121 -0
  54. package/examples/oauth-example/src/icons/Satoshi.tsx +28 -0
  55. package/examples/oauth-example/src/index.css +13 -0
  56. package/examples/oauth-example/src/index.tsx +23 -0
  57. package/examples/oauth-example/src/lightsparkclient/LightsparkClientContext.ts +10 -0
  58. package/examples/oauth-example/src/lightsparkclient/LightsparkClientProvider.tsx +53 -0
  59. package/examples/oauth-example/src/logo.svg +1 -0
  60. package/examples/oauth-example/src/pages/DashboardPage.tsx +71 -0
  61. package/examples/oauth-example/src/pages/LoginPage.tsx +63 -0
  62. package/examples/oauth-example/src/react-app-env.d.ts +1 -0
  63. package/examples/oauth-example/src/reportWebVitals.ts +15 -0
  64. package/examples/oauth-example/src/routes/index.tsx +15 -0
  65. package/examples/oauth-example/src/setupTests.ts +5 -0
  66. package/examples/oauth-example/src/utils/currency.ts +483 -0
  67. package/examples/oauth-example/tsconfig.json +20 -0
  68. package/examples/streaming-wallet-extension/.fossa.yml +6 -0
  69. package/examples/streaming-wallet-extension/README.md +17 -0
  70. package/examples/streaming-wallet-extension/craco.config.js +58 -0
  71. package/examples/streaming-wallet-extension/package-lock.json +18260 -0
  72. package/examples/streaming-wallet-extension/package.json +77 -0
  73. package/examples/streaming-wallet-extension/public/index.html +24 -0
  74. package/examples/streaming-wallet-extension/public/lightspark_full.png +0 -0
  75. package/examples/streaming-wallet-extension/public/lightspark_icon_circle.png +0 -0
  76. package/examples/streaming-wallet-extension/public/manifest.json +43 -0
  77. package/examples/streaming-wallet-extension/public/robots.txt +3 -0
  78. package/examples/streaming-wallet-extension/src/App.css +53 -0
  79. package/examples/streaming-wallet-extension/src/App.tsx +425 -0
  80. package/examples/streaming-wallet-extension/src/auth/AccountStorage.ts +28 -0
  81. package/examples/streaming-wallet-extension/src/auth/DemoAccountProvider.ts +99 -0
  82. package/examples/streaming-wallet-extension/src/auth/StreamingDemoCredentials.ts +10 -0
  83. package/examples/streaming-wallet-extension/src/background/PaymentStrategy.ts +36 -0
  84. package/examples/streaming-wallet-extension/src/background/PlaybackRange.ts +31 -0
  85. package/examples/streaming-wallet-extension/src/background/StreamingInvoiceHolder.ts +33 -0
  86. package/examples/streaming-wallet-extension/src/background/TransactionObserver.ts +66 -0
  87. package/examples/streaming-wallet-extension/src/background/VideoPlaybackRanges.ts +38 -0
  88. package/examples/streaming-wallet-extension/src/background/VideoProgressCache.ts +87 -0
  89. package/examples/streaming-wallet-extension/src/background/background.ts +145 -0
  90. package/examples/streaming-wallet-extension/src/background/messageHandling.ts +185 -0
  91. package/examples/streaming-wallet-extension/src/common/datetimes.ts +28 -0
  92. package/examples/streaming-wallet-extension/src/common/settings.ts +12 -0
  93. package/examples/streaming-wallet-extension/src/common/storage.ts +8 -0
  94. package/examples/streaming-wallet-extension/src/common/streamingTabs.ts +27 -0
  95. package/examples/streaming-wallet-extension/src/common/types.tsx +23 -0
  96. package/examples/streaming-wallet-extension/src/components/CirclePlusIcon.tsx +19 -0
  97. package/examples/streaming-wallet-extension/src/components/CurrencyAmount.tsx +110 -0
  98. package/examples/streaming-wallet-extension/src/components/CurrencyAmountRaw.tsx +195 -0
  99. package/examples/streaming-wallet-extension/src/components/LeftArrow.tsx +21 -0
  100. package/examples/streaming-wallet-extension/src/components/Loading.tsx +151 -0
  101. package/examples/streaming-wallet-extension/src/components/StreamingTransactionChip.tsx +95 -0
  102. package/examples/streaming-wallet-extension/src/components/TransactionRow.tsx +93 -0
  103. package/examples/streaming-wallet-extension/src/contentscript/content.ts +123 -0
  104. package/examples/streaming-wallet-extension/src/contentscript/lightsparkDemoDom.tsx +113 -0
  105. package/examples/streaming-wallet-extension/src/contentscript/videoElementParsers.ts +92 -0
  106. package/examples/streaming-wallet-extension/src/index.css +16 -0
  107. package/examples/streaming-wallet-extension/src/index.tsx +11 -0
  108. package/examples/streaming-wallet-extension/src/lightsparkClientProvider.tsx +26 -0
  109. package/examples/streaming-wallet-extension/src/react-app-env.d.ts +1 -0
  110. package/examples/streaming-wallet-extension/src/types/Messages.ts +17 -0
  111. package/examples/streaming-wallet-extension/tsconfig.json +20 -0
  112. package/package.json +87 -0
  113. package/src/auth/AccountTokenAuthProvider.ts +37 -0
  114. package/src/auth/index.ts +3 -0
  115. package/src/client.ts +759 -0
  116. package/src/graphql/BitcoinFeeEstimate.ts +13 -0
  117. package/src/graphql/CreateApiToken.ts +22 -0
  118. package/src/graphql/CreateInvoice.ts +18 -0
  119. package/src/graphql/CreateNodeWalletAddress.ts +13 -0
  120. package/src/graphql/CurrentAccount.ts +13 -0
  121. package/src/graphql/DecodeInvoice.ts +16 -0
  122. package/src/graphql/DeleteApiToken.ts +13 -0
  123. package/src/graphql/FundNode.ts +18 -0
  124. package/src/graphql/LightningFeeEstimateForInvoice.ts +21 -0
  125. package/src/graphql/LightningFeeEstimateForNode.ts +21 -0
  126. package/src/graphql/MultiNodeDashboard.ts +118 -0
  127. package/src/graphql/PayInvoice.ts +29 -0
  128. package/src/graphql/RecoverNodeSigningKey.ts +15 -0
  129. package/src/graphql/RequestWithdrawal.ts +25 -0
  130. package/src/graphql/SendPayment.ts +29 -0
  131. package/src/graphql/SingleNodeDashboard.ts +116 -0
  132. package/src/graphql/TransactionSubscription.ts +16 -0
  133. package/src/graphql/TransactionsForNode.ts +42 -0
  134. package/src/index.ts +5 -0
  135. package/src/objects/Account.ts +1222 -0
  136. package/src/objects/AccountToApiTokensConnection.ts +50 -0
  137. package/src/objects/AccountToChannelsConnection.ts +35 -0
  138. package/src/objects/AccountToNodesConnection.ts +62 -0
  139. package/src/objects/AccountToPaymentRequestsConnection.ts +50 -0
  140. package/src/objects/AccountToTransactionsConnection.ts +112 -0
  141. package/src/objects/ApiToken.ts +80 -0
  142. package/src/objects/BitcoinNetwork.ts +19 -0
  143. package/src/objects/BlockchainBalance.ts +102 -0
  144. package/src/objects/Channel.ts +283 -0
  145. package/src/objects/ChannelClosingTransaction.ts +150 -0
  146. package/src/objects/ChannelFees.ts +34 -0
  147. package/src/objects/ChannelOpeningTransaction.ts +150 -0
  148. package/src/objects/ChannelStatus.ts +25 -0
  149. package/src/objects/ChannelToTransactionsConnection.ts +86 -0
  150. package/src/objects/CreateApiTokenInput.ts +22 -0
  151. package/src/objects/CreateApiTokenOutput.ts +41 -0
  152. package/src/objects/CreateInvoiceInput.ts +27 -0
  153. package/src/objects/CreateInvoiceOutput.ts +21 -0
  154. package/src/objects/CreateNodeWalletAddressInput.ts +15 -0
  155. package/src/objects/CreateNodeWalletAddressOutput.ts +27 -0
  156. package/src/objects/CurrencyAmount.ts +55 -0
  157. package/src/objects/CurrencyUnit.ts +25 -0
  158. package/src/objects/DeleteApiTokenInput.ts +13 -0
  159. package/src/objects/DeleteApiTokenOutput.ts +23 -0
  160. package/src/objects/Deposit.ts +144 -0
  161. package/src/objects/Entity.ts +868 -0
  162. package/src/objects/FeeEstimate.ts +39 -0
  163. package/src/objects/FundNodeInput.ts +16 -0
  164. package/src/objects/FundNodeOutput.ts +28 -0
  165. package/src/objects/GraphNode.ts +110 -0
  166. package/src/objects/Hop.ts +108 -0
  167. package/src/objects/HtlcAttemptFailureCode.ts +65 -0
  168. package/src/objects/IncomingPayment.ts +141 -0
  169. package/src/objects/IncomingPaymentAttempt.ts +96 -0
  170. package/src/objects/IncomingPaymentAttemptStatus.ts +20 -0
  171. package/src/objects/IncomingPaymentToAttemptsConnection.ts +39 -0
  172. package/src/objects/Invoice.ts +226 -0
  173. package/src/objects/InvoiceData.ts +185 -0
  174. package/src/objects/InvoiceType.ts +15 -0
  175. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +28 -0
  176. package/src/objects/LightningFeeEstimateForNodeInput.ts +25 -0
  177. package/src/objects/LightningFeeEstimateOutput.ts +33 -0
  178. package/src/objects/LightningTransaction.ts +393 -0
  179. package/src/objects/LightsparkNode.ts +377 -0
  180. package/src/objects/LightsparkNodePurpose.ts +17 -0
  181. package/src/objects/LightsparkNodeStatus.ts +29 -0
  182. package/src/objects/LightsparkNodeToChannelsConnection.ts +50 -0
  183. package/src/objects/Node.ts +273 -0
  184. package/src/objects/NodeAddress.ts +29 -0
  185. package/src/objects/NodeAddressType.ts +18 -0
  186. package/src/objects/NodeToAddressesConnection.ts +39 -0
  187. package/src/objects/OnChainTransaction.ts +318 -0
  188. package/src/objects/OutgoingPayment.ts +319 -0
  189. package/src/objects/OutgoingPaymentAttempt.ts +164 -0
  190. package/src/objects/OutgoingPaymentAttemptStatus.ts +18 -0
  191. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +37 -0
  192. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +39 -0
  193. package/src/objects/PageInfo.ts +31 -0
  194. package/src/objects/PayInvoiceInput.ts +33 -0
  195. package/src/objects/PayInvoiceOutput.ts +22 -0
  196. package/src/objects/PaymentFailureReason.ts +29 -0
  197. package/src/objects/PaymentRequest.ts +231 -0
  198. package/src/objects/PaymentRequestData.ts +183 -0
  199. package/src/objects/PaymentRequestStatus.ts +15 -0
  200. package/src/objects/Permission.ts +39 -0
  201. package/src/objects/RequestWithdrawalInput.ts +35 -0
  202. package/src/objects/RequestWithdrawalOutput.ts +24 -0
  203. package/src/objects/RichText.ts +19 -0
  204. package/src/objects/RoutingTransaction.ts +150 -0
  205. package/src/objects/RoutingTransactionFailureReason.ts +17 -0
  206. package/src/objects/Secret.ts +23 -0
  207. package/src/objects/SendPaymentInput.ts +30 -0
  208. package/src/objects/SendPaymentOutput.ts +22 -0
  209. package/src/objects/Transaction.ts +609 -0
  210. package/src/objects/TransactionFailures.ts +23 -0
  211. package/src/objects/TransactionStatus.ts +23 -0
  212. package/src/objects/TransactionType.ts +31 -0
  213. package/src/objects/TransactionUpdate.ts +67 -0
  214. package/src/objects/WalletDashboard.ts +32 -0
  215. package/src/objects/WebhookEventType.ts +15 -0
  216. package/src/objects/Withdrawal.ts +144 -0
  217. package/src/objects/WithdrawalMode.ts +15 -0
  218. package/src/objects/WithdrawalRequest.ts +224 -0
  219. package/src/objects/WithdrawalRequestStatus.ts +17 -0
  220. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +57 -0
  221. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +57 -0
  222. package/src/objects/index.ts +108 -0
  223. package/tsconfig.json +5 -0
@@ -0,0 +1,150 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import { Query } from "@lightsparkdev/core";
4
+ import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
+ import Entity from "./Entity.js";
6
+ import LightningTransaction from "./LightningTransaction.js";
7
+ import RichText, { RichTextFromJson } from "./RichText.js";
8
+ import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js";
9
+ import Transaction from "./Transaction.js";
10
+ import TransactionStatus from "./TransactionStatus.js";
11
+
12
+ /** A transaction that was forwarded through a Lightspark node on the Lightning Network. **/
13
+ type RoutingTransaction = LightningTransaction &
14
+ Transaction &
15
+ Entity & {
16
+ /**
17
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
18
+ * string.
19
+ **/
20
+ id: string;
21
+
22
+ /** The date and time when this transaction was initiated. **/
23
+ createdAt: string;
24
+
25
+ /** The date and time when the entity was last updated. **/
26
+ updatedAt: string;
27
+
28
+ /** The current status of this transaction. **/
29
+ status: TransactionStatus;
30
+
31
+ /** The amount of money involved in this transaction. **/
32
+ amount: CurrencyAmount;
33
+
34
+ /** The typename of the object **/
35
+ typename: string;
36
+
37
+ /** The date and time when this transaction was completed or failed. **/
38
+ resolvedAt?: string;
39
+
40
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
41
+ transactionHash?: string;
42
+
43
+ /** If known, the channel this transaction was received from. **/
44
+ incomingChannelId?: string;
45
+
46
+ /** If known, the channel this transaction was forwarded to. **/
47
+ outgoingChannelId?: string;
48
+
49
+ /**
50
+ * The fees collected by the node when routing this transaction. We subtract the outgoing amount to
51
+ * the incoming amount to determine how much fees were collected.
52
+ **/
53
+ fees?: CurrencyAmount;
54
+
55
+ /** If applicable, user-facing error message describing why the routing failed. **/
56
+ failureMessage?: RichText;
57
+
58
+ /** If applicable, the reason why the routing failed. **/
59
+ failureReason?: RoutingTransactionFailureReason;
60
+ };
61
+
62
+ export const RoutingTransactionFromJson = (obj: any): RoutingTransaction => {
63
+ return {
64
+ id: obj["routing_transaction_id"],
65
+ createdAt: obj["routing_transaction_created_at"],
66
+ updatedAt: obj["routing_transaction_updated_at"],
67
+ status:
68
+ TransactionStatus[obj["routing_transaction_status"]] ??
69
+ TransactionStatus.FUTURE_VALUE,
70
+ amount: CurrencyAmountFromJson(obj["routing_transaction_amount"]),
71
+ typename: "RoutingTransaction",
72
+ resolvedAt: obj["routing_transaction_resolved_at"],
73
+ transactionHash: obj["routing_transaction_transaction_hash"],
74
+ incomingChannelId:
75
+ obj["routing_transaction_incoming_channel"]?.id ?? undefined,
76
+ outgoingChannelId:
77
+ obj["routing_transaction_outgoing_channel"]?.id ?? undefined,
78
+ fees: !!obj["routing_transaction_fees"]
79
+ ? CurrencyAmountFromJson(obj["routing_transaction_fees"])
80
+ : undefined,
81
+ failureMessage: !!obj["routing_transaction_failure_message"]
82
+ ? RichTextFromJson(obj["routing_transaction_failure_message"])
83
+ : undefined,
84
+ failureReason: !!obj["routing_transaction_failure_reason"]
85
+ ? RoutingTransactionFailureReason[
86
+ obj["routing_transaction_failure_reason"]
87
+ ] ?? RoutingTransactionFailureReason.FUTURE_VALUE
88
+ : null,
89
+ } as RoutingTransaction;
90
+ };
91
+
92
+ export const FRAGMENT = `
93
+ fragment RoutingTransactionFragment on RoutingTransaction {
94
+ __typename
95
+ routing_transaction_id: id
96
+ routing_transaction_created_at: created_at
97
+ routing_transaction_updated_at: updated_at
98
+ routing_transaction_status: status
99
+ routing_transaction_resolved_at: resolved_at
100
+ routing_transaction_amount: amount {
101
+ __typename
102
+ currency_amount_original_value: original_value
103
+ currency_amount_original_unit: original_unit
104
+ currency_amount_preferred_currency_unit: preferred_currency_unit
105
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
106
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
107
+ }
108
+ routing_transaction_transaction_hash: transaction_hash
109
+ routing_transaction_incoming_channel: incoming_channel {
110
+ id
111
+ }
112
+ routing_transaction_outgoing_channel: outgoing_channel {
113
+ id
114
+ }
115
+ routing_transaction_fees: fees {
116
+ __typename
117
+ currency_amount_original_value: original_value
118
+ currency_amount_original_unit: original_unit
119
+ currency_amount_preferred_currency_unit: preferred_currency_unit
120
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
121
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
122
+ }
123
+ routing_transaction_failure_message: failure_message {
124
+ __typename
125
+ rich_text_text: text
126
+ }
127
+ routing_transaction_failure_reason: failure_reason
128
+ }`;
129
+
130
+ export const getRoutingTransactionQuery = (
131
+ id: string
132
+ ): Query<RoutingTransaction> => {
133
+ return {
134
+ queryPayload: `
135
+ query GetRoutingTransaction($id: ID!) {
136
+ entity(id: $id) {
137
+ ... on RoutingTransaction {
138
+ ...RoutingTransactionFragment
139
+ }
140
+ }
141
+ }
142
+
143
+ ${FRAGMENT}
144
+ `,
145
+ variables: { id },
146
+ constructObject: (data: any) => RoutingTransactionFromJson(data.entity),
147
+ };
148
+ };
149
+
150
+ export default RoutingTransaction;
@@ -0,0 +1,17 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ export enum RoutingTransactionFailureReason {
4
+ /**
5
+ * This is an enum value that represents values that could be added in the future.
6
+ * Clients should support unknown values as more of them could be added without notice.
7
+ */
8
+ FUTURE_VALUE = "FUTURE_VALUE",
9
+
10
+ INCOMING_LINK_FAILURE = "INCOMING_LINK_FAILURE",
11
+
12
+ OUTGOING_LINK_FAILURE = "OUTGOING_LINK_FAILURE",
13
+
14
+ FORWARDING_FAILURE = "FORWARDING_FAILURE",
15
+ }
16
+
17
+ export default RoutingTransactionFailureReason;
@@ -0,0 +1,23 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type Secret = {
4
+ encryptedValue: string;
5
+
6
+ cipher: string;
7
+ };
8
+
9
+ export const SecretFromJson = (obj: any): Secret => {
10
+ return {
11
+ encryptedValue: obj["secret_encrypted_value"],
12
+ cipher: obj["secret_cipher"],
13
+ } as Secret;
14
+ };
15
+
16
+ export const FRAGMENT = `
17
+ fragment SecretFragment on Secret {
18
+ __typename
19
+ secret_encrypted_value: encrypted_value
20
+ secret_cipher: cipher
21
+ }`;
22
+
23
+ export default Secret;
@@ -0,0 +1,30 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type SendPaymentInput = {
4
+ /** The node from where you want to send the payment. **/
5
+ nodeId: string;
6
+
7
+ /** The public key of the destination node. **/
8
+ destinationPublicKey: string;
9
+
10
+ /** The timeout in seconds that we will try to make the payment. **/
11
+ timeoutSecs: number;
12
+
13
+ /** The amount you will send to the destination node, expressed in msats. **/
14
+ amountMsats: number;
15
+
16
+ /** The maximum amount of fees that you want to pay for this payment to be sent, expressed in msats. **/
17
+ maximumFeesMsats: number;
18
+ };
19
+
20
+ export const SendPaymentInputFromJson = (obj: any): SendPaymentInput => {
21
+ return {
22
+ nodeId: obj["send_payment_input_node_id"],
23
+ destinationPublicKey: obj["send_payment_input_destination_public_key"],
24
+ timeoutSecs: obj["send_payment_input_timeout_secs"],
25
+ amountMsats: obj["send_payment_input_amount_msats"],
26
+ maximumFeesMsats: obj["send_payment_input_maximum_fees_msats"],
27
+ } as SendPaymentInput;
28
+ };
29
+
30
+ export default SendPaymentInput;
@@ -0,0 +1,22 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type SendPaymentOutput = {
4
+ /** The payment that has been sent. **/
5
+ paymentId: string;
6
+ };
7
+
8
+ export const SendPaymentOutputFromJson = (obj: any): SendPaymentOutput => {
9
+ return {
10
+ paymentId: obj["send_payment_output_payment"].id,
11
+ } as SendPaymentOutput;
12
+ };
13
+
14
+ export const FRAGMENT = `
15
+ fragment SendPaymentOutputFragment on SendPaymentOutput {
16
+ __typename
17
+ send_payment_output_payment: payment {
18
+ id
19
+ }
20
+ }`;
21
+
22
+ export default SendPaymentOutput;