@lydianpay/sdk-web 3.13.1 → 3.15.0
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/README.md +49 -12
- package/dist/chunks/browser-Bt5TF15J.js +33 -0
- package/dist/chunks/connect-multichain-DZaPiBrH.js +9971 -0
- package/dist/chunks/{index-BsBqHeHy.js → index-BNr7lH3k.js} +114 -95
- package/dist/chunks/index-BqoF-MuQ.js +5944 -0
- package/dist/chunks/{index-fJBrLteK.js → index-Co-4jhyA.js} +927 -1293
- package/dist/chunks/index-DvVB0Sjv.js +114 -0
- package/dist/chunks/index-FAg0du7P.js +595 -0
- package/dist/chunks/index-KRc-DEDM.js +4716 -0
- package/dist/chunks/index-ehz3N8J3.js +314 -0
- package/dist/chunks/mm-install-modal_2.entry-Dhx9nDM_.js +1365 -0
- package/dist/chunks/{mountEngine-BIIdZhCT.js → mountEngine-0Lj7ZkFh.js} +8636 -8483
- package/dist/chunks/utils-Ca8X9WUu.js +264 -0
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/types.d.ts +7 -0
- package/dist/types/ui/checkoutPresentation.d.ts +1 -0
- package/dist/types/ui/initConfig.d.ts +3 -0
- package/dist/types/ui/ldkCheckout.d.ts +1 -0
- package/dist/types/ui/ldkHandoff.d.ts +5 -0
- package/dist/types/ui/paymentFlow.d.ts +1 -0
- package/dist/types/ui/walletCheckoutRecord.d.ts +9 -0
- package/dist/types/utils/guards.d.ts +1 -0
- package/package.json +8 -4
- package/dist/chunks/metamask-sdk-BIbC0y1P.js +0 -15037
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const g = ["USD", "TRY", "PHP"];
|
|
2
|
-
function
|
|
2
|
+
function A(e) {
|
|
3
3
|
return typeof e == "string" && g.includes(e);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function l(e) {
|
|
6
6
|
return "sessionID" in e && typeof e.sessionID == "string" && e.sessionID.length > 0;
|
|
7
7
|
}
|
|
8
8
|
class y {
|
|
@@ -41,14 +41,14 @@ class y {
|
|
|
41
41
|
throw new Error(s.statusText);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
class
|
|
44
|
+
const c = "transaction";
|
|
45
|
+
class S extends y {
|
|
46
46
|
async getCryptoTransaction(t) {
|
|
47
|
-
return await this.request(`/${
|
|
47
|
+
return await this.request(`/${c}/${t}`);
|
|
48
48
|
}
|
|
49
49
|
async createPaymentRequest(t, a) {
|
|
50
50
|
return await this.request(
|
|
51
|
-
`/${
|
|
51
|
+
`/${c}/${t}/payment`,
|
|
52
52
|
{
|
|
53
53
|
method: "POST",
|
|
54
54
|
body: JSON.stringify(a)
|
|
@@ -57,7 +57,7 @@ class A extends y {
|
|
|
57
57
|
}
|
|
58
58
|
async cancelCryptoTransaction(t, a) {
|
|
59
59
|
return await this.request(
|
|
60
|
-
`/${
|
|
60
|
+
`/${c}/${t}/cancel`,
|
|
61
61
|
{
|
|
62
62
|
method: "PATCH",
|
|
63
63
|
body: JSON.stringify(a)
|
|
@@ -67,7 +67,7 @@ class A extends y {
|
|
|
67
67
|
async kycVerification(t, a) {
|
|
68
68
|
const n = new FormData();
|
|
69
69
|
return n.append("asset", a.asset), n.append("network", a.network), n.append("firstName", a.firstName), n.append("lastName", a.lastName), n.append("email", a.email), n.append("street", a.street), n.append("city", a.city), n.append("region", a.region), n.append("postalCode", a.postalCode), n.append("country", a.country), n.append("storeKYC", a.storeKYC ? "true" : "false"), a.customerUUID && n.append("customerUUID", a.customerUUID), a.walletAddress && n.append("walletAddress", a.walletAddress), a.documentType && n.append("documentType", a.documentType), a.documentFiles.forEach((o) => n.append("documentFiles", o)), await this.requestWithFormData(
|
|
70
|
-
`/${
|
|
70
|
+
`/${c}/${t}/verification`,
|
|
71
71
|
{
|
|
72
72
|
method: "POST",
|
|
73
73
|
body: n
|
|
@@ -75,7 +75,7 @@ class A extends y {
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function I(e, t) {
|
|
79
79
|
t.forEach((a) => {
|
|
80
80
|
Object.getOwnPropertyNames(a.prototype).forEach((n) => {
|
|
81
81
|
const o = Object.getOwnPropertyDescriptor(a.prototype, n);
|
|
@@ -84,7 +84,7 @@ function S(e, t) {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
const w = "customer/otp";
|
|
87
|
-
class
|
|
87
|
+
class L extends y {
|
|
88
88
|
// PATCH /customer/otp -> text/plain "OTP sent" (no JSON body).
|
|
89
89
|
async sendCustomerOTP(t) {
|
|
90
90
|
return await this.requestText(`/${w}`, {
|
|
@@ -101,7 +101,7 @@ class I extends y {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
const d = "session";
|
|
104
|
-
class
|
|
104
|
+
class U extends y {
|
|
105
105
|
async createSession(t) {
|
|
106
106
|
return await this.request(`/${d}`, {
|
|
107
107
|
method: "POST",
|
|
@@ -131,10 +131,10 @@ class L extends y {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
class
|
|
134
|
+
class b extends y {
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
const R =
|
|
136
|
+
I(b, [S, L, U]);
|
|
137
|
+
const R = b;
|
|
138
138
|
var u = {
|
|
139
139
|
COMPLIANCE_PENDING: -10,
|
|
140
140
|
API_CANCELLED: -9,
|
|
@@ -152,7 +152,7 @@ var u = {
|
|
|
152
152
|
FRAUD: -1,
|
|
153
153
|
PENDING: 0,
|
|
154
154
|
SUCCESS: 1
|
|
155
|
-
},
|
|
155
|
+
}, V = {
|
|
156
156
|
PARTIALLY_PAID: 1,
|
|
157
157
|
OVERPAID: 3
|
|
158
158
|
}, O = {
|
|
@@ -164,9 +164,9 @@ var u = {
|
|
|
164
164
|
prod: "https://api.lydian.com"
|
|
165
165
|
};
|
|
166
166
|
function F(e) {
|
|
167
|
-
return e.dev ? p.dev : e.sandbox ? p.sandbox : p.prod;
|
|
167
|
+
return e.gatewayUrl ? new URL(e.gatewayUrl).origin : e.dev ? p.dev : e.sandbox ? p.sandbox : p.prod;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function C({
|
|
170
170
|
options: e,
|
|
171
171
|
unsupportedKeys: t,
|
|
172
172
|
entryPoint: a
|
|
@@ -178,35 +178,47 @@ function P(e) {
|
|
|
178
178
|
var t;
|
|
179
179
|
return (t = e.flow) != null && t.walletConnect && !e.walletConnectProjectId ? "walletConnectProjectId is required when flow.walletConnect is on" : null;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return e
|
|
181
|
+
function k(e) {
|
|
182
|
+
return e.gatewayUrl === void 0 || W(e.gatewayUrl) ? null : `gatewayUrl must be an http(s) origin such as http://localhost:8000, with no path, got ${JSON.stringify(e.gatewayUrl)}`;
|
|
183
|
+
}
|
|
184
|
+
function W(e) {
|
|
185
|
+
let t;
|
|
186
|
+
try {
|
|
187
|
+
t = new URL(e);
|
|
188
|
+
} catch {
|
|
189
|
+
return !1;
|
|
190
|
+
}
|
|
191
|
+
return (t.protocol === "http:" || t.protocol === "https:") && t.pathname === "/" && t.search === "" && t.hash === "";
|
|
192
|
+
}
|
|
193
|
+
function ee(e) {
|
|
194
|
+
return e !== null && !l(e) && !!e.publishableKey;
|
|
183
195
|
}
|
|
184
|
-
function
|
|
185
|
-
return e !== null && !
|
|
196
|
+
function te(e) {
|
|
197
|
+
return e !== null && !l(e);
|
|
186
198
|
}
|
|
187
|
-
function
|
|
199
|
+
function ae({
|
|
188
200
|
options: e,
|
|
189
201
|
session: t,
|
|
190
202
|
settled: a
|
|
191
203
|
}) {
|
|
192
|
-
return !a && t !== null && e !== null &&
|
|
204
|
+
return !a && t !== null && e !== null && l(e);
|
|
193
205
|
}
|
|
194
|
-
function
|
|
206
|
+
function T(e, t, a) {
|
|
195
207
|
try {
|
|
196
208
|
e == null || e(t, a);
|
|
197
209
|
} catch (n) {
|
|
198
210
|
console.error(`onEvent("${t}") threw:`, n);
|
|
199
211
|
}
|
|
200
212
|
}
|
|
201
|
-
async function
|
|
213
|
+
async function x({
|
|
202
214
|
api: e,
|
|
203
215
|
options: t,
|
|
204
216
|
emit: a
|
|
205
217
|
}) {
|
|
206
218
|
try {
|
|
207
|
-
const n = await
|
|
208
|
-
a("session.loaded",
|
|
209
|
-
const s = await
|
|
219
|
+
const n = await M({ api: e, options: t }), { session: o, sessionPromoted: r } = await Y({ api: e, sessionID: n });
|
|
220
|
+
a("session.loaded", $(o));
|
|
221
|
+
const s = await B({
|
|
210
222
|
api: e,
|
|
211
223
|
transactionID: o.transactionID
|
|
212
224
|
});
|
|
@@ -215,35 +227,35 @@ async function U({
|
|
|
215
227
|
return { ok: !1 };
|
|
216
228
|
}
|
|
217
229
|
}
|
|
218
|
-
async function
|
|
230
|
+
async function M({
|
|
219
231
|
api: e,
|
|
220
232
|
options: t
|
|
221
233
|
}) {
|
|
222
|
-
return
|
|
234
|
+
return l(t) ? t.sessionID : (await e.createSession({
|
|
223
235
|
amount: t.transaction.amount,
|
|
224
236
|
amountCurrency: t.transaction.currency,
|
|
225
237
|
descriptor: t.transaction.descriptor,
|
|
226
238
|
referenceNumber: t.transaction.referenceNumber
|
|
227
239
|
})).sessionID;
|
|
228
240
|
}
|
|
229
|
-
async function
|
|
241
|
+
async function Y({
|
|
230
242
|
api: e,
|
|
231
243
|
sessionID: t
|
|
232
244
|
}) {
|
|
233
245
|
const a = await e.getSession(t);
|
|
234
|
-
return { session: a, sessionPromoted:
|
|
246
|
+
return { session: a, sessionPromoted: E(a) };
|
|
235
247
|
}
|
|
236
|
-
function
|
|
248
|
+
function $(e) {
|
|
237
249
|
return {
|
|
238
250
|
sessionID: e.sessionID,
|
|
239
251
|
merchantName: e.merchantName,
|
|
240
|
-
alreadyPromoted:
|
|
252
|
+
alreadyPromoted: E(e)
|
|
241
253
|
};
|
|
242
254
|
}
|
|
243
|
-
function
|
|
255
|
+
function E(e) {
|
|
244
256
|
return !!e.transactionID;
|
|
245
257
|
}
|
|
246
|
-
async function
|
|
258
|
+
async function B({
|
|
247
259
|
api: e,
|
|
248
260
|
transactionID: t
|
|
249
261
|
}) {
|
|
@@ -255,7 +267,7 @@ async function Y({
|
|
|
255
267
|
return console.error("Failed to resolve the session transaction:", a), null;
|
|
256
268
|
}
|
|
257
269
|
}
|
|
258
|
-
function
|
|
270
|
+
function h(e) {
|
|
259
271
|
if (!e)
|
|
260
272
|
return;
|
|
261
273
|
let t;
|
|
@@ -266,7 +278,7 @@ function m(e) {
|
|
|
266
278
|
}
|
|
267
279
|
return t.protocol === "https:" || t.protocol === "http:" ? e : void 0;
|
|
268
280
|
}
|
|
269
|
-
function
|
|
281
|
+
function _({
|
|
270
282
|
message: e,
|
|
271
283
|
reason: t,
|
|
272
284
|
shouldEndCheckout: a,
|
|
@@ -282,11 +294,11 @@ function $({
|
|
|
282
294
|
// Only a failure that ends the checkout carries a redirect. A retryable one
|
|
283
295
|
// leaves the customer mid-flow with something still to do, and a host that
|
|
284
296
|
// navigated on it would eject them on a hiccup.
|
|
285
|
-
redirectURL: a ?
|
|
297
|
+
redirectURL: a ? h(o == null ? void 0 : o.failureURL) : void 0
|
|
286
298
|
}
|
|
287
299
|
};
|
|
288
300
|
}
|
|
289
|
-
const
|
|
301
|
+
const G = {
|
|
290
302
|
"common.cancelTransaction": "Cancel Transaction",
|
|
291
303
|
"common.cancel": "Cancel",
|
|
292
304
|
"common.back": "Back",
|
|
@@ -329,6 +341,7 @@ const B = {
|
|
|
329
341
|
"wallet.connectNamed": "Connect {wallet}",
|
|
330
342
|
"wallet.scanToConnect": "Scan with your phone to connect with {wallet}.",
|
|
331
343
|
"wallet.continueInApp": "Continue in {wallet}",
|
|
344
|
+
"wallet.paidInApp": "Paid {paid} of {total} in {wallet}",
|
|
332
345
|
"wallet.backToWallets": "Back to wallets",
|
|
333
346
|
"asset.chooseCoin": "Choose a coin",
|
|
334
347
|
"asset.markupNotice": "Conversion includes a {percent}% markup fee",
|
|
@@ -507,40 +520,40 @@ const B = {
|
|
|
507
520
|
"validation.customerDetailsMissing": "Customer details are missing.",
|
|
508
521
|
"validation.invalidOtp": "Please enter a valid 6-digit code.",
|
|
509
522
|
"terms.notice": 'By continuing, you agree to Lydian <a href="https://lydian.com/privacy" target="_blank" rel="noopener noreferrer">Terms and Conditions</a> and understand your data will be processed according to the <a href="https://lydian.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Notice</a>.'
|
|
510
|
-
}, f = { en:
|
|
511
|
-
let D =
|
|
512
|
-
function
|
|
523
|
+
}, f = { en: G }, v = "en";
|
|
524
|
+
let D = v;
|
|
525
|
+
function ne() {
|
|
513
526
|
return D;
|
|
514
527
|
}
|
|
515
|
-
function
|
|
528
|
+
function N(e, t) {
|
|
516
529
|
var n;
|
|
517
|
-
const a = ((n = f[D]) == null ? void 0 : n[e]) ?? f[
|
|
530
|
+
const a = ((n = f[D]) == null ? void 0 : n[e]) ?? f[v][e] ?? e;
|
|
518
531
|
return t ? a.replace(
|
|
519
532
|
/\{(\w+)\}/g,
|
|
520
533
|
(o, r) => t[r] != null ? String(t[r]) : `{${r}}`
|
|
521
534
|
) : a;
|
|
522
535
|
}
|
|
523
|
-
function
|
|
536
|
+
function q(e) {
|
|
524
537
|
return e === u.SUCCESS ? "succeeded" : e < u.PENDING && e !== u.KYC_VERIFICATION_PENDING && e !== u.COMPLIANCE_PENDING ? "failed" : "active";
|
|
525
538
|
}
|
|
526
|
-
function
|
|
539
|
+
function H({
|
|
527
540
|
transaction: e,
|
|
528
541
|
session: t
|
|
529
542
|
}) {
|
|
530
543
|
var o, r, s;
|
|
531
|
-
const a =
|
|
544
|
+
const a = q(e.status);
|
|
532
545
|
if (a === "active")
|
|
533
546
|
return null;
|
|
534
547
|
if (a === "failed")
|
|
535
548
|
return {
|
|
536
549
|
outcome: a,
|
|
537
|
-
message:
|
|
550
|
+
message: N("errors.paymentCouldNotComplete"),
|
|
538
551
|
failure: {
|
|
539
552
|
shouldEndCheckout: !0,
|
|
540
553
|
// Negative (non-KYC) status — cancelled / fraud / timeout.
|
|
541
554
|
reason: "blocked",
|
|
542
555
|
transactionID: e.transactionID,
|
|
543
|
-
redirectURL:
|
|
556
|
+
redirectURL: h(t == null ? void 0 : t.failureURL)
|
|
544
557
|
}
|
|
545
558
|
};
|
|
546
559
|
const n = (o = e.payments) == null ? void 0 : o.find(
|
|
@@ -560,7 +573,7 @@ function q({
|
|
|
560
573
|
asset: n == null ? void 0 : n.cryptoAsset,
|
|
561
574
|
network: n == null ? void 0 : n.cryptoNetwork,
|
|
562
575
|
completedAt: n == null ? void 0 : n.completedAt,
|
|
563
|
-
redirectURL:
|
|
576
|
+
redirectURL: h(t == null ? void 0 : t.successURL)
|
|
564
577
|
}
|
|
565
578
|
};
|
|
566
579
|
}
|
|
@@ -570,7 +583,7 @@ function K() {
|
|
|
570
583
|
setOptions: (t) => {
|
|
571
584
|
e = t;
|
|
572
585
|
},
|
|
573
|
-
emit: (t, a) =>
|
|
586
|
+
emit: (t, a) => T(e == null ? void 0 : e.onEvent, t, a),
|
|
574
587
|
paymentFailed: (t, a) => {
|
|
575
588
|
var n;
|
|
576
589
|
return (n = e == null ? void 0 : e.paymentFailedListener) == null ? void 0 : n.call(e, t, a);
|
|
@@ -585,7 +598,7 @@ function K() {
|
|
|
585
598
|
}
|
|
586
599
|
};
|
|
587
600
|
}
|
|
588
|
-
class
|
|
601
|
+
class j extends HTMLElement {
|
|
589
602
|
constructor() {
|
|
590
603
|
super(), this.engine = null, this.engineLoadPromise = null, this.isTornDown = !1, this.shadow = this.attachShadow({ mode: "open" });
|
|
591
604
|
}
|
|
@@ -595,7 +608,7 @@ class G extends HTMLElement {
|
|
|
595
608
|
this.isTornDown = !1;
|
|
596
609
|
}
|
|
597
610
|
async initialize(t) {
|
|
598
|
-
const a =
|
|
611
|
+
const a = z(t), n = J({ api: a, options: t }), o = await this.loadEngine(t, n);
|
|
599
612
|
!o || this.isTornDown || (this.engine = o, await o.initialize(t, { api: a, sessionLoad: n }));
|
|
600
613
|
}
|
|
601
614
|
async loadEngine(t, a) {
|
|
@@ -623,7 +636,7 @@ class G extends HTMLElement {
|
|
|
623
636
|
// Not started in the constructor: a page can carry the tag and never check out.
|
|
624
637
|
// Overlapping initialize() calls share one download.
|
|
625
638
|
getOrLoadEngine() {
|
|
626
|
-
return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-
|
|
639
|
+
return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-0Lj7ZkFh.js").then((t) => t.m).then((t) => {
|
|
627
640
|
const a = t.mountCheckoutEngine({
|
|
628
641
|
host: this,
|
|
629
642
|
shadowRoot: this.shadow
|
|
@@ -658,7 +671,7 @@ class G extends HTMLElement {
|
|
|
658
671
|
return;
|
|
659
672
|
const o = K();
|
|
660
673
|
o.setOptions(t);
|
|
661
|
-
const r = n.ok && n.linkedTransaction ?
|
|
674
|
+
const r = n.ok && n.linkedTransaction ? H({
|
|
662
675
|
transaction: n.linkedTransaction,
|
|
663
676
|
session: n.session
|
|
664
677
|
}) : null;
|
|
@@ -674,7 +687,7 @@ class G extends HTMLElement {
|
|
|
674
687
|
}), o.paymentFailed(r.message, r.failure);
|
|
675
688
|
return;
|
|
676
689
|
}
|
|
677
|
-
const s =
|
|
690
|
+
const s = N("errors.checkoutUnavailable"), i = _({
|
|
678
691
|
message: s,
|
|
679
692
|
reason: "error",
|
|
680
693
|
shouldEndCheckout: !0,
|
|
@@ -688,82 +701,88 @@ class G extends HTMLElement {
|
|
|
688
701
|
t == null || t.teardown(), t == null || t.unmount(), this.engine = null, this.engineLoadPromise = null;
|
|
689
702
|
}
|
|
690
703
|
}
|
|
691
|
-
function
|
|
704
|
+
function z(e) {
|
|
692
705
|
return new R(
|
|
693
706
|
F(e),
|
|
694
|
-
|
|
707
|
+
l(e) ? void 0 : e.publishableKey
|
|
695
708
|
);
|
|
696
709
|
}
|
|
697
|
-
function
|
|
710
|
+
function J({
|
|
698
711
|
api: e,
|
|
699
712
|
options: t
|
|
700
713
|
}) {
|
|
701
|
-
return
|
|
714
|
+
return x({
|
|
702
715
|
api: e,
|
|
703
716
|
options: t,
|
|
704
|
-
emit: (a, n) =>
|
|
717
|
+
emit: (a, n) => T(t.onEvent, a, n)
|
|
705
718
|
});
|
|
706
719
|
}
|
|
707
|
-
customElements.get("lydian-checkout") || customElements.define("lydian-checkout",
|
|
708
|
-
function
|
|
720
|
+
customElements.get("lydian-checkout") || customElements.define("lydian-checkout", j);
|
|
721
|
+
function m() {
|
|
709
722
|
return document.querySelector("lydian-checkout");
|
|
710
723
|
}
|
|
711
|
-
async function
|
|
724
|
+
async function Q(e) {
|
|
712
725
|
if (!e.publishableKey || !e.transaction.amount || !e.transaction.currency)
|
|
713
726
|
throw new Error("SDK initialization requires publishableKey and a transaction");
|
|
714
727
|
const t = P(e);
|
|
715
728
|
if (t)
|
|
716
729
|
throw new Error(t);
|
|
717
|
-
|
|
730
|
+
const a = k(e);
|
|
731
|
+
if (a)
|
|
732
|
+
throw new Error(a);
|
|
733
|
+
if (!A(e.transaction.currency))
|
|
718
734
|
throw new Error("Invalid value for currency, valid values are: " + g.join(", "));
|
|
719
|
-
const
|
|
735
|
+
const n = C({
|
|
720
736
|
options: e,
|
|
721
737
|
unsupportedKeys: ["sessionID"],
|
|
722
738
|
entryPoint: "init"
|
|
723
739
|
});
|
|
724
|
-
if (
|
|
725
|
-
throw new Error(
|
|
726
|
-
await
|
|
740
|
+
if (n)
|
|
741
|
+
throw new Error(n);
|
|
742
|
+
await m().initialize(e);
|
|
727
743
|
}
|
|
728
|
-
async function
|
|
744
|
+
async function Z(e) {
|
|
729
745
|
if (!e.sessionID)
|
|
730
746
|
throw new Error("initExistingSession requires a sessionID");
|
|
731
747
|
const t = P(e);
|
|
732
748
|
if (t)
|
|
733
749
|
throw new Error(t);
|
|
734
|
-
const a =
|
|
750
|
+
const a = k(e);
|
|
751
|
+
if (a)
|
|
752
|
+
throw new Error(a);
|
|
753
|
+
const n = C({
|
|
735
754
|
options: e,
|
|
736
755
|
unsupportedKeys: ["publishableKey", "transaction"],
|
|
737
756
|
entryPoint: "initExistingSession"
|
|
738
757
|
});
|
|
739
|
-
if (
|
|
740
|
-
throw new Error(
|
|
741
|
-
await
|
|
758
|
+
if (n)
|
|
759
|
+
throw new Error(n);
|
|
760
|
+
await m().initialize(e);
|
|
742
761
|
}
|
|
743
|
-
async function
|
|
744
|
-
await
|
|
762
|
+
async function X(e) {
|
|
763
|
+
await m().updateTransaction(e);
|
|
745
764
|
}
|
|
746
|
-
window.Lydian = { init:
|
|
765
|
+
window.Lydian = { init: Q, initExistingSession: Z, updateTransaction: X };
|
|
747
766
|
export {
|
|
748
767
|
O as P,
|
|
749
768
|
u as T,
|
|
750
|
-
|
|
751
|
-
|
|
769
|
+
V as a,
|
|
770
|
+
te as b,
|
|
752
771
|
g as c,
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
772
|
+
Y as d,
|
|
773
|
+
$ as e,
|
|
774
|
+
B as f,
|
|
775
|
+
ne as g,
|
|
776
|
+
l as h,
|
|
777
|
+
A as i,
|
|
778
|
+
q as j,
|
|
779
|
+
H as k,
|
|
780
|
+
E as l,
|
|
781
|
+
ae as m,
|
|
782
|
+
_ as n,
|
|
783
|
+
ee as o,
|
|
765
784
|
K as p,
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
785
|
+
M as r,
|
|
786
|
+
h as s,
|
|
787
|
+
N as t
|
|
769
788
|
};
|