@lydianpay/sdk-web 3.18.2 → 3.18.4
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-ByUw6qxL.js → browser-DdTVGR0z.js} +1 -1
- package/dist/chunks/{connect-multichain-B5TudJIg.js → connect-multichain-BrcN2dNL.js} +9 -9
- package/dist/chunks/{dist-CgyqdZZP.js → dist-B5EhMLUz.js} +3 -3
- package/dist/chunks/{dist-DxDvLdBX.js → dist-BQ3n2-E0.js} +2 -2
- package/dist/chunks/{index-CF-D_uxJ.js → index-1dDAk3NM.js} +1 -1
- package/dist/chunks/{index-CxHFTZ5V.js → index-C6Fwd4Bo.js} +1 -1
- package/dist/chunks/{index-BJAiOYNA.js → index-D6FuIfZo.js} +127 -131
- package/dist/chunks/{index-BMvT5fJ_.js → index-Dq_OOR8t.js} +2 -2
- package/dist/chunks/{mountEngine-DURf9AtR.js → mountEngine-DLOTZV_w.js} +8118 -8166
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/network/places/index.d.ts +1 -2
- package/dist/types/types.d.ts +5 -5
- package/dist/types/ui/flowConfig.d.ts +1 -0
- package/dist/types/ui/kycValidation.d.ts +1 -5
- package/dist/types/ui/paymentFlow.d.ts +3 -1
- package/dist/types/ui/react/AssetSelectScreen/AssetSelectOption.d.ts +2 -1
- package/dist/types/ui/react/OptionButton.d.ts +2 -1
- package/dist/types/ui/react/checkoutStore.d.ts +0 -4
- package/dist/types/ui/regionDirectory.d.ts +2 -7
- package/package.json +1 -1
- package/dist/types/ui/kycRegions.d.ts +0 -12
- package/dist/types/ui/react/useRegionOptions.d.ts +0 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Base } from '../base';
|
|
2
|
-
import type { PlaceCountry
|
|
2
|
+
import type { PlaceCountry } from '../../types';
|
|
3
3
|
export declare class Places extends Base {
|
|
4
4
|
getCountries(signal?: AbortSignal): Promise<PlaceCountry[] | null>;
|
|
5
|
-
getStates(countryCode: string, signal?: AbortSignal): Promise<PlaceState[] | null>;
|
|
6
5
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -136,10 +136,6 @@ export type CustomerKYCValidationStatusResponse = {
|
|
|
136
136
|
customerUUID: string;
|
|
137
137
|
kycValidated: boolean;
|
|
138
138
|
};
|
|
139
|
-
export type PlaceState = {
|
|
140
|
-
name: string;
|
|
141
|
-
iso2: string;
|
|
142
|
-
};
|
|
143
139
|
export type PlaceCountry = {
|
|
144
140
|
name: string;
|
|
145
141
|
iso2: string;
|
|
@@ -200,6 +196,7 @@ export type CreateSessionTransactionRequest = {
|
|
|
200
196
|
asset: string;
|
|
201
197
|
network: string;
|
|
202
198
|
customerUUID?: string;
|
|
199
|
+
walletAddress?: string;
|
|
203
200
|
};
|
|
204
201
|
export type SendReceiptRequest = {
|
|
205
202
|
email: string;
|
|
@@ -255,7 +252,6 @@ export type KYCVerificationRequest = {
|
|
|
255
252
|
email?: string;
|
|
256
253
|
street?: string;
|
|
257
254
|
city?: string;
|
|
258
|
-
subdivision?: string;
|
|
259
255
|
region?: string;
|
|
260
256
|
postalCode?: string;
|
|
261
257
|
country?: string;
|
|
@@ -322,6 +318,9 @@ export type GetTransactionResponse = {
|
|
|
322
318
|
paymentStatus: number;
|
|
323
319
|
expiration: string;
|
|
324
320
|
cancellationReason?: string;
|
|
321
|
+
compliance?: {
|
|
322
|
+
complianceStatus?: string;
|
|
323
|
+
};
|
|
325
324
|
amounts: Amounts;
|
|
326
325
|
remainingUSD: number;
|
|
327
326
|
remainingLocal: number;
|
|
@@ -373,6 +372,7 @@ export type CheckoutFlow = {
|
|
|
373
372
|
showApprovalPage?: boolean;
|
|
374
373
|
hideChangePaymentMethod?: boolean;
|
|
375
374
|
hideEmailReceipt?: boolean;
|
|
375
|
+
disableSplitPayments?: boolean;
|
|
376
376
|
};
|
|
377
377
|
export type CheckoutConfig = {
|
|
378
378
|
logoURL?: string;
|
|
@@ -7,5 +7,6 @@ export type CheckoutFlowSettings = {
|
|
|
7
7
|
hideOtherWallets: boolean;
|
|
8
8
|
hideChangePaymentMethod: boolean;
|
|
9
9
|
hideEmailReceipt: boolean;
|
|
10
|
+
disableSplitPayments: boolean;
|
|
10
11
|
};
|
|
11
12
|
export declare function resolveFlow(accountFlow?: CheckoutFlow, embedFlow?: InitFlowOptions): CheckoutFlowSettings;
|
|
@@ -10,7 +10,7 @@ export declare const KYC_FIELD_PARTS: {
|
|
|
10
10
|
readonly dateOfBirth: readonly ["dateOfBirth"];
|
|
11
11
|
readonly nationalIDNumber: readonly ["nationalIDNumber"];
|
|
12
12
|
readonly customerIDNumber: readonly ["customerIDNumber"];
|
|
13
|
-
readonly physicalAddress: readonly ["country", "
|
|
13
|
+
readonly physicalAddress: readonly ["country", "street", "street2", "region", "city", "postalCode"];
|
|
14
14
|
};
|
|
15
15
|
export type KycField = keyof typeof KYC_FIELD_PARTS;
|
|
16
16
|
export type KycFieldPart = (typeof KYC_FIELD_PARTS)[KycField][number];
|
|
@@ -57,10 +57,6 @@ export declare function getHiddenFilledParts({ group, chosenFields, values, }: {
|
|
|
57
57
|
}): KycFieldPart[];
|
|
58
58
|
export declare function canFulfillKycRequirements({ requiredFields, fieldGroups, documentTypes, unsupportedFields, }: KycRequirements): boolean;
|
|
59
59
|
export declare function isKycEmailCollected({ requiredParts, fieldGroups }: KycRequirements): boolean;
|
|
60
|
-
export declare function isKycPartRevealed({ part, values, }: {
|
|
61
|
-
part: KycFieldPart;
|
|
62
|
-
values: KycFormValues;
|
|
63
|
-
}): boolean;
|
|
64
60
|
export declare function getKycPartError(part: KycFieldPart, values: KycFormValues): string | null;
|
|
65
61
|
export declare function isKycFieldComplete(field: KycField, values: KycFormValues): boolean;
|
|
66
62
|
export declare function documentHasTwoSides(documentType: string): boolean;
|
|
@@ -18,6 +18,7 @@ export interface PaymentFlow {
|
|
|
18
18
|
*/
|
|
19
19
|
endCheckoutIfSettled(transaction: GetTransactionResponse, overpaidUSD?: number): boolean;
|
|
20
20
|
continueAfterCreate(): Promise<void>;
|
|
21
|
+
awaitCompliance(): void;
|
|
21
22
|
startPolling(): void;
|
|
22
23
|
pollOnce(): Promise<void>;
|
|
23
24
|
showQRCode(): void;
|
|
@@ -35,7 +36,7 @@ export interface PaymentFlowSeams {
|
|
|
35
36
|
closeSettledCheckout(): void;
|
|
36
37
|
walletOwnsCheckout(): boolean;
|
|
37
38
|
}
|
|
38
|
-
export declare function createPaymentFlow({ store, presentation, screenNavigator, sessionLifecycle, hostCallbacks, poller, quoteWatcher, getApi, getOptions, emit, seams, }: {
|
|
39
|
+
export declare function createPaymentFlow({ store, presentation, screenNavigator, sessionLifecycle, hostCallbacks, poller, quoteWatcher, getApi, getOptions, getWalletAccount, emit, seams, }: {
|
|
39
40
|
store: CheckoutStore;
|
|
40
41
|
presentation: CheckoutPresentation;
|
|
41
42
|
screenNavigator: ScreenNavigator;
|
|
@@ -45,6 +46,7 @@ export declare function createPaymentFlow({ store, presentation, screenNavigator
|
|
|
45
46
|
quoteWatcher: SessionQuoteWatcher;
|
|
46
47
|
getApi: () => API | null;
|
|
47
48
|
getOptions: () => CheckoutInitOptions | null;
|
|
49
|
+
getWalletAccount: () => string | null;
|
|
48
50
|
emit: (name: CheckoutEventName, data?: Record<string, unknown>) => void;
|
|
49
51
|
seams: PaymentFlowSeams;
|
|
50
52
|
}): PaymentFlow;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type BalanceWarning } from '../../networkListHelpers';
|
|
3
3
|
import type { GetSessionResponse } from '../../../types';
|
|
4
|
-
export default function AssetSelectOption({ assetCode, session, priceNetwork, balanceWarning, onSelect, }: {
|
|
4
|
+
export default function AssetSelectOption({ assetCode, session, priceNetwork, balanceWarning, disabled, onSelect, }: {
|
|
5
5
|
assetCode: string;
|
|
6
6
|
session: GetSessionResponse | undefined;
|
|
7
7
|
priceNetwork: string | null;
|
|
8
8
|
balanceWarning?: BalanceWarning;
|
|
9
|
+
disabled: boolean;
|
|
9
10
|
onSelect: (assetCode: string) => void;
|
|
10
11
|
}): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type OptionButtonVariant = 'network' | 'asset';
|
|
3
|
-
export default function OptionButton({ id, imageUrl, imageAlt, label, secondaryLabel, secondaryValue, trailingNote, badgeLabel, warningLabel, highlighted, variant, onClick, }: {
|
|
3
|
+
export default function OptionButton({ id, imageUrl, imageAlt, label, secondaryLabel, secondaryValue, trailingNote, badgeLabel, warningLabel, highlighted, disabled, variant, onClick, }: {
|
|
4
4
|
id: string;
|
|
5
5
|
imageUrl: string;
|
|
6
6
|
imageAlt: string;
|
|
@@ -11,6 +11,7 @@ export default function OptionButton({ id, imageUrl, imageAlt, label, secondaryL
|
|
|
11
11
|
badgeLabel?: string;
|
|
12
12
|
warningLabel?: string;
|
|
13
13
|
highlighted?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
14
15
|
variant?: OptionButtonVariant;
|
|
15
16
|
onClick: () => void;
|
|
16
17
|
}): React.JSX.Element;
|
|
@@ -143,10 +143,6 @@ export interface CheckoutCallbacks {
|
|
|
143
143
|
onGetCountryOptions(details: {
|
|
144
144
|
signal: AbortSignal;
|
|
145
145
|
}): Promise<SelectOption[]>;
|
|
146
|
-
onGetRegionOptions(details: {
|
|
147
|
-
countryCode: string;
|
|
148
|
-
signal: AbortSignal;
|
|
149
|
-
}): Promise<SelectOption[]>;
|
|
150
146
|
onKycSubmit(submission: {
|
|
151
147
|
values: KycFormValues;
|
|
152
148
|
documentFront: File | null;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import type { PlaceCountry
|
|
1
|
+
import type { PlaceCountry } from '../types';
|
|
2
2
|
export type RegionDirectory = {
|
|
3
3
|
getCountries(details: {
|
|
4
4
|
signal?: AbortSignal;
|
|
5
5
|
}): Promise<PlaceCountry[]>;
|
|
6
|
-
getStates(details: {
|
|
7
|
-
countryCode: string;
|
|
8
|
-
signal?: AbortSignal;
|
|
9
|
-
}): Promise<PlaceState[]>;
|
|
10
6
|
};
|
|
11
|
-
export declare function createRegionDirectory({ fetchCountries,
|
|
7
|
+
export declare function createRegionDirectory({ fetchCountries, }: {
|
|
12
8
|
fetchCountries: (signal?: AbortSignal) => Promise<unknown>;
|
|
13
|
-
fetchStates: (countryCode: string, signal?: AbortSignal) => Promise<unknown>;
|
|
14
9
|
}): RegionDirectory;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lydianpay/sdk-web",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.4",
|
|
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": {
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { SelectOption } from './optionFilter';
|
|
2
|
-
import type { PlaceState } from '../types';
|
|
3
|
-
export declare function applyKycPartChange<Fields extends {
|
|
4
|
-
country: string;
|
|
5
|
-
region: string;
|
|
6
|
-
}>({ fields, part, value, }: {
|
|
7
|
-
fields: Fields;
|
|
8
|
-
part: string;
|
|
9
|
-
value: string;
|
|
10
|
-
}): Fields;
|
|
11
|
-
export declare function getValidStates(response: unknown): PlaceState[];
|
|
12
|
-
export declare function getRegionOptions(states: PlaceState[]): SelectOption[];
|