@lydianpay/sdk-web 3.14.0 → 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.
@@ -1,4 +1,4 @@
1
- import { g as c } from "./mountEngine-0u7my-Xz.js";
1
+ import { g as c } from "./mountEngine-0Lj7ZkFh.js";
2
2
  function f(t, i) {
3
3
  for (var o = 0; o < i.length; o++) {
4
4
  const e = i[o];
@@ -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-B8vFbue_.js";
5
- import { g as ri, c as gr } from "./mountEngine-0u7my-Xz.js";
4
+ import { E as Ja } from "./index-DvVB0Sjv.js";
5
+ import { g as ri, c as gr } from "./mountEngine-0Lj7ZkFh.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-B2KlqxZz.js").then((n) => n.i), r = yield t.create(e);
7882
+ const { kvstore: e } = this, { SessionStore: t } = yield import("./index-BqoF-MuQ.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-DhuuCvX-.js").then((i) => i.i);
8061
+ const { decrypt: e, encrypt: t, PrivateKey: r, PublicKey: n } = yield import("./index-KRc-DEDM.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-B2KlqxZz.js").then((h) => h.i),
9333
- import("./index-SMHjRBlL.js"),
9332
+ import("./index-BqoF-MuQ.js").then((h) => h.i),
9333
+ import("./index-ehz3N8J3.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-BFd9Zasn.js").then((h) => h.b)).WebSocket
9337
+ typeof window < "u" ? WebSocket : (yield import("./browser-Bt5TF15J.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-B2KlqxZz.js").then((y) => y.i);
9402
+ const { ProtocolError: d, ErrorCode: h } = yield import("./index-BqoF-MuQ.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-B2KlqxZz.js").then((l) => l.i);
9459
+ const { ProtocolError: o } = yield import("./index-BqoF-MuQ.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);
@@ -2,7 +2,7 @@ const g = ["USD", "TRY", "PHP"];
2
2
  function A(e) {
3
3
  return typeof e == "string" && g.includes(e);
4
4
  }
5
- function c(e) {
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 l = "transaction";
44
+ const c = "transaction";
45
45
  class S extends y {
46
46
  async getCryptoTransaction(t) {
47
- return await this.request(`/${l}/${t}`);
47
+ return await this.request(`/${c}/${t}`);
48
48
  }
49
49
  async createPaymentRequest(t, a) {
50
50
  return await this.request(
51
- `/${l}/${t}/payment`,
51
+ `/${c}/${t}/payment`,
52
52
  {
53
53
  method: "POST",
54
54
  body: JSON.stringify(a)
@@ -57,7 +57,7 @@ class S extends y {
57
57
  }
58
58
  async cancelCryptoTransaction(t, a) {
59
59
  return await this.request(
60
- `/${l}/${t}/cancel`,
60
+ `/${c}/${t}/cancel`,
61
61
  {
62
62
  method: "PATCH",
63
63
  body: JSON.stringify(a)
@@ -67,7 +67,7 @@ class S 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
- `/${l}/${t}/verification`,
70
+ `/${c}/${t}/verification`,
71
71
  {
72
72
  method: "POST",
73
73
  body: n
@@ -191,17 +191,17 @@ function W(e) {
191
191
  return (t.protocol === "http:" || t.protocol === "https:") && t.pathname === "/" && t.search === "" && t.hash === "";
192
192
  }
193
193
  function ee(e) {
194
- return e !== null && !c(e) && !!e.publishableKey;
194
+ return e !== null && !l(e) && !!e.publishableKey;
195
195
  }
196
196
  function te(e) {
197
- return e !== null && !c(e);
197
+ return e !== null && !l(e);
198
198
  }
199
199
  function ae({
200
200
  options: e,
201
201
  session: t,
202
202
  settled: a
203
203
  }) {
204
- return !a && t !== null && e !== null && c(e);
204
+ return !a && t !== null && e !== null && l(e);
205
205
  }
206
206
  function T(e, t, a) {
207
207
  try {
@@ -231,7 +231,7 @@ async function M({
231
231
  api: e,
232
232
  options: t
233
233
  }) {
234
- return c(t) ? t.sessionID : (await e.createSession({
234
+ return l(t) ? t.sessionID : (await e.createSession({
235
235
  amount: t.transaction.amount,
236
236
  amountCurrency: t.transaction.currency,
237
237
  descriptor: t.transaction.descriptor,
@@ -341,6 +341,7 @@ const G = {
341
341
  "wallet.connectNamed": "Connect {wallet}",
342
342
  "wallet.scanToConnect": "Scan with your phone to connect with {wallet}.",
343
343
  "wallet.continueInApp": "Continue in {wallet}",
344
+ "wallet.paidInApp": "Paid {paid} of {total} in {wallet}",
344
345
  "wallet.backToWallets": "Back to wallets",
345
346
  "asset.chooseCoin": "Choose a coin",
346
347
  "asset.markupNotice": "Conversion includes a {percent}% markup fee",
@@ -635,7 +636,7 @@ class j extends HTMLElement {
635
636
  // Not started in the constructor: a page can carry the tag and never check out.
636
637
  // Overlapping initialize() calls share one download.
637
638
  getOrLoadEngine() {
638
- return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-0u7my-Xz.js").then((t) => t.m).then((t) => {
639
+ return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-0Lj7ZkFh.js").then((t) => t.m).then((t) => {
639
640
  const a = t.mountCheckoutEngine({
640
641
  host: this,
641
642
  shadowRoot: this.shadow
@@ -703,7 +704,7 @@ class j extends HTMLElement {
703
704
  function z(e) {
704
705
  return new R(
705
706
  F(e),
706
- c(e) ? void 0 : e.publishableKey
707
+ l(e) ? void 0 : e.publishableKey
707
708
  );
708
709
  }
709
710
  function J({
@@ -772,7 +773,7 @@ export {
772
773
  $ as e,
773
774
  B as f,
774
775
  ne as g,
775
- c as h,
776
+ l as h,
776
777
  A as i,
777
778
  q as j,
778
779
  H as k,
@@ -1,5 +1,5 @@
1
- import { d as Si, g as wi } from "./mountEngine-0u7my-Xz.js";
2
- import { r as Ti } from "./index-B8vFbue_.js";
1
+ import { d as Si, g as wi } from "./mountEngine-0Lj7ZkFh.js";
2
+ import { r as Ti } from "./index-DvVB0Sjv.js";
3
3
  function Pi(r, u) {
4
4
  for (var f = 0; f < u.length; f++) {
5
5
  const h = u[f];
@@ -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-0u7my-Xz.js";
1
+ import { i as Te, I as Xe, h as et, g as yn, b as vn, s as kn } from "./mountEngine-0Lj7ZkFh.js";
2
2
  import { r as En, a as In } from "./utils-Ca8X9WUu.js";
3
- import { E as Cn } from "./index-B8vFbue_.js";
3
+ import { E as Cn } from "./index-DvVB0Sjv.js";
4
4
  function Sn(t, e) {
5
5
  if (!Te(t, { strict: !1 }))
6
6
  throw new Xe({ address: t });
@@ -1,4 +1,4 @@
1
- import { g as L } from "./mountEngine-0u7my-Xz.js";
1
+ import { g as L } from "./mountEngine-0Lj7ZkFh.js";
2
2
  var x = { exports: {} }, E;
3
3
  function C() {
4
4
  return E || (E = 1, (function(g) {
@@ -1,4 +1,4 @@
1
- import { g as cn } from "./mountEngine-0u7my-Xz.js";
1
+ import { g as cn } from "./mountEngine-0Lj7ZkFh.js";
2
2
  import { a as Ot, r as an } from "./utils-Ca8X9WUu.js";
3
3
  function fn(t, f) {
4
4
  for (var y = 0; y < f.length; y++) {
@@ -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-B2KlqxZz.js";
5
- import { v as w } from "./connect-multichain-W5NFpeTb.js";
6
- import { a as l } from "./mountEngine-0u7my-Xz.js";
4
+ import { d as s } from "./index-BqoF-MuQ.js";
5
+ import { v as w } from "./connect-multichain-DZaPiBrH.js";
6
+ import { a as l } from "./mountEngine-0Lj7ZkFh.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";