@lydianpay/sdk-web 1.1.7 → 2.0.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/README.md +23 -10
- package/dist/chunks/index-CPaNT4Oo.js +24414 -0
- package/dist/chunks/index-CWd2eKRT.js +3579 -0
- package/dist/chunks/metamask-sdk-B763dcIQ.js +15037 -0
- package/dist/chunks/scanQrBackground-DWbKIxRa.js +4 -0
- package/dist/lydian.js +1 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/types.d.ts +0 -2
- package/dist/types/ui/Checkout.d.ts +32 -12
- package/dist/types/ui/buttons/optionButton.d.ts +3 -1
- package/dist/types/ui/buttons/walletButton.d.ts +4 -1
- package/dist/types/ui/components/changePaymentMethodRow.d.ts +1 -0
- package/dist/types/ui/components/copyField.d.ts +2 -1
- package/dist/types/ui/components/featuredWalletBanner.d.ts +3 -0
- package/dist/types/ui/components/icons.d.ts +9 -1
- package/dist/types/ui/components/logoHeader.d.ts +1 -0
- package/dist/types/ui/components/summaryRowGroup.d.ts +7 -0
- package/dist/types/ui/countdownBanner.d.ts +30 -0
- package/dist/types/ui/featuredWallet.d.ts +15 -0
- package/dist/types/ui/maskEmail.d.ts +1 -0
- package/dist/types/ui/networkListHelpers.d.ts +7 -3
- package/dist/types/ui/restoreDetailsController.d.ts +6 -0
- package/dist/types/ui/scanQrBackground.d.ts +1 -0
- package/dist/types/ui/scanQrPanelBackground.d.ts +7 -0
- package/dist/types/ui/sessionHelpers.d.ts +13 -0
- package/package.json +10 -2
- package/dist/lydian.iife.js +0 -737
package/README.md
CHANGED
|
@@ -33,13 +33,20 @@ import '@lydianpay/sdk-web';
|
|
|
33
33
|
```html
|
|
34
34
|
<script
|
|
35
35
|
type="module"
|
|
36
|
-
src="https://cdn.jsdelivr.net/npm/@lydianpay/sdk-web@
|
|
36
|
+
src="https://cdn.jsdelivr.net/npm/@lydianpay/sdk-web@2.0.0/dist/lydian.js"
|
|
37
37
|
></script>
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Pin a version (e.g. `@
|
|
40
|
+
Pin a version (e.g. `@2.0.0`) in production so an upstream release can't change
|
|
41
41
|
your checkout unexpectedly.
|
|
42
42
|
|
|
43
|
+
Since v2 the SDK ships as ES modules only: the entry registers
|
|
44
|
+
`window.Lydian` and `<lydian-checkout>` exactly as before, and the heavy
|
|
45
|
+
wallet SDKs load as separate chunks only when a customer picks that wallet
|
|
46
|
+
(the CDN serves the chunks alongside the entry). The v1 single-file bundle
|
|
47
|
+
(`dist/lydian.iife.js`) no longer exists — if you are upgrading a script tag
|
|
48
|
+
from v1, change the file name to `lydian.js` and keep `type="module"`.
|
|
49
|
+
|
|
43
50
|
## Quick start
|
|
44
51
|
|
|
45
52
|
Place the checkout element where you want the UI, then initialize the SDK:
|
|
@@ -91,15 +98,21 @@ Place the checkout element where you want the UI, then initialize the SDK:
|
|
|
91
98
|
|
|
92
99
|
**`flow`**
|
|
93
100
|
|
|
94
|
-
Optional per-embed
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
Optional per-embed settings. Only settings your Lydian account cannot express live
|
|
102
|
+
here — everything else is configured once on the merchant portal and applies to
|
|
103
|
+
every checkout automatically.
|
|
104
|
+
|
|
105
|
+
| Field | Type | Default | Description |
|
|
106
|
+
| --------------- | --------- | ------- | --------------------------------------------------------------------------------- |
|
|
107
|
+
| `walletConnect` | `boolean` | `false` | Offer wallet connection alongside the QR code. Not available from account config. |
|
|
108
|
+
|
|
109
|
+
Configured on your Lydian account, not here. They apply to every checkout and there
|
|
110
|
+
is no per-embed override:
|
|
97
111
|
|
|
98
|
-
|
|
|
99
|
-
| ---------------------- |
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `hideNoWalletOption` | `boolean` | account | Hide the "I don't have a supported wallet" link. |
|
|
112
|
+
| Setting | Description |
|
|
113
|
+
| ---------------------- | ----------------------------------------------------------------------- |
|
|
114
|
+
| `skipConfirmationPage` | Open the wallet straight away instead of showing a confirmation screen. |
|
|
115
|
+
| `hideNoWalletOption` | Hide the "I don't have a supported wallet" link. |
|
|
103
116
|
|
|
104
117
|
```js
|
|
105
118
|
window.Lydian.init({
|