@lydianpay/sdk-web 3.9.0 → 3.10.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 +5 -4
- package/dist/chunks/{index-wJd9PSat.js → index-6NJ8eaaA.js} +15 -11
- package/dist/chunks/{index-DRxELYu4.js → index-CKnuB_nz.js} +1 -1
- package/dist/chunks/{metamask-sdk-BvG7yj9u.js → metamask-sdk-D7OTwvM8.js} +1 -1
- package/dist/chunks/{mountEngine-BEjbUUpt.js → mountEngine-D78kQHoa.js} +8625 -8423
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types/ui/brandingHelpers.d.ts +1 -0
- package/dist/types/ui/flowConfig.d.ts +1 -0
- package/dist/types/ui/react/CopyField.d.ts +2 -1
- package/dist/types/ui/react/ScanToPayScreen/CopyRow.d.ts +9 -0
- package/dist/types/ui/react/ScanToPayScreen/ScanActionButtons.d.ts +7 -0
- package/dist/types/ui/react/ScanToPayScreen/ScanNotices.d.ts +6 -0
- package/dist/types/ui/react/ScanToPayScreen/ScanPaymentDetails.d.ts +5 -0
- package/dist/types/ui/react/ScanToPayScreen/ScanQrCode.d.ts +5 -0
- package/dist/types/ui/react/ScanToPayScreen/ScanToPayEmbeddedLayout.d.ts +3 -0
- package/dist/types/ui/react/ScanToPayScreen/ScanToPayModalLayout.d.ts +3 -0
- package/dist/types/ui/react/ScanToPayScreen/UnderpaidDetails.d.ts +5 -0
- package/dist/types/ui/react/ScanToPayScreen/scanToPayLayoutProps.d.ts +10 -0
- package/dist/types/ui/react/ScanToPayScreen/useScanToPayState.d.ts +9 -0
- package/dist/types/ui/react/checkoutActions.d.ts +4 -1
- package/dist/types/ui/react/checkoutStore.d.ts +1 -0
- package/package.json +1 -1
- /package/dist/types/ui/react/{ScanToPayScreen.d.ts → ScanToPayScreen/ScanToPayScreen.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -110,10 +110,11 @@ every checkout automatically.
|
|
|
110
110
|
Configured on your Lydian account, not here. They apply to every checkout and there
|
|
111
111
|
is no per-embed override:
|
|
112
112
|
|
|
113
|
-
| Setting
|
|
114
|
-
|
|
|
115
|
-
| `showApprovalPage`
|
|
116
|
-
| `hideNoWalletOption`
|
|
113
|
+
| Setting | Description |
|
|
114
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `showApprovalPage` | Show the scan-to-pay screen as a confirmation step before asking a connected wallet to sign. Off by default — the wallet opens straight away. |
|
|
116
|
+
| `hideNoWalletOption` | Legacy field name retained for compatibility. When true, hides the "Other wallets" option on the wallet selection screen. |
|
|
117
|
+
| `hideChangePaymentMethod` | When true, the "Change payment method" button is not shown on the wallet selection screen even when the session has a `cancelURL`. |
|
|
117
118
|
|
|
118
119
|
```js
|
|
119
120
|
window.Lydian.init({
|
|
@@ -163,10 +163,10 @@ var u = {
|
|
|
163
163
|
sandbox: "https://api.sandbox.lydian.com",
|
|
164
164
|
prod: "https://api.lydian.com"
|
|
165
165
|
};
|
|
166
|
-
function
|
|
166
|
+
function F(e) {
|
|
167
167
|
return 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
|
|
@@ -174,7 +174,7 @@ function P({
|
|
|
174
174
|
const n = t.filter((o) => e[o] !== void 0);
|
|
175
175
|
return n.length === 0 ? null : `${n.join(" and ")} ${n.length > 1 ? "are" : "is"} not used by ${a}. Passing it has no effect, so this is almost always a mistake.`;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
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
|
}
|
|
@@ -198,7 +198,7 @@ function k(e, t, a) {
|
|
|
198
198
|
console.error(`onEvent("${t}") threw:`, n);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
async function
|
|
201
|
+
async function U({
|
|
202
202
|
api: e,
|
|
203
203
|
options: t,
|
|
204
204
|
emit: a
|
|
@@ -389,6 +389,10 @@ const B = {
|
|
|
389
389
|
"scan.downloadQr": "Download QR",
|
|
390
390
|
"scan.changeCoin": "Change coin",
|
|
391
391
|
"scan.waitingForPayment": "Waiting for payment...",
|
|
392
|
+
"scan.waitingForPaymentStatus": "Waiting for payment",
|
|
393
|
+
"scan.includeFees": "Include Fees",
|
|
394
|
+
"scan.termsAndConditions": "Terms & Conditions",
|
|
395
|
+
"scan.copy": "Copy",
|
|
392
396
|
"scan.cancelPayment": "Cancel payment",
|
|
393
397
|
"scan.openWalletToPay": "Open {wallet}",
|
|
394
398
|
"scan.payWithWallet": "Pay with your wallet",
|
|
@@ -616,7 +620,7 @@ class G extends HTMLElement {
|
|
|
616
620
|
// Not started in the constructor: a page can carry the tag and never check out.
|
|
617
621
|
// Overlapping initialize() calls share one download.
|
|
618
622
|
getOrLoadEngine() {
|
|
619
|
-
return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-
|
|
623
|
+
return this.engineLoadPromise ?? (this.engineLoadPromise = import("./mountEngine-D78kQHoa.js").then((t) => t.m).then((t) => {
|
|
620
624
|
const a = t.mountCheckoutEngine({
|
|
621
625
|
host: this,
|
|
622
626
|
shadowRoot: this.shadow
|
|
@@ -683,7 +687,7 @@ class G extends HTMLElement {
|
|
|
683
687
|
}
|
|
684
688
|
function H(e) {
|
|
685
689
|
return new R(
|
|
686
|
-
|
|
690
|
+
F(e),
|
|
687
691
|
c(e) ? void 0 : e.publishableKey
|
|
688
692
|
);
|
|
689
693
|
}
|
|
@@ -691,7 +695,7 @@ function j({
|
|
|
691
695
|
api: e,
|
|
692
696
|
options: t
|
|
693
697
|
}) {
|
|
694
|
-
return
|
|
698
|
+
return U({
|
|
695
699
|
api: e,
|
|
696
700
|
options: t,
|
|
697
701
|
emit: (a, n) => k(t.onEvent, a, n)
|
|
@@ -704,12 +708,12 @@ function h() {
|
|
|
704
708
|
async function z(e) {
|
|
705
709
|
if (!e.publishableKey || !e.transaction.amount || !e.transaction.currency)
|
|
706
710
|
throw new Error("SDK initialization requires publishableKey and a transaction");
|
|
707
|
-
const t =
|
|
711
|
+
const t = P(e);
|
|
708
712
|
if (t)
|
|
709
713
|
throw new Error(t);
|
|
710
714
|
if (!N(e.transaction.currency))
|
|
711
715
|
throw new Error("Invalid value for currency, valid values are: " + g.join(", "));
|
|
712
|
-
const a =
|
|
716
|
+
const a = C({
|
|
713
717
|
options: e,
|
|
714
718
|
unsupportedKeys: ["sessionID"],
|
|
715
719
|
entryPoint: "init"
|
|
@@ -721,10 +725,10 @@ async function z(e) {
|
|
|
721
725
|
async function Q(e) {
|
|
722
726
|
if (!e.sessionID)
|
|
723
727
|
throw new Error("initExistingSession requires a sessionID");
|
|
724
|
-
const t =
|
|
728
|
+
const t = P(e);
|
|
725
729
|
if (t)
|
|
726
730
|
throw new Error(t);
|
|
727
|
-
const a =
|
|
731
|
+
const a = C({
|
|
728
732
|
options: e,
|
|
729
733
|
unsupportedKeys: ["publishableKey", "transaction"],
|
|
730
734
|
entryPoint: "initExistingSession"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Fe, I as ft, g as Qt, h as pt, b as jn, s as Bn } from "./mountEngine-
|
|
1
|
+
import { i as Fe, I as ft, g as Qt, h as pt, b as jn, s as Bn } from "./mountEngine-D78kQHoa.js";
|
|
2
2
|
function Wn(t, e) {
|
|
3
3
|
if (!Fe(t, { strict: !1 }))
|
|
4
4
|
throw new ft({ address: t });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Gf = Object.defineProperty;
|
|
2
2
|
var Yf = (t, e, n) => e in t ? Gf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var Ht = (t, e, n) => Yf(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { c as ei, g as ga } from "./mountEngine-
|
|
4
|
+
import { c as ei, g as ga } from "./mountEngine-D78kQHoa.js";
|
|
5
5
|
var ti = { exports: {} }, cc;
|
|
6
6
|
function Zf() {
|
|
7
7
|
return cc || (cc = 1, (function(t, e) {
|