@lydianpay/sdk-web 2.1.0 → 2.3.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,6 +1,6 @@
1
1
  import { type Connection } from '@lydianpay/lydianconnect';
2
2
  export type WalletEventHandlers = {
3
- onDisplayUri?: (uri: string) => void;
3
+ onDisplayUri?: (uri: string, deepLink: boolean) => void;
4
4
  onDisconnect?: (walletId: string) => void;
5
5
  onChainChanged?: (walletId: string, chainId: string) => void;
6
6
  onAccountsChanged?: (walletId: string, account: string) => void;
@@ -16,6 +16,7 @@ export declare class LydianConnectService {
16
16
  init(walletConnectProjectId: string, handlers: WalletEventHandlers): Promise<void>;
17
17
  private dispatch;
18
18
  connect(walletId: string, chainId: string, signal?: AbortSignal): Promise<Connection>;
19
+ openWallet(walletId: string, uri?: string, via?: 'scheme' | 'universal'): boolean;
19
20
  disconnect(walletId?: string): Promise<void>;
20
21
  reset(): Promise<void>;
21
22
  destroy(): void;
@@ -36,6 +36,8 @@ export declare class Checkout extends HTMLElement {
36
36
  private walletConnection;
37
37
  private connectedAccount;
38
38
  private connectAbort;
39
+ private pendingPairingUri;
40
+ private connecting;
39
41
  private btnCancelAssetSelection;
40
42
  private btnCancelNetworkSelection;
41
43
  private btnNetworkSummaryRow;
@@ -75,6 +77,9 @@ export declare class Checkout extends HTMLElement {
75
77
  private btnChangeCoin;
76
78
  private qrCodeStyling;
77
79
  private qrCodeLink;
80
+ private scanToPayRoot;
81
+ private qrUnavailableNotice;
82
+ private qrCopyFeedback;
78
83
  private pendingWalletSend;
79
84
  private countdownBanner;
80
85
  private isCheckoutSettled;
@@ -186,6 +191,7 @@ export declare class Checkout extends HTMLElement {
186
191
  private initializeComponents;
187
192
  private wireWarningIconFallbacks;
188
193
  private wireCopyFields;
194
+ private copyAndFlash;
189
195
  private flashCopyFeedback;
190
196
  private attachListeners;
191
197
  private startListeningCryptoTransaction;
@@ -210,6 +216,7 @@ export declare class Checkout extends HTMLElement {
210
216
  private hideWalletFlowScreens;
211
217
  private buildConnectedWalletSend;
212
218
  private showConnectingWallet;
219
+ private showOpenWalletButton;
213
220
  private showWalletOpenFailed;
214
221
  private showConnectWithQr;
215
222
  private showScreen;
@@ -0,0 +1,2 @@
1
+ export type CopyOutcome = 'copied' | 'manual';
2
+ export declare function copyText(value: string, clipboard?: Pick<Clipboard, 'writeText'>): Promise<CopyOutcome>;
@@ -0,0 +1,7 @@
1
+ export type CopyButtonProps = {
2
+ label: string;
3
+ copyLabel?: string;
4
+ buttonClass?: string;
5
+ feedbackClass?: string;
6
+ };
7
+ export default function CopyButton({ label, copyLabel, buttonClass, feedbackClass, }: CopyButtonProps): string;
@@ -0,0 +1,6 @@
1
+ export declare const ConnectPromptOpenButton = "open-button";
2
+ export declare const ConnectPromptQr = "qr";
3
+ export type ConnectPrompt = typeof ConnectPromptOpenButton | typeof ConnectPromptQr;
4
+ export declare function connectPromptFor(event: {
5
+ deepLink: boolean;
6
+ }): ConnectPrompt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "Drop-in crypto payment checkout for the web — a <lydian-checkout> web component and window.Lydian API across 20+ chains and major stablecoins.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -63,7 +63,6 @@
63
63
  "autoprefixer": "^10.4.0",
64
64
  "eslint": "^9.0.0",
65
65
  "globals": "^16.0.0",
66
- "is-mobile": "^5.0.0",
67
66
  "npm-run-all2": "^7.0.2",
68
67
  "postcss": "^8.4.6",
69
68
  "prettier": "3.9.5",