@lydianpay/sdk-web 3.18.3 → 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-B1LvcJK7.js → browser-DdTVGR0z.js} +1 -1
- package/dist/chunks/{connect-multichain-BTjOwyD0.js → connect-multichain-BrcN2dNL.js} +9 -9
- package/dist/chunks/{dist-LC8XIUBA.js → dist-B5EhMLUz.js} +3 -3
- package/dist/chunks/{dist-fcq9rJpd.js → dist-BQ3n2-E0.js} +2 -2
- package/dist/chunks/{index-d0o2-TKM.js → index-1dDAk3NM.js} +1 -1
- package/dist/chunks/{index-C0GZhKp3.js → index-C6Fwd4Bo.js} +1 -1
- package/dist/chunks/{index-CHvJ_L6s.js → index-D6FuIfZo.js} +127 -131
- package/dist/chunks/{index-CqGRQrLr.js → index-Dq_OOR8t.js} +2 -2
- package/dist/chunks/{mountEngine-Bn21lPvA.js → mountEngine-DLOTZV_w.js} +5550 -5605
- 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 +4 -5
- package/dist/types/ui/flowConfig.d.ts +1 -0
- package/dist/types/ui/kycValidation.d.ts +1 -5
- 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;
|
|
@@ -256,7 +252,6 @@ export type KYCVerificationRequest = {
|
|
|
256
252
|
email?: string;
|
|
257
253
|
street?: string;
|
|
258
254
|
city?: string;
|
|
259
|
-
subdivision?: string;
|
|
260
255
|
region?: string;
|
|
261
256
|
postalCode?: string;
|
|
262
257
|
country?: string;
|
|
@@ -323,6 +318,9 @@ export type GetTransactionResponse = {
|
|
|
323
318
|
paymentStatus: number;
|
|
324
319
|
expiration: string;
|
|
325
320
|
cancellationReason?: string;
|
|
321
|
+
compliance?: {
|
|
322
|
+
complianceStatus?: string;
|
|
323
|
+
};
|
|
326
324
|
amounts: Amounts;
|
|
327
325
|
remainingUSD: number;
|
|
328
326
|
remainingLocal: number;
|
|
@@ -374,6 +372,7 @@ export type CheckoutFlow = {
|
|
|
374
372
|
showApprovalPage?: boolean;
|
|
375
373
|
hideChangePaymentMethod?: boolean;
|
|
376
374
|
hideEmailReceipt?: boolean;
|
|
375
|
+
disableSplitPayments?: boolean;
|
|
377
376
|
};
|
|
378
377
|
export type CheckoutConfig = {
|
|
379
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;
|
|
@@ -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[];
|