@lightsparkdev/lightspark-sdk 1.9.2 → 1.9.4
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 +20 -0
- package/dist/{chunk-KEXWDHIC.js → chunk-VCNFGP4P.js} +53 -1
- package/dist/{index-BxC6kyLD.d.cts → index-CCNALIhi.d.cts} +56 -0
- package/dist/{index-B4pktcM-.d.ts → index-gyjGw7N4.d.ts} +56 -0
- package/dist/index.cjs +149 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +99 -5
- package/dist/objects/index.cjs +53 -1
- package/dist/objects/index.d.cts +1 -1
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/package.json +3 -4
- package/src/client.ts +81 -0
- package/src/graphql/CancelUmaInvitation.ts +19 -0
- package/src/graphql/CreateUmaInvitationWithPayment.ts +25 -0
- package/src/objects/UmaCurrencyAmount.ts +44 -0
- package/src/objects/UmaInvitation.ts +53 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @lightsparkdev/lightspark-sdk
|
|
2
2
|
|
|
3
|
+
## 1.9.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 52a274f: - Regenerate GQL objects, add UmaCurrencyAmount object, update UmaInvitation with additional statuses
|
|
8
|
+
- Updated dependencies [52a274f]
|
|
9
|
+
- @lightsparkdev/core@1.4.2
|
|
10
|
+
- @lightsparkdev/crypto-wasm@0.1.16
|
|
11
|
+
|
|
12
|
+
## 1.9.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 7ae2525: - Add createUmaInvitationWithPayment
|
|
17
|
+
- Add cancelUmaInvitation
|
|
18
|
+
- Remove unneeded crypto-browserify as dependency
|
|
19
|
+
- Updated dependencies [7ae2525]
|
|
20
|
+
- @lightsparkdev/core@1.4.1
|
|
21
|
+
- @lightsparkdev/crypto-wasm@0.1.15
|
|
22
|
+
|
|
3
23
|
## 1.9.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -10783,6 +10783,40 @@ fragment TransactionUpdateFragment on Transaction {
|
|
|
10783
10783
|
|
|
10784
10784
|
// src/objects/UmaInvitation.ts
|
|
10785
10785
|
import { isObject as isObject33 } from "@lightsparkdev/core";
|
|
10786
|
+
|
|
10787
|
+
// src/objects/UmaCurrencyAmount.ts
|
|
10788
|
+
var UmaCurrencyAmount = class _UmaCurrencyAmount {
|
|
10789
|
+
value;
|
|
10790
|
+
currency;
|
|
10791
|
+
constructor(value, currency) {
|
|
10792
|
+
this.value = value;
|
|
10793
|
+
this.currency = currency;
|
|
10794
|
+
}
|
|
10795
|
+
static fromJson(obj) {
|
|
10796
|
+
if (!obj || !obj.currency) {
|
|
10797
|
+
throw new Error("Invalid currency amount data");
|
|
10798
|
+
}
|
|
10799
|
+
return new _UmaCurrencyAmount(obj.value, {
|
|
10800
|
+
code: obj.currency.code,
|
|
10801
|
+
symbol: obj.currency.symbol,
|
|
10802
|
+
decimals: obj.currency.decimals,
|
|
10803
|
+
name: obj.currency.name
|
|
10804
|
+
});
|
|
10805
|
+
}
|
|
10806
|
+
toJson() {
|
|
10807
|
+
return {
|
|
10808
|
+
value: this.value,
|
|
10809
|
+
currency: {
|
|
10810
|
+
code: this.currency.code,
|
|
10811
|
+
symbol: this.currency.symbol,
|
|
10812
|
+
decimals: this.currency.decimals,
|
|
10813
|
+
name: this.currency.name
|
|
10814
|
+
}
|
|
10815
|
+
};
|
|
10816
|
+
}
|
|
10817
|
+
};
|
|
10818
|
+
|
|
10819
|
+
// src/objects/UmaInvitation.ts
|
|
10786
10820
|
var UmaInvitationFromJson = (obj) => {
|
|
10787
10821
|
return {
|
|
10788
10822
|
id: obj["uma_invitation_id"],
|
|
@@ -10794,7 +10828,13 @@ var UmaInvitationFromJson = (obj) => {
|
|
|
10794
10828
|
incentivesStatus: IncentivesStatus_default[obj["uma_invitation_incentives_status"]] ?? IncentivesStatus_default.FUTURE_VALUE,
|
|
10795
10829
|
typename: "UmaInvitation",
|
|
10796
10830
|
inviteeUma: obj["uma_invitation_invitee_uma"],
|
|
10797
|
-
incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ?
|
|
10831
|
+
incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? obj["uma_invitation_incentives_ineligibility_reason"] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null,
|
|
10832
|
+
status: obj["uma_invitation_status"] ?? (() => {
|
|
10833
|
+
throw new Error("Required field 'uma_invitation_status' is missing");
|
|
10834
|
+
})(),
|
|
10835
|
+
paymentAmount: obj["uma_invitation_payment_amount"] ? UmaCurrencyAmount.fromJson(obj["uma_invitation_payment_amount"]) : void 0,
|
|
10836
|
+
cancelledAt: obj["uma_invitation_cancelled_at"],
|
|
10837
|
+
expiresAt: obj["uma_invitation_expires_at"]
|
|
10798
10838
|
};
|
|
10799
10839
|
};
|
|
10800
10840
|
var FRAGMENT38 = `
|
|
@@ -10809,6 +10849,18 @@ fragment UmaInvitationFragment on UmaInvitation {
|
|
|
10809
10849
|
uma_invitation_invitee_uma: invitee_uma
|
|
10810
10850
|
uma_invitation_incentives_status: incentives_status
|
|
10811
10851
|
uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
|
|
10852
|
+
uma_invitation_status: status
|
|
10853
|
+
uma_invitation_payment_amount: payment_amount {
|
|
10854
|
+
value
|
|
10855
|
+
currency {
|
|
10856
|
+
code
|
|
10857
|
+
symbol
|
|
10858
|
+
decimals
|
|
10859
|
+
name
|
|
10860
|
+
}
|
|
10861
|
+
}
|
|
10862
|
+
uma_invitation_cancelled_at: cancelled_at
|
|
10863
|
+
uma_invitation_expires_at: expires_at
|
|
10812
10864
|
}`;
|
|
10813
10865
|
var getUmaInvitationQuery = (id) => {
|
|
10814
10866
|
return {
|
|
@@ -2926,6 +2926,30 @@ declare enum IncentivesStatus {
|
|
|
2926
2926
|
INELIGIBLE = "INELIGIBLE"
|
|
2927
2927
|
}
|
|
2928
2928
|
|
|
2929
|
+
declare class UmaCurrencyAmount {
|
|
2930
|
+
value: number;
|
|
2931
|
+
currency: {
|
|
2932
|
+
code: string;
|
|
2933
|
+
symbol: string;
|
|
2934
|
+
decimals: number;
|
|
2935
|
+
name: string;
|
|
2936
|
+
};
|
|
2937
|
+
constructor(value: number, currency: {
|
|
2938
|
+
code: string;
|
|
2939
|
+
symbol: string;
|
|
2940
|
+
decimals: number;
|
|
2941
|
+
name: string;
|
|
2942
|
+
});
|
|
2943
|
+
static fromJson(obj: any): UmaCurrencyAmount;
|
|
2944
|
+
toJson(): any;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
declare enum UmaInvitationStatus {
|
|
2948
|
+
PENDING = "PENDING",
|
|
2949
|
+
CLAIMED = "CLAIMED",
|
|
2950
|
+
CANCELLED = "CANCELLED",
|
|
2951
|
+
EXPIRED = "EXPIRED"
|
|
2952
|
+
}
|
|
2929
2953
|
/** This is an object representing an UMA.ME invitation. **/
|
|
2930
2954
|
interface UmaInvitation {
|
|
2931
2955
|
/**
|
|
@@ -2951,6 +2975,14 @@ interface UmaInvitation {
|
|
|
2951
2975
|
inviteeUma?: string | undefined;
|
|
2952
2976
|
/** The reason why the invitation is not eligible for incentives, if applicable. **/
|
|
2953
2977
|
incentivesIneligibilityReason?: IncentivesIneligibilityReason | undefined;
|
|
2978
|
+
/** The status of the invitation. **/
|
|
2979
|
+
status: UmaInvitationStatus;
|
|
2980
|
+
/** Payment amount in lowest currency unit. Null if no payment attached. **/
|
|
2981
|
+
paymentAmount?: UmaCurrencyAmount | undefined;
|
|
2982
|
+
/** When the invitation was cancelled, if applicable. **/
|
|
2983
|
+
cancelledAt?: string | undefined;
|
|
2984
|
+
/** When the invitation expires. Null if no expiration set. **/
|
|
2985
|
+
expiresAt?: string | undefined;
|
|
2954
2986
|
}
|
|
2955
2987
|
declare const getUmaInvitationQuery: (id: string) => Query<UmaInvitation>;
|
|
2956
2988
|
|
|
@@ -3479,6 +3511,30 @@ declare class LightsparkClient {
|
|
|
3479
3511
|
* @param level The logging level to use.
|
|
3480
3512
|
* */
|
|
3481
3513
|
setLoggingEnabled(enabled: boolean, level?: LoggingLevel): void;
|
|
3514
|
+
/**
|
|
3515
|
+
* Creates an UMA invitation with an attached payment.
|
|
3516
|
+
*
|
|
3517
|
+
* @param inviterUma The UMA of the inviter.
|
|
3518
|
+
* @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
|
|
3519
|
+
* @param expiresAt The expiration date/time (Date).
|
|
3520
|
+
* @returns The invitation that was created, or null if creation failed.
|
|
3521
|
+
*/
|
|
3522
|
+
createUmaInvitationWithPayment(inviterUma: string, amountToSend: {
|
|
3523
|
+
amount: number;
|
|
3524
|
+
currency: {
|
|
3525
|
+
code: string;
|
|
3526
|
+
name: string;
|
|
3527
|
+
symbol: string;
|
|
3528
|
+
decimals: number;
|
|
3529
|
+
};
|
|
3530
|
+
}, expiresAt: Date): Promise<UmaInvitation | null>;
|
|
3531
|
+
/**
|
|
3532
|
+
* Cancels an UMA invitation by its invite code.
|
|
3533
|
+
*
|
|
3534
|
+
* @param invitationCode The code of the invitation to cancel.
|
|
3535
|
+
* @returns The cancelled invitation, or null if cancellation failed.
|
|
3536
|
+
*/
|
|
3537
|
+
cancelUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
|
|
3482
3538
|
}
|
|
3483
3539
|
|
|
3484
3540
|
/** Audit log actor who called the GraphQL mutation **/
|
|
@@ -2926,6 +2926,30 @@ declare enum IncentivesStatus {
|
|
|
2926
2926
|
INELIGIBLE = "INELIGIBLE"
|
|
2927
2927
|
}
|
|
2928
2928
|
|
|
2929
|
+
declare class UmaCurrencyAmount {
|
|
2930
|
+
value: number;
|
|
2931
|
+
currency: {
|
|
2932
|
+
code: string;
|
|
2933
|
+
symbol: string;
|
|
2934
|
+
decimals: number;
|
|
2935
|
+
name: string;
|
|
2936
|
+
};
|
|
2937
|
+
constructor(value: number, currency: {
|
|
2938
|
+
code: string;
|
|
2939
|
+
symbol: string;
|
|
2940
|
+
decimals: number;
|
|
2941
|
+
name: string;
|
|
2942
|
+
});
|
|
2943
|
+
static fromJson(obj: any): UmaCurrencyAmount;
|
|
2944
|
+
toJson(): any;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
declare enum UmaInvitationStatus {
|
|
2948
|
+
PENDING = "PENDING",
|
|
2949
|
+
CLAIMED = "CLAIMED",
|
|
2950
|
+
CANCELLED = "CANCELLED",
|
|
2951
|
+
EXPIRED = "EXPIRED"
|
|
2952
|
+
}
|
|
2929
2953
|
/** This is an object representing an UMA.ME invitation. **/
|
|
2930
2954
|
interface UmaInvitation {
|
|
2931
2955
|
/**
|
|
@@ -2951,6 +2975,14 @@ interface UmaInvitation {
|
|
|
2951
2975
|
inviteeUma?: string | undefined;
|
|
2952
2976
|
/** The reason why the invitation is not eligible for incentives, if applicable. **/
|
|
2953
2977
|
incentivesIneligibilityReason?: IncentivesIneligibilityReason | undefined;
|
|
2978
|
+
/** The status of the invitation. **/
|
|
2979
|
+
status: UmaInvitationStatus;
|
|
2980
|
+
/** Payment amount in lowest currency unit. Null if no payment attached. **/
|
|
2981
|
+
paymentAmount?: UmaCurrencyAmount | undefined;
|
|
2982
|
+
/** When the invitation was cancelled, if applicable. **/
|
|
2983
|
+
cancelledAt?: string | undefined;
|
|
2984
|
+
/** When the invitation expires. Null if no expiration set. **/
|
|
2985
|
+
expiresAt?: string | undefined;
|
|
2954
2986
|
}
|
|
2955
2987
|
declare const getUmaInvitationQuery: (id: string) => Query<UmaInvitation>;
|
|
2956
2988
|
|
|
@@ -3479,6 +3511,30 @@ declare class LightsparkClient {
|
|
|
3479
3511
|
* @param level The logging level to use.
|
|
3480
3512
|
* */
|
|
3481
3513
|
setLoggingEnabled(enabled: boolean, level?: LoggingLevel): void;
|
|
3514
|
+
/**
|
|
3515
|
+
* Creates an UMA invitation with an attached payment.
|
|
3516
|
+
*
|
|
3517
|
+
* @param inviterUma The UMA of the inviter.
|
|
3518
|
+
* @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
|
|
3519
|
+
* @param expiresAt The expiration date/time (Date).
|
|
3520
|
+
* @returns The invitation that was created, or null if creation failed.
|
|
3521
|
+
*/
|
|
3522
|
+
createUmaInvitationWithPayment(inviterUma: string, amountToSend: {
|
|
3523
|
+
amount: number;
|
|
3524
|
+
currency: {
|
|
3525
|
+
code: string;
|
|
3526
|
+
name: string;
|
|
3527
|
+
symbol: string;
|
|
3528
|
+
decimals: number;
|
|
3529
|
+
};
|
|
3530
|
+
}, expiresAt: Date): Promise<UmaInvitation | null>;
|
|
3531
|
+
/**
|
|
3532
|
+
* Cancels an UMA invitation by its invite code.
|
|
3533
|
+
*
|
|
3534
|
+
* @param invitationCode The code of the invitation to cancel.
|
|
3535
|
+
* @returns The cancelled invitation, or null if cancellation failed.
|
|
3536
|
+
*/
|
|
3537
|
+
cancelUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
|
|
3482
3538
|
}
|
|
3483
3539
|
|
|
3484
3540
|
/** Audit log actor who called the GraphQL mutation **/
|
package/dist/index.cjs
CHANGED
|
@@ -178,7 +178,7 @@ var import_core28 = require("@lightsparkdev/core");
|
|
|
178
178
|
// package.json
|
|
179
179
|
var package_default = {
|
|
180
180
|
name: "@lightsparkdev/lightspark-sdk",
|
|
181
|
-
version: "1.9.
|
|
181
|
+
version: "1.9.4",
|
|
182
182
|
description: "Lightspark JS SDK",
|
|
183
183
|
author: "Lightspark Inc.",
|
|
184
184
|
keywords: [
|
|
@@ -247,9 +247,8 @@ var package_default = {
|
|
|
247
247
|
},
|
|
248
248
|
license: "Apache-2.0",
|
|
249
249
|
dependencies: {
|
|
250
|
-
"@lightsparkdev/core": "1.4.
|
|
251
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
252
|
-
"crypto-browserify": "^3.12.0",
|
|
250
|
+
"@lightsparkdev/core": "1.4.2",
|
|
251
|
+
"@lightsparkdev/crypto-wasm": "0.1.16",
|
|
253
252
|
dayjs: "^1.11.7",
|
|
254
253
|
dotenv: "^16.3.1",
|
|
255
254
|
graphql: "^16.6.0",
|
|
@@ -3144,6 +3143,38 @@ var IncentivesStatus = /* @__PURE__ */ ((IncentivesStatus2) => {
|
|
|
3144
3143
|
})(IncentivesStatus || {});
|
|
3145
3144
|
var IncentivesStatus_default = IncentivesStatus;
|
|
3146
3145
|
|
|
3146
|
+
// src/objects/UmaCurrencyAmount.ts
|
|
3147
|
+
var UmaCurrencyAmount = class _UmaCurrencyAmount {
|
|
3148
|
+
value;
|
|
3149
|
+
currency;
|
|
3150
|
+
constructor(value, currency) {
|
|
3151
|
+
this.value = value;
|
|
3152
|
+
this.currency = currency;
|
|
3153
|
+
}
|
|
3154
|
+
static fromJson(obj) {
|
|
3155
|
+
if (!obj || !obj.currency) {
|
|
3156
|
+
throw new Error("Invalid currency amount data");
|
|
3157
|
+
}
|
|
3158
|
+
return new _UmaCurrencyAmount(obj.value, {
|
|
3159
|
+
code: obj.currency.code,
|
|
3160
|
+
symbol: obj.currency.symbol,
|
|
3161
|
+
decimals: obj.currency.decimals,
|
|
3162
|
+
name: obj.currency.name
|
|
3163
|
+
});
|
|
3164
|
+
}
|
|
3165
|
+
toJson() {
|
|
3166
|
+
return {
|
|
3167
|
+
value: this.value,
|
|
3168
|
+
currency: {
|
|
3169
|
+
code: this.currency.code,
|
|
3170
|
+
symbol: this.currency.symbol,
|
|
3171
|
+
decimals: this.currency.decimals,
|
|
3172
|
+
name: this.currency.name
|
|
3173
|
+
}
|
|
3174
|
+
};
|
|
3175
|
+
}
|
|
3176
|
+
};
|
|
3177
|
+
|
|
3147
3178
|
// src/objects/UmaInvitation.ts
|
|
3148
3179
|
var UmaInvitationFromJson = (obj) => {
|
|
3149
3180
|
return {
|
|
@@ -3156,7 +3187,13 @@ var UmaInvitationFromJson = (obj) => {
|
|
|
3156
3187
|
incentivesStatus: IncentivesStatus_default[obj["uma_invitation_incentives_status"]] ?? IncentivesStatus_default.FUTURE_VALUE,
|
|
3157
3188
|
typename: "UmaInvitation",
|
|
3158
3189
|
inviteeUma: obj["uma_invitation_invitee_uma"],
|
|
3159
|
-
incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ?
|
|
3190
|
+
incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? obj["uma_invitation_incentives_ineligibility_reason"] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null,
|
|
3191
|
+
status: obj["uma_invitation_status"] ?? (() => {
|
|
3192
|
+
throw new Error("Required field 'uma_invitation_status' is missing");
|
|
3193
|
+
})(),
|
|
3194
|
+
paymentAmount: obj["uma_invitation_payment_amount"] ? UmaCurrencyAmount.fromJson(obj["uma_invitation_payment_amount"]) : void 0,
|
|
3195
|
+
cancelledAt: obj["uma_invitation_cancelled_at"],
|
|
3196
|
+
expiresAt: obj["uma_invitation_expires_at"]
|
|
3160
3197
|
};
|
|
3161
3198
|
};
|
|
3162
3199
|
var FRAGMENT10 = `
|
|
@@ -3171,6 +3208,18 @@ fragment UmaInvitationFragment on UmaInvitation {
|
|
|
3171
3208
|
uma_invitation_invitee_uma: invitee_uma
|
|
3172
3209
|
uma_invitation_incentives_status: incentives_status
|
|
3173
3210
|
uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
|
|
3211
|
+
uma_invitation_status: status
|
|
3212
|
+
uma_invitation_payment_amount: payment_amount {
|
|
3213
|
+
value
|
|
3214
|
+
currency {
|
|
3215
|
+
code
|
|
3216
|
+
symbol
|
|
3217
|
+
decimals
|
|
3218
|
+
name
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
uma_invitation_cancelled_at: cancelled_at
|
|
3222
|
+
uma_invitation_expires_at: expires_at
|
|
3174
3223
|
}`;
|
|
3175
3224
|
var getUmaInvitationQuery = (id) => {
|
|
3176
3225
|
return {
|
|
@@ -3190,6 +3239,23 @@ ${FRAGMENT10}
|
|
|
3190
3239
|
};
|
|
3191
3240
|
};
|
|
3192
3241
|
|
|
3242
|
+
// src/graphql/CancelUmaInvitation.ts
|
|
3243
|
+
var CancelUmaInvitation = `
|
|
3244
|
+
mutation CancelUmaInvitation(
|
|
3245
|
+
$inviteCode: String!
|
|
3246
|
+
) {
|
|
3247
|
+
cancel_uma_invitation(input: {
|
|
3248
|
+
invite_code: $inviteCode
|
|
3249
|
+
}) {
|
|
3250
|
+
invitation {
|
|
3251
|
+
...UmaInvitationFragment
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
${FRAGMENT10}
|
|
3257
|
+
`;
|
|
3258
|
+
|
|
3193
3259
|
// src/graphql/ClaimUmaInvitation.ts
|
|
3194
3260
|
var ClaimUmaInvitation = `
|
|
3195
3261
|
mutation ClaimUmaInvitation(
|
|
@@ -3738,6 +3804,29 @@ var CreateUmaInvitationWithIncentives = `
|
|
|
3738
3804
|
${FRAGMENT10}
|
|
3739
3805
|
`;
|
|
3740
3806
|
|
|
3807
|
+
// src/graphql/CreateUmaInvitationWithPayment.ts
|
|
3808
|
+
var CreateUmaInvitationWithPayment = `
|
|
3809
|
+
mutation CreateUmaInvitationWithPayment(
|
|
3810
|
+
$inviterUma: String!
|
|
3811
|
+
$paymentAmount: Int!
|
|
3812
|
+
$paymentCurrency: UmaCurrencyInput!
|
|
3813
|
+
$expiresAt: DateTime!
|
|
3814
|
+
) {
|
|
3815
|
+
create_uma_invitation_with_payment(input: {
|
|
3816
|
+
inviter_uma: $inviterUma
|
|
3817
|
+
payment_amount: $paymentAmount
|
|
3818
|
+
payment_currency: $paymentCurrency
|
|
3819
|
+
expires_at: $expiresAt
|
|
3820
|
+
}) {
|
|
3821
|
+
invitation {
|
|
3822
|
+
...UmaInvitationFragment
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
${FRAGMENT10}
|
|
3828
|
+
`;
|
|
3829
|
+
|
|
3741
3830
|
// src/graphql/CreateUmaInvoice.ts
|
|
3742
3831
|
var CreateUmaInvoice = `
|
|
3743
3832
|
mutation CreateUmaInvoice(
|
|
@@ -11801,6 +11890,61 @@ var LightsparkClient = class {
|
|
|
11801
11890
|
import_core28.logger.setEnabled(enabled, level);
|
|
11802
11891
|
logger.setEnabled(enabled, level);
|
|
11803
11892
|
}
|
|
11893
|
+
/**
|
|
11894
|
+
* Creates an UMA invitation with an attached payment.
|
|
11895
|
+
*
|
|
11896
|
+
* @param inviterUma The UMA of the inviter.
|
|
11897
|
+
* @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
|
|
11898
|
+
* @param expiresAt The expiration date/time (Date).
|
|
11899
|
+
* @returns The invitation that was created, or null if creation failed.
|
|
11900
|
+
*/
|
|
11901
|
+
async createUmaInvitationWithPayment(inviterUma, amountToSend, expiresAt) {
|
|
11902
|
+
return await this.executeRawQuery({
|
|
11903
|
+
queryPayload: CreateUmaInvitationWithPayment,
|
|
11904
|
+
variables: {
|
|
11905
|
+
inviterUma,
|
|
11906
|
+
paymentAmount: amountToSend.amount,
|
|
11907
|
+
paymentCurrency: amountToSend.currency,
|
|
11908
|
+
expiresAt: expiresAt.toISOString()
|
|
11909
|
+
},
|
|
11910
|
+
constructObject: (responseJson) => {
|
|
11911
|
+
if (!responseJson.create_uma_invitation_with_payment?.invitation) {
|
|
11912
|
+
throw new import_core28.LightsparkException(
|
|
11913
|
+
"CreateUmaInvitationWithPaymentError",
|
|
11914
|
+
"Unable to create UMA invitation with payment"
|
|
11915
|
+
);
|
|
11916
|
+
}
|
|
11917
|
+
return UmaInvitationFromJson(
|
|
11918
|
+
responseJson.create_uma_invitation_with_payment.invitation
|
|
11919
|
+
);
|
|
11920
|
+
}
|
|
11921
|
+
});
|
|
11922
|
+
}
|
|
11923
|
+
/**
|
|
11924
|
+
* Cancels an UMA invitation by its invite code.
|
|
11925
|
+
*
|
|
11926
|
+
* @param invitationCode The code of the invitation to cancel.
|
|
11927
|
+
* @returns The cancelled invitation, or null if cancellation failed.
|
|
11928
|
+
*/
|
|
11929
|
+
async cancelUmaInvitation(invitationCode) {
|
|
11930
|
+
return await this.executeRawQuery({
|
|
11931
|
+
queryPayload: CancelUmaInvitation,
|
|
11932
|
+
variables: {
|
|
11933
|
+
inviteCode: invitationCode
|
|
11934
|
+
},
|
|
11935
|
+
constructObject: (responseJson) => {
|
|
11936
|
+
if (!responseJson.cancel_uma_invitation?.invitation) {
|
|
11937
|
+
throw new import_core28.LightsparkException(
|
|
11938
|
+
"CancelUmaInvitationError",
|
|
11939
|
+
"Unable to cancel UMA invitation"
|
|
11940
|
+
);
|
|
11941
|
+
}
|
|
11942
|
+
return UmaInvitationFromJson(
|
|
11943
|
+
responseJson.cancel_uma_invitation.invitation
|
|
11944
|
+
);
|
|
11945
|
+
}
|
|
11946
|
+
});
|
|
11947
|
+
}
|
|
11804
11948
|
};
|
|
11805
11949
|
var client_default = LightsparkClient;
|
|
11806
11950
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthProvider } from '@lightsparkdev/core';
|
|
2
|
-
import { W as WebhookEventType, L as LightsparkClient } from './index-
|
|
3
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-
|
|
2
|
+
import { W as WebhookEventType, L as LightsparkClient } from './index-CCNALIhi.cjs';
|
|
3
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-CCNALIhi.cjs';
|
|
4
4
|
import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.cjs';
|
|
5
5
|
import 'zen-observable';
|
|
6
6
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthProvider } from '@lightsparkdev/core';
|
|
2
|
-
import { W as WebhookEventType, L as LightsparkClient } from './index-
|
|
3
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-
|
|
2
|
+
import { W as WebhookEventType, L as LightsparkClient } from './index-gyjGw7N4.js';
|
|
3
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from './index-gyjGw7N4.js';
|
|
4
4
|
import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.js';
|
|
5
5
|
import 'zen-observable';
|
|
6
6
|
|
package/dist/index.js
CHANGED
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
getTransactionQuery,
|
|
96
96
|
getUmaInvitationQuery,
|
|
97
97
|
getWithdrawalQuery
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-VCNFGP4P.js";
|
|
99
99
|
import {
|
|
100
100
|
BitcoinNetwork_default
|
|
101
101
|
} from "./chunk-K6SAUSAX.js";
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
// package.json
|
|
154
154
|
var package_default = {
|
|
155
155
|
name: "@lightsparkdev/lightspark-sdk",
|
|
156
|
-
version: "1.9.
|
|
156
|
+
version: "1.9.4",
|
|
157
157
|
description: "Lightspark JS SDK",
|
|
158
158
|
author: "Lightspark Inc.",
|
|
159
159
|
keywords: [
|
|
@@ -222,9 +222,8 @@ var package_default = {
|
|
|
222
222
|
},
|
|
223
223
|
license: "Apache-2.0",
|
|
224
224
|
dependencies: {
|
|
225
|
-
"@lightsparkdev/core": "1.4.
|
|
226
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
227
|
-
"crypto-browserify": "^3.12.0",
|
|
225
|
+
"@lightsparkdev/core": "1.4.2",
|
|
226
|
+
"@lightsparkdev/crypto-wasm": "0.1.16",
|
|
228
227
|
dayjs: "^1.11.7",
|
|
229
228
|
dotenv: "^16.3.1",
|
|
230
229
|
graphql: "^16.6.0",
|
|
@@ -469,6 +468,23 @@ var CancelInvoice = `
|
|
|
469
468
|
${FRAGMENT4}
|
|
470
469
|
`;
|
|
471
470
|
|
|
471
|
+
// src/graphql/CancelUmaInvitation.ts
|
|
472
|
+
var CancelUmaInvitation = `
|
|
473
|
+
mutation CancelUmaInvitation(
|
|
474
|
+
$inviteCode: String!
|
|
475
|
+
) {
|
|
476
|
+
cancel_uma_invitation(input: {
|
|
477
|
+
invite_code: $inviteCode
|
|
478
|
+
}) {
|
|
479
|
+
invitation {
|
|
480
|
+
...UmaInvitationFragment
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
${FRAGMENT5}
|
|
486
|
+
`;
|
|
487
|
+
|
|
472
488
|
// src/graphql/ClaimUmaInvitation.ts
|
|
473
489
|
var ClaimUmaInvitation = `
|
|
474
490
|
mutation ClaimUmaInvitation(
|
|
@@ -678,6 +694,29 @@ var CreateUmaInvitationWithIncentives = `
|
|
|
678
694
|
${FRAGMENT5}
|
|
679
695
|
`;
|
|
680
696
|
|
|
697
|
+
// src/graphql/CreateUmaInvitationWithPayment.ts
|
|
698
|
+
var CreateUmaInvitationWithPayment = `
|
|
699
|
+
mutation CreateUmaInvitationWithPayment(
|
|
700
|
+
$inviterUma: String!
|
|
701
|
+
$paymentAmount: Int!
|
|
702
|
+
$paymentCurrency: UmaCurrencyInput!
|
|
703
|
+
$expiresAt: DateTime!
|
|
704
|
+
) {
|
|
705
|
+
create_uma_invitation_with_payment(input: {
|
|
706
|
+
inviter_uma: $inviterUma
|
|
707
|
+
payment_amount: $paymentAmount
|
|
708
|
+
payment_currency: $paymentCurrency
|
|
709
|
+
expires_at: $expiresAt
|
|
710
|
+
}) {
|
|
711
|
+
invitation {
|
|
712
|
+
...UmaInvitationFragment
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
${FRAGMENT5}
|
|
718
|
+
`;
|
|
719
|
+
|
|
681
720
|
// src/graphql/CreateUmaInvoice.ts
|
|
682
721
|
var CreateUmaInvoice = `
|
|
683
722
|
mutation CreateUmaInvoice(
|
|
@@ -2614,6 +2653,61 @@ var LightsparkClient = class {
|
|
|
2614
2653
|
coreLogger.setEnabled(enabled, level);
|
|
2615
2654
|
logger.setEnabled(enabled, level);
|
|
2616
2655
|
}
|
|
2656
|
+
/**
|
|
2657
|
+
* Creates an UMA invitation with an attached payment.
|
|
2658
|
+
*
|
|
2659
|
+
* @param inviterUma The UMA of the inviter.
|
|
2660
|
+
* @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
|
|
2661
|
+
* @param expiresAt The expiration date/time (Date).
|
|
2662
|
+
* @returns The invitation that was created, or null if creation failed.
|
|
2663
|
+
*/
|
|
2664
|
+
async createUmaInvitationWithPayment(inviterUma, amountToSend, expiresAt) {
|
|
2665
|
+
return await this.executeRawQuery({
|
|
2666
|
+
queryPayload: CreateUmaInvitationWithPayment,
|
|
2667
|
+
variables: {
|
|
2668
|
+
inviterUma,
|
|
2669
|
+
paymentAmount: amountToSend.amount,
|
|
2670
|
+
paymentCurrency: amountToSend.currency,
|
|
2671
|
+
expiresAt: expiresAt.toISOString()
|
|
2672
|
+
},
|
|
2673
|
+
constructObject: (responseJson) => {
|
|
2674
|
+
if (!responseJson.create_uma_invitation_with_payment?.invitation) {
|
|
2675
|
+
throw new LightsparkException(
|
|
2676
|
+
"CreateUmaInvitationWithPaymentError",
|
|
2677
|
+
"Unable to create UMA invitation with payment"
|
|
2678
|
+
);
|
|
2679
|
+
}
|
|
2680
|
+
return UmaInvitationFromJson(
|
|
2681
|
+
responseJson.create_uma_invitation_with_payment.invitation
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
}
|
|
2686
|
+
/**
|
|
2687
|
+
* Cancels an UMA invitation by its invite code.
|
|
2688
|
+
*
|
|
2689
|
+
* @param invitationCode The code of the invitation to cancel.
|
|
2690
|
+
* @returns The cancelled invitation, or null if cancellation failed.
|
|
2691
|
+
*/
|
|
2692
|
+
async cancelUmaInvitation(invitationCode) {
|
|
2693
|
+
return await this.executeRawQuery({
|
|
2694
|
+
queryPayload: CancelUmaInvitation,
|
|
2695
|
+
variables: {
|
|
2696
|
+
inviteCode: invitationCode
|
|
2697
|
+
},
|
|
2698
|
+
constructObject: (responseJson) => {
|
|
2699
|
+
if (!responseJson.cancel_uma_invitation?.invitation) {
|
|
2700
|
+
throw new LightsparkException(
|
|
2701
|
+
"CancelUmaInvitationError",
|
|
2702
|
+
"Unable to cancel UMA invitation"
|
|
2703
|
+
);
|
|
2704
|
+
}
|
|
2705
|
+
return UmaInvitationFromJson(
|
|
2706
|
+
responseJson.cancel_uma_invitation.invitation
|
|
2707
|
+
);
|
|
2708
|
+
}
|
|
2709
|
+
});
|
|
2710
|
+
}
|
|
2617
2711
|
};
|
|
2618
2712
|
var client_default = LightsparkClient;
|
|
2619
2713
|
|
package/dist/objects/index.cjs
CHANGED
|
@@ -10503,6 +10503,40 @@ var TransactionType_default = TransactionType;
|
|
|
10503
10503
|
|
|
10504
10504
|
// src/objects/UmaInvitation.ts
|
|
10505
10505
|
var import_core35 = require("@lightsparkdev/core");
|
|
10506
|
+
|
|
10507
|
+
// src/objects/UmaCurrencyAmount.ts
|
|
10508
|
+
var UmaCurrencyAmount = class _UmaCurrencyAmount {
|
|
10509
|
+
value;
|
|
10510
|
+
currency;
|
|
10511
|
+
constructor(value, currency) {
|
|
10512
|
+
this.value = value;
|
|
10513
|
+
this.currency = currency;
|
|
10514
|
+
}
|
|
10515
|
+
static fromJson(obj) {
|
|
10516
|
+
if (!obj || !obj.currency) {
|
|
10517
|
+
throw new Error("Invalid currency amount data");
|
|
10518
|
+
}
|
|
10519
|
+
return new _UmaCurrencyAmount(obj.value, {
|
|
10520
|
+
code: obj.currency.code,
|
|
10521
|
+
symbol: obj.currency.symbol,
|
|
10522
|
+
decimals: obj.currency.decimals,
|
|
10523
|
+
name: obj.currency.name
|
|
10524
|
+
});
|
|
10525
|
+
}
|
|
10526
|
+
toJson() {
|
|
10527
|
+
return {
|
|
10528
|
+
value: this.value,
|
|
10529
|
+
currency: {
|
|
10530
|
+
code: this.currency.code,
|
|
10531
|
+
symbol: this.currency.symbol,
|
|
10532
|
+
decimals: this.currency.decimals,
|
|
10533
|
+
name: this.currency.name
|
|
10534
|
+
}
|
|
10535
|
+
};
|
|
10536
|
+
}
|
|
10537
|
+
};
|
|
10538
|
+
|
|
10539
|
+
// src/objects/UmaInvitation.ts
|
|
10506
10540
|
var UmaInvitationFromJson = (obj) => {
|
|
10507
10541
|
return {
|
|
10508
10542
|
id: obj["uma_invitation_id"],
|
|
@@ -10514,7 +10548,13 @@ var UmaInvitationFromJson = (obj) => {
|
|
|
10514
10548
|
incentivesStatus: IncentivesStatus_default[obj["uma_invitation_incentives_status"]] ?? IncentivesStatus_default.FUTURE_VALUE,
|
|
10515
10549
|
typename: "UmaInvitation",
|
|
10516
10550
|
inviteeUma: obj["uma_invitation_invitee_uma"],
|
|
10517
|
-
incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ?
|
|
10551
|
+
incentivesIneligibilityReason: !!obj["uma_invitation_incentives_ineligibility_reason"] ? obj["uma_invitation_incentives_ineligibility_reason"] ?? IncentivesIneligibilityReason_default.FUTURE_VALUE : null,
|
|
10552
|
+
status: obj["uma_invitation_status"] ?? (() => {
|
|
10553
|
+
throw new Error("Required field 'uma_invitation_status' is missing");
|
|
10554
|
+
})(),
|
|
10555
|
+
paymentAmount: obj["uma_invitation_payment_amount"] ? UmaCurrencyAmount.fromJson(obj["uma_invitation_payment_amount"]) : void 0,
|
|
10556
|
+
cancelledAt: obj["uma_invitation_cancelled_at"],
|
|
10557
|
+
expiresAt: obj["uma_invitation_expires_at"]
|
|
10518
10558
|
};
|
|
10519
10559
|
};
|
|
10520
10560
|
var FRAGMENT33 = `
|
|
@@ -10529,6 +10569,18 @@ fragment UmaInvitationFragment on UmaInvitation {
|
|
|
10529
10569
|
uma_invitation_invitee_uma: invitee_uma
|
|
10530
10570
|
uma_invitation_incentives_status: incentives_status
|
|
10531
10571
|
uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
|
|
10572
|
+
uma_invitation_status: status
|
|
10573
|
+
uma_invitation_payment_amount: payment_amount {
|
|
10574
|
+
value
|
|
10575
|
+
currency {
|
|
10576
|
+
code
|
|
10577
|
+
symbol
|
|
10578
|
+
decimals
|
|
10579
|
+
name
|
|
10580
|
+
}
|
|
10581
|
+
}
|
|
10582
|
+
uma_invitation_cancelled_at: cancelled_at
|
|
10583
|
+
uma_invitation_expires_at: expires_at
|
|
10532
10584
|
}`;
|
|
10533
10585
|
var getUmaInvitationQuery = (id) => {
|
|
10534
10586
|
return {
|
package/dist/objects/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-
|
|
1
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-CCNALIhi.cjs';
|
|
2
2
|
export { B as BitcoinNetwork } from '../BitcoinNetwork-CIfB1c0X.cjs';
|
|
3
3
|
import '@lightsparkdev/core';
|
|
4
4
|
import 'zen-observable';
|
package/dist/objects/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-
|
|
1
|
+
export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as AccountToWithdrawalRequestsConnection, h as ApiToken, j as AuditLogActor, B as Balances, l as BlockchainBalance, C as CancelInvoiceInput, m as CancelInvoiceOutput, n as Channel, o as ChannelClosingTransaction, q as ChannelFees, r as ChannelOpeningTransaction, t as ChannelSnapshot, v as ChannelStatus, w as ChannelToTransactionsConnection, x as ClaimUmaInvitationInput, y as ClaimUmaInvitationOutput, z as ClaimUmaInvitationWithIncentivesInput, D as ClaimUmaInvitationWithIncentivesOutput, E as ComplianceProvider, F as Connection, G as CreateApiTokenInput, H as CreateApiTokenOutput, I as CreateInvitationWithIncentivesInput, J as CreateInvitationWithIncentivesOutput, K as CreateInvoiceInput, M as CreateInvoiceOutput, N as CreateLnurlInvoiceInput, O as CreateNodeWalletAddressInput, P as CreateNodeWalletAddressOutput, Q as CreateOfferInput, R as CreateOfferOutput, S as CreateTestModeInvoiceInput, T as CreateTestModeInvoiceOutput, U as CreateTestModePaymentInput, V as CreateTestModePaymentoutput, X as CreateUmaInvitationInput, Y as CreateUmaInvitationOutput, Z as CreateUmaInvoiceInput, _ as CurrencyAmount, $ as CurrencyAmountInput, a0 as CurrencyUnit, a1 as DailyLiquidityForecast, a2 as DeclineToSignMessagesInput, a3 as DeclineToSignMessagesOutput, a4 as DeleteApiTokenInput, a5 as DeleteApiTokenOutput, a6 as Deposit, a8 as Entity, a9 as FailHtlcsInput, aa as FailHtlcsOutput, ab as FeeEstimate, ac as FundNodeInput, ad as FundNodeOutput, ae as GraphNode, af as Hop, ah as HtlcAttemptFailureCode, ai as IdAndSignature, aj as IncentivesIneligibilityReason, ak as IncentivesStatus, al as IncomingPayment, am as IncomingPaymentAttempt, ao as IncomingPaymentAttemptStatus, at as IncomingPaymentToAttemptsConnection, ap as IncomingPaymentsForInvoiceQueryInput, aq as IncomingPaymentsForInvoiceQueryOutput, ar as IncomingPaymentsForPaymentHashQueryInput, as as IncomingPaymentsForPaymentHashQueryOutput, au as Invoice, aw as InvoiceData, ax as InvoiceForPaymentHashInput, ay as InvoiceForPaymentHashOutput, az as InvoiceType, aA as LightningFeeEstimateForInvoiceInput, aB as LightningFeeEstimateForNodeInput, aC as LightningFeeEstimateOutput, aD as LightningPaymentDirection, aE as LightningTransaction, aG as LightsparkNode, aI as LightsparkNodeOwner, aK as LightsparkNodeStatus, aL as LightsparkNodeToChannelsConnection, aM as LightsparkNodeToDailyLiquidityForecastsConnection, aN as LightsparkNodeWithOSK, aO as LightsparkNodeWithRemoteSigning, aP as MultiSigAddressValidationParameters, aQ as Node, aS as NodeAddress, aT as NodeAddressType, aU as NodeToAddressesConnection, aV as Offer, aX as OfferData, aZ as OnChainFeeTarget, a_ as OnChainTransaction, b0 as OutgoingPayment, b1 as OutgoingPaymentAttempt, b2 as OutgoingPaymentAttemptStatus, b3 as OutgoingPaymentAttemptToHopsConnection, b4 as OutgoingPaymentForIdempotencyKeyInput, b5 as OutgoingPaymentForIdempotencyKeyOutput, ba as OutgoingPaymentToAttemptsConnection, b6 as OutgoingPaymentsForInvoiceQueryInput, b7 as OutgoingPaymentsForInvoiceQueryOutput, b8 as OutgoingPaymentsForPaymentHashQueryInput, b9 as OutgoingPaymentsForPaymentHashQueryOutput, bb as PageInfo, bc as PayInvoiceInput, bd as PayInvoiceOutput, bk as PayOfferInput, bl as PayOfferOutput, bm as PayTestModeInvoiceInput, bn as PayUmaInvoiceInput, be as PaymentDirection, bf as PaymentFailureReason, bg as PaymentRequest, bi as PaymentRequestData, bj as PaymentRequestStatus, bo as Permission, bp as PostTransactionData, bq as RegionCode, br as RegisterPaymentInput, bs as RegisterPaymentOutput, bt as ReleaseChannelPerCommitmentSecretInput, bu as ReleaseChannelPerCommitmentSecretOutput, bv as ReleasePaymentPreimageInput, bw as ReleasePaymentPreimageOutput, bx as RemoteSigningSubEventType, by as RequestInitiator, bz as RequestWithdrawalInput, bA as RequestWithdrawalOutput, bB as RichText, bC as RiskRating, bD as RoutingTransaction, bF as RoutingTransactionFailureReason, bG as ScreenNodeInput, bH as ScreenNodeOutput, bI as Secret, bJ as SendPaymentInput, bK as SendPaymentOutput, bL as SetInvoicePaymentHashInput, bM as SetInvoicePaymentHashOutput, bS as SignInvoiceInput, bT as SignInvoiceOutput, bU as SignMessagesInput, bV as SignMessagesOutput, bN as Signable, bP as SignablePayload, bR as SignablePayloadStatus, bW as SingleNodeDashboard, bX as Transaction, bZ as TransactionFailures, b_ as TransactionStatus, b$ as TransactionType, c0 as TransactionUpdate, c1 as UmaInvitation, c3 as UpdateChannelPerCommitmentPointInput, c4 as UpdateChannelPerCommitmentPointOutput, c5 as UpdateNodeSharedSecretInput, c6 as UpdateNodeSharedSecretOutput, c7 as Wallet, c8 as WalletStatus, c9 as WalletToPaymentRequestsConnection, ca as WalletToTransactionsConnection, cb as WalletToWithdrawalRequestsConnection, W as WebhookEventType, cc as Withdrawal, ce as WithdrawalFeeEstimateInput, cf as WithdrawalFeeEstimateOutput, cg as WithdrawalMode, ch as WithdrawalRequest, ci as WithdrawalRequestStatus, cj as WithdrawalRequestToChannelClosingTransactionsConnection, ck as WithdrawalRequestToChannelOpeningTransactionsConnection, cl as WithdrawalRequestToWithdrawalsConnection, i as getApiTokenQuery, k as getAuditLogActorQuery, p as getChannelClosingTransactionQuery, s as getChannelOpeningTransactionQuery, u as getChannelSnapshotQuery, a7 as getDepositQuery, ag as getHopQuery, an as getIncomingPaymentAttemptQuery, av as getInvoiceQuery, aF as getLightningTransactionQuery, aJ as getLightsparkNodeOwnerQuery, aH as getLightsparkNodeQuery, aR as getNodeQuery, aY as getOfferDataQuery, aW as getOfferQuery, a$ as getOnChainTransactionQuery, bh as getPaymentRequestQuery, bE as getRoutingTransactionQuery, bQ as getSignablePayloadQuery, bO as getSignableQuery, bY as getTransactionQuery, c2 as getUmaInvitationQuery, cd as getWithdrawalQuery } from '../index-gyjGw7N4.js';
|
|
2
2
|
export { B as BitcoinNetwork } from '../BitcoinNetwork-CIfB1c0X.js';
|
|
3
3
|
import '@lightsparkdev/core';
|
|
4
4
|
import 'zen-observable';
|
package/dist/objects/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightsparkdev/lightspark-sdk",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Lightspark JS SDK",
|
|
5
5
|
"author": "Lightspark Inc.",
|
|
6
6
|
"keywords": [
|
|
@@ -69,9 +69,8 @@
|
|
|
69
69
|
},
|
|
70
70
|
"license": "Apache-2.0",
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@lightsparkdev/core": "1.4.
|
|
73
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
74
|
-
"crypto-browserify": "^3.12.0",
|
|
72
|
+
"@lightsparkdev/core": "1.4.2",
|
|
73
|
+
"@lightsparkdev/crypto-wasm": "0.1.16",
|
|
75
74
|
"dayjs": "^1.11.7",
|
|
76
75
|
"dotenv": "^16.3.1",
|
|
77
76
|
"graphql": "^16.6.0",
|
package/src/client.ts
CHANGED
|
@@ -29,6 +29,7 @@ import NodeKeyLoaderCache from "./NodeKeyLoaderCache.js";
|
|
|
29
29
|
import { type SigningKeyLoaderArgs } from "./SigningKeyLoader.js";
|
|
30
30
|
import { BitcoinFeeEstimate as BitcoinFeeEstimateQuery } from "./graphql/BitcoinFeeEstimate.js";
|
|
31
31
|
import { CancelInvoice } from "./graphql/CancelInvoice.js";
|
|
32
|
+
import { CancelUmaInvitation } from "./graphql/CancelUmaInvitation.js";
|
|
32
33
|
import { ClaimUmaInvitation } from "./graphql/ClaimUmaInvitation.js";
|
|
33
34
|
import { ClaimUmaInvitationWithIncentives } from "./graphql/ClaimUmaInvitationWithIncentives.js";
|
|
34
35
|
import { CreateApiToken } from "./graphql/CreateApiToken.js";
|
|
@@ -40,6 +41,7 @@ import { CreateTestModeInvoice } from "./graphql/CreateTestModeInvoice.js";
|
|
|
40
41
|
import { CreateTestModePayment } from "./graphql/CreateTestModePayment.js";
|
|
41
42
|
import { CreateUmaInvitation } from "./graphql/CreateUmaInvitation.js";
|
|
42
43
|
import { CreateUmaInvitationWithIncentives } from "./graphql/CreateUmaInvitationWithIncentives.js";
|
|
44
|
+
import { CreateUmaInvitationWithPayment } from "./graphql/CreateUmaInvitationWithPayment.js";
|
|
43
45
|
import { CreateUmaInvoice } from "./graphql/CreateUmaInvoice.js";
|
|
44
46
|
import { DecodeInvoice } from "./graphql/DecodeInvoice.js";
|
|
45
47
|
import { DeleteApiToken } from "./graphql/DeleteApiToken.js";
|
|
@@ -1737,6 +1739,85 @@ class LightsparkClient {
|
|
|
1737
1739
|
coreLogger.setEnabled(enabled, level);
|
|
1738
1740
|
logger.setEnabled(enabled, level);
|
|
1739
1741
|
}
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* Creates an UMA invitation with an attached payment.
|
|
1745
|
+
*
|
|
1746
|
+
* @param inviterUma The UMA of the inviter.
|
|
1747
|
+
* @param amountToSend The amount and currency to send in the smallest unit of the currency (i.e. cents for USD).
|
|
1748
|
+
* @param expiresAt The expiration date/time (Date).
|
|
1749
|
+
* @returns The invitation that was created, or null if creation failed.
|
|
1750
|
+
*/
|
|
1751
|
+
public async createUmaInvitationWithPayment(
|
|
1752
|
+
inviterUma: string,
|
|
1753
|
+
amountToSend: {
|
|
1754
|
+
amount: number;
|
|
1755
|
+
currency: {
|
|
1756
|
+
code: string;
|
|
1757
|
+
name: string;
|
|
1758
|
+
symbol: string;
|
|
1759
|
+
decimals: number;
|
|
1760
|
+
};
|
|
1761
|
+
},
|
|
1762
|
+
expiresAt: Date,
|
|
1763
|
+
): Promise<UmaInvitation | null> {
|
|
1764
|
+
return await this.executeRawQuery({
|
|
1765
|
+
queryPayload: CreateUmaInvitationWithPayment,
|
|
1766
|
+
variables: {
|
|
1767
|
+
inviterUma,
|
|
1768
|
+
paymentAmount: amountToSend.amount,
|
|
1769
|
+
paymentCurrency: amountToSend.currency,
|
|
1770
|
+
expiresAt: expiresAt.toISOString(),
|
|
1771
|
+
},
|
|
1772
|
+
constructObject: (responseJson: {
|
|
1773
|
+
create_uma_invitation_with_payment: {
|
|
1774
|
+
invitation: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1775
|
+
} | null;
|
|
1776
|
+
}) => {
|
|
1777
|
+
if (!responseJson.create_uma_invitation_with_payment?.invitation) {
|
|
1778
|
+
throw new LightsparkException(
|
|
1779
|
+
"CreateUmaInvitationWithPaymentError",
|
|
1780
|
+
"Unable to create UMA invitation with payment",
|
|
1781
|
+
);
|
|
1782
|
+
}
|
|
1783
|
+
return UmaInvitationFromJson(
|
|
1784
|
+
responseJson.create_uma_invitation_with_payment.invitation,
|
|
1785
|
+
);
|
|
1786
|
+
},
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* Cancels an UMA invitation by its invite code.
|
|
1792
|
+
*
|
|
1793
|
+
* @param invitationCode The code of the invitation to cancel.
|
|
1794
|
+
* @returns The cancelled invitation, or null if cancellation failed.
|
|
1795
|
+
*/
|
|
1796
|
+
public async cancelUmaInvitation(
|
|
1797
|
+
invitationCode: string,
|
|
1798
|
+
): Promise<UmaInvitation | null> {
|
|
1799
|
+
return await this.executeRawQuery({
|
|
1800
|
+
queryPayload: CancelUmaInvitation,
|
|
1801
|
+
variables: {
|
|
1802
|
+
inviteCode: invitationCode,
|
|
1803
|
+
},
|
|
1804
|
+
constructObject: (responseJson: {
|
|
1805
|
+
cancel_uma_invitation: {
|
|
1806
|
+
invitation: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1807
|
+
} | null;
|
|
1808
|
+
}) => {
|
|
1809
|
+
if (!responseJson.cancel_uma_invitation?.invitation) {
|
|
1810
|
+
throw new LightsparkException(
|
|
1811
|
+
"CancelUmaInvitationError",
|
|
1812
|
+
"Unable to cancel UMA invitation",
|
|
1813
|
+
);
|
|
1814
|
+
}
|
|
1815
|
+
return UmaInvitationFromJson(
|
|
1816
|
+
responseJson.cancel_uma_invitation.invitation,
|
|
1817
|
+
);
|
|
1818
|
+
},
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1740
1821
|
}
|
|
1741
1822
|
|
|
1742
1823
|
export default LightsparkClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import { FRAGMENT as UmaInvitationFragment } from "../objects/UmaInvitation.js";
|
|
4
|
+
|
|
5
|
+
export const CancelUmaInvitation = `
|
|
6
|
+
mutation CancelUmaInvitation(
|
|
7
|
+
$inviteCode: String!
|
|
8
|
+
) {
|
|
9
|
+
cancel_uma_invitation(input: {
|
|
10
|
+
invite_code: $inviteCode
|
|
11
|
+
}) {
|
|
12
|
+
invitation {
|
|
13
|
+
...UmaInvitationFragment
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
${UmaInvitationFragment}
|
|
19
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
import { FRAGMENT as UmaInvitationFragment } from "../objects/UmaInvitation.js";
|
|
4
|
+
|
|
5
|
+
export const CreateUmaInvitationWithPayment = `
|
|
6
|
+
mutation CreateUmaInvitationWithPayment(
|
|
7
|
+
$inviterUma: String!
|
|
8
|
+
$paymentAmount: Int!
|
|
9
|
+
$paymentCurrency: UmaCurrencyInput!
|
|
10
|
+
$expiresAt: DateTime!
|
|
11
|
+
) {
|
|
12
|
+
create_uma_invitation_with_payment(input: {
|
|
13
|
+
inviter_uma: $inviterUma
|
|
14
|
+
payment_amount: $paymentAmount
|
|
15
|
+
payment_currency: $paymentCurrency
|
|
16
|
+
expires_at: $expiresAt
|
|
17
|
+
}) {
|
|
18
|
+
invitation {
|
|
19
|
+
...UmaInvitationFragment
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
${UmaInvitationFragment}
|
|
25
|
+
`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
|
|
3
|
+
export class UmaCurrencyAmount {
|
|
4
|
+
value: number;
|
|
5
|
+
currency: {
|
|
6
|
+
code: string;
|
|
7
|
+
symbol: string;
|
|
8
|
+
decimals: number;
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
value: number,
|
|
14
|
+
currency: { code: string; symbol: string; decimals: number; name: string },
|
|
15
|
+
) {
|
|
16
|
+
this.value = value;
|
|
17
|
+
this.currency = currency;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static fromJson(obj: any): UmaCurrencyAmount {
|
|
21
|
+
if (!obj || !obj.currency) {
|
|
22
|
+
throw new Error("Invalid currency amount data");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return new UmaCurrencyAmount(obj.value, {
|
|
26
|
+
code: obj.currency.code,
|
|
27
|
+
symbol: obj.currency.symbol,
|
|
28
|
+
decimals: obj.currency.decimals,
|
|
29
|
+
name: obj.currency.name,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
toJson(): any {
|
|
34
|
+
return {
|
|
35
|
+
value: this.value,
|
|
36
|
+
currency: {
|
|
37
|
+
code: this.currency.code,
|
|
38
|
+
symbol: this.currency.symbol,
|
|
39
|
+
decimals: this.currency.decimals,
|
|
40
|
+
name: this.currency.name,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
import { type Query, isObject } from "@lightsparkdev/core";
|
|
4
4
|
import IncentivesIneligibilityReason from "./IncentivesIneligibilityReason.js";
|
|
5
5
|
import IncentivesStatus from "./IncentivesStatus.js";
|
|
6
|
+
import { UmaCurrencyAmount } from "./UmaCurrencyAmount.js";
|
|
7
|
+
|
|
8
|
+
export enum UmaInvitationStatus {
|
|
9
|
+
PENDING = "PENDING",
|
|
10
|
+
CLAIMED = "CLAIMED",
|
|
11
|
+
CANCELLED = "CANCELLED",
|
|
12
|
+
EXPIRED = "EXPIRED",
|
|
13
|
+
}
|
|
6
14
|
|
|
7
15
|
/** This is an object representing an UMA.ME invitation. **/
|
|
8
16
|
interface UmaInvitation {
|
|
@@ -38,6 +46,18 @@ interface UmaInvitation {
|
|
|
38
46
|
|
|
39
47
|
/** The reason why the invitation is not eligible for incentives, if applicable. **/
|
|
40
48
|
incentivesIneligibilityReason?: IncentivesIneligibilityReason | undefined;
|
|
49
|
+
|
|
50
|
+
/** The status of the invitation. **/
|
|
51
|
+
status: UmaInvitationStatus;
|
|
52
|
+
|
|
53
|
+
/** Payment amount in lowest currency unit. Null if no payment attached. **/
|
|
54
|
+
paymentAmount?: UmaCurrencyAmount | undefined;
|
|
55
|
+
|
|
56
|
+
/** When the invitation was cancelled, if applicable. **/
|
|
57
|
+
cancelledAt?: string | undefined;
|
|
58
|
+
|
|
59
|
+
/** When the invitation expires. Null if no expiration set. **/
|
|
60
|
+
expiresAt?: string | undefined;
|
|
41
61
|
}
|
|
42
62
|
|
|
43
63
|
export const UmaInvitationFromJson = (obj: any): UmaInvitation => {
|
|
@@ -56,12 +76,24 @@ export const UmaInvitationFromJson = (obj: any): UmaInvitation => {
|
|
|
56
76
|
incentivesIneligibilityReason: !!obj[
|
|
57
77
|
"uma_invitation_incentives_ineligibility_reason"
|
|
58
78
|
]
|
|
59
|
-
?
|
|
60
|
-
|
|
61
|
-
]
|
|
79
|
+
? (obj[
|
|
80
|
+
"uma_invitation_incentives_ineligibility_reason"
|
|
81
|
+
] as IncentivesIneligibilityReason) ??
|
|
82
|
+
IncentivesIneligibilityReason.FUTURE_VALUE
|
|
62
83
|
: null,
|
|
84
|
+
status:
|
|
85
|
+
(obj["uma_invitation_status"] as UmaInvitationStatus) ??
|
|
86
|
+
(() => {
|
|
87
|
+
throw new Error("Required field 'uma_invitation_status' is missing");
|
|
88
|
+
})(),
|
|
89
|
+
paymentAmount: obj["uma_invitation_payment_amount"]
|
|
90
|
+
? UmaCurrencyAmount.fromJson(obj["uma_invitation_payment_amount"])
|
|
91
|
+
: undefined,
|
|
92
|
+
cancelledAt: obj["uma_invitation_cancelled_at"],
|
|
93
|
+
expiresAt: obj["uma_invitation_expires_at"],
|
|
63
94
|
} as UmaInvitation;
|
|
64
95
|
};
|
|
96
|
+
|
|
65
97
|
export const UmaInvitationToJson = (obj: UmaInvitation): any => {
|
|
66
98
|
return {
|
|
67
99
|
__typename: "UmaInvitation",
|
|
@@ -75,6 +107,12 @@ export const UmaInvitationToJson = (obj: UmaInvitation): any => {
|
|
|
75
107
|
uma_invitation_incentives_status: obj.incentivesStatus,
|
|
76
108
|
uma_invitation_incentives_ineligibility_reason:
|
|
77
109
|
obj.incentivesIneligibilityReason,
|
|
110
|
+
uma_invitation_status: obj.status,
|
|
111
|
+
uma_invitation_payment_amount: obj.paymentAmount
|
|
112
|
+
? obj.paymentAmount.toJson()
|
|
113
|
+
: undefined,
|
|
114
|
+
uma_invitation_cancelled_at: obj.cancelledAt,
|
|
115
|
+
uma_invitation_expires_at: obj.expiresAt,
|
|
78
116
|
};
|
|
79
117
|
};
|
|
80
118
|
|
|
@@ -90,6 +128,18 @@ fragment UmaInvitationFragment on UmaInvitation {
|
|
|
90
128
|
uma_invitation_invitee_uma: invitee_uma
|
|
91
129
|
uma_invitation_incentives_status: incentives_status
|
|
92
130
|
uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
|
|
131
|
+
uma_invitation_status: status
|
|
132
|
+
uma_invitation_payment_amount: payment_amount {
|
|
133
|
+
value
|
|
134
|
+
currency {
|
|
135
|
+
code
|
|
136
|
+
symbol
|
|
137
|
+
decimals
|
|
138
|
+
name
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
uma_invitation_cancelled_at: cancelled_at
|
|
142
|
+
uma_invitation_expires_at: expires_at
|
|
93
143
|
}`;
|
|
94
144
|
|
|
95
145
|
export const getUmaInvitationQuery = (id: string): Query<UmaInvitation> => {
|