@lydianpay/sdk-web 2.2.0 → 3.0.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-CJbjRiSO.js → index-B-nXrLNN.js} +1 -1
- package/dist/chunks/{index-DU-uAMN4.js → index-CoARqfML.js} +7663 -10155
- package/dist/chunks/{metamask-sdk-Dme-4KCo.js → metamask-sdk-DpI24rgz.js} +1 -1
- package/dist/chunks/mount-mNbGvMK_.js +12914 -0
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/constants.d.ts +0 -17
- package/dist/types/services/lydianConnectService.d.ts +2 -1
- package/dist/types/types.d.ts +6 -1
- package/dist/types/ui/Checkout.d.ts +44 -140
- package/dist/types/ui/brandingHelpers.d.ts +0 -4
- package/dist/types/ui/countdownBanner.d.ts +4 -1
- package/dist/types/ui/countries.d.ts +1 -1
- package/dist/types/ui/networkListHelpers.d.ts +2 -2
- package/dist/types/ui/optionFilter.d.ts +4 -1
- package/dist/types/ui/react/AlertBanner.d.ts +6 -0
- package/dist/types/ui/react/AssetSelectScreen.d.ts +6 -0
- package/dist/types/ui/react/CheckoutApp.d.ts +9 -0
- package/dist/types/ui/react/CloseTransactionDialogBody.d.ts +7 -0
- package/dist/types/ui/react/ConnectWithQrScreen.d.ts +6 -0
- package/dist/types/ui/react/ConnectingWalletScreen.d.ts +6 -0
- package/dist/types/ui/react/CopyField.d.ts +16 -0
- package/dist/types/ui/react/DetailCard.d.ts +12 -0
- package/dist/types/ui/react/DownloadWalletScreen.d.ts +4 -0
- package/dist/types/ui/react/FileDropzone.d.ts +8 -0
- package/dist/types/ui/react/FormField.d.ts +19 -0
- package/dist/types/ui/react/FormSelect.d.ts +12 -0
- package/dist/types/ui/react/KycScreen.d.ts +6 -0
- package/dist/types/ui/react/LoadingScreen.d.ts +9 -0
- package/dist/types/ui/react/NetworkSelectScreen.d.ts +6 -0
- package/dist/types/ui/{buttons/optionButton.d.ts → react/OptionButton.d.ts} +4 -3
- package/dist/types/ui/react/OtpInput.d.ts +4 -0
- package/dist/types/ui/react/PayButtons.d.ts +4 -0
- package/dist/types/ui/react/PaymentFailureScreen.d.ts +6 -0
- package/dist/types/ui/react/PaymentHeaderSection.d.ts +13 -0
- package/dist/types/ui/react/PaymentSuccessScreen.d.ts +6 -0
- package/dist/types/ui/react/RestoreDetailsDialogBody.d.ts +5 -0
- package/dist/types/ui/react/ScanToPayScreen.d.ts +6 -0
- package/dist/types/ui/react/SearchSelect.d.ts +11 -0
- package/dist/types/ui/react/SummaryRow.d.ts +11 -0
- package/dist/types/ui/react/TimerBanner.d.ts +4 -0
- package/dist/types/ui/react/WalletSelectScreen.d.ts +6 -0
- package/dist/types/ui/react/WarningIcon.d.ts +4 -0
- package/dist/types/ui/react/callbacksFixture.d.ts +6 -0
- package/dist/types/ui/react/checkoutStore.d.ts +138 -0
- package/dist/types/ui/react/checkoutTargets.d.ts +14 -0
- package/dist/types/ui/react/mount.d.ts +10 -0
- package/dist/types/ui/scanToPayView.d.ts +36 -0
- package/dist/types/ui/walletConnectPrompt.d.ts +6 -0
- package/dist/types/ui/walletSelection.d.ts +4 -0
- package/dist/types/utils/collections.d.ts +0 -2
- package/dist/types/utils/index.d.ts +0 -8
- package/package.json +12 -4
- package/dist/types/ui/buttons/assetButton.d.ts +0 -2
- package/dist/types/ui/buttons/networkButton.d.ts +0 -2
- package/dist/types/ui/buttons/walletButton.d.ts +0 -6
- package/dist/types/ui/components/additionalInfoContent.d.ts +0 -1
- package/dist/types/ui/components/alertBanner.d.ts +0 -8
- package/dist/types/ui/components/assetSelectContent.d.ts +0 -1
- package/dist/types/ui/components/changePaymentMethodRow.d.ts +0 -1
- package/dist/types/ui/components/closeTransactionModal.d.ts +0 -1
- package/dist/types/ui/components/connectWithQrContent.d.ts +0 -1
- package/dist/types/ui/components/connectingWalletContent.d.ts +0 -1
- package/dist/types/ui/components/copyButton.d.ts +0 -7
- package/dist/types/ui/components/copyField.d.ts +0 -10
- package/dist/types/ui/components/detailCard.d.ts +0 -6
- package/dist/types/ui/components/detailRow.d.ts +0 -9
- package/dist/types/ui/components/downloadWalletContent.d.ts +0 -1
- package/dist/types/ui/components/featuredWalletBanner.d.ts +0 -3
- package/dist/types/ui/components/fieldShell.d.ts +0 -7
- package/dist/types/ui/components/fileDropzone.d.ts +0 -8
- package/dist/types/ui/components/formField.d.ts +0 -8
- package/dist/types/ui/components/formSelect.d.ts +0 -12
- package/dist/types/ui/components/loadingContent.d.ts +0 -1
- package/dist/types/ui/components/logoHeader.d.ts +0 -1
- package/dist/types/ui/components/networkPill.d.ts +0 -5
- package/dist/types/ui/components/networkSelectContent.d.ts +0 -1
- package/dist/types/ui/components/payButtons.d.ts +0 -1
- package/dist/types/ui/components/paymentFailureContent.d.ts +0 -1
- package/dist/types/ui/components/paymentHeader.d.ts +0 -1
- package/dist/types/ui/components/paymentSuccessContent.d.ts +0 -1
- package/dist/types/ui/components/restoreDetailsModal.d.ts +0 -1
- package/dist/types/ui/components/scanToPayContent.d.ts +0 -1
- package/dist/types/ui/components/searchSelectField.d.ts +0 -18
- package/dist/types/ui/components/summaryRow.d.ts +0 -7
- package/dist/types/ui/components/summaryRowGroup.d.ts +0 -7
- package/dist/types/ui/components/timerBanner.d.ts +0 -1
- package/dist/types/ui/components/underpaidContent.d.ts +0 -3
- package/dist/types/ui/components/walletSelectContent.d.ts +0 -1
- package/dist/types/ui/domHelpers.d.ts +0 -3
- package/dist/types/ui/restoreDetailsController.d.ts +0 -48
- package/dist/types/ui/searchSelectController.d.ts +0 -28
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { DisplayAsset } from './types';
|
|
2
|
-
export declare const CryptoTransactionStatusPending = 0;
|
|
3
|
-
export declare const CryptoTransactionStatusSuccess = 1;
|
|
4
|
-
export declare const CryptoTransactionStatusPendingKYCVerification = -3;
|
|
5
|
-
export declare const TransactionStatusPending = 0;
|
|
6
|
-
export declare const TransactionStatusSuccess = 1;
|
|
7
|
-
export declare const PaymentStatusUnpaid = 0;
|
|
8
|
-
export declare const PaymentStatusPartiallyPaid = 1;
|
|
9
|
-
export declare const PaymentStatusPaid = 2;
|
|
10
|
-
export declare const PaymentStatusOverpaid = 3;
|
|
11
|
-
export declare const PaymentRequestStatusExpired = -1;
|
|
12
|
-
export declare const PaymentRequestStatusPending = 0;
|
|
13
|
-
export declare const PaymentRequestStatusConfirmed = 1;
|
|
14
|
-
export declare const BaseUrlDev = "https://api.lydian.dev";
|
|
15
|
-
export declare const BaseUrlSandbox = "https://api.sandbox.lydian.com";
|
|
16
|
-
export declare const BaseUrlProduction = "https://api.lydian.com";
|
|
17
2
|
export declare const DEFAULT_LOGO_URL = "https://pay.lydian.com/lydian-wordmark-aqua-2.svg";
|
|
18
|
-
export declare const LYDIAN_LOGO_DOMAINS: string[];
|
|
19
|
-
export declare const FONT_DOMAINS: string[];
|
|
20
3
|
export declare const DEFAULT_FONT_URL = "https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap";
|
|
21
4
|
export declare const DEFAULT_FONT_LINK_ID = "lydian-default-font";
|
|
22
5
|
export declare const AllowedAssetArbitrum = "ARB";
|
|
@@ -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;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ export type GetSessionResponse = {
|
|
|
160
160
|
cancelURL: string;
|
|
161
161
|
successURL: string;
|
|
162
162
|
failureURL: string;
|
|
163
|
-
|
|
163
|
+
allowedAssets: SessionAllowedAsset[] | null;
|
|
164
164
|
allowedWalletsConfig: AllowedWalletConfig[] | null;
|
|
165
165
|
recommendedNetwork: string;
|
|
166
166
|
merchantName?: string;
|
|
@@ -274,6 +274,11 @@ export type GetTransactionResponse = {
|
|
|
274
274
|
remainingLocal: number;
|
|
275
275
|
payments: PaymentRequest[];
|
|
276
276
|
};
|
|
277
|
+
export type SessionAllowedAsset = {
|
|
278
|
+
code: string;
|
|
279
|
+
type?: string;
|
|
280
|
+
networks?: string[] | null;
|
|
281
|
+
};
|
|
277
282
|
export type Asset = {
|
|
278
283
|
code: string;
|
|
279
284
|
type?: string;
|
|
@@ -3,138 +3,53 @@ export declare class Checkout extends HTMLElement {
|
|
|
3
3
|
private shadow;
|
|
4
4
|
private initOptions;
|
|
5
5
|
private API;
|
|
6
|
-
private session;
|
|
6
|
+
private get session();
|
|
7
|
+
private set session(value);
|
|
7
8
|
private sessionPromoted;
|
|
8
|
-
private
|
|
9
|
+
private reactChunkReady;
|
|
10
|
+
private uiUnavailable;
|
|
11
|
+
private get cryptoTransaction();
|
|
12
|
+
private set cryptoTransaction(value);
|
|
9
13
|
private linkedTransaction;
|
|
10
14
|
private consecutivePollFailures;
|
|
11
15
|
private pollInFlight;
|
|
12
16
|
private walletChainWarned;
|
|
13
17
|
private getCryptoTransactionIntervalID;
|
|
14
18
|
private readonly sessionQuoteWatcher;
|
|
15
|
-
private containerPaymentSuccess;
|
|
16
|
-
private containerPaymentFailure;
|
|
17
|
-
private containerQRCode;
|
|
18
|
-
private lydianProcessingContainer;
|
|
19
|
-
private btnCancelLoading;
|
|
20
19
|
private paymentHeaderWasVisible;
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private paymentIdField;
|
|
24
|
-
private btnClosePaymentFailure;
|
|
25
|
-
private containerWalletSelect;
|
|
26
|
-
private modalContainerWalletSelect;
|
|
27
|
-
private containerConnectingWallet;
|
|
28
|
-
private modalContainerConnectingWallet;
|
|
29
|
-
private containerConnectWithQr;
|
|
30
|
-
private modalContainerConnectWithQr;
|
|
31
|
-
private containerDownloadWallet;
|
|
32
|
-
private modalContainerDownloadWallet;
|
|
33
|
-
private containerNetworks;
|
|
34
|
-
private containerNetworkList;
|
|
20
|
+
private connectQrElement;
|
|
21
|
+
private pairingQrStyling;
|
|
35
22
|
private lydianConnect;
|
|
36
23
|
private walletConnection;
|
|
37
24
|
private connectedAccount;
|
|
38
25
|
private connectAbort;
|
|
39
|
-
private
|
|
40
|
-
private
|
|
41
|
-
private
|
|
42
|
-
private btnWalletSummaryRow;
|
|
43
|
-
private btnAssetWalletSummaryRow;
|
|
44
|
-
private assetSelectTotalAmount;
|
|
45
|
-
private assetMarkupNotice;
|
|
46
|
-
private paymentHeader;
|
|
47
|
-
private merchantLogoHeader;
|
|
48
|
-
private changePaymentMethodRow;
|
|
49
|
-
private btnHeaderBack;
|
|
26
|
+
private get pendingPairingUri();
|
|
27
|
+
private set pendingPairingUri(value);
|
|
28
|
+
private connecting;
|
|
50
29
|
private headerBackAction;
|
|
51
|
-
private btnChangePaymentMethod;
|
|
52
30
|
private logoHeaderWasVisible;
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
private
|
|
56
|
-
private paymentHeaderMerchant;
|
|
57
|
-
private containerCryptoPayment;
|
|
58
|
-
private containerAssets;
|
|
31
|
+
private readonly checkoutStore;
|
|
32
|
+
private checkoutApp;
|
|
33
|
+
private kycDraftSource;
|
|
59
34
|
private canvasQRCode;
|
|
60
|
-
private
|
|
61
|
-
private displayQrSubtotal;
|
|
62
|
-
private displayQrNetworkFee;
|
|
63
|
-
private displayQrMarkup;
|
|
64
|
-
private qrMarkupRow;
|
|
65
|
-
private displayWalletAddress;
|
|
66
|
-
private qrNetworkLogo;
|
|
67
|
-
private qrNetworkName;
|
|
68
|
-
private btnCancelQr;
|
|
69
|
-
private btnOpenInWallet;
|
|
70
|
-
private btnOpenInWalletLabel;
|
|
71
|
-
private scanPayHeading;
|
|
72
|
-
private displayCopyNetwork;
|
|
73
|
-
private displayCopyAmount;
|
|
74
|
-
private btnDownloadQr;
|
|
75
|
-
private btnChangeCoin;
|
|
35
|
+
private scanQrPanel;
|
|
76
36
|
private qrCodeStyling;
|
|
77
|
-
private qrCodeLink;
|
|
78
|
-
private scanToPayRoot;
|
|
79
|
-
private qrUnavailableNotice;
|
|
80
|
-
private qrCopyFeedback;
|
|
81
37
|
private pendingWalletSend;
|
|
82
38
|
private countdownBanner;
|
|
83
|
-
private isCheckoutSettled;
|
|
84
|
-
private
|
|
85
|
-
private
|
|
86
|
-
private selectedAsset;
|
|
87
|
-
private
|
|
88
|
-
private selectedNetwork;
|
|
89
|
-
private selectedWallet;
|
|
39
|
+
private get isCheckoutSettled();
|
|
40
|
+
private set isCheckoutSettled(value);
|
|
41
|
+
private get selectedAsset();
|
|
42
|
+
private set selectedAsset(value);
|
|
43
|
+
private get selectedNetwork();
|
|
44
|
+
private set selectedNetwork(value);
|
|
45
|
+
private get selectedWallet();
|
|
46
|
+
private set selectedWallet(value);
|
|
90
47
|
private modal;
|
|
91
|
-
private modalContainerPaymentSuccess;
|
|
92
|
-
private modalContainerPaymentFailure;
|
|
93
|
-
private modalContainerQRCode;
|
|
94
|
-
private modalContainerNetworks;
|
|
95
|
-
private modalContainerCryptoPayment;
|
|
96
|
-
private displaySuccessAmount;
|
|
97
|
-
private successOverpaidBanner;
|
|
98
|
-
private btnDoneSuccess;
|
|
99
|
-
private underpaidSlot;
|
|
100
|
-
private underpaidNoticeSlot;
|
|
101
|
-
private underpaidActionsSlot;
|
|
102
|
-
private labelAssetTotal;
|
|
103
|
-
private scanExactAmountNotice;
|
|
104
|
-
private modalButtonChooseDifferentAsset;
|
|
105
48
|
private modalCloseTransactionModal;
|
|
106
|
-
private
|
|
107
|
-
private
|
|
108
|
-
private
|
|
109
|
-
private
|
|
110
|
-
private modalContainerKYCAndTravelRules;
|
|
111
|
-
private email;
|
|
112
|
-
private firstName;
|
|
113
|
-
private lastName;
|
|
114
|
-
private street;
|
|
115
|
-
private city;
|
|
116
|
-
private region;
|
|
117
|
-
private postalCode;
|
|
118
|
-
private countryInput;
|
|
119
|
-
private countryCombobox;
|
|
120
|
-
private documentType;
|
|
121
|
-
private documentFileFront;
|
|
122
|
-
private documentFileBackContainer;
|
|
123
|
-
private documentFileBack;
|
|
124
|
-
private buttonKYCVerificationAndTravelRules;
|
|
125
|
-
private btnCancelKyc;
|
|
126
|
-
private storeKYC;
|
|
127
|
-
private restoreController;
|
|
128
|
-
private kycStepLabel;
|
|
129
|
-
private kycStepBasic;
|
|
130
|
-
private kycStepAddress;
|
|
131
|
-
private kycStepDocument;
|
|
132
|
-
private btnKycWalletSummaryRow;
|
|
133
|
-
private btnKycNetworkSummaryRow;
|
|
134
|
-
private btnCoinSummaryRow;
|
|
135
|
-
private kycSteps;
|
|
136
|
-
private restoreContext;
|
|
137
|
-
private currentKycStepIndex;
|
|
49
|
+
private closeTransactionModalBody;
|
|
50
|
+
private modalRestoreDetails;
|
|
51
|
+
private get restoreContext();
|
|
52
|
+
private set restoreContext(value);
|
|
138
53
|
private brandFontLink;
|
|
139
54
|
constructor();
|
|
140
55
|
initialize(options: CheckoutInitOptions): Promise<void>;
|
|
@@ -147,29 +62,20 @@ export declare class Checkout extends HTMLElement {
|
|
|
147
62
|
private fetchLinkedTransaction;
|
|
148
63
|
disconnectedCallback(): void;
|
|
149
64
|
private renewExpiredQuote;
|
|
150
|
-
private updateDisplayedAmounts;
|
|
151
|
-
private isScreenVisible;
|
|
152
65
|
private ensureFreshSession;
|
|
153
66
|
private markPromotedFrom;
|
|
154
67
|
private loadInitialState;
|
|
155
68
|
private setSelectedAsset;
|
|
156
69
|
private setSelectedNetwork;
|
|
157
70
|
private setSelectedWallet;
|
|
158
|
-
private setDetailRow;
|
|
159
|
-
private hideDetailRow;
|
|
160
|
-
private syncDetailCards;
|
|
161
71
|
private showPaymentSuccess;
|
|
162
72
|
private hidePaymentHeader;
|
|
163
73
|
private showUnderpaid;
|
|
164
|
-
private safeFormatCurrency;
|
|
165
|
-
private safeFormatLocal;
|
|
166
74
|
private reportFailure;
|
|
167
75
|
private showErrorBanner;
|
|
168
|
-
private flushPendingErrorBanner;
|
|
169
76
|
private clearErrorBanner;
|
|
170
77
|
private showPaymentFailure;
|
|
171
|
-
private
|
|
172
|
-
private hidePaymentSuccess;
|
|
78
|
+
private confirmCloseTransaction;
|
|
173
79
|
private setProcessingMessage;
|
|
174
80
|
private showProcessing;
|
|
175
81
|
private hideProcessing;
|
|
@@ -184,14 +90,21 @@ export declare class Checkout extends HTMLElement {
|
|
|
184
90
|
private refreshExpirationCountdown;
|
|
185
91
|
private endCheckout;
|
|
186
92
|
private returnToCoinSelection;
|
|
93
|
+
private drawPendingQrCode;
|
|
187
94
|
private hideQRCode;
|
|
188
95
|
private render;
|
|
189
96
|
private initializeComponents;
|
|
190
|
-
private wireWarningIconFallbacks;
|
|
191
97
|
private wireCopyFields;
|
|
192
98
|
private copyAndFlash;
|
|
193
99
|
private flashCopyFeedback;
|
|
100
|
+
private scanToPayCallbacks;
|
|
101
|
+
private resolveAppTargets;
|
|
102
|
+
private clearSelection;
|
|
103
|
+
private chooseNetwork;
|
|
104
|
+
private chooseAsset;
|
|
194
105
|
private attachListeners;
|
|
106
|
+
private requireApi;
|
|
107
|
+
private openRestoreDetails;
|
|
195
108
|
private startListeningCryptoTransaction;
|
|
196
109
|
private readTransactionOnce;
|
|
197
110
|
private collectUnderpaidBalance;
|
|
@@ -199,29 +112,29 @@ export declare class Checkout extends HTMLElement {
|
|
|
199
112
|
private settleTerminalTransaction;
|
|
200
113
|
private updatePaymentHeader;
|
|
201
114
|
private setAssetButtons;
|
|
202
|
-
private attachListenersOnAssets;
|
|
203
115
|
private setWalletButtons;
|
|
204
|
-
private
|
|
116
|
+
private chooseWallet;
|
|
205
117
|
private flowSettings;
|
|
118
|
+
private syncFlowSettings;
|
|
206
119
|
private hasConnectableWallet;
|
|
207
120
|
private connectSelectedWallet;
|
|
208
121
|
private releaseTopLayer;
|
|
209
122
|
private reclaimTopLayer;
|
|
210
123
|
private failWalletConnect;
|
|
211
|
-
private hideConnectScreens;
|
|
212
124
|
private syncChangeMethodButton;
|
|
213
125
|
private setHeaderBack;
|
|
214
126
|
private hideWalletFlowScreens;
|
|
215
127
|
private buildConnectedWalletSend;
|
|
216
128
|
private showConnectingWallet;
|
|
129
|
+
private showOpenWalletButton;
|
|
217
130
|
private showWalletOpenFailed;
|
|
131
|
+
private openSelectedWallet;
|
|
132
|
+
private cancelConnect;
|
|
218
133
|
private showConnectWithQr;
|
|
219
|
-
private
|
|
134
|
+
private drawPendingPairingQr;
|
|
220
135
|
private showDownloadWallet;
|
|
221
136
|
private showWalletSelectFromDownload;
|
|
222
|
-
private setTextById;
|
|
223
137
|
private setNetworkButtons;
|
|
224
|
-
private attachListenerOnNetworks;
|
|
225
138
|
private applyBranding;
|
|
226
139
|
private beginPayment;
|
|
227
140
|
private beginTransaction;
|
|
@@ -229,17 +142,8 @@ export declare class Checkout extends HTMLElement {
|
|
|
229
142
|
private walletSendForSigning;
|
|
230
143
|
private signAndSubmit;
|
|
231
144
|
private showKycScreen;
|
|
232
|
-
private
|
|
233
|
-
private
|
|
234
|
-
private fillWalletSummaryRow;
|
|
235
|
-
private populateKycSummaryRows;
|
|
236
|
-
private applyKycFieldVisibility;
|
|
237
|
-
private renderKycStep;
|
|
238
|
-
private syncKycContinueEnabled;
|
|
239
|
-
private readKycFieldValues;
|
|
240
|
-
private showKycFieldError;
|
|
241
|
-
private clearKycFieldErrors;
|
|
242
|
-
private handleKycContinue;
|
|
145
|
+
private showScreen;
|
|
146
|
+
private stashKycDraft;
|
|
243
147
|
private submitKycVerification;
|
|
244
148
|
private showDocumentOnlyKycScreen;
|
|
245
149
|
private restoreWithCustomerUUID;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export declare const isSafeColor: (color?: string) => color is string;
|
|
2
|
-
export declare const isSafeFontFamily: (fontFamily?: string) => fontFamily is string;
|
|
3
|
-
export declare const isAllowedFontUrl: (fontUrl?: string) => fontUrl is string;
|
|
4
|
-
export declare const isAllowedLogoUrl: (logoUrl?: string) => logoUrl is string;
|
|
5
1
|
export declare const resolveLogoUrl: (logoUrl?: string) => string;
|
|
6
2
|
export declare const sanitizeTermNotice: (rawHtml: string) => string;
|
|
@@ -10,14 +10,16 @@ type ClockElement = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare class CountdownBannerController {
|
|
12
12
|
private readonly slot;
|
|
13
|
-
private
|
|
13
|
+
private clock;
|
|
14
14
|
private interval;
|
|
15
15
|
private targetExpiry;
|
|
16
16
|
private wasVisible;
|
|
17
|
+
private lastClockText;
|
|
17
18
|
constructor({ slot, clock }: {
|
|
18
19
|
slot: SlotElement | null;
|
|
19
20
|
clock: ClockElement | null;
|
|
20
21
|
});
|
|
22
|
+
setClock(clock: ClockElement | null): void;
|
|
21
23
|
refresh(expiry: number | null): void;
|
|
22
24
|
show(): void;
|
|
23
25
|
hide(): void;
|
|
@@ -26,5 +28,6 @@ export declare class CountdownBannerController {
|
|
|
26
28
|
suspend(): void;
|
|
27
29
|
resume(): void;
|
|
28
30
|
private startClock;
|
|
31
|
+
private paintClock;
|
|
29
32
|
}
|
|
30
33
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { SelectOption } from './
|
|
1
|
+
import type { SelectOption } from './optionFilter';
|
|
2
2
|
export declare function countryOptions(locale?: string): SelectOption[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AllowedWalletConfig, Asset, GetSessionResponse } from '../types';
|
|
2
|
-
export declare function resolveAllowedAssets(
|
|
1
|
+
import { AllowedWalletConfig, Asset, GetSessionResponse, SessionAllowedAsset } from '../types';
|
|
2
|
+
export declare function resolveAllowedAssets(allowedAssets: SessionAllowedAsset[] | null | undefined): Asset[];
|
|
3
3
|
export declare function collectNetworksFromAssets(allowedAssets: Asset[]): string[];
|
|
4
4
|
export declare function hoistRecommendedNetwork({ networks, recommendedNetwork, }: {
|
|
5
5
|
networks: string[];
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export type SelectOption = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
2
5
|
export declare function filterOptions(options: SelectOption[], query: string): SelectOption[];
|
|
3
6
|
export declare function resolveOption(options: SelectOption[], query: string): SelectOption | null;
|
|
4
7
|
export declare function initialHighlightIndex(options: SelectOption[], value: string | undefined): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CheckoutCallbacks, CheckoutStore } from './checkoutStore';
|
|
3
|
+
import type { CheckoutAppTargets } from './checkoutTargets';
|
|
4
|
+
export type { CheckoutAppTargets };
|
|
5
|
+
export default function CheckoutApp({ store, callbacks, targets, }: {
|
|
6
|
+
store: CheckoutStore;
|
|
7
|
+
callbacks: CheckoutCallbacks;
|
|
8
|
+
targets: CheckoutAppTargets;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CloseDialogVariant } from './checkoutStore';
|
|
3
|
+
export default function CloseTransactionDialogBody({ variant, onAccept, onReject, }: {
|
|
4
|
+
variant: CloseDialogVariant;
|
|
5
|
+
onAccept: () => void;
|
|
6
|
+
onReject: () => void;
|
|
7
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function CopyButton({ label, copyLabel, buttonClass, feedbackClass, }: {
|
|
3
|
+
label: string;
|
|
4
|
+
copyLabel?: string;
|
|
5
|
+
buttonClass?: string;
|
|
6
|
+
feedbackClass?: string;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
export default function CopyField({ valueId, label, copyLabel, value, copyValue, valueSizeClass, wrap, }: {
|
|
9
|
+
valueId: string;
|
|
10
|
+
label: string;
|
|
11
|
+
copyLabel?: string;
|
|
12
|
+
value: string;
|
|
13
|
+
copyValue?: string;
|
|
14
|
+
valueSizeClass?: string;
|
|
15
|
+
wrap?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type DetailRowSpec = {
|
|
3
|
+
label: string;
|
|
4
|
+
rowId: string;
|
|
5
|
+
valueId: string;
|
|
6
|
+
value: string;
|
|
7
|
+
emphasis?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export default function DetailCard({ heading, rows }: {
|
|
10
|
+
heading: string;
|
|
11
|
+
rows: DetailRowSpec[];
|
|
12
|
+
}): React.JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function FieldShell({ id, label, labelFor, error, children, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
labelFor: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export default function FormField({ id, label, placeholder, value, onChange, type, autoComplete, error, inputRef, }: {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (value: string) => void;
|
|
15
|
+
type?: string;
|
|
16
|
+
autoComplete?: string;
|
|
17
|
+
error?: string;
|
|
18
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
19
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SelectOption } from '../optionFilter';
|
|
3
|
+
export default function FormSelect({ id, label, options, value, onChange, placeholder, ariaLabel, error, }: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
options: SelectOption[];
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function LoadingScreen({ message, subMessage, cancellable, logoUrl, logoAlt, onCancel, }: {
|
|
3
|
+
message: string | null;
|
|
4
|
+
subMessage: string | null;
|
|
5
|
+
cancellable: boolean;
|
|
6
|
+
logoUrl: string | null;
|
|
7
|
+
logoAlt: string;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
export type OptionButtonVariant = 'network' | 'asset';
|
|
2
|
-
export
|
|
3
|
+
export default function OptionButton({ id, imageUrl, imageAlt, label, secondaryLabel, secondaryValue, trailingNote, badgeLabel, variant, onClick, }: {
|
|
3
4
|
id: string;
|
|
4
5
|
imageUrl: string;
|
|
5
6
|
imageAlt: string;
|
|
@@ -9,5 +10,5 @@ export type OptionButtonProps = {
|
|
|
9
10
|
trailingNote?: string;
|
|
10
11
|
badgeLabel?: string;
|
|
11
12
|
variant?: OptionButtonVariant;
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function PaymentHeaderSection({ logoVisible, logoUrl, logoAlt, backVisible, onBack, headerVisible, merchant, amount, changeMethodVisible, onChangePaymentMethod, }: {
|
|
3
|
+
logoVisible: boolean;
|
|
4
|
+
logoUrl: string | null;
|
|
5
|
+
logoAlt: string;
|
|
6
|
+
backVisible: boolean;
|
|
7
|
+
onBack: () => void;
|
|
8
|
+
headerVisible: boolean;
|
|
9
|
+
merchant: string | null;
|
|
10
|
+
amount: string;
|
|
11
|
+
changeMethodVisible: boolean;
|
|
12
|
+
onChangePaymentMethod: () => void;
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SelectOption } from '../optionFilter';
|
|
3
|
+
export default function SearchSelect({ id, label, placeholder, options, value, onChange, error, }: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
options: SelectOption[];
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
error?: string;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function SummaryRow({ id, leadingLabel, logoUrl, name, onClick, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
leadingLabel: string;
|
|
5
|
+
logoUrl: string;
|
|
6
|
+
name: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export declare function SummaryRowGroup({ children }: {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}): React.JSX.Element;
|