@buildonspark/spark-sdk 0.1.41 → 0.1.43
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.
- package/CHANGELOG.md +15 -0
- package/android/src/main/jniLibs/arm64-v8a/libuniffi_spark_frost.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libuniffi_spark_frost.so +0 -0
- package/android/src/main/jniLibs/x86/libuniffi_spark_frost.so +0 -0
- package/android/src/main/jniLibs/x86_64/libuniffi_spark_frost.so +0 -0
- package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.cts +10 -0
- package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.ts +10 -0
- package/dist/{RequestLightningSendInput-mXUWn_cp.d.ts → RequestLightningSendInput-D7fZdT4A.d.ts} +35 -16
- package/dist/{RequestLightningSendInput-DXcLoiCe.d.cts → RequestLightningSendInput-Na1mHdWg.d.cts} +35 -16
- package/dist/address/index.cjs +38 -7
- package/dist/address/index.d.cts +2 -2
- package/dist/address/index.d.ts +2 -2
- package/dist/address/index.js +3 -3
- package/dist/{chunk-ATEHMLKP.js → chunk-6AFUC5M2.js} +1 -1
- package/dist/{chunk-ZXDE2XMU.js → chunk-BUTZWYBW.js} +9 -6
- package/dist/{chunk-7EFSUADA.js → chunk-DOA6QXYQ.js} +1 -0
- package/dist/{chunk-J5W5Q2ZP.js → chunk-DQYKQJRZ.js} +291 -7
- package/dist/{chunk-TWF35O6M.js → chunk-GSI4OLXZ.js} +32 -1
- package/dist/{chunk-2ZXXLPG2.js → chunk-GYQR4B4P.js} +5 -4
- package/dist/{chunk-ROKY5KS4.js → chunk-HRQRRDSS.js} +53 -15
- package/dist/{chunk-YEZDPUFY.js → chunk-IRW5TWMH.js} +8 -8
- package/dist/{chunk-7VMYMQLF.js → chunk-NSJF5F5O.js} +1 -1
- package/dist/{chunk-TM4TOEOX.js → chunk-O4RYNJNB.js} +3 -3
- package/dist/{chunk-MGPRLH6Q.js → chunk-QNNSEJ4P.js} +1 -1
- package/dist/{chunk-UKT6OFLO.js → chunk-TIUBYNN5.js} +13 -7
- package/dist/{chunk-6YVPOQ2A.js → chunk-TOSP3INR.js} +235 -143
- package/dist/chunk-VFJQNBFX.js +21 -0
- package/dist/{chunk-KKSU7OZO.js → chunk-WWOTVNPP.js} +195 -67
- package/dist/{chunk-HK6LPV6Z.js → chunk-Z5HIAYFT.js} +1 -1
- package/dist/graphql/objects/index.cjs +229 -135
- package/dist/graphql/objects/index.d.cts +54 -9
- package/dist/graphql/objects/index.d.ts +54 -9
- package/dist/graphql/objects/index.js +3 -3
- package/dist/{index-OSDtPMmC.d.ts → index-7RYRH5wc.d.ts} +10 -8
- package/dist/{index-CFh4uWzi.d.cts → index-BJOc8Ur-.d.cts} +10 -8
- package/dist/index.cjs +790 -315
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +26 -26
- package/dist/index.node.cjs +790 -315
- package/dist/index.node.d.cts +9 -8
- package/dist/index.node.d.ts +9 -8
- package/dist/index.node.js +26 -26
- package/dist/native/index.cjs +812 -332
- package/dist/native/index.d.cts +53 -18
- package/dist/native/index.d.ts +53 -18
- package/dist/native/index.js +659 -181
- package/dist/{network-BiwBmoOg.d.cts → network-D5lKssVl.d.cts} +1 -1
- package/dist/{network-BF2GYPye.d.ts → network-xkBSpaTn.d.ts} +1 -1
- package/dist/proto/lrc20.d.cts +1 -1
- package/dist/proto/lrc20.d.ts +1 -1
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark_token.d.cts +1 -1
- package/dist/proto/spark_token.d.ts +1 -1
- package/dist/{sdk-types-CfhdFnsA.d.cts → sdk-types-B-q9py_P.d.cts} +1 -1
- package/dist/{sdk-types-MnQrHolg.d.ts → sdk-types-BPoPgzda.d.ts} +1 -1
- package/dist/services/config.cjs +118 -69
- package/dist/services/config.d.cts +6 -4
- package/dist/services/config.d.ts +6 -4
- package/dist/services/config.js +9 -9
- package/dist/services/connection.cjs +95 -15
- package/dist/services/connection.d.cts +6 -4
- package/dist/services/connection.d.ts +6 -4
- package/dist/services/connection.js +3 -3
- package/dist/services/index.cjs +487 -117
- package/dist/services/index.d.cts +5 -4
- package/dist/services/index.d.ts +5 -4
- package/dist/services/index.js +19 -19
- package/dist/services/lrc-connection.cjs +50 -7
- package/dist/services/lrc-connection.d.cts +5 -4
- package/dist/services/lrc-connection.d.ts +5 -4
- package/dist/services/lrc-connection.js +3 -3
- package/dist/services/token-transactions.cjs +351 -36
- package/dist/services/token-transactions.d.cts +5 -4
- package/dist/services/token-transactions.d.ts +5 -4
- package/dist/services/token-transactions.js +6 -6
- package/dist/services/wallet-config.cjs +1 -0
- package/dist/services/wallet-config.d.cts +6 -4
- package/dist/services/wallet-config.d.ts +6 -4
- package/dist/services/wallet-config.js +1 -1
- package/dist/signer/signer.cjs +117 -64
- package/dist/signer/signer.d.cts +4 -3
- package/dist/signer/signer.d.ts +4 -3
- package/dist/signer/signer.js +15 -7
- package/dist/{signer-CylxIujU.d.ts → signer-IO3oMRNj.d.cts} +2 -1
- package/dist/{signer-BhLS7SYR.d.cts → signer-wqesWifN.d.ts} +2 -1
- package/dist/{spark-DjR1b3TC.d.cts → spark-CDm4gqS6.d.cts} +1 -1
- package/dist/{spark-DjR1b3TC.d.ts → spark-CDm4gqS6.d.ts} +1 -1
- package/dist/types/index.cjs +282 -188
- package/dist/types/index.d.cts +7 -6
- package/dist/types/index.d.ts +7 -6
- package/dist/types/index.js +3 -3
- package/dist/utils/index.cjs +90 -58
- package/dist/utils/index.d.cts +6 -5
- package/dist/utils/index.d.ts +6 -5
- package/dist/utils/index.js +16 -16
- package/ios/spark_frostFFI.xcframework/ios-arm64/SparkFrost +0 -0
- package/ios/spark_frostFFI.xcframework/ios-arm64/spark_frostFFI.framework/spark_frostFFI +0 -0
- package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/SparkFrost +0 -0
- package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/spark_frostFFI.framework/spark_frostFFI +0 -0
- package/ios/spark_frostFFI.xcframework/macos-arm64_x86_64/spark_frostFFI.framework/spark_frostFFI +0 -0
- package/package.json +4 -4
- package/src/constants.ts +21 -0
- package/src/errors/base.ts +43 -1
- package/src/graphql/client.ts +4 -0
- package/src/graphql/mutations/RequestLightningSend.ts +2 -0
- package/src/graphql/objects/ClaimStaticDepositInput.ts +1 -1
- package/src/graphql/objects/ClaimStaticDepositStatus.ts +4 -2
- package/src/graphql/objects/Connection.ts +7 -7
- package/src/graphql/objects/CoopExitFeeEstimate.ts +1 -1
- package/src/graphql/objects/CoopExitFeeQuote.ts +202 -0
- package/src/graphql/objects/CoopExitFeeQuoteInput.ts +41 -0
- package/src/graphql/objects/CoopExitFeeQuoteOutput.ts +45 -0
- package/src/graphql/objects/CoopExitRequest.ts +21 -0
- package/src/graphql/objects/CurrencyUnit.ts +26 -28
- package/src/graphql/objects/Entity.ts +84 -0
- package/src/graphql/objects/Invoice.ts +2 -2
- package/src/graphql/objects/Leaf.ts +1 -1
- package/src/graphql/objects/LeavesSwapFeeEstimateOutput.ts +1 -1
- package/src/graphql/objects/LeavesSwapRequest.ts +6 -0
- package/src/graphql/objects/LightningReceiveRequest.ts +11 -0
- package/src/graphql/objects/LightningSendFeeEstimateInput.ts +8 -0
- package/src/graphql/objects/LightningSendFeeEstimateOutput.ts +1 -1
- package/src/graphql/objects/LightningSendRequest.ts +3 -0
- package/src/graphql/objects/RequestCoopExitInput.ts +8 -0
- package/src/graphql/objects/RequestLeavesSwapInput.ts +5 -1
- package/src/graphql/objects/RequestLightningReceiveInput.ts +9 -2
- package/src/graphql/objects/RequestLightningSendInput.ts +8 -0
- package/src/graphql/objects/SparkCoopExitRequestStatus.ts +2 -0
- package/src/graphql/objects/SparkUserRequestType.ts +2 -0
- package/src/graphql/objects/SparkWalletUser.ts +20 -0
- package/src/graphql/objects/UserRequest.ts +32 -0
- package/src/graphql/objects/VerifyChallengeInput.ts +1 -1
- package/src/graphql/objects/index.ts +12 -3
- package/src/graphql/queries/LightningSendFeeEstimate.ts +2 -0
- package/src/logger.ts +3 -0
- package/src/native/index.ts +1 -0
- package/src/services/config.ts +4 -0
- package/src/services/connection.ts +68 -29
- package/src/services/coop-exit.ts +1 -1
- package/src/services/lightning.ts +25 -1
- package/src/services/lrc-connection.ts +3 -3
- package/src/services/token-transactions.ts +6 -2
- package/src/services/wallet-config.ts +2 -0
- package/src/signer/signer.ts +4 -1
- package/src/spark-wallet/spark-wallet.ts +51 -15
- package/src/spark-wallet/types.ts +1 -0
- package/src/tests/errors.test.ts +58 -0
- package/src/tests/integration/lightning.test.ts +184 -0
- package/src/tests/integration/ssp/static_deposit.test.ts +1 -2
- package/src/tests/tokens.test.ts +52 -3
- package/src/utils/token-hashing.ts +335 -1
- package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.cts +0 -5
- package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.ts +0 -5
- package/dist/chunk-HKAKEKCE.js +0 -8
|
@@ -34,7 +34,7 @@ __export(objects_exports, {
|
|
|
34
34
|
SparkWalletUser: () => SparkWalletUser_default,
|
|
35
35
|
Transfer: () => Transfer_default,
|
|
36
36
|
getClaimStaticDepositQuery: () => getClaimStaticDepositQuery,
|
|
37
|
-
|
|
37
|
+
getCoopExitFeeQuoteQuery: () => getCoopExitFeeQuoteQuery,
|
|
38
38
|
getLeavesSwapRequestQuery: () => getLeavesSwapRequestQuery,
|
|
39
39
|
getLightningReceiveRequestQuery: () => getLightningReceiveRequestQuery,
|
|
40
40
|
getLightningSendRequestQuery: () => getLightningSendRequestQuery,
|
|
@@ -79,8 +79,9 @@ var ClaimStaticDepositStatus = /* @__PURE__ */ ((ClaimStaticDepositStatus2) => {
|
|
|
79
79
|
ClaimStaticDepositStatus2["REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED"] = "REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED";
|
|
80
80
|
ClaimStaticDepositStatus2["REFUND_SIGNING_FAILED"] = "REFUND_SIGNING_FAILED";
|
|
81
81
|
ClaimStaticDepositStatus2["UTXO_SWAPPING_FAILED"] = "UTXO_SWAPPING_FAILED";
|
|
82
|
-
ClaimStaticDepositStatus2["TRANSFER_FAILED"] = "TRANSFER_FAILED";
|
|
83
82
|
ClaimStaticDepositStatus2["TRANSFER_COMPLETED"] = "TRANSFER_COMPLETED";
|
|
83
|
+
ClaimStaticDepositStatus2["SPEND_TX_CREATED"] = "SPEND_TX_CREATED";
|
|
84
|
+
ClaimStaticDepositStatus2["SPEND_TX_BROADCAST"] = "SPEND_TX_BROADCAST";
|
|
84
85
|
return ClaimStaticDepositStatus2;
|
|
85
86
|
})(ClaimStaticDepositStatus || {});
|
|
86
87
|
var ClaimStaticDepositStatus_default = ClaimStaticDepositStatus;
|
|
@@ -197,22 +198,158 @@ var ClaimStaticDepositRequestType = /* @__PURE__ */ ((ClaimStaticDepositRequestT
|
|
|
197
198
|
})(ClaimStaticDepositRequestType || {});
|
|
198
199
|
var ClaimStaticDepositRequestType_default = ClaimStaticDepositRequestType;
|
|
199
200
|
|
|
200
|
-
// src/graphql/objects/
|
|
201
|
+
// src/graphql/objects/CoopExitFeeQuote.ts
|
|
201
202
|
var import_core2 = require("@lightsparkdev/core");
|
|
203
|
+
var CoopExitFeeQuoteFromJson = (obj) => {
|
|
204
|
+
return {
|
|
205
|
+
id: obj["coop_exit_fee_quote_id"],
|
|
206
|
+
createdAt: obj["coop_exit_fee_quote_created_at"],
|
|
207
|
+
updatedAt: obj["coop_exit_fee_quote_updated_at"],
|
|
208
|
+
network: BitcoinNetwork_default[obj["coop_exit_fee_quote_network"]] ?? BitcoinNetwork_default.FUTURE_VALUE,
|
|
209
|
+
totalAmount: CurrencyAmountFromJson(
|
|
210
|
+
obj["coop_exit_fee_quote_total_amount"]
|
|
211
|
+
),
|
|
212
|
+
userFeeFast: CurrencyAmountFromJson(
|
|
213
|
+
obj["coop_exit_fee_quote_user_fee_fast"]
|
|
214
|
+
),
|
|
215
|
+
userFeeMedium: CurrencyAmountFromJson(
|
|
216
|
+
obj["coop_exit_fee_quote_user_fee_medium"]
|
|
217
|
+
),
|
|
218
|
+
userFeeSlow: CurrencyAmountFromJson(
|
|
219
|
+
obj["coop_exit_fee_quote_user_fee_slow"]
|
|
220
|
+
),
|
|
221
|
+
l1BroadcastFeeFast: CurrencyAmountFromJson(
|
|
222
|
+
obj["coop_exit_fee_quote_l1_broadcast_fee_fast"]
|
|
223
|
+
),
|
|
224
|
+
l1BroadcastFeeMedium: CurrencyAmountFromJson(
|
|
225
|
+
obj["coop_exit_fee_quote_l1_broadcast_fee_medium"]
|
|
226
|
+
),
|
|
227
|
+
l1BroadcastFeeSlow: CurrencyAmountFromJson(
|
|
228
|
+
obj["coop_exit_fee_quote_l1_broadcast_fee_slow"]
|
|
229
|
+
),
|
|
230
|
+
expiresAt: obj["coop_exit_fee_quote_expires_at"],
|
|
231
|
+
typename: "CoopExitFeeQuote"
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
var FRAGMENT2 = `
|
|
235
|
+
fragment CoopExitFeeQuoteFragment on CoopExitFeeQuote {
|
|
236
|
+
__typename
|
|
237
|
+
coop_exit_fee_quote_id: id
|
|
238
|
+
coop_exit_fee_quote_created_at: created_at
|
|
239
|
+
coop_exit_fee_quote_updated_at: updated_at
|
|
240
|
+
coop_exit_fee_quote_network: network
|
|
241
|
+
coop_exit_fee_quote_total_amount: total_amount {
|
|
242
|
+
__typename
|
|
243
|
+
currency_amount_original_value: original_value
|
|
244
|
+
currency_amount_original_unit: original_unit
|
|
245
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
246
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
247
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
248
|
+
}
|
|
249
|
+
coop_exit_fee_quote_user_fee_fast: user_fee_fast {
|
|
250
|
+
__typename
|
|
251
|
+
currency_amount_original_value: original_value
|
|
252
|
+
currency_amount_original_unit: original_unit
|
|
253
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
254
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
255
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
256
|
+
}
|
|
257
|
+
coop_exit_fee_quote_user_fee_medium: user_fee_medium {
|
|
258
|
+
__typename
|
|
259
|
+
currency_amount_original_value: original_value
|
|
260
|
+
currency_amount_original_unit: original_unit
|
|
261
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
262
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
263
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
264
|
+
}
|
|
265
|
+
coop_exit_fee_quote_user_fee_slow: user_fee_slow {
|
|
266
|
+
__typename
|
|
267
|
+
currency_amount_original_value: original_value
|
|
268
|
+
currency_amount_original_unit: original_unit
|
|
269
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
270
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
271
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
272
|
+
}
|
|
273
|
+
coop_exit_fee_quote_l1_broadcast_fee_fast: l1_broadcast_fee_fast {
|
|
274
|
+
__typename
|
|
275
|
+
currency_amount_original_value: original_value
|
|
276
|
+
currency_amount_original_unit: original_unit
|
|
277
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
278
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
279
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
280
|
+
}
|
|
281
|
+
coop_exit_fee_quote_l1_broadcast_fee_medium: l1_broadcast_fee_medium {
|
|
282
|
+
__typename
|
|
283
|
+
currency_amount_original_value: original_value
|
|
284
|
+
currency_amount_original_unit: original_unit
|
|
285
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
286
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
287
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
288
|
+
}
|
|
289
|
+
coop_exit_fee_quote_l1_broadcast_fee_slow: l1_broadcast_fee_slow {
|
|
290
|
+
__typename
|
|
291
|
+
currency_amount_original_value: original_value
|
|
292
|
+
currency_amount_original_unit: original_unit
|
|
293
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
294
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
295
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
296
|
+
}
|
|
297
|
+
coop_exit_fee_quote_expires_at: expires_at
|
|
298
|
+
}`;
|
|
299
|
+
var getCoopExitFeeQuoteQuery = (id) => {
|
|
300
|
+
return {
|
|
301
|
+
queryPayload: `
|
|
302
|
+
query GetCoopExitFeeQuote($id: ID!) {
|
|
303
|
+
entity(id: $id) {
|
|
304
|
+
... on CoopExitFeeQuote {
|
|
305
|
+
...CoopExitFeeQuoteFragment
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
202
309
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
310
|
+
${FRAGMENT2}
|
|
311
|
+
`,
|
|
312
|
+
variables: { id },
|
|
313
|
+
constructObject: (data) => (0, import_core2.isObject)(data) && "entity" in data && (0, import_core2.isObject)(data.entity) ? CoopExitFeeQuoteFromJson(data.entity) : null
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// src/graphql/objects/ExitSpeed.ts
|
|
318
|
+
var ExitSpeed = /* @__PURE__ */ ((ExitSpeed2) => {
|
|
319
|
+
ExitSpeed2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
320
|
+
ExitSpeed2["FAST"] = "FAST";
|
|
321
|
+
ExitSpeed2["MEDIUM"] = "MEDIUM";
|
|
322
|
+
ExitSpeed2["SLOW"] = "SLOW";
|
|
323
|
+
return ExitSpeed2;
|
|
324
|
+
})(ExitSpeed || {});
|
|
325
|
+
var ExitSpeed_default = ExitSpeed;
|
|
326
|
+
|
|
327
|
+
// src/graphql/objects/LeavesSwapRequest.ts
|
|
328
|
+
var import_core3 = require("@lightsparkdev/core");
|
|
329
|
+
|
|
330
|
+
// src/graphql/objects/SparkLeavesSwapRequestStatus.ts
|
|
331
|
+
var SparkLeavesSwapRequestStatus = /* @__PURE__ */ ((SparkLeavesSwapRequestStatus2) => {
|
|
332
|
+
SparkLeavesSwapRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
333
|
+
SparkLeavesSwapRequestStatus2["CREATED"] = "CREATED";
|
|
334
|
+
SparkLeavesSwapRequestStatus2["INITIATED"] = "INITIATED";
|
|
335
|
+
SparkLeavesSwapRequestStatus2["LEAVES_LOCKED"] = "LEAVES_LOCKED";
|
|
336
|
+
SparkLeavesSwapRequestStatus2["REFUND_TX_ADAPTOR_SIGNED"] = "REFUND_TX_ADAPTOR_SIGNED";
|
|
337
|
+
SparkLeavesSwapRequestStatus2["INBOUND_TRANSFER_CLAIMED"] = "INBOUND_TRANSFER_CLAIMED";
|
|
338
|
+
SparkLeavesSwapRequestStatus2["SUCCEEDED"] = "SUCCEEDED";
|
|
339
|
+
SparkLeavesSwapRequestStatus2["EXPIRED"] = "EXPIRED";
|
|
340
|
+
SparkLeavesSwapRequestStatus2["FAILED"] = "FAILED";
|
|
341
|
+
return SparkLeavesSwapRequestStatus2;
|
|
342
|
+
})(SparkLeavesSwapRequestStatus || {});
|
|
343
|
+
var SparkLeavesSwapRequestStatus_default = SparkLeavesSwapRequestStatus;
|
|
344
|
+
|
|
345
|
+
// src/graphql/objects/SwapLeaf.ts
|
|
346
|
+
var SwapLeafFromJson = (obj) => {
|
|
347
|
+
return {
|
|
348
|
+
leafId: obj["swap_leaf_leaf_id"],
|
|
349
|
+
rawUnsignedRefundTransaction: obj["swap_leaf_raw_unsigned_refund_transaction"],
|
|
350
|
+
adaptorSignedSignature: obj["swap_leaf_adaptor_signed_signature"]
|
|
351
|
+
};
|
|
352
|
+
};
|
|
216
353
|
|
|
217
354
|
// src/auto-bind.ts
|
|
218
355
|
function getAllProperties(object) {
|
|
@@ -347,122 +484,6 @@ var TransferFromJson = (obj) => {
|
|
|
347
484
|
};
|
|
348
485
|
var Transfer_default = Transfer;
|
|
349
486
|
|
|
350
|
-
// src/graphql/objects/CoopExitRequest.ts
|
|
351
|
-
var CoopExitRequestFromJson = (obj) => {
|
|
352
|
-
return {
|
|
353
|
-
id: obj["coop_exit_request_id"],
|
|
354
|
-
createdAt: obj["coop_exit_request_created_at"],
|
|
355
|
-
updatedAt: obj["coop_exit_request_updated_at"],
|
|
356
|
-
network: BitcoinNetwork_default[obj["coop_exit_request_network"]] ?? BitcoinNetwork_default.FUTURE_VALUE,
|
|
357
|
-
fee: CurrencyAmountFromJson(obj["coop_exit_request_fee"]),
|
|
358
|
-
l1BroadcastFee: CurrencyAmountFromJson(
|
|
359
|
-
obj["coop_exit_request_l1_broadcast_fee"]
|
|
360
|
-
),
|
|
361
|
-
status: SparkCoopExitRequestStatus_default[obj["coop_exit_request_status"]] ?? SparkCoopExitRequestStatus_default.FUTURE_VALUE,
|
|
362
|
-
expiresAt: obj["coop_exit_request_expires_at"],
|
|
363
|
-
rawConnectorTransaction: obj["coop_exit_request_raw_connector_transaction"],
|
|
364
|
-
rawCoopExitTransaction: obj["coop_exit_request_raw_coop_exit_transaction"],
|
|
365
|
-
coopExitTxid: obj["coop_exit_request_coop_exit_txid"],
|
|
366
|
-
typename: "CoopExitRequest",
|
|
367
|
-
transfer: !!obj["coop_exit_request_transfer"] ? TransferFromJson(obj["coop_exit_request_transfer"]) : void 0
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
var FRAGMENT2 = `
|
|
371
|
-
fragment CoopExitRequestFragment on CoopExitRequest {
|
|
372
|
-
__typename
|
|
373
|
-
coop_exit_request_id: id
|
|
374
|
-
coop_exit_request_created_at: created_at
|
|
375
|
-
coop_exit_request_updated_at: updated_at
|
|
376
|
-
coop_exit_request_network: network
|
|
377
|
-
coop_exit_request_fee: fee {
|
|
378
|
-
__typename
|
|
379
|
-
currency_amount_original_value: original_value
|
|
380
|
-
currency_amount_original_unit: original_unit
|
|
381
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
382
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
383
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
384
|
-
}
|
|
385
|
-
coop_exit_request_l1_broadcast_fee: l1_broadcast_fee {
|
|
386
|
-
__typename
|
|
387
|
-
currency_amount_original_value: original_value
|
|
388
|
-
currency_amount_original_unit: original_unit
|
|
389
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
390
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
391
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
392
|
-
}
|
|
393
|
-
coop_exit_request_status: status
|
|
394
|
-
coop_exit_request_expires_at: expires_at
|
|
395
|
-
coop_exit_request_raw_connector_transaction: raw_connector_transaction
|
|
396
|
-
coop_exit_request_raw_coop_exit_transaction: raw_coop_exit_transaction
|
|
397
|
-
coop_exit_request_coop_exit_txid: coop_exit_txid
|
|
398
|
-
coop_exit_request_transfer: transfer {
|
|
399
|
-
__typename
|
|
400
|
-
transfer_total_amount: total_amount {
|
|
401
|
-
__typename
|
|
402
|
-
currency_amount_original_value: original_value
|
|
403
|
-
currency_amount_original_unit: original_unit
|
|
404
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
405
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
406
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
407
|
-
}
|
|
408
|
-
transfer_spark_id: spark_id
|
|
409
|
-
}
|
|
410
|
-
}`;
|
|
411
|
-
var getCoopExitRequestQuery = (id) => {
|
|
412
|
-
return {
|
|
413
|
-
queryPayload: `
|
|
414
|
-
query GetCoopExitRequest($id: ID!) {
|
|
415
|
-
entity(id: $id) {
|
|
416
|
-
... on CoopExitRequest {
|
|
417
|
-
...CoopExitRequestFragment
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
${FRAGMENT2}
|
|
423
|
-
`,
|
|
424
|
-
variables: { id },
|
|
425
|
-
constructObject: (data) => (0, import_core2.isObject)(data) && "entity" in data && (0, import_core2.isObject)(data.entity) ? CoopExitRequestFromJson(data.entity) : null
|
|
426
|
-
};
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
// src/graphql/objects/ExitSpeed.ts
|
|
430
|
-
var ExitSpeed = /* @__PURE__ */ ((ExitSpeed2) => {
|
|
431
|
-
ExitSpeed2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
432
|
-
ExitSpeed2["FAST"] = "FAST";
|
|
433
|
-
ExitSpeed2["MEDIUM"] = "MEDIUM";
|
|
434
|
-
ExitSpeed2["SLOW"] = "SLOW";
|
|
435
|
-
return ExitSpeed2;
|
|
436
|
-
})(ExitSpeed || {});
|
|
437
|
-
var ExitSpeed_default = ExitSpeed;
|
|
438
|
-
|
|
439
|
-
// src/graphql/objects/LeavesSwapRequest.ts
|
|
440
|
-
var import_core3 = require("@lightsparkdev/core");
|
|
441
|
-
|
|
442
|
-
// src/graphql/objects/SparkLeavesSwapRequestStatus.ts
|
|
443
|
-
var SparkLeavesSwapRequestStatus = /* @__PURE__ */ ((SparkLeavesSwapRequestStatus2) => {
|
|
444
|
-
SparkLeavesSwapRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
445
|
-
SparkLeavesSwapRequestStatus2["CREATED"] = "CREATED";
|
|
446
|
-
SparkLeavesSwapRequestStatus2["INITIATED"] = "INITIATED";
|
|
447
|
-
SparkLeavesSwapRequestStatus2["LEAVES_LOCKED"] = "LEAVES_LOCKED";
|
|
448
|
-
SparkLeavesSwapRequestStatus2["REFUND_TX_ADAPTOR_SIGNED"] = "REFUND_TX_ADAPTOR_SIGNED";
|
|
449
|
-
SparkLeavesSwapRequestStatus2["INBOUND_TRANSFER_CLAIMED"] = "INBOUND_TRANSFER_CLAIMED";
|
|
450
|
-
SparkLeavesSwapRequestStatus2["SUCCEEDED"] = "SUCCEEDED";
|
|
451
|
-
SparkLeavesSwapRequestStatus2["EXPIRED"] = "EXPIRED";
|
|
452
|
-
SparkLeavesSwapRequestStatus2["FAILED"] = "FAILED";
|
|
453
|
-
return SparkLeavesSwapRequestStatus2;
|
|
454
|
-
})(SparkLeavesSwapRequestStatus || {});
|
|
455
|
-
var SparkLeavesSwapRequestStatus_default = SparkLeavesSwapRequestStatus;
|
|
456
|
-
|
|
457
|
-
// src/graphql/objects/SwapLeaf.ts
|
|
458
|
-
var SwapLeafFromJson = (obj) => {
|
|
459
|
-
return {
|
|
460
|
-
leafId: obj["swap_leaf_leaf_id"],
|
|
461
|
-
rawUnsignedRefundTransaction: obj["swap_leaf_raw_unsigned_refund_transaction"],
|
|
462
|
-
adaptorSignedSignature: obj["swap_leaf_adaptor_signed_signature"]
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
|
|
466
487
|
// src/graphql/objects/LeavesSwapRequest.ts
|
|
467
488
|
var LeavesSwapRequestFromJson = (obj) => {
|
|
468
489
|
return {
|
|
@@ -532,6 +553,9 @@ fragment LeavesSwapRequestFragment on LeavesSwapRequest {
|
|
|
532
553
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
533
554
|
}
|
|
534
555
|
transfer_spark_id: spark_id
|
|
556
|
+
transfer_user_request: user_request {
|
|
557
|
+
id
|
|
558
|
+
}
|
|
535
559
|
}
|
|
536
560
|
leaves_swap_request_outbound_transfer: outbound_transfer {
|
|
537
561
|
__typename
|
|
@@ -544,6 +568,9 @@ fragment LeavesSwapRequestFragment on LeavesSwapRequest {
|
|
|
544
568
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
545
569
|
}
|
|
546
570
|
transfer_spark_id: spark_id
|
|
571
|
+
transfer_user_request: user_request {
|
|
572
|
+
id
|
|
573
|
+
}
|
|
547
574
|
}
|
|
548
575
|
leaves_swap_request_expires_at: expires_at
|
|
549
576
|
leaves_swap_request_swap_leaves: swap_leaves {
|
|
@@ -615,7 +642,8 @@ var LightningReceiveRequestFromJson = (obj) => {
|
|
|
615
642
|
status: LightningReceiveRequestStatus_default[obj["lightning_receive_request_status"]] ?? LightningReceiveRequestStatus_default.FUTURE_VALUE,
|
|
616
643
|
typename: "LightningReceiveRequest",
|
|
617
644
|
transfer: !!obj["lightning_receive_request_transfer"] ? TransferFromJson(obj["lightning_receive_request_transfer"]) : void 0,
|
|
618
|
-
paymentPreimage: obj["lightning_receive_request_payment_preimage"]
|
|
645
|
+
paymentPreimage: obj["lightning_receive_request_payment_preimage"],
|
|
646
|
+
receiverIdentityPublicKey: obj["lightning_receive_request_receiver_identity_public_key"]
|
|
619
647
|
};
|
|
620
648
|
};
|
|
621
649
|
var FRAGMENT4 = `
|
|
@@ -654,8 +682,12 @@ fragment LightningReceiveRequestFragment on LightningReceiveRequest {
|
|
|
654
682
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
655
683
|
}
|
|
656
684
|
transfer_spark_id: spark_id
|
|
685
|
+
transfer_user_request: user_request {
|
|
686
|
+
id
|
|
687
|
+
}
|
|
657
688
|
}
|
|
658
689
|
lightning_receive_request_payment_preimage: payment_preimage
|
|
690
|
+
lightning_receive_request_receiver_identity_public_key: receiver_identity_public_key
|
|
659
691
|
}`;
|
|
660
692
|
var getLightningReceiveRequestQuery = (id) => {
|
|
661
693
|
return {
|
|
@@ -737,6 +769,9 @@ fragment LightningSendRequestFragment on LightningSendRequest {
|
|
|
737
769
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
738
770
|
}
|
|
739
771
|
transfer_spark_id: spark_id
|
|
772
|
+
transfer_user_request: user_request {
|
|
773
|
+
id
|
|
774
|
+
}
|
|
740
775
|
}
|
|
741
776
|
lightning_send_request_payment_preimage: payment_preimage
|
|
742
777
|
}`;
|
|
@@ -758,6 +793,21 @@ ${FRAGMENT5}
|
|
|
758
793
|
};
|
|
759
794
|
};
|
|
760
795
|
|
|
796
|
+
// src/graphql/objects/SparkCoopExitRequestStatus.ts
|
|
797
|
+
var SparkCoopExitRequestStatus = /* @__PURE__ */ ((SparkCoopExitRequestStatus2) => {
|
|
798
|
+
SparkCoopExitRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
799
|
+
SparkCoopExitRequestStatus2["INITIATED"] = "INITIATED";
|
|
800
|
+
SparkCoopExitRequestStatus2["INBOUND_TRANSFER_CHECKED"] = "INBOUND_TRANSFER_CHECKED";
|
|
801
|
+
SparkCoopExitRequestStatus2["TX_SIGNED"] = "TX_SIGNED";
|
|
802
|
+
SparkCoopExitRequestStatus2["TX_BROADCASTED"] = "TX_BROADCASTED";
|
|
803
|
+
SparkCoopExitRequestStatus2["WAITING_ON_TX_CONFIRMATIONS"] = "WAITING_ON_TX_CONFIRMATIONS";
|
|
804
|
+
SparkCoopExitRequestStatus2["SUCCEEDED"] = "SUCCEEDED";
|
|
805
|
+
SparkCoopExitRequestStatus2["EXPIRED"] = "EXPIRED";
|
|
806
|
+
SparkCoopExitRequestStatus2["FAILED"] = "FAILED";
|
|
807
|
+
return SparkCoopExitRequestStatus2;
|
|
808
|
+
})(SparkCoopExitRequestStatus || {});
|
|
809
|
+
var SparkCoopExitRequestStatus_default = SparkCoopExitRequestStatus;
|
|
810
|
+
|
|
761
811
|
// src/graphql/objects/SparkUserRequestStatus.ts
|
|
762
812
|
var SparkUserRequestStatus = /* @__PURE__ */ ((SparkUserRequestStatus2) => {
|
|
763
813
|
SparkUserRequestStatus2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
@@ -778,6 +828,7 @@ var SparkUserRequestType = /* @__PURE__ */ ((SparkUserRequestType2) => {
|
|
|
778
828
|
SparkUserRequestType2["LIGHTNING_RECEIVE"] = "LIGHTNING_RECEIVE";
|
|
779
829
|
SparkUserRequestType2["COOP_EXIT"] = "COOP_EXIT";
|
|
780
830
|
SparkUserRequestType2["LEAVES_SWAP"] = "LEAVES_SWAP";
|
|
831
|
+
SparkUserRequestType2["CLAIM_STATIC_DEPOSIT"] = "CLAIM_STATIC_DEPOSIT";
|
|
781
832
|
return SparkUserRequestType2;
|
|
782
833
|
})(SparkUserRequestType || {});
|
|
783
834
|
var SparkUserRequestType_default = SparkUserRequestType;
|
|
@@ -822,6 +873,8 @@ var UserRequestFromJson = (obj) => {
|
|
|
822
873
|
rawCoopExitTransaction: obj["coop_exit_request_raw_coop_exit_transaction"],
|
|
823
874
|
coopExitTxid: obj["coop_exit_request_coop_exit_txid"],
|
|
824
875
|
typename: "CoopExitRequest",
|
|
876
|
+
feeQuoteId: obj["coop_exit_request_fee_quote"]?.id ?? void 0,
|
|
877
|
+
exitSpeed: !!obj["coop_exit_request_exit_speed"] ? ExitSpeed_default[obj["coop_exit_request_exit_speed"]] ?? ExitSpeed_default.FUTURE_VALUE : null,
|
|
825
878
|
transfer: !!obj["coop_exit_request_transfer"] ? TransferFromJson(obj["coop_exit_request_transfer"]) : void 0
|
|
826
879
|
};
|
|
827
880
|
}
|
|
@@ -860,7 +913,8 @@ var UserRequestFromJson = (obj) => {
|
|
|
860
913
|
status: LightningReceiveRequestStatus_default[obj["lightning_receive_request_status"]] ?? LightningReceiveRequestStatus_default.FUTURE_VALUE,
|
|
861
914
|
typename: "LightningReceiveRequest",
|
|
862
915
|
transfer: !!obj["lightning_receive_request_transfer"] ? TransferFromJson(obj["lightning_receive_request_transfer"]) : void 0,
|
|
863
|
-
paymentPreimage: obj["lightning_receive_request_payment_preimage"]
|
|
916
|
+
paymentPreimage: obj["lightning_receive_request_payment_preimage"],
|
|
917
|
+
receiverIdentityPublicKey: obj["lightning_receive_request_receiver_identity_public_key"]
|
|
864
918
|
};
|
|
865
919
|
}
|
|
866
920
|
if (obj["__typename"] == "LightningSendRequest") {
|
|
@@ -936,6 +990,10 @@ fragment UserRequestFragment on UserRequest {
|
|
|
936
990
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
937
991
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
938
992
|
}
|
|
993
|
+
coop_exit_request_fee_quote: fee_quote {
|
|
994
|
+
id
|
|
995
|
+
}
|
|
996
|
+
coop_exit_request_exit_speed: exit_speed
|
|
939
997
|
coop_exit_request_status: status
|
|
940
998
|
coop_exit_request_expires_at: expires_at
|
|
941
999
|
coop_exit_request_raw_connector_transaction: raw_connector_transaction
|
|
@@ -952,6 +1010,9 @@ fragment UserRequestFragment on UserRequest {
|
|
|
952
1010
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
953
1011
|
}
|
|
954
1012
|
transfer_spark_id: spark_id
|
|
1013
|
+
transfer_user_request: user_request {
|
|
1014
|
+
id
|
|
1015
|
+
}
|
|
955
1016
|
}
|
|
956
1017
|
}
|
|
957
1018
|
... on LeavesSwapRequest {
|
|
@@ -996,6 +1057,9 @@ fragment UserRequestFragment on UserRequest {
|
|
|
996
1057
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
997
1058
|
}
|
|
998
1059
|
transfer_spark_id: spark_id
|
|
1060
|
+
transfer_user_request: user_request {
|
|
1061
|
+
id
|
|
1062
|
+
}
|
|
999
1063
|
}
|
|
1000
1064
|
leaves_swap_request_outbound_transfer: outbound_transfer {
|
|
1001
1065
|
__typename
|
|
@@ -1008,6 +1072,9 @@ fragment UserRequestFragment on UserRequest {
|
|
|
1008
1072
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1009
1073
|
}
|
|
1010
1074
|
transfer_spark_id: spark_id
|
|
1075
|
+
transfer_user_request: user_request {
|
|
1076
|
+
id
|
|
1077
|
+
}
|
|
1011
1078
|
}
|
|
1012
1079
|
leaves_swap_request_expires_at: expires_at
|
|
1013
1080
|
leaves_swap_request_swap_leaves: swap_leaves {
|
|
@@ -1052,8 +1119,12 @@ fragment UserRequestFragment on UserRequest {
|
|
|
1052
1119
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1053
1120
|
}
|
|
1054
1121
|
transfer_spark_id: spark_id
|
|
1122
|
+
transfer_user_request: user_request {
|
|
1123
|
+
id
|
|
1124
|
+
}
|
|
1055
1125
|
}
|
|
1056
1126
|
lightning_receive_request_payment_preimage: payment_preimage
|
|
1127
|
+
lightning_receive_request_receiver_identity_public_key: receiver_identity_public_key
|
|
1057
1128
|
}
|
|
1058
1129
|
... on LightningSendRequest {
|
|
1059
1130
|
__typename
|
|
@@ -1083,6 +1154,9 @@ fragment UserRequestFragment on UserRequest {
|
|
|
1083
1154
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1084
1155
|
}
|
|
1085
1156
|
transfer_spark_id: spark_id
|
|
1157
|
+
transfer_user_request: user_request {
|
|
1158
|
+
id
|
|
1159
|
+
}
|
|
1086
1160
|
}
|
|
1087
1161
|
lightning_send_request_payment_preimage: payment_preimage
|
|
1088
1162
|
}
|
|
@@ -1197,6 +1271,10 @@ query FetchSparkWalletUserToUserRequestsConnection($entity_id: ID!, $first: Int,
|
|
|
1197
1271
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
1198
1272
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1199
1273
|
}
|
|
1274
|
+
coop_exit_request_fee_quote: fee_quote {
|
|
1275
|
+
id
|
|
1276
|
+
}
|
|
1277
|
+
coop_exit_request_exit_speed: exit_speed
|
|
1200
1278
|
coop_exit_request_status: status
|
|
1201
1279
|
coop_exit_request_expires_at: expires_at
|
|
1202
1280
|
coop_exit_request_raw_connector_transaction: raw_connector_transaction
|
|
@@ -1213,6 +1291,9 @@ query FetchSparkWalletUserToUserRequestsConnection($entity_id: ID!, $first: Int,
|
|
|
1213
1291
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1214
1292
|
}
|
|
1215
1293
|
transfer_spark_id: spark_id
|
|
1294
|
+
transfer_user_request: user_request {
|
|
1295
|
+
id
|
|
1296
|
+
}
|
|
1216
1297
|
}
|
|
1217
1298
|
}
|
|
1218
1299
|
... on LeavesSwapRequest {
|
|
@@ -1257,6 +1338,9 @@ query FetchSparkWalletUserToUserRequestsConnection($entity_id: ID!, $first: Int,
|
|
|
1257
1338
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1258
1339
|
}
|
|
1259
1340
|
transfer_spark_id: spark_id
|
|
1341
|
+
transfer_user_request: user_request {
|
|
1342
|
+
id
|
|
1343
|
+
}
|
|
1260
1344
|
}
|
|
1261
1345
|
leaves_swap_request_outbound_transfer: outbound_transfer {
|
|
1262
1346
|
__typename
|
|
@@ -1269,6 +1353,9 @@ query FetchSparkWalletUserToUserRequestsConnection($entity_id: ID!, $first: Int,
|
|
|
1269
1353
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1270
1354
|
}
|
|
1271
1355
|
transfer_spark_id: spark_id
|
|
1356
|
+
transfer_user_request: user_request {
|
|
1357
|
+
id
|
|
1358
|
+
}
|
|
1272
1359
|
}
|
|
1273
1360
|
leaves_swap_request_expires_at: expires_at
|
|
1274
1361
|
leaves_swap_request_swap_leaves: swap_leaves {
|
|
@@ -1313,8 +1400,12 @@ query FetchSparkWalletUserToUserRequestsConnection($entity_id: ID!, $first: Int,
|
|
|
1313
1400
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1314
1401
|
}
|
|
1315
1402
|
transfer_spark_id: spark_id
|
|
1403
|
+
transfer_user_request: user_request {
|
|
1404
|
+
id
|
|
1405
|
+
}
|
|
1316
1406
|
}
|
|
1317
1407
|
lightning_receive_request_payment_preimage: payment_preimage
|
|
1408
|
+
lightning_receive_request_receiver_identity_public_key: receiver_identity_public_key
|
|
1318
1409
|
}
|
|
1319
1410
|
... on LightningSendRequest {
|
|
1320
1411
|
__typename
|
|
@@ -1344,6 +1435,9 @@ query FetchSparkWalletUserToUserRequestsConnection($entity_id: ID!, $first: Int,
|
|
|
1344
1435
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
1345
1436
|
}
|
|
1346
1437
|
transfer_spark_id: spark_id
|
|
1438
|
+
transfer_user_request: user_request {
|
|
1439
|
+
id
|
|
1440
|
+
}
|
|
1347
1441
|
}
|
|
1348
1442
|
lightning_send_request_payment_preimage: payment_preimage
|
|
1349
1443
|
}
|
|
@@ -1428,7 +1522,7 @@ var SparkWalletUser_default = SparkWalletUser;
|
|
|
1428
1522
|
SparkWalletUser,
|
|
1429
1523
|
Transfer,
|
|
1430
1524
|
getClaimStaticDepositQuery,
|
|
1431
|
-
|
|
1525
|
+
getCoopExitFeeQuoteQuery,
|
|
1432
1526
|
getLeavesSwapRequestQuery,
|
|
1433
1527
|
getLightningReceiveRequestQuery,
|
|
1434
1528
|
getLightningSendRequestQuery,
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { B as BitcoinNetwork } from '../../BitcoinNetwork-TnABML0T.cjs';
|
|
2
2
|
import { Query } from '@lightsparkdev/core';
|
|
3
|
-
import { h as CurrencyAmount, P as PageInfo, D as SspClient } from '../../RequestLightningSendInput-
|
|
4
|
-
export { C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitRequest, i as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, j as LeavesSwapFeeEstimateOutput, l as LeavesSwapRequest, n as LightningReceiveRequest, o as LightningReceiveRequestStatus, p as LightningSendFeeEstimateOutput, r as LightningSendRequest, s as LightningSendRequestStatus, R as RequestCoopExitInput, t as RequestLeavesSwapInput, u as RequestLightningReceiveInput, v as RequestLightningSendInput, S as SparkCoopExitRequestStatus, w as SparkLeavesSwapRequestStatus, x as SparkTransferToLeavesConnection, y as StaticDepositQuoteInput, z as StaticDepositQuoteOutput, A as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitRequestQuery, k as getLeavesSwapRequestQuery, m as getLightningReceiveRequestQuery, q as getLightningSendRequestQuery } from '../../RequestLightningSendInput-
|
|
5
|
-
export { L as LightningSendFeeEstimateInput } from '../../LightningSendFeeEstimateInput-
|
|
6
|
-
import '../../signer-
|
|
3
|
+
import { h as CurrencyAmount, P as PageInfo, D as SspClient } from '../../RequestLightningSendInput-Na1mHdWg.cjs';
|
|
4
|
+
export { C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitRequest, i as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, j as LeavesSwapFeeEstimateOutput, l as LeavesSwapRequest, n as LightningReceiveRequest, o as LightningReceiveRequestStatus, p as LightningSendFeeEstimateOutput, r as LightningSendRequest, s as LightningSendRequestStatus, R as RequestCoopExitInput, t as RequestLeavesSwapInput, u as RequestLightningReceiveInput, v as RequestLightningSendInput, S as SparkCoopExitRequestStatus, w as SparkLeavesSwapRequestStatus, x as SparkTransferToLeavesConnection, y as StaticDepositQuoteInput, z as StaticDepositQuoteOutput, A as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitRequestQuery, k as getLeavesSwapRequestQuery, m as getLightningReceiveRequestQuery, q as getLightningSendRequestQuery } from '../../RequestLightningSendInput-Na1mHdWg.cjs';
|
|
5
|
+
export { L as LightningSendFeeEstimateInput } from '../../LightningSendFeeEstimateInput-BgOhEAI-.cjs';
|
|
6
|
+
import '../../signer-IO3oMRNj.cjs';
|
|
7
7
|
import '@scure/bip32';
|
|
8
|
-
import '../../spark-
|
|
8
|
+
import '../../spark-CDm4gqS6.cjs';
|
|
9
9
|
import '@bufbuild/protobuf/wire';
|
|
10
10
|
import 'nice-grpc-common';
|
|
11
11
|
import '@buildonspark/lrc20-sdk';
|
|
12
12
|
import '@scure/btc-signer';
|
|
13
13
|
import 'bitcoinjs-lib';
|
|
14
|
+
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
14
15
|
|
|
15
16
|
declare enum ClaimStaticDepositStatus {
|
|
16
17
|
/**
|
|
@@ -24,8 +25,9 @@ declare enum ClaimStaticDepositStatus {
|
|
|
24
25
|
REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED = "REFUND_SIGNING_COMMITMENTS_QUERYING_FAILED",
|
|
25
26
|
REFUND_SIGNING_FAILED = "REFUND_SIGNING_FAILED",
|
|
26
27
|
UTXO_SWAPPING_FAILED = "UTXO_SWAPPING_FAILED",
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
TRANSFER_COMPLETED = "TRANSFER_COMPLETED",
|
|
29
|
+
SPEND_TX_CREATED = "SPEND_TX_CREATED",
|
|
30
|
+
SPEND_TX_BROADCAST = "SPEND_TX_BROADCAST"
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
interface ClaimStaticDeposit {
|
|
@@ -119,6 +121,48 @@ interface Connection {
|
|
|
119
121
|
typename: string;
|
|
120
122
|
}
|
|
121
123
|
|
|
124
|
+
interface CoopExitFeeQuote {
|
|
125
|
+
/**
|
|
126
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
127
|
+
* string.
|
|
128
|
+
**/
|
|
129
|
+
id: string;
|
|
130
|
+
/** The date and time when the entity was first created. **/
|
|
131
|
+
createdAt: string;
|
|
132
|
+
/** The date and time when the entity was last updated. **/
|
|
133
|
+
updatedAt: string;
|
|
134
|
+
/** The network the coop exit fee quote is on. **/
|
|
135
|
+
network: BitcoinNetwork;
|
|
136
|
+
/** The total currency amount of all the nodes user swapped for the coop exit quote. **/
|
|
137
|
+
totalAmount: CurrencyAmount;
|
|
138
|
+
/** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is fast. **/
|
|
139
|
+
userFeeFast: CurrencyAmount;
|
|
140
|
+
/** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is medium. **/
|
|
141
|
+
userFeeMedium: CurrencyAmount;
|
|
142
|
+
/** The fee user pays for the coop exit not including the L1 broadcast fee when exit speed is slow. **/
|
|
143
|
+
userFeeSlow: CurrencyAmount;
|
|
144
|
+
/** The L1 broadcast fee user pays for the coop exit when exit speed is fast. **/
|
|
145
|
+
l1BroadcastFeeFast: CurrencyAmount;
|
|
146
|
+
/** The L1 broadcast fee user pays for the coop exit when exit speed is medium. **/
|
|
147
|
+
l1BroadcastFeeMedium: CurrencyAmount;
|
|
148
|
+
/** The L1 broadcast fee user pays for the coop exit when exit speed is slow. **/
|
|
149
|
+
l1BroadcastFeeSlow: CurrencyAmount;
|
|
150
|
+
/** The time when the coop exit fee quote expires. **/
|
|
151
|
+
expiresAt: string;
|
|
152
|
+
/** The typename of the object **/
|
|
153
|
+
typename: string;
|
|
154
|
+
}
|
|
155
|
+
declare const getCoopExitFeeQuoteQuery: (id: string) => Query<CoopExitFeeQuote>;
|
|
156
|
+
|
|
157
|
+
interface CoopExitFeeQuoteInput {
|
|
158
|
+
leafExternalIds: string[];
|
|
159
|
+
withdrawalAddress: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface CoopExitFeeQuoteOutput {
|
|
163
|
+
quoteId: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
122
166
|
/** 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. **/
|
|
123
167
|
interface Entity {
|
|
124
168
|
/**
|
|
@@ -191,7 +235,8 @@ declare enum SparkUserRequestType {
|
|
|
191
235
|
LIGHTNING_SEND = "LIGHTNING_SEND",
|
|
192
236
|
LIGHTNING_RECEIVE = "LIGHTNING_RECEIVE",
|
|
193
237
|
COOP_EXIT = "COOP_EXIT",
|
|
194
|
-
LEAVES_SWAP = "LEAVES_SWAP"
|
|
238
|
+
LEAVES_SWAP = "LEAVES_SWAP",
|
|
239
|
+
CLAIM_STATIC_DEPOSIT = "CLAIM_STATIC_DEPOSIT"
|
|
195
240
|
}
|
|
196
241
|
|
|
197
242
|
interface UserRequest {
|
|
@@ -283,4 +328,4 @@ interface WalletUserIdentityPublicKeyOutput {
|
|
|
283
328
|
identityPublicKey: string;
|
|
284
329
|
}
|
|
285
330
|
|
|
286
|
-
export { BitcoinNetwork, type ClaimStaticDeposit, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, CurrencyAmount, type Entity, type GetChallengeInput, type LeavesSwapFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, type SparkWalletUserToUserRequestsConnection, type StartSeedReleaseInput, type UserRequest, type VerifyChallengeInput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getClaimStaticDepositQuery, getUserRequestQuery };
|
|
331
|
+
export { BitcoinNetwork, type ClaimStaticDeposit, type ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, type CompleteCoopExitOutput, type CompleteLeavesSwapOutput, type CompleteSeedReleaseInput, type CompleteSeedReleaseOutput, type Connection, type CoopExitFeeQuote, type CoopExitFeeQuoteInput, type CoopExitFeeQuoteOutput, CurrencyAmount, type Entity, type GetChallengeInput, type LeavesSwapFeeEstimateInput, type NotifyReceiverTransferInput, PageInfo, type Provider, type RequestCoopExitOutput, type RequestLeavesSwapOutput, type RequestLightningReceiveOutput, type RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, type SparkWalletUserToUserRequestsConnection, type StartSeedReleaseInput, type UserRequest, type VerifyChallengeInput, type WalletUserIdentityPublicKeyInput, type WalletUserIdentityPublicKeyOutput, getClaimStaticDepositQuery, getCoopExitFeeQuoteQuery, getUserRequestQuery };
|