@lydianpay/sdk-web 3.11.0 → 3.12.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/dist/chunks/{index-DN1W8tpt.js → index-DWQYIL16.js} +1 -1
- package/dist/chunks/{index-CGkvJIU5.js → index-tNP_Ef9F.js} +1 -1
- package/dist/chunks/{metamask-sdk-ByAE3QwW.js → metamask-sdk-D2NEVk6l.js} +1 -1
- package/dist/chunks/{mountEngine-KmqEj6j1.js → mountEngine-DMLeHBQ3.js} +8352 -8166
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/services/lydianConnectService.d.ts +3 -2
- package/dist/types/ui/walletConnection.d.ts +13 -2
- package/dist/types/ui/walletHandoff.d.ts +18 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ConnectInput, type Connection } from '@lydianpay/lydianconnect';
|
|
1
|
+
import { type ConnectInput, type Connection, type RestoreInput } from '@lydianpay/lydianconnect';
|
|
2
2
|
export type WalletEventHandlers = {
|
|
3
|
-
onDisplayUri?: (uri: string, deepLink: boolean) => void;
|
|
3
|
+
onDisplayUri?: (uri: string, deepLink: boolean, walletId: string) => 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(input: ConnectInput): Promise<Connection>;
|
|
19
|
+
restore(input: RestoreInput): Promise<Connection[]>;
|
|
19
20
|
openWallet(walletId: string, uri?: string, via?: 'scheme' | 'universal'): boolean;
|
|
20
21
|
disconnect(walletId?: string): Promise<void>;
|
|
21
22
|
reset(): Promise<void>;
|
|
@@ -7,8 +7,19 @@ import type { PaymentFlow } from './paymentFlow';
|
|
|
7
7
|
import type { ScreenNavigator } from './screenNavigator';
|
|
8
8
|
import type { CheckoutEventName, CheckoutInitOptions, PaymentFailureReason } from '../types';
|
|
9
9
|
export interface WalletConnection {
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Off by default: only a walletConnect-flow merchant with a project id gets a
|
|
12
|
+
* service. A promoted session never resumes a wallet handoff.
|
|
13
|
+
*/
|
|
14
|
+
initialize(input: {
|
|
15
|
+
promoted: boolean;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
/** Whether this load found a wallet handoff to recover. */
|
|
18
|
+
hasHandoffToResume(): boolean;
|
|
19
|
+
/** Reconnects the handed-off wallet behind the connecting screen. */
|
|
20
|
+
resumeHandoff(): void;
|
|
21
|
+
/** Drops this checkout's record of a wallet handoff. */
|
|
22
|
+
forgetHandoff(): void;
|
|
12
23
|
choose(wallet: CheckoutWallet): void;
|
|
13
24
|
/** Whether the picked wallet is one checkout can actually connect to. */
|
|
14
25
|
hasConnectable(): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const HANDOFF_VERSION = 1;
|
|
2
|
+
export type WalletHandoff = {
|
|
3
|
+
v: typeof HANDOFF_VERSION;
|
|
4
|
+
walletId: string;
|
|
5
|
+
};
|
|
6
|
+
type SessionId = string | null | undefined;
|
|
7
|
+
export declare function readWalletHandoff({ sessionId }: {
|
|
8
|
+
sessionId: SessionId;
|
|
9
|
+
}): WalletHandoff | null;
|
|
10
|
+
export declare function writeWalletHandoff({ sessionId, walletId, }: {
|
|
11
|
+
sessionId: SessionId;
|
|
12
|
+
walletId: string;
|
|
13
|
+
}): void;
|
|
14
|
+
export declare function clearWalletHandoff({ sessionId }: {
|
|
15
|
+
sessionId: SessionId;
|
|
16
|
+
}): void;
|
|
17
|
+
export declare function parseWalletHandoff(raw: string | null): WalletHandoff | null;
|
|
18
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lydianpay/sdk-web",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.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": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@lydianpay/frontend-shared-helpers": "1.2.0",
|
|
86
|
-
"@lydianpay/lydianconnect": "^1.
|
|
86
|
+
"@lydianpay/lydianconnect": "^1.7.1",
|
|
87
87
|
"@lydianpay/lydianconnect-catalog": "^1.4.0",
|
|
88
88
|
"@solana/qr-code-styling": "^1.6.0",
|
|
89
89
|
"dompurify": "^3.4.12",
|