@lydianpay/sdk-web 3.15.0 → 3.15.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/dist/chunks/{browser-Bt5TF15J.js → browser-DY-UjlLA.js} +1 -1
- package/dist/chunks/{connect-multichain-DZaPiBrH.js → connect-multichain-wBdEwKyo.js} +9 -9
- package/dist/chunks/{index-Co-4jhyA.js → index-CXemgulL.js} +2 -2
- package/dist/chunks/{index-BqoF-MuQ.js → index-D5SHnWSP.js} +2 -2
- package/dist/chunks/{index-KRc-DEDM.js → index-DI_XOVX4.js} +1 -1
- package/dist/chunks/{index-DvVB0Sjv.js → index-DOukN_y9.js} +1 -1
- package/dist/chunks/{index-BNr7lH3k.js → index-Dcas8XfB.js} +30 -21
- package/dist/chunks/{index-ehz3N8J3.js → index-rTVbAb-M.js} +3 -3
- package/dist/chunks/{mountEngine-0Lj7ZkFh.js → mountEngine-B8GaOfwA.js} +7010 -6967
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/chains/adapters.d.ts +4 -2
- package/dist/types/network/cryptotransaction/index.d.ts +2 -1
- package/dist/types/types.d.ts +7 -0
- package/dist/types/ui/paymentFlow.d.ts +2 -3
- package/dist/types/ui/walletConnection.d.ts +6 -7
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisplayAsset } from '../types';
|
|
1
|
+
import { BuildTransferResponse, DisplayAsset } from '../types';
|
|
2
2
|
import { CheckoutNamespace } from '../constants';
|
|
3
3
|
export type WalletRequest = {
|
|
4
4
|
method: string;
|
|
@@ -10,16 +10,18 @@ export type BuildTransferRequestArgs = {
|
|
|
10
10
|
from: string;
|
|
11
11
|
amount: string;
|
|
12
12
|
tokenContract?: string;
|
|
13
|
+
backendTransfer?: () => Promise<BuildTransferResponse>;
|
|
13
14
|
};
|
|
14
15
|
export type BuildBalanceRequestArgs = {
|
|
15
16
|
account: string;
|
|
16
17
|
tokenContract?: string;
|
|
17
18
|
};
|
|
18
19
|
export interface ChainAdapter {
|
|
19
|
-
buildTransferRequest(args: BuildTransferRequestArgs): WalletRequest | null
|
|
20
|
+
buildTransferRequest(args: BuildTransferRequestArgs): Promise<WalletRequest | null>;
|
|
20
21
|
buildBalanceRequest(args: BuildBalanceRequestArgs): WalletRequest | null;
|
|
21
22
|
/** Base units from a balance result, or null when unreadable. */
|
|
22
23
|
parseBalanceResult(result: unknown): bigint | null;
|
|
23
24
|
}
|
|
24
25
|
export declare const evmChainAdapter: ChainAdapter;
|
|
26
|
+
export declare const solanaChainAdapter: ChainAdapter;
|
|
25
27
|
export declare function getChainAdapter(namespace: CheckoutNamespace): ChainAdapter | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Base } from '../base.js';
|
|
2
|
-
import { CancelTransactionRequest, CreatePaymentRequest, CreateTransactionResponse, GetTransactionResponse, KYCVerificationRequest } from '../../types';
|
|
2
|
+
import { BuildTransferRequest, BuildTransferResponse, CancelTransactionRequest, CreatePaymentRequest, CreateTransactionResponse, GetTransactionResponse, KYCVerificationRequest } from '../../types';
|
|
3
3
|
export declare class CryptoTransactions extends Base {
|
|
4
4
|
getCryptoTransaction(transactionID: string): Promise<GetTransactionResponse>;
|
|
5
5
|
createPaymentRequest(transactionID: string, paymentRequest: CreatePaymentRequest): Promise<CreateTransactionResponse>;
|
|
6
|
+
buildTransfer(transactionID: string, paymentRequestID: string, request: BuildTransferRequest): Promise<BuildTransferResponse>;
|
|
6
7
|
cancelCryptoTransaction(transactionID: string, cancelTransaction: CancelTransactionRequest): Promise<CreateTransactionResponse>;
|
|
7
8
|
kycVerification(transactionID: string, kycVerificationRequest: KYCVerificationRequest): Promise<CreateTransactionResponse>;
|
|
8
9
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -215,6 +215,13 @@ export type CreateTransactionResponse = {
|
|
|
215
215
|
calculatedTotals?: CalculatedTotals;
|
|
216
216
|
cryptoFXRate?: number;
|
|
217
217
|
};
|
|
218
|
+
export type BuildTransferRequest = {
|
|
219
|
+
fromAddress: string;
|
|
220
|
+
};
|
|
221
|
+
export type BuildTransferResponse = {
|
|
222
|
+
unsignedTransfer: string;
|
|
223
|
+
lastValidBlockHeight: number;
|
|
224
|
+
};
|
|
218
225
|
export type KYCVerificationRequest = {
|
|
219
226
|
asset: string;
|
|
220
227
|
network: string;
|
|
@@ -28,10 +28,9 @@ export interface PaymentFlowSeams {
|
|
|
28
28
|
transactionID?: string;
|
|
29
29
|
}): void;
|
|
30
30
|
showKycScreen(): void;
|
|
31
|
-
buildConnectedWalletSend(): WalletRequest | null
|
|
31
|
+
buildConnectedWalletSend(): Promise<WalletRequest | null>;
|
|
32
32
|
signAndSubmit(built: WalletRequest): Promise<void>;
|
|
33
|
-
|
|
34
|
-
hasPendingWalletSend(): boolean;
|
|
33
|
+
canSignWithConnectedWallet(): boolean;
|
|
35
34
|
resetCheckout(): void;
|
|
36
35
|
walletOwnsCheckout(): boolean;
|
|
37
36
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type WalletRequest } from '../chains/adapters';
|
|
2
2
|
import { type CheckoutWallet } from '../constants';
|
|
3
3
|
import { type CheckoutStore } from './react/checkoutStore';
|
|
4
|
+
import type { API } from '../network';
|
|
4
5
|
import type { CheckoutPresentation } from './checkoutPresentation';
|
|
5
6
|
import type { DialogController } from './dialogController';
|
|
6
7
|
import type { PaymentFlow } from './paymentFlow';
|
|
@@ -32,12 +33,9 @@ export interface WalletConnection {
|
|
|
32
33
|
/** No navigation or failure report; a late result is ignored. */
|
|
33
34
|
abortPendingConnection(): void;
|
|
34
35
|
/** Null unless a connected wallet can sign for the live transaction. */
|
|
35
|
-
buildSend(): WalletRequest | null
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/** Held while the customer looks at the confirmation screen. */
|
|
39
|
-
setPendingSend(built: WalletRequest | null): void;
|
|
40
|
-
hasPendingSend(): boolean;
|
|
36
|
+
buildSend(): Promise<WalletRequest | null>;
|
|
37
|
+
sendForSigning(): Promise<WalletRequest | null>;
|
|
38
|
+
canSign(): boolean;
|
|
41
39
|
signAndSubmit(built: WalletRequest): Promise<void>;
|
|
42
40
|
openWallet(link?: 'universal'): void;
|
|
43
41
|
showConnectWithQr(): void;
|
|
@@ -57,13 +55,14 @@ export interface WalletConnectionSeams {
|
|
|
57
55
|
watchForHandoff(): void;
|
|
58
56
|
abandonHandoff(): void;
|
|
59
57
|
}
|
|
60
|
-
export declare function createWalletConnection({ store, presentation, screenNavigator, paymentFlow, getDialogs, getOptions, emit, seams, }: {
|
|
58
|
+
export declare function createWalletConnection({ store, presentation, screenNavigator, paymentFlow, getDialogs, getOptions, getApi, emit, seams, }: {
|
|
61
59
|
store: CheckoutStore;
|
|
62
60
|
presentation: CheckoutPresentation;
|
|
63
61
|
screenNavigator: ScreenNavigator;
|
|
64
62
|
paymentFlow: PaymentFlow;
|
|
65
63
|
getDialogs: () => DialogController | null;
|
|
66
64
|
getOptions: () => CheckoutInitOptions | null;
|
|
65
|
+
getApi: () => API | null;
|
|
67
66
|
emit: (name: CheckoutEventName, data?: Record<string, unknown>) => void;
|
|
68
67
|
seams: WalletConnectionSeams;
|
|
69
68
|
}): WalletConnection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lydianpay/sdk-web",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.1",
|
|
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": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@lydianpay/frontend-shared-helpers": "1.2.0",
|
|
91
|
-
"@lydianpay/lydianconnect": "^1.10.
|
|
91
|
+
"@lydianpay/lydianconnect": "^1.10.1",
|
|
92
92
|
"@lydianpay/lydianconnect-catalog": "^1.4.1",
|
|
93
93
|
"@solana/qr-code-styling": "^1.6.0",
|
|
94
94
|
"dompurify": "^3.4.12",
|