@lydianpay/sdk-web 3.14.0 → 3.15.1
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/dist/chunks/{browser-BFd9Zasn.js → browser-DY-UjlLA.js} +1 -1
- package/dist/chunks/{connect-multichain-W5NFpeTb.js → connect-multichain-wBdEwKyo.js} +9 -9
- package/dist/chunks/{index-ChcFlkGu.js → index-CXemgulL.js} +2 -2
- package/dist/chunks/{index-B2KlqxZz.js → index-D5SHnWSP.js} +2 -2
- package/dist/chunks/{index-DhuuCvX-.js → index-DI_XOVX4.js} +1 -1
- package/dist/chunks/{index-B8vFbue_.js → index-DOukN_y9.js} +1 -1
- package/dist/chunks/{index-DDKaYwMc.js → index-Dcas8XfB.js} +19 -9
- package/dist/chunks/{index-SMHjRBlL.js → index-rTVbAb-M.js} +3 -3
- package/dist/chunks/{mountEngine-0u7my-Xz.js → mountEngine-B8GaOfwA.js} +9186 -9058
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/chains/adapters.d.ts +4 -2
- package/dist/types/network/cryptotransaction/index.d.ts +2 -1
- package/dist/types/types.d.ts +7 -0
- package/dist/types/ui/checkoutPresentation.d.ts +1 -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 +3 -3
- package/dist/types/ui/walletCheckoutRecord.d.ts +9 -0
- package/dist/types/ui/walletConnection.d.ts +6 -7
- package/dist/types/utils/guards.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Va = Object.defineProperty;
|
|
2
2
|
var Ka = (e, t, r) => t in e ? Va(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var Ee = (e, t, r) => Ka(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { E as Ja } from "./index-
|
|
5
|
-
import { g as ri, c as gr } from "./mountEngine-
|
|
4
|
+
import { E as Ja } from "./index-DOukN_y9.js";
|
|
5
|
+
import { g as ri, c as gr } from "./mountEngine-B8GaOfwA.js";
|
|
6
6
|
var _r = { exports: {} }, on, Hi;
|
|
7
7
|
function Ya() {
|
|
8
8
|
if (Hi) return on;
|
|
@@ -7879,7 +7879,7 @@ var Cn, Rs, Is, Fs, qe, gt, _t, xr, Bs, Os, Cr, zt, Ps, Ns, Ds, ta, ra = V({
|
|
|
7879
7879
|
}
|
|
7880
7880
|
getActiveSession() {
|
|
7881
7881
|
return S(this, null, function* () {
|
|
7882
|
-
const { kvstore: e } = this, { SessionStore: t } = yield import("./index-
|
|
7882
|
+
const { kvstore: e } = this, { SessionStore: t } = yield import("./index-D5SHnWSP.js").then((n) => n.i), r = yield t.create(e);
|
|
7883
7883
|
try {
|
|
7884
7884
|
const [n] = yield r.list();
|
|
7885
7885
|
return n;
|
|
@@ -8058,7 +8058,7 @@ Xr(na, {
|
|
|
8058
8058
|
});
|
|
8059
8059
|
function Qd() {
|
|
8060
8060
|
return S(this, null, function* () {
|
|
8061
|
-
const { decrypt: e, encrypt: t, PrivateKey: r, PublicKey: n } = yield import("./index-
|
|
8061
|
+
const { decrypt: e, encrypt: t, PrivateKey: r, PublicKey: n } = yield import("./index-DI_XOVX4.js").then((i) => i.i);
|
|
8062
8062
|
return {
|
|
8063
8063
|
generateKeyPair() {
|
|
8064
8064
|
const i = new r();
|
|
@@ -9329,12 +9329,12 @@ Ta = function() {
|
|
|
9329
9329
|
Ui = function() {
|
|
9330
9330
|
return S(this, null, function* () {
|
|
9331
9331
|
const [e, { DappClient: t }, { createKeyManager: r }] = yield Promise.all([
|
|
9332
|
-
import("./index-
|
|
9333
|
-
import("./index-
|
|
9332
|
+
import("./index-D5SHnWSP.js").then((h) => h.i),
|
|
9333
|
+
import("./index-rTVbAb-M.js"),
|
|
9334
9334
|
Promise.resolve().then(() => (eh(), na))
|
|
9335
9335
|
]), n = yield r(), { adapter: i } = this.options.storage, o = yield e.SessionStore.create(i), l = (
|
|
9336
9336
|
// eslint-disable-next-line no-negated-condition
|
|
9337
|
-
typeof window < "u" ? WebSocket : (yield import("./browser-
|
|
9337
|
+
typeof window < "u" ? WebSocket : (yield import("./browser-DY-UjlLA.js").then((h) => h.b)).WebSocket
|
|
9338
9338
|
), c = yield e.WebSocketTransport.create({
|
|
9339
9339
|
url: uh,
|
|
9340
9340
|
kvstore: i,
|
|
@@ -9399,7 +9399,7 @@ Ba = function(e, t, r, n) {
|
|
|
9399
9399
|
/* MWP */
|
|
9400
9400
|
);
|
|
9401
9401
|
})).catch((c) => S(this, null, function* () {
|
|
9402
|
-
const { ProtocolError: d, ErrorCode: h } = yield import("./index-
|
|
9402
|
+
const { ProtocolError: d, ErrorCode: h } = yield import("./index-D5SHnWSP.js").then((y) => y.i);
|
|
9403
9403
|
if (c instanceof d)
|
|
9404
9404
|
c.code !== h.REQUEST_EXPIRED && (this.status = "disconnected", yield this.options.ui.factory.unload(c), i.reject(c));
|
|
9405
9405
|
else {
|
|
@@ -9456,7 +9456,7 @@ Pa = function(e, t, r) {
|
|
|
9456
9456
|
/* MWP */
|
|
9457
9457
|
);
|
|
9458
9458
|
} catch (i) {
|
|
9459
|
-
const { ProtocolError: o } = yield import("./index-
|
|
9459
|
+
const { ProtocolError: o } = yield import("./index-D5SHnWSP.js").then((l) => l.i);
|
|
9460
9460
|
throw this.status = "disconnected", yield this.storage.removeTransportType(), i instanceof o || i instanceof Error ? i : new Error(String(i));
|
|
9461
9461
|
} finally {
|
|
9462
9462
|
this.dappClient.off("session_request", n);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as Te, I as Xe, h as et, g as yn, b as vn, s as kn } from "./mountEngine-
|
|
1
|
+
import { i as Te, I as Xe, h as et, g as yn, b as vn, s as kn } from "./mountEngine-B8GaOfwA.js";
|
|
2
2
|
import { r as En, a as In } from "./utils-Ca8X9WUu.js";
|
|
3
|
-
import { E as Cn } from "./index-
|
|
3
|
+
import { E as Cn } from "./index-DOukN_y9.js";
|
|
4
4
|
function Sn(t, e) {
|
|
5
5
|
if (!Te(t, { strict: !1 }))
|
|
6
6
|
throw new Xe({ address: t });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as Si, g as wi } from "./mountEngine-
|
|
2
|
-
import { r as Ti } from "./index-
|
|
1
|
+
import { d as Si, g as wi } from "./mountEngine-B8GaOfwA.js";
|
|
2
|
+
import { r as Ti } from "./index-DOukN_y9.js";
|
|
3
3
|
function Pi(r, u) {
|
|
4
4
|
for (var f = 0; f < u.length; f++) {
|
|
5
5
|
const h = u[f];
|
|
@@ -55,6 +55,15 @@ class S extends y {
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
+
async buildTransfer(t, a, n) {
|
|
59
|
+
return await this.request(
|
|
60
|
+
`/${l}/${t}/payment/${a}/transfer`,
|
|
61
|
+
{
|
|
62
|
+
method: "POST",
|
|
63
|
+
body: JSON.stringify(n)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
58
67
|
async cancelCryptoTransaction(t, a) {
|
|
59
68
|
return await this.request(
|
|
60
69
|
`/${l}/${t}/cancel`,
|
|
@@ -216,8 +225,8 @@ async function x({
|
|
|
216
225
|
emit: a
|
|
217
226
|
}) {
|
|
218
227
|
try {
|
|
219
|
-
const n = await
|
|
220
|
-
a("session.loaded",
|
|
228
|
+
const n = await $({ api: e, options: t }), { session: o, sessionPromoted: r } = await M({ api: e, sessionID: n });
|
|
229
|
+
a("session.loaded", Y(o));
|
|
221
230
|
const s = await B({
|
|
222
231
|
api: e,
|
|
223
232
|
transactionID: o.transactionID
|
|
@@ -227,7 +236,7 @@ async function x({
|
|
|
227
236
|
return { ok: !1 };
|
|
228
237
|
}
|
|
229
238
|
}
|
|
230
|
-
async function
|
|
239
|
+
async function $({
|
|
231
240
|
api: e,
|
|
232
241
|
options: t
|
|
233
242
|
}) {
|
|
@@ -238,14 +247,14 @@ async function M({
|
|
|
238
247
|
referenceNumber: t.transaction.referenceNumber
|
|
239
248
|
})).sessionID;
|
|
240
249
|
}
|
|
241
|
-
async function
|
|
250
|
+
async function M({
|
|
242
251
|
api: e,
|
|
243
252
|
sessionID: t
|
|
244
253
|
}) {
|
|
245
254
|
const a = await e.getSession(t);
|
|
246
255
|
return { session: a, sessionPromoted: E(a) };
|
|
247
256
|
}
|
|
248
|
-
function
|
|
257
|
+
function Y(e) {
|
|
249
258
|
return {
|
|
250
259
|
sessionID: e.sessionID,
|
|
251
260
|
merchantName: e.merchantName,
|
|
@@ -341,6 +350,7 @@ const G = {
|
|
|
341
350
|
"wallet.connectNamed": "Connect {wallet}",
|
|
342
351
|
"wallet.scanToConnect": "Scan with your phone to connect with {wallet}.",
|
|
343
352
|
"wallet.continueInApp": "Continue in {wallet}",
|
|
353
|
+
"wallet.paidInApp": "Paid {paid} of {total} in {wallet}",
|
|
344
354
|
"wallet.backToWallets": "Back to wallets",
|
|
345
355
|
"asset.chooseCoin": "Choose a coin",
|
|
346
356
|
"asset.markupNotice": "Conversion includes a {percent}% markup fee",
|
|
@@ -635,7 +645,7 @@ class j extends HTMLElement {
|
|
|
635
645
|
// Not started in the constructor: a page can carry the tag and never check out.
|
|
636
646
|
// Overlapping initialize() calls share one download.
|
|
637
647
|
getOrLoadEngine() {
|
|
638
|
-
return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-
|
|
648
|
+
return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-B8GaOfwA.js").then((t) => t.m).then((t) => {
|
|
639
649
|
const a = t.mountCheckoutEngine({
|
|
640
650
|
host: this,
|
|
641
651
|
shadowRoot: this.shadow
|
|
@@ -768,8 +778,8 @@ export {
|
|
|
768
778
|
V as a,
|
|
769
779
|
te as b,
|
|
770
780
|
g as c,
|
|
771
|
-
|
|
772
|
-
|
|
781
|
+
M as d,
|
|
782
|
+
Y as e,
|
|
773
783
|
B as f,
|
|
774
784
|
ne as g,
|
|
775
785
|
c as h,
|
|
@@ -781,7 +791,7 @@ export {
|
|
|
781
791
|
_ as n,
|
|
782
792
|
ee as o,
|
|
783
793
|
K as p,
|
|
784
|
-
|
|
794
|
+
$ as r,
|
|
785
795
|
h as s,
|
|
786
796
|
N as t
|
|
787
797
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
2
|
var S = (e, t, n) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var h = (e, t, n) => S(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { d as s } from "./index-
|
|
5
|
-
import { v as w } from "./connect-multichain-
|
|
6
|
-
import { a as l } from "./mountEngine-
|
|
4
|
+
import { d as s } from "./index-D5SHnWSP.js";
|
|
5
|
+
import { v as w } from "./connect-multichain-wBdEwKyo.js";
|
|
6
|
+
import { a as l } from "./mountEngine-B8GaOfwA.js";
|
|
7
7
|
function m(e) {
|
|
8
8
|
var t, n;
|
|
9
9
|
return typeof ((n = (t = e == null ? void 0 : e.prototype) == null ? void 0 : t.constructor) == null ? void 0 : n.name) == "string";
|