@lightsparkdev/lightspark-sdk 1.5.11 → 1.5.13
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 +13 -0
- package/dist/{chunk-X7VPX3F3.js → chunk-FGFVWCTL.js} +234 -161
- package/dist/{index-dd1501fa.d.ts → index-2b493387.d.ts} +147 -17
- package/dist/index.cjs +227 -152
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/dist/objects/index.cjs +226 -151
- package/dist/objects/index.d.cts +1 -1
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +5 -1
- package/package.json +2 -2
- package/src/env.ts +3 -3
- package/src/objects/Account.ts +5 -0
- package/src/objects/ApiToken.ts +6 -0
- package/src/objects/AuditLogActor.ts +96 -0
- package/src/objects/CancelInvoiceInput.ts +4 -0
- package/src/objects/CancelInvoiceOutput.ts +4 -0
- package/src/objects/ChannelSnapshot.ts +68 -17
- package/src/objects/ClaimUmaInvitationInput.ts +5 -0
- package/src/objects/ClaimUmaInvitationOutput.ts +1 -0
- package/src/objects/ClaimUmaInvitationWithIncentivesInput.ts +7 -0
- package/src/objects/ClaimUmaInvitationWithIncentivesOutput.ts +1 -0
- package/src/objects/CreateApiTokenOutput.ts +1 -0
- package/src/objects/CreateInvitationWithIncentivesInput.ts +6 -0
- package/src/objects/CreateInvitationWithIncentivesOutput.ts +1 -0
- package/src/objects/CreateInvoiceInput.ts +4 -1
- package/src/objects/CreateNodeWalletAddressOutput.ts +34 -0
- package/src/objects/CreateUmaInvitationInput.ts +4 -0
- package/src/objects/CreateUmaInvitationOutput.ts +1 -0
- package/src/objects/Entity.ts +57 -45
- package/src/objects/IncomingPayment.ts +13 -0
- package/src/objects/IncomingPaymentsForInvoiceQueryInput.ts +31 -0
- package/src/objects/IncomingPaymentsForInvoiceQueryOutput.ts +71 -0
- package/src/objects/LightningTransaction.ts +12 -0
- package/src/objects/MultiSigAddressValidationParameters.ts +45 -0
- package/src/objects/OutgoingPayment.ts +14 -45
- package/src/objects/OutgoingPaymentAttempt.ts +5 -59
- package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +343 -1
- package/src/objects/PaymentFailureReason.ts +2 -0
- package/src/objects/Transaction.ts +12 -0
- package/src/objects/Wallet.ts +4 -0
- package/src/objects/WebhookEventType.ts +2 -0
- package/src/objects/WithdrawalRequestStatus.ts +2 -0
- package/src/objects/index.ts +11 -1
package/dist/index.cjs
CHANGED
|
@@ -1884,9 +1884,11 @@ __export(src_exports, {
|
|
|
1884
1884
|
WithdrawalRequestStatus: () => WithdrawalRequestStatus_default,
|
|
1885
1885
|
assertValidBitcoinNetwork: () => assertValidBitcoinNetwork,
|
|
1886
1886
|
getApiTokenQuery: () => getApiTokenQuery,
|
|
1887
|
+
getAuditLogActorQuery: () => getAuditLogActorQuery,
|
|
1887
1888
|
getBitcoinNetworkOrThrow: () => getBitcoinNetworkOrThrow,
|
|
1888
1889
|
getChannelClosingTransactionQuery: () => getChannelClosingTransactionQuery,
|
|
1889
1890
|
getChannelOpeningTransactionQuery: () => getChannelOpeningTransactionQuery,
|
|
1891
|
+
getChannelSnapshotQuery: () => getChannelSnapshotQuery,
|
|
1890
1892
|
getDepositQuery: () => getDepositQuery,
|
|
1891
1893
|
getHopQuery: () => getHopQuery,
|
|
1892
1894
|
getIncomingPaymentAttemptQuery: () => getIncomingPaymentAttemptQuery,
|
|
@@ -1982,7 +1984,7 @@ var import_core9 = require("@lightsparkdev/core");
|
|
|
1982
1984
|
// package.json
|
|
1983
1985
|
var package_default = {
|
|
1984
1986
|
name: "@lightsparkdev/lightspark-sdk",
|
|
1985
|
-
version: "1.5.
|
|
1987
|
+
version: "1.5.13",
|
|
1986
1988
|
description: "Lightspark JS SDK",
|
|
1987
1989
|
author: "Lightspark Inc.",
|
|
1988
1990
|
keywords: [
|
|
@@ -2067,7 +2069,7 @@ var package_default = {
|
|
|
2067
2069
|
},
|
|
2068
2070
|
license: "Apache-2.0",
|
|
2069
2071
|
dependencies: {
|
|
2070
|
-
"@lightsparkdev/core": "1.0
|
|
2072
|
+
"@lightsparkdev/core": "1.1.0",
|
|
2071
2073
|
"@lightsparkdev/crypto-wasm": "0.1.3",
|
|
2072
2074
|
"crypto-browserify": "^3.12.0",
|
|
2073
2075
|
dayjs: "^1.11.7",
|
|
@@ -5054,6 +5056,7 @@ var ApiTokenFromJson = (obj) => {
|
|
|
5054
5056
|
clientId: obj["api_token_client_id"],
|
|
5055
5057
|
name: obj["api_token_name"],
|
|
5056
5058
|
permissions: obj["api_token_permissions"].map((e) => Permission_default[e]),
|
|
5059
|
+
isDeleted: obj["api_token_is_deleted"],
|
|
5057
5060
|
typename: "ApiToken"
|
|
5058
5061
|
};
|
|
5059
5062
|
};
|
|
@@ -5066,6 +5069,7 @@ fragment ApiTokenFragment on ApiToken {
|
|
|
5066
5069
|
api_token_client_id: client_id
|
|
5067
5070
|
api_token_name: name
|
|
5068
5071
|
api_token_permissions: permissions
|
|
5072
|
+
api_token_is_deleted: is_deleted
|
|
5069
5073
|
}`;
|
|
5070
5074
|
var getApiTokenQuery = (id) => {
|
|
5071
5075
|
return {
|
|
@@ -5283,13 +5287,15 @@ var TransactionStatus_default = TransactionStatus;
|
|
|
5283
5287
|
|
|
5284
5288
|
// src/objects/IncomingPayment.ts
|
|
5285
5289
|
var IncomingPayment = class {
|
|
5286
|
-
constructor(id, createdAt, updatedAt, status, amount, destinationId, typename, resolvedAt, transactionHash, paymentRequestId, umaPostTransactionData) {
|
|
5290
|
+
constructor(id, createdAt, updatedAt, status, amount, isUma, destinationId, isInternalPayment, typename, resolvedAt, transactionHash, paymentRequestId, umaPostTransactionData) {
|
|
5287
5291
|
this.id = id;
|
|
5288
5292
|
this.createdAt = createdAt;
|
|
5289
5293
|
this.updatedAt = updatedAt;
|
|
5290
5294
|
this.status = status;
|
|
5291
5295
|
this.amount = amount;
|
|
5296
|
+
this.isUma = isUma;
|
|
5292
5297
|
this.destinationId = destinationId;
|
|
5298
|
+
this.isInternalPayment = isInternalPayment;
|
|
5293
5299
|
this.typename = typename;
|
|
5294
5300
|
this.resolvedAt = resolvedAt;
|
|
5295
5301
|
this.transactionHash = transactionHash;
|
|
@@ -5376,9 +5382,11 @@ ${FRAGMENT13}
|
|
|
5376
5382
|
incoming_payment_resolved_at: this.resolvedAt,
|
|
5377
5383
|
incoming_payment_amount: CurrencyAmountToJson(this.amount),
|
|
5378
5384
|
incoming_payment_transaction_hash: this.transactionHash,
|
|
5385
|
+
incoming_payment_is_uma: this.isUma,
|
|
5379
5386
|
incoming_payment_destination: { id: this.destinationId },
|
|
5380
5387
|
incoming_payment_payment_request: { id: this.paymentRequestId },
|
|
5381
|
-
incoming_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e))
|
|
5388
|
+
incoming_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e)),
|
|
5389
|
+
incoming_payment_is_internal_payment: this.isInternalPayment
|
|
5382
5390
|
};
|
|
5383
5391
|
}
|
|
5384
5392
|
};
|
|
@@ -5389,7 +5397,9 @@ var IncomingPaymentFromJson = (obj) => {
|
|
|
5389
5397
|
obj["incoming_payment_updated_at"],
|
|
5390
5398
|
TransactionStatus_default[obj["incoming_payment_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
|
|
5391
5399
|
CurrencyAmountFromJson(obj["incoming_payment_amount"]),
|
|
5400
|
+
obj["incoming_payment_is_uma"],
|
|
5392
5401
|
obj["incoming_payment_destination"].id,
|
|
5402
|
+
obj["incoming_payment_is_internal_payment"],
|
|
5393
5403
|
"IncomingPayment",
|
|
5394
5404
|
obj["incoming_payment_resolved_at"],
|
|
5395
5405
|
obj["incoming_payment_transaction_hash"],
|
|
@@ -5416,6 +5426,7 @@ fragment IncomingPaymentFragment on IncomingPayment {
|
|
|
5416
5426
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
5417
5427
|
}
|
|
5418
5428
|
incoming_payment_transaction_hash: transaction_hash
|
|
5429
|
+
incoming_payment_is_uma: is_uma
|
|
5419
5430
|
incoming_payment_destination: destination {
|
|
5420
5431
|
id
|
|
5421
5432
|
}
|
|
@@ -5434,6 +5445,7 @@ fragment IncomingPaymentFragment on IncomingPayment {
|
|
|
5434
5445
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
5435
5446
|
}
|
|
5436
5447
|
}
|
|
5448
|
+
incoming_payment_is_internal_payment: is_internal_payment
|
|
5437
5449
|
}`;
|
|
5438
5450
|
var IncomingPayment_default = IncomingPayment;
|
|
5439
5451
|
|
|
@@ -5701,30 +5713,6 @@ var MultiNodeDashboard = `
|
|
|
5701
5713
|
${FRAGMENT}
|
|
5702
5714
|
`;
|
|
5703
5715
|
|
|
5704
|
-
// src/objects/ChannelSnapshot.ts
|
|
5705
|
-
var ChannelSnapshotFromJson = (obj) => {
|
|
5706
|
-
return {
|
|
5707
|
-
channelId: obj["channel_snapshot_channel"].id,
|
|
5708
|
-
timestamp: obj["channel_snapshot_timestamp"],
|
|
5709
|
-
localBalance: !!obj["channel_snapshot_local_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_balance"]) : void 0,
|
|
5710
|
-
localUnsettledBalance: !!obj["channel_snapshot_local_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_unsettled_balance"]) : void 0,
|
|
5711
|
-
localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0,
|
|
5712
|
-
remoteBalance: !!obj["channel_snapshot_remote_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_balance"]) : void 0,
|
|
5713
|
-
remoteUnsettledBalance: !!obj["channel_snapshot_remote_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_unsettled_balance"]) : void 0
|
|
5714
|
-
};
|
|
5715
|
-
};
|
|
5716
|
-
var ChannelSnapshotToJson = (obj) => {
|
|
5717
|
-
return {
|
|
5718
|
-
channel_snapshot_channel: { id: obj.channelId },
|
|
5719
|
-
channel_snapshot_timestamp: obj.timestamp,
|
|
5720
|
-
channel_snapshot_local_balance: obj.localBalance ? CurrencyAmountToJson(obj.localBalance) : void 0,
|
|
5721
|
-
channel_snapshot_local_unsettled_balance: obj.localUnsettledBalance ? CurrencyAmountToJson(obj.localUnsettledBalance) : void 0,
|
|
5722
|
-
channel_snapshot_local_channel_reserve: obj.localChannelReserve ? CurrencyAmountToJson(obj.localChannelReserve) : void 0,
|
|
5723
|
-
channel_snapshot_remote_balance: obj.remoteBalance ? CurrencyAmountToJson(obj.remoteBalance) : void 0,
|
|
5724
|
-
channel_snapshot_remote_unsettled_balance: obj.remoteUnsettledBalance ? CurrencyAmountToJson(obj.remoteUnsettledBalance) : void 0
|
|
5725
|
-
};
|
|
5726
|
-
};
|
|
5727
|
-
|
|
5728
5716
|
// src/objects/HtlcAttemptFailureCode.ts
|
|
5729
5717
|
var HtlcAttemptFailureCode = /* @__PURE__ */ ((HtlcAttemptFailureCode2) => {
|
|
5730
5718
|
HtlcAttemptFailureCode2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
@@ -5848,7 +5836,7 @@ var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
|
|
|
5848
5836
|
|
|
5849
5837
|
// src/objects/OutgoingPaymentAttempt.ts
|
|
5850
5838
|
var OutgoingPaymentAttempt = class {
|
|
5851
|
-
constructor(id, createdAt, updatedAt, status, attemptedAt, outgoingPaymentId, typename, failureCode, failureSourceIndex, resolvedAt, amount, fees,
|
|
5839
|
+
constructor(id, createdAt, updatedAt, status, attemptedAt, outgoingPaymentId, typename, failureCode, failureSourceIndex, resolvedAt, amount, fees, channelSnapshotId) {
|
|
5852
5840
|
this.id = id;
|
|
5853
5841
|
this.createdAt = createdAt;
|
|
5854
5842
|
this.updatedAt = updatedAt;
|
|
@@ -5861,7 +5849,7 @@ var OutgoingPaymentAttempt = class {
|
|
|
5861
5849
|
this.resolvedAt = resolvedAt;
|
|
5862
5850
|
this.amount = amount;
|
|
5863
5851
|
this.fees = fees;
|
|
5864
|
-
this.
|
|
5852
|
+
this.channelSnapshotId = channelSnapshotId;
|
|
5865
5853
|
autoBind(this);
|
|
5866
5854
|
}
|
|
5867
5855
|
async getHops(client, first = void 0, after = void 0) {
|
|
@@ -5951,7 +5939,7 @@ ${FRAGMENT16}
|
|
|
5951
5939
|
outgoing_payment_attempt_amount: this.amount ? CurrencyAmountToJson(this.amount) : void 0,
|
|
5952
5940
|
outgoing_payment_attempt_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
|
|
5953
5941
|
outgoing_payment_attempt_outgoing_payment: { id: this.outgoingPaymentId },
|
|
5954
|
-
outgoing_payment_attempt_channel_snapshot:
|
|
5942
|
+
outgoing_payment_attempt_channel_snapshot: { id: this.channelSnapshotId }
|
|
5955
5943
|
};
|
|
5956
5944
|
}
|
|
5957
5945
|
};
|
|
@@ -5969,9 +5957,7 @@ var OutgoingPaymentAttemptFromJson = (obj) => {
|
|
|
5969
5957
|
obj["outgoing_payment_attempt_resolved_at"],
|
|
5970
5958
|
!!obj["outgoing_payment_attempt_amount"] ? CurrencyAmountFromJson(obj["outgoing_payment_attempt_amount"]) : void 0,
|
|
5971
5959
|
!!obj["outgoing_payment_attempt_fees"] ? CurrencyAmountFromJson(obj["outgoing_payment_attempt_fees"]) : void 0,
|
|
5972
|
-
|
|
5973
|
-
obj["outgoing_payment_attempt_channel_snapshot"]
|
|
5974
|
-
) : void 0
|
|
5960
|
+
obj["outgoing_payment_attempt_channel_snapshot"]?.id ?? void 0
|
|
5975
5961
|
);
|
|
5976
5962
|
};
|
|
5977
5963
|
var FRAGMENT16 = `
|
|
@@ -6005,51 +5991,7 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
|
|
|
6005
5991
|
id
|
|
6006
5992
|
}
|
|
6007
5993
|
outgoing_payment_attempt_channel_snapshot: channel_snapshot {
|
|
6008
|
-
|
|
6009
|
-
channel_snapshot_channel: channel {
|
|
6010
|
-
id
|
|
6011
|
-
}
|
|
6012
|
-
channel_snapshot_timestamp: timestamp
|
|
6013
|
-
channel_snapshot_local_balance: local_balance {
|
|
6014
|
-
__typename
|
|
6015
|
-
currency_amount_original_value: original_value
|
|
6016
|
-
currency_amount_original_unit: original_unit
|
|
6017
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6018
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6019
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6020
|
-
}
|
|
6021
|
-
channel_snapshot_local_unsettled_balance: local_unsettled_balance {
|
|
6022
|
-
__typename
|
|
6023
|
-
currency_amount_original_value: original_value
|
|
6024
|
-
currency_amount_original_unit: original_unit
|
|
6025
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6026
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6027
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6028
|
-
}
|
|
6029
|
-
channel_snapshot_local_channel_reserve: local_channel_reserve {
|
|
6030
|
-
__typename
|
|
6031
|
-
currency_amount_original_value: original_value
|
|
6032
|
-
currency_amount_original_unit: original_unit
|
|
6033
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6034
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6035
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6036
|
-
}
|
|
6037
|
-
channel_snapshot_remote_balance: remote_balance {
|
|
6038
|
-
__typename
|
|
6039
|
-
currency_amount_original_value: original_value
|
|
6040
|
-
currency_amount_original_unit: original_unit
|
|
6041
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6042
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6043
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6044
|
-
}
|
|
6045
|
-
channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
|
|
6046
|
-
__typename
|
|
6047
|
-
currency_amount_original_value: original_value
|
|
6048
|
-
currency_amount_original_unit: original_unit
|
|
6049
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6050
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6051
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6052
|
-
}
|
|
5994
|
+
id
|
|
6053
5995
|
}
|
|
6054
5996
|
}`;
|
|
6055
5997
|
var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
|
|
@@ -6080,6 +6022,7 @@ var PaymentFailureReason = /* @__PURE__ */ ((PaymentFailureReason2) => {
|
|
|
6080
6022
|
PaymentFailureReason2["INVOICE_ALREADY_PAID"] = "INVOICE_ALREADY_PAID";
|
|
6081
6023
|
PaymentFailureReason2["SELF_PAYMENT"] = "SELF_PAYMENT";
|
|
6082
6024
|
PaymentFailureReason2["INVOICE_EXPIRED"] = "INVOICE_EXPIRED";
|
|
6025
|
+
PaymentFailureReason2["INVOICE_CANCELLED"] = "INVOICE_CANCELLED";
|
|
6083
6026
|
PaymentFailureReason2["RISK_SCREENING_FAILED"] = "RISK_SCREENING_FAILED";
|
|
6084
6027
|
return PaymentFailureReason2;
|
|
6085
6028
|
})(PaymentFailureReason || {});
|
|
@@ -6141,13 +6084,15 @@ var RichTextToJson = (obj) => {
|
|
|
6141
6084
|
|
|
6142
6085
|
// src/objects/OutgoingPayment.ts
|
|
6143
6086
|
var OutgoingPayment = class {
|
|
6144
|
-
constructor(id, createdAt, updatedAt, status, amount, originId, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage) {
|
|
6087
|
+
constructor(id, createdAt, updatedAt, status, amount, isUma, originId, isInternalPayment, typename, resolvedAt, transactionHash, destinationId, fees, paymentRequestData, failureReason, failureMessage, umaPostTransactionData, paymentPreimage) {
|
|
6145
6088
|
this.id = id;
|
|
6146
6089
|
this.createdAt = createdAt;
|
|
6147
6090
|
this.updatedAt = updatedAt;
|
|
6148
6091
|
this.status = status;
|
|
6149
6092
|
this.amount = amount;
|
|
6093
|
+
this.isUma = isUma;
|
|
6150
6094
|
this.originId = originId;
|
|
6095
|
+
this.isInternalPayment = isInternalPayment;
|
|
6151
6096
|
this.typename = typename;
|
|
6152
6097
|
this.resolvedAt = resolvedAt;
|
|
6153
6098
|
this.transactionHash = transactionHash;
|
|
@@ -6206,51 +6151,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
|
|
|
6206
6151
|
id
|
|
6207
6152
|
}
|
|
6208
6153
|
outgoing_payment_attempt_channel_snapshot: channel_snapshot {
|
|
6209
|
-
|
|
6210
|
-
channel_snapshot_channel: channel {
|
|
6211
|
-
id
|
|
6212
|
-
}
|
|
6213
|
-
channel_snapshot_timestamp: timestamp
|
|
6214
|
-
channel_snapshot_local_balance: local_balance {
|
|
6215
|
-
__typename
|
|
6216
|
-
currency_amount_original_value: original_value
|
|
6217
|
-
currency_amount_original_unit: original_unit
|
|
6218
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6219
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6220
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6221
|
-
}
|
|
6222
|
-
channel_snapshot_local_unsettled_balance: local_unsettled_balance {
|
|
6223
|
-
__typename
|
|
6224
|
-
currency_amount_original_value: original_value
|
|
6225
|
-
currency_amount_original_unit: original_unit
|
|
6226
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6227
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6228
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6229
|
-
}
|
|
6230
|
-
channel_snapshot_local_channel_reserve: local_channel_reserve {
|
|
6231
|
-
__typename
|
|
6232
|
-
currency_amount_original_value: original_value
|
|
6233
|
-
currency_amount_original_unit: original_unit
|
|
6234
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6235
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6236
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6237
|
-
}
|
|
6238
|
-
channel_snapshot_remote_balance: remote_balance {
|
|
6239
|
-
__typename
|
|
6240
|
-
currency_amount_original_value: original_value
|
|
6241
|
-
currency_amount_original_unit: original_unit
|
|
6242
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6243
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6244
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6245
|
-
}
|
|
6246
|
-
channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
|
|
6247
|
-
__typename
|
|
6248
|
-
currency_amount_original_value: original_value
|
|
6249
|
-
currency_amount_original_unit: original_unit
|
|
6250
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6251
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6252
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6253
|
-
}
|
|
6154
|
+
id
|
|
6254
6155
|
}
|
|
6255
6156
|
}
|
|
6256
6157
|
}
|
|
@@ -6292,6 +6193,7 @@ ${FRAGMENT17}
|
|
|
6292
6193
|
outgoing_payment_resolved_at: this.resolvedAt,
|
|
6293
6194
|
outgoing_payment_amount: CurrencyAmountToJson(this.amount),
|
|
6294
6195
|
outgoing_payment_transaction_hash: this.transactionHash,
|
|
6196
|
+
outgoing_payment_is_uma: this.isUma,
|
|
6295
6197
|
outgoing_payment_origin: { id: this.originId },
|
|
6296
6198
|
outgoing_payment_destination: { id: this.destinationId },
|
|
6297
6199
|
outgoing_payment_fees: this.fees ? CurrencyAmountToJson(this.fees) : void 0,
|
|
@@ -6299,7 +6201,8 @@ ${FRAGMENT17}
|
|
|
6299
6201
|
outgoing_payment_failure_reason: this.failureReason,
|
|
6300
6202
|
outgoing_payment_failure_message: this.failureMessage ? RichTextToJson(this.failureMessage) : void 0,
|
|
6301
6203
|
outgoing_payment_uma_post_transaction_data: this.umaPostTransactionData?.map((e) => PostTransactionDataToJson(e)),
|
|
6302
|
-
outgoing_payment_payment_preimage: this.paymentPreimage
|
|
6204
|
+
outgoing_payment_payment_preimage: this.paymentPreimage,
|
|
6205
|
+
outgoing_payment_is_internal_payment: this.isInternalPayment
|
|
6303
6206
|
};
|
|
6304
6207
|
}
|
|
6305
6208
|
};
|
|
@@ -6310,7 +6213,9 @@ var OutgoingPaymentFromJson = (obj) => {
|
|
|
6310
6213
|
obj["outgoing_payment_updated_at"],
|
|
6311
6214
|
TransactionStatus_default[obj["outgoing_payment_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
|
|
6312
6215
|
CurrencyAmountFromJson(obj["outgoing_payment_amount"]),
|
|
6216
|
+
obj["outgoing_payment_is_uma"],
|
|
6313
6217
|
obj["outgoing_payment_origin"].id,
|
|
6218
|
+
obj["outgoing_payment_is_internal_payment"],
|
|
6314
6219
|
"OutgoingPayment",
|
|
6315
6220
|
obj["outgoing_payment_resolved_at"],
|
|
6316
6221
|
obj["outgoing_payment_transaction_hash"],
|
|
@@ -6342,6 +6247,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
6342
6247
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6343
6248
|
}
|
|
6344
6249
|
outgoing_payment_transaction_hash: transaction_hash
|
|
6250
|
+
outgoing_payment_is_uma: is_uma
|
|
6345
6251
|
outgoing_payment_origin: origin {
|
|
6346
6252
|
id
|
|
6347
6253
|
}
|
|
@@ -6668,6 +6574,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment {
|
|
|
6668
6574
|
}
|
|
6669
6575
|
}
|
|
6670
6576
|
outgoing_payment_payment_preimage: payment_preimage
|
|
6577
|
+
outgoing_payment_is_internal_payment: is_internal_payment
|
|
6671
6578
|
}`;
|
|
6672
6579
|
var OutgoingPayment_default = OutgoingPayment;
|
|
6673
6580
|
|
|
@@ -7140,6 +7047,7 @@ var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
|
|
|
7140
7047
|
WithdrawalRequestStatus2["FAILED"] = "FAILED";
|
|
7141
7048
|
WithdrawalRequestStatus2["IN_PROGRESS"] = "IN_PROGRESS";
|
|
7142
7049
|
WithdrawalRequestStatus2["SUCCESSFUL"] = "SUCCESSFUL";
|
|
7050
|
+
WithdrawalRequestStatus2["PARTIALLY_SUCCESSFUL"] = "PARTIALLY_SUCCESSFUL";
|
|
7143
7051
|
return WithdrawalRequestStatus2;
|
|
7144
7052
|
})(WithdrawalRequestStatus || {});
|
|
7145
7053
|
var WithdrawalRequestStatus_default = WithdrawalRequestStatus;
|
|
@@ -7691,7 +7599,9 @@ var TransactionFromJson = (obj) => {
|
|
|
7691
7599
|
obj["incoming_payment_updated_at"],
|
|
7692
7600
|
TransactionStatus_default[obj["incoming_payment_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
|
|
7693
7601
|
CurrencyAmountFromJson(obj["incoming_payment_amount"]),
|
|
7602
|
+
obj["incoming_payment_is_uma"],
|
|
7694
7603
|
obj["incoming_payment_destination"].id,
|
|
7604
|
+
obj["incoming_payment_is_internal_payment"],
|
|
7695
7605
|
"IncomingPayment",
|
|
7696
7606
|
obj["incoming_payment_resolved_at"],
|
|
7697
7607
|
obj["incoming_payment_transaction_hash"],
|
|
@@ -7708,7 +7618,9 @@ var TransactionFromJson = (obj) => {
|
|
|
7708
7618
|
obj["outgoing_payment_updated_at"],
|
|
7709
7619
|
TransactionStatus_default[obj["outgoing_payment_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
|
|
7710
7620
|
CurrencyAmountFromJson(obj["outgoing_payment_amount"]),
|
|
7621
|
+
obj["outgoing_payment_is_uma"],
|
|
7711
7622
|
obj["outgoing_payment_origin"].id,
|
|
7623
|
+
obj["outgoing_payment_is_internal_payment"],
|
|
7712
7624
|
"OutgoingPayment",
|
|
7713
7625
|
obj["outgoing_payment_resolved_at"],
|
|
7714
7626
|
obj["outgoing_payment_transaction_hash"],
|
|
@@ -7880,6 +7792,7 @@ fragment TransactionFragment on Transaction {
|
|
|
7880
7792
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
7881
7793
|
}
|
|
7882
7794
|
incoming_payment_transaction_hash: transaction_hash
|
|
7795
|
+
incoming_payment_is_uma: is_uma
|
|
7883
7796
|
incoming_payment_destination: destination {
|
|
7884
7797
|
id
|
|
7885
7798
|
}
|
|
@@ -7898,6 +7811,7 @@ fragment TransactionFragment on Transaction {
|
|
|
7898
7811
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
7899
7812
|
}
|
|
7900
7813
|
}
|
|
7814
|
+
incoming_payment_is_internal_payment: is_internal_payment
|
|
7901
7815
|
}
|
|
7902
7816
|
... on OutgoingPayment {
|
|
7903
7817
|
__typename
|
|
@@ -7915,6 +7829,7 @@ fragment TransactionFragment on Transaction {
|
|
|
7915
7829
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
7916
7830
|
}
|
|
7917
7831
|
outgoing_payment_transaction_hash: transaction_hash
|
|
7832
|
+
outgoing_payment_is_uma: is_uma
|
|
7918
7833
|
outgoing_payment_origin: origin {
|
|
7919
7834
|
id
|
|
7920
7835
|
}
|
|
@@ -8241,6 +8156,7 @@ fragment TransactionFragment on Transaction {
|
|
|
8241
8156
|
}
|
|
8242
8157
|
}
|
|
8243
8158
|
outgoing_payment_payment_preimage: payment_preimage
|
|
8159
|
+
outgoing_payment_is_internal_payment: is_internal_payment
|
|
8244
8160
|
}
|
|
8245
8161
|
... on RoutingTransaction {
|
|
8246
8162
|
__typename
|
|
@@ -9201,6 +9117,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
|
|
|
9201
9117
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
9202
9118
|
}
|
|
9203
9119
|
incoming_payment_transaction_hash: transaction_hash
|
|
9120
|
+
incoming_payment_is_uma: is_uma
|
|
9204
9121
|
incoming_payment_destination: destination {
|
|
9205
9122
|
id
|
|
9206
9123
|
}
|
|
@@ -9219,6 +9136,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
|
|
|
9219
9136
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
9220
9137
|
}
|
|
9221
9138
|
}
|
|
9139
|
+
incoming_payment_is_internal_payment: is_internal_payment
|
|
9222
9140
|
}
|
|
9223
9141
|
... on OutgoingPayment {
|
|
9224
9142
|
__typename
|
|
@@ -9236,6 +9154,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
|
|
|
9236
9154
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
9237
9155
|
}
|
|
9238
9156
|
outgoing_payment_transaction_hash: transaction_hash
|
|
9157
|
+
outgoing_payment_is_uma: is_uma
|
|
9239
9158
|
outgoing_payment_origin: origin {
|
|
9240
9159
|
id
|
|
9241
9160
|
}
|
|
@@ -9562,6 +9481,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after:
|
|
|
9562
9481
|
}
|
|
9563
9482
|
}
|
|
9564
9483
|
outgoing_payment_payment_preimage: payment_preimage
|
|
9484
|
+
outgoing_payment_is_internal_payment: is_internal_payment
|
|
9565
9485
|
}
|
|
9566
9486
|
... on RoutingTransaction {
|
|
9567
9487
|
__typename
|
|
@@ -10279,6 +10199,7 @@ query FetchAccountToApiTokensConnection($first: Int, $after: String) {
|
|
|
10279
10199
|
api_token_client_id: client_id
|
|
10280
10200
|
api_token_name: name
|
|
10281
10201
|
api_token_permissions: permissions
|
|
10202
|
+
api_token_is_deleted: is_deleted
|
|
10282
10203
|
}
|
|
10283
10204
|
}
|
|
10284
10205
|
}
|
|
@@ -11029,6 +10950,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
11029
10950
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
11030
10951
|
}
|
|
11031
10952
|
incoming_payment_transaction_hash: transaction_hash
|
|
10953
|
+
incoming_payment_is_uma: is_uma
|
|
11032
10954
|
incoming_payment_destination: destination {
|
|
11033
10955
|
id
|
|
11034
10956
|
}
|
|
@@ -11047,6 +10969,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
11047
10969
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
11048
10970
|
}
|
|
11049
10971
|
}
|
|
10972
|
+
incoming_payment_is_internal_payment: is_internal_payment
|
|
11050
10973
|
}
|
|
11051
10974
|
... on OutgoingPayment {
|
|
11052
10975
|
__typename
|
|
@@ -11064,6 +10987,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
11064
10987
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
11065
10988
|
}
|
|
11066
10989
|
outgoing_payment_transaction_hash: transaction_hash
|
|
10990
|
+
outgoing_payment_is_uma: is_uma
|
|
11067
10991
|
outgoing_payment_origin: origin {
|
|
11068
10992
|
id
|
|
11069
10993
|
}
|
|
@@ -11390,6 +11314,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
11390
11314
|
}
|
|
11391
11315
|
}
|
|
11392
11316
|
outgoing_payment_payment_preimage: payment_preimage
|
|
11317
|
+
outgoing_payment_is_internal_payment: is_internal_payment
|
|
11393
11318
|
}
|
|
11394
11319
|
... on RoutingTransaction {
|
|
11395
11320
|
__typename
|
|
@@ -13125,6 +13050,145 @@ var getBitcoinNetworkOrThrow = (bitcoinNetwork) => {
|
|
|
13125
13050
|
return bitcoinNetwork;
|
|
13126
13051
|
};
|
|
13127
13052
|
|
|
13053
|
+
// src/objects/AuditLogActor.ts
|
|
13054
|
+
var import_core10 = require("@lightsparkdev/core");
|
|
13055
|
+
var AuditLogActorFromJson = (obj) => {
|
|
13056
|
+
if (obj["__typename"] == "ApiToken") {
|
|
13057
|
+
return {
|
|
13058
|
+
id: obj["api_token_id"],
|
|
13059
|
+
createdAt: obj["api_token_created_at"],
|
|
13060
|
+
updatedAt: obj["api_token_updated_at"],
|
|
13061
|
+
clientId: obj["api_token_client_id"],
|
|
13062
|
+
name: obj["api_token_name"],
|
|
13063
|
+
permissions: obj["api_token_permissions"].map((e) => Permission_default[e]),
|
|
13064
|
+
isDeleted: obj["api_token_is_deleted"],
|
|
13065
|
+
typename: "ApiToken"
|
|
13066
|
+
};
|
|
13067
|
+
}
|
|
13068
|
+
throw new import_core10.LightsparkException(
|
|
13069
|
+
"DeserializationError",
|
|
13070
|
+
`Couldn't find a concrete type for interface AuditLogActor corresponding to the typename=${obj["__typename"]}`
|
|
13071
|
+
);
|
|
13072
|
+
};
|
|
13073
|
+
var FRAGMENT28 = `
|
|
13074
|
+
fragment AuditLogActorFragment on AuditLogActor {
|
|
13075
|
+
__typename
|
|
13076
|
+
... on ApiToken {
|
|
13077
|
+
__typename
|
|
13078
|
+
api_token_id: id
|
|
13079
|
+
api_token_created_at: created_at
|
|
13080
|
+
api_token_updated_at: updated_at
|
|
13081
|
+
api_token_client_id: client_id
|
|
13082
|
+
api_token_name: name
|
|
13083
|
+
api_token_permissions: permissions
|
|
13084
|
+
api_token_is_deleted: is_deleted
|
|
13085
|
+
}
|
|
13086
|
+
}`;
|
|
13087
|
+
var getAuditLogActorQuery = (id) => {
|
|
13088
|
+
return {
|
|
13089
|
+
queryPayload: `
|
|
13090
|
+
query GetAuditLogActor($id: ID!) {
|
|
13091
|
+
entity(id: $id) {
|
|
13092
|
+
... on AuditLogActor {
|
|
13093
|
+
...AuditLogActorFragment
|
|
13094
|
+
}
|
|
13095
|
+
}
|
|
13096
|
+
}
|
|
13097
|
+
|
|
13098
|
+
${FRAGMENT28}
|
|
13099
|
+
`,
|
|
13100
|
+
variables: { id },
|
|
13101
|
+
constructObject: (data) => AuditLogActorFromJson(data.entity)
|
|
13102
|
+
};
|
|
13103
|
+
};
|
|
13104
|
+
|
|
13105
|
+
// src/objects/ChannelSnapshot.ts
|
|
13106
|
+
var ChannelSnapshotFromJson = (obj) => {
|
|
13107
|
+
return {
|
|
13108
|
+
id: obj["channel_snapshot_id"],
|
|
13109
|
+
createdAt: obj["channel_snapshot_created_at"],
|
|
13110
|
+
updatedAt: obj["channel_snapshot_updated_at"],
|
|
13111
|
+
channelId: obj["channel_snapshot_channel"].id,
|
|
13112
|
+
timestamp: obj["channel_snapshot_timestamp"],
|
|
13113
|
+
typename: "ChannelSnapshot",
|
|
13114
|
+
localBalance: !!obj["channel_snapshot_local_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_balance"]) : void 0,
|
|
13115
|
+
localUnsettledBalance: !!obj["channel_snapshot_local_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_unsettled_balance"]) : void 0,
|
|
13116
|
+
remoteBalance: !!obj["channel_snapshot_remote_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_balance"]) : void 0,
|
|
13117
|
+
remoteUnsettledBalance: !!obj["channel_snapshot_remote_unsettled_balance"] ? CurrencyAmountFromJson(obj["channel_snapshot_remote_unsettled_balance"]) : void 0,
|
|
13118
|
+
status: obj["channel_snapshot_status"],
|
|
13119
|
+
localChannelReserve: !!obj["channel_snapshot_local_channel_reserve"] ? CurrencyAmountFromJson(obj["channel_snapshot_local_channel_reserve"]) : void 0
|
|
13120
|
+
};
|
|
13121
|
+
};
|
|
13122
|
+
var FRAGMENT29 = `
|
|
13123
|
+
fragment ChannelSnapshotFragment on ChannelSnapshot {
|
|
13124
|
+
__typename
|
|
13125
|
+
channel_snapshot_id: id
|
|
13126
|
+
channel_snapshot_created_at: created_at
|
|
13127
|
+
channel_snapshot_updated_at: updated_at
|
|
13128
|
+
channel_snapshot_local_balance: local_balance {
|
|
13129
|
+
__typename
|
|
13130
|
+
currency_amount_original_value: original_value
|
|
13131
|
+
currency_amount_original_unit: original_unit
|
|
13132
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
13133
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
13134
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13135
|
+
}
|
|
13136
|
+
channel_snapshot_local_unsettled_balance: local_unsettled_balance {
|
|
13137
|
+
__typename
|
|
13138
|
+
currency_amount_original_value: original_value
|
|
13139
|
+
currency_amount_original_unit: original_unit
|
|
13140
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
13141
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
13142
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13143
|
+
}
|
|
13144
|
+
channel_snapshot_remote_balance: remote_balance {
|
|
13145
|
+
__typename
|
|
13146
|
+
currency_amount_original_value: original_value
|
|
13147
|
+
currency_amount_original_unit: original_unit
|
|
13148
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
13149
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
13150
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13151
|
+
}
|
|
13152
|
+
channel_snapshot_remote_unsettled_balance: remote_unsettled_balance {
|
|
13153
|
+
__typename
|
|
13154
|
+
currency_amount_original_value: original_value
|
|
13155
|
+
currency_amount_original_unit: original_unit
|
|
13156
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
13157
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
13158
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13159
|
+
}
|
|
13160
|
+
channel_snapshot_status: status
|
|
13161
|
+
channel_snapshot_channel: channel {
|
|
13162
|
+
id
|
|
13163
|
+
}
|
|
13164
|
+
channel_snapshot_local_channel_reserve: local_channel_reserve {
|
|
13165
|
+
__typename
|
|
13166
|
+
currency_amount_original_value: original_value
|
|
13167
|
+
currency_amount_original_unit: original_unit
|
|
13168
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
13169
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
13170
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13171
|
+
}
|
|
13172
|
+
channel_snapshot_timestamp: timestamp
|
|
13173
|
+
}`;
|
|
13174
|
+
var getChannelSnapshotQuery = (id) => {
|
|
13175
|
+
return {
|
|
13176
|
+
queryPayload: `
|
|
13177
|
+
query GetChannelSnapshot($id: ID!) {
|
|
13178
|
+
entity(id: $id) {
|
|
13179
|
+
... on ChannelSnapshot {
|
|
13180
|
+
...ChannelSnapshotFragment
|
|
13181
|
+
}
|
|
13182
|
+
}
|
|
13183
|
+
}
|
|
13184
|
+
|
|
13185
|
+
${FRAGMENT29}
|
|
13186
|
+
`,
|
|
13187
|
+
variables: { id },
|
|
13188
|
+
constructObject: (data) => ChannelSnapshotFromJson(data.entity)
|
|
13189
|
+
};
|
|
13190
|
+
};
|
|
13191
|
+
|
|
13128
13192
|
// src/objects/RegionCode.ts
|
|
13129
13193
|
var RegionCode = /* @__PURE__ */ ((RegionCode2) => {
|
|
13130
13194
|
RegionCode2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
@@ -13390,7 +13454,7 @@ var ComplianceProvider = /* @__PURE__ */ ((ComplianceProvider2) => {
|
|
|
13390
13454
|
var ComplianceProvider_default = ComplianceProvider;
|
|
13391
13455
|
|
|
13392
13456
|
// src/objects/Connection.ts
|
|
13393
|
-
var
|
|
13457
|
+
var import_core11 = require("@lightsparkdev/core");
|
|
13394
13458
|
|
|
13395
13459
|
// src/objects/SignablePayloadStatus.ts
|
|
13396
13460
|
var SignablePayloadStatus = /* @__PURE__ */ ((SignablePayloadStatus2) => {
|
|
@@ -13418,7 +13482,7 @@ var SignablePayloadFromJson = (obj) => {
|
|
|
13418
13482
|
mulTweak: obj["signable_payload_mul_tweak"]
|
|
13419
13483
|
};
|
|
13420
13484
|
};
|
|
13421
|
-
var
|
|
13485
|
+
var FRAGMENT30 = `
|
|
13422
13486
|
fragment SignablePayloadFragment on SignablePayload {
|
|
13423
13487
|
__typename
|
|
13424
13488
|
signable_payload_id: id
|
|
@@ -13444,7 +13508,7 @@ query GetSignablePayload($id: ID!) {
|
|
|
13444
13508
|
}
|
|
13445
13509
|
}
|
|
13446
13510
|
|
|
13447
|
-
${
|
|
13511
|
+
${FRAGMENT30}
|
|
13448
13512
|
`,
|
|
13449
13513
|
variables: { id },
|
|
13450
13514
|
constructObject: (data) => SignablePayloadFromJson(data.entity)
|
|
@@ -13470,7 +13534,7 @@ var DepositFromJson = (obj) => {
|
|
|
13470
13534
|
numConfirmations: obj["deposit_num_confirmations"]
|
|
13471
13535
|
};
|
|
13472
13536
|
};
|
|
13473
|
-
var
|
|
13537
|
+
var FRAGMENT31 = `
|
|
13474
13538
|
fragment DepositFragment on Deposit {
|
|
13475
13539
|
__typename
|
|
13476
13540
|
deposit_id: id
|
|
@@ -13514,7 +13578,7 @@ query GetDeposit($id: ID!) {
|
|
|
13514
13578
|
}
|
|
13515
13579
|
}
|
|
13516
13580
|
|
|
13517
|
-
${
|
|
13581
|
+
${FRAGMENT31}
|
|
13518
13582
|
`,
|
|
13519
13583
|
variables: { id },
|
|
13520
13584
|
constructObject: (data) => DepositFromJson(data.entity)
|
|
@@ -13522,7 +13586,7 @@ ${FRAGMENT29}
|
|
|
13522
13586
|
};
|
|
13523
13587
|
|
|
13524
13588
|
// src/objects/LightningTransaction.ts
|
|
13525
|
-
var
|
|
13589
|
+
var import_core12 = require("@lightsparkdev/core");
|
|
13526
13590
|
var LightningTransactionFromJson = (obj) => {
|
|
13527
13591
|
if (obj["__typename"] == "IncomingPayment") {
|
|
13528
13592
|
return new IncomingPayment_default(
|
|
@@ -13531,7 +13595,9 @@ var LightningTransactionFromJson = (obj) => {
|
|
|
13531
13595
|
obj["incoming_payment_updated_at"],
|
|
13532
13596
|
TransactionStatus_default[obj["incoming_payment_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
|
|
13533
13597
|
CurrencyAmountFromJson(obj["incoming_payment_amount"]),
|
|
13598
|
+
obj["incoming_payment_is_uma"],
|
|
13534
13599
|
obj["incoming_payment_destination"].id,
|
|
13600
|
+
obj["incoming_payment_is_internal_payment"],
|
|
13535
13601
|
"IncomingPayment",
|
|
13536
13602
|
obj["incoming_payment_resolved_at"],
|
|
13537
13603
|
obj["incoming_payment_transaction_hash"],
|
|
@@ -13548,7 +13614,9 @@ var LightningTransactionFromJson = (obj) => {
|
|
|
13548
13614
|
obj["outgoing_payment_updated_at"],
|
|
13549
13615
|
TransactionStatus_default[obj["outgoing_payment_status"]] ?? TransactionStatus_default.FUTURE_VALUE,
|
|
13550
13616
|
CurrencyAmountFromJson(obj["outgoing_payment_amount"]),
|
|
13617
|
+
obj["outgoing_payment_is_uma"],
|
|
13551
13618
|
obj["outgoing_payment_origin"].id,
|
|
13619
|
+
obj["outgoing_payment_is_internal_payment"],
|
|
13552
13620
|
"OutgoingPayment",
|
|
13553
13621
|
obj["outgoing_payment_resolved_at"],
|
|
13554
13622
|
obj["outgoing_payment_transaction_hash"],
|
|
@@ -13582,12 +13650,12 @@ var LightningTransactionFromJson = (obj) => {
|
|
|
13582
13650
|
failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
|
|
13583
13651
|
};
|
|
13584
13652
|
}
|
|
13585
|
-
throw new
|
|
13653
|
+
throw new import_core12.LightsparkException(
|
|
13586
13654
|
"DeserializationError",
|
|
13587
13655
|
`Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
|
|
13588
13656
|
);
|
|
13589
13657
|
};
|
|
13590
|
-
var
|
|
13658
|
+
var FRAGMENT32 = `
|
|
13591
13659
|
fragment LightningTransactionFragment on LightningTransaction {
|
|
13592
13660
|
__typename
|
|
13593
13661
|
... on IncomingPayment {
|
|
@@ -13606,6 +13674,7 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
13606
13674
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13607
13675
|
}
|
|
13608
13676
|
incoming_payment_transaction_hash: transaction_hash
|
|
13677
|
+
incoming_payment_is_uma: is_uma
|
|
13609
13678
|
incoming_payment_destination: destination {
|
|
13610
13679
|
id
|
|
13611
13680
|
}
|
|
@@ -13624,6 +13693,7 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
13624
13693
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13625
13694
|
}
|
|
13626
13695
|
}
|
|
13696
|
+
incoming_payment_is_internal_payment: is_internal_payment
|
|
13627
13697
|
}
|
|
13628
13698
|
... on OutgoingPayment {
|
|
13629
13699
|
__typename
|
|
@@ -13641,6 +13711,7 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
13641
13711
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
13642
13712
|
}
|
|
13643
13713
|
outgoing_payment_transaction_hash: transaction_hash
|
|
13714
|
+
outgoing_payment_is_uma: is_uma
|
|
13644
13715
|
outgoing_payment_origin: origin {
|
|
13645
13716
|
id
|
|
13646
13717
|
}
|
|
@@ -13967,6 +14038,7 @@ fragment LightningTransactionFragment on LightningTransaction {
|
|
|
13967
14038
|
}
|
|
13968
14039
|
}
|
|
13969
14040
|
outgoing_payment_payment_preimage: payment_preimage
|
|
14041
|
+
outgoing_payment_is_internal_payment: is_internal_payment
|
|
13970
14042
|
}
|
|
13971
14043
|
... on RoutingTransaction {
|
|
13972
14044
|
__typename
|
|
@@ -14016,7 +14088,7 @@ query GetLightningTransaction($id: ID!) {
|
|
|
14016
14088
|
}
|
|
14017
14089
|
}
|
|
14018
14090
|
|
|
14019
|
-
${
|
|
14091
|
+
${FRAGMENT32}
|
|
14020
14092
|
`,
|
|
14021
14093
|
variables: { id },
|
|
14022
14094
|
constructObject: (data) => LightningTransactionFromJson(data.entity)
|
|
@@ -14024,7 +14096,7 @@ ${FRAGMENT30}
|
|
|
14024
14096
|
};
|
|
14025
14097
|
|
|
14026
14098
|
// src/objects/LightsparkNodeOwner.ts
|
|
14027
|
-
var
|
|
14099
|
+
var import_core13 = require("@lightsparkdev/core");
|
|
14028
14100
|
var LightsparkNodeOwnerFromJson = (obj) => {
|
|
14029
14101
|
if (obj["__typename"] == "Account") {
|
|
14030
14102
|
return new Account_default(
|
|
@@ -14048,12 +14120,12 @@ var LightsparkNodeOwnerFromJson = (obj) => {
|
|
|
14048
14120
|
obj["wallet_account"]?.id ?? void 0
|
|
14049
14121
|
);
|
|
14050
14122
|
}
|
|
14051
|
-
throw new
|
|
14123
|
+
throw new import_core13.LightsparkException(
|
|
14052
14124
|
"DeserializationError",
|
|
14053
14125
|
`Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
|
|
14054
14126
|
);
|
|
14055
14127
|
};
|
|
14056
|
-
var
|
|
14128
|
+
var FRAGMENT33 = `
|
|
14057
14129
|
fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner {
|
|
14058
14130
|
__typename
|
|
14059
14131
|
... on Account {
|
|
@@ -14114,7 +14186,7 @@ query GetLightsparkNodeOwner($id: ID!) {
|
|
|
14114
14186
|
}
|
|
14115
14187
|
}
|
|
14116
14188
|
|
|
14117
|
-
${
|
|
14189
|
+
${FRAGMENT33}
|
|
14118
14190
|
`,
|
|
14119
14191
|
variables: { id },
|
|
14120
14192
|
constructObject: (data) => LightsparkNodeOwnerFromJson(data.entity)
|
|
@@ -14122,7 +14194,7 @@ ${FRAGMENT31}
|
|
|
14122
14194
|
};
|
|
14123
14195
|
|
|
14124
14196
|
// src/objects/OnChainTransaction.ts
|
|
14125
|
-
var
|
|
14197
|
+
var import_core14 = require("@lightsparkdev/core");
|
|
14126
14198
|
var OnChainTransactionFromJson = (obj) => {
|
|
14127
14199
|
if (obj["__typename"] == "ChannelClosingTransaction") {
|
|
14128
14200
|
return {
|
|
@@ -14196,12 +14268,12 @@ var OnChainTransactionFromJson = (obj) => {
|
|
|
14196
14268
|
numConfirmations: obj["withdrawal_num_confirmations"]
|
|
14197
14269
|
};
|
|
14198
14270
|
}
|
|
14199
|
-
throw new
|
|
14271
|
+
throw new import_core14.LightsparkException(
|
|
14200
14272
|
"DeserializationError",
|
|
14201
14273
|
`Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
|
|
14202
14274
|
);
|
|
14203
14275
|
};
|
|
14204
|
-
var
|
|
14276
|
+
var FRAGMENT34 = `
|
|
14205
14277
|
fragment OnChainTransactionFragment on OnChainTransaction {
|
|
14206
14278
|
__typename
|
|
14207
14279
|
... on ChannelClosingTransaction {
|
|
@@ -14344,7 +14416,7 @@ query GetOnChainTransaction($id: ID!) {
|
|
|
14344
14416
|
}
|
|
14345
14417
|
}
|
|
14346
14418
|
|
|
14347
|
-
${
|
|
14419
|
+
${FRAGMENT34}
|
|
14348
14420
|
`,
|
|
14349
14421
|
variables: { id },
|
|
14350
14422
|
constructObject: (data) => OnChainTransactionFromJson(data.entity)
|
|
@@ -14403,7 +14475,7 @@ var RoutingTransactionFromJson = (obj) => {
|
|
|
14403
14475
|
failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
|
|
14404
14476
|
};
|
|
14405
14477
|
};
|
|
14406
|
-
var
|
|
14478
|
+
var FRAGMENT35 = `
|
|
14407
14479
|
fragment RoutingTransactionFragment on RoutingTransaction {
|
|
14408
14480
|
__typename
|
|
14409
14481
|
routing_transaction_id: id
|
|
@@ -14451,7 +14523,7 @@ query GetRoutingTransaction($id: ID!) {
|
|
|
14451
14523
|
}
|
|
14452
14524
|
}
|
|
14453
14525
|
|
|
14454
|
-
${
|
|
14526
|
+
${FRAGMENT35}
|
|
14455
14527
|
`,
|
|
14456
14528
|
variables: { id },
|
|
14457
14529
|
constructObject: (data) => RoutingTransactionFromJson(data.entity)
|
|
@@ -14467,7 +14539,7 @@ var SignableFromJson = (obj) => {
|
|
|
14467
14539
|
typename: "Signable"
|
|
14468
14540
|
};
|
|
14469
14541
|
};
|
|
14470
|
-
var
|
|
14542
|
+
var FRAGMENT36 = `
|
|
14471
14543
|
fragment SignableFragment on Signable {
|
|
14472
14544
|
__typename
|
|
14473
14545
|
signable_id: id
|
|
@@ -14485,7 +14557,7 @@ query GetSignable($id: ID!) {
|
|
|
14485
14557
|
}
|
|
14486
14558
|
}
|
|
14487
14559
|
|
|
14488
|
-
${
|
|
14560
|
+
${FRAGMENT36}
|
|
14489
14561
|
`,
|
|
14490
14562
|
variables: { id },
|
|
14491
14563
|
constructObject: (data) => SignableFromJson(data.entity)
|
|
@@ -14525,6 +14597,7 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
|
|
|
14525
14597
|
WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
|
|
14526
14598
|
WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
|
|
14527
14599
|
WebhookEventType2["LOW_BALANCE"] = "LOW_BALANCE";
|
|
14600
|
+
WebhookEventType2["HIGH_BALANCE"] = "HIGH_BALANCE";
|
|
14528
14601
|
return WebhookEventType2;
|
|
14529
14602
|
})(WebhookEventType || {});
|
|
14530
14603
|
var WebhookEventType_default = WebhookEventType;
|
|
@@ -14548,7 +14621,7 @@ var WithdrawalFromJson = (obj) => {
|
|
|
14548
14621
|
numConfirmations: obj["withdrawal_num_confirmations"]
|
|
14549
14622
|
};
|
|
14550
14623
|
};
|
|
14551
|
-
var
|
|
14624
|
+
var FRAGMENT37 = `
|
|
14552
14625
|
fragment WithdrawalFragment on Withdrawal {
|
|
14553
14626
|
__typename
|
|
14554
14627
|
withdrawal_id: id
|
|
@@ -14592,7 +14665,7 @@ query GetWithdrawal($id: ID!) {
|
|
|
14592
14665
|
}
|
|
14593
14666
|
}
|
|
14594
14667
|
|
|
14595
|
-
${
|
|
14668
|
+
${FRAGMENT37}
|
|
14596
14669
|
`,
|
|
14597
14670
|
variables: { id },
|
|
14598
14671
|
constructObject: (data) => WithdrawalFromJson(data.entity)
|
|
@@ -14600,7 +14673,7 @@ ${FRAGMENT35}
|
|
|
14600
14673
|
};
|
|
14601
14674
|
|
|
14602
14675
|
// src/webhooks.ts
|
|
14603
|
-
var
|
|
14676
|
+
var import_core15 = require("@lightsparkdev/core");
|
|
14604
14677
|
var WEBHOOKS_SIGNATURE_HEADER = "lightspark-signature";
|
|
14605
14678
|
var verifyAndParseWebhook = async (data, hexdigest, webhook_secret) => {
|
|
14606
14679
|
const { createHmac } = await import("crypto");
|
|
@@ -14636,8 +14709,8 @@ var RemoteSigningWebhookHandler = class {
|
|
|
14636
14709
|
this.validator = validator;
|
|
14637
14710
|
}
|
|
14638
14711
|
async handleWebhookRequest(data, webhookSignature, webhookSecret) {
|
|
14639
|
-
if (!
|
|
14640
|
-
throw new
|
|
14712
|
+
if (!import_core15.isNode) {
|
|
14713
|
+
throw new import_core15.LightsparkSigningException(
|
|
14641
14714
|
"Environment not supported for handling webhooks."
|
|
14642
14715
|
);
|
|
14643
14716
|
}
|
|
@@ -14703,9 +14776,11 @@ var RemoteSigningWebhookHandler = class {
|
|
|
14703
14776
|
WithdrawalRequestStatus,
|
|
14704
14777
|
assertValidBitcoinNetwork,
|
|
14705
14778
|
getApiTokenQuery,
|
|
14779
|
+
getAuditLogActorQuery,
|
|
14706
14780
|
getBitcoinNetworkOrThrow,
|
|
14707
14781
|
getChannelClosingTransactionQuery,
|
|
14708
14782
|
getChannelOpeningTransactionQuery,
|
|
14783
|
+
getChannelSnapshotQuery,
|
|
14709
14784
|
getDepositQuery,
|
|
14710
14785
|
getHopQuery,
|
|
14711
14786
|
getIncomingPaymentAttemptQuery,
|