@lydianpay/sdk-web 3.18.8 → 3.19.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.
@@ -198,6 +198,7 @@ export type GetSessionResponse = {
198
198
  allowedWalletsConfig: AllowedWalletConfig[] | null;
199
199
  recommendedNetwork: string;
200
200
  merchantName?: string;
201
+ merchantCountry?: string;
201
202
  calculatedCryptoTotals?: AmountPerAsset;
202
203
  calculatedCryptoTotalsPerNetwork?: AmountPerNetworkPerAsset;
203
204
  customFlatFeePerNetwork?: AmountPerNetwork;
@@ -2,6 +2,7 @@ import type { SelectOption } from './optionFilter';
2
2
  import type { PlaceCountry } from '../types';
3
3
  export declare function isSupportedCountryCode(countryCode: string): boolean;
4
4
  export declare function countryOptions(locale?: string): SelectOption[];
5
+ export declare function getCountryName(code: string, locale?: string): string;
5
6
  export declare function getCountryOptions({ countries, locale, }: {
6
7
  countries: PlaceCountry[];
7
8
  locale?: string;
@@ -1,5 +1,5 @@
1
1
  import type { CreateTransactionResponse } from '../types';
2
- export declare const KYC_PART_ORDER: readonly ["email", "firstName", "lastName", "walletAddress", "country", "cityOfBirth", "dateOfBirth", "nationalIDNumber", "customerIDNumber", "street", "street2", "region", "city", "postalCode"];
2
+ export declare const KYC_PART_ORDER: readonly ["email", "country", "firstName", "lastName", "walletAddress", "cityOfBirth", "dateOfBirth", "nationalIDNumber", "customerIDNumber", "street", "street2", "region", "city", "postalCode"];
3
3
  export type KycFieldPart = (typeof KYC_PART_ORDER)[number];
4
4
  export declare const KYC_FIELD_ORDER: readonly ["email", "firstName", "lastName", "walletAddress", "country", "dateAndPlaceOfBirth", "cityOfBirth", "dateOfBirth", "physicalAddress", "nationalIDNumber", "customerIDNumber"];
5
5
  export type KycField = (typeof KYC_FIELD_ORDER)[number];
@@ -24,6 +24,9 @@ export type KycFormValues = Record<KycFieldPart, string> & {
24
24
  hasDocumentBack: boolean;
25
25
  };
26
26
  export declare const EMPTY_KYC_TEXT: Record<KycFieldPart, string>;
27
+ export declare function getBlankKycText({ merchantCountry, }: {
28
+ merchantCountry: string | null;
29
+ }): Record<KycFieldPart, string>;
27
30
  export type KycFieldGroup = {
28
31
  fields: KycField[];
29
32
  count: number;
@@ -49,9 +52,10 @@ export declare function getKycChoiceInputs({ group, chosenFields, }: {
49
52
  group: KycFieldGroup;
50
53
  chosenFields: KycField[];
51
54
  }): KycGroupChoice[];
52
- export declare function getInitialKycChoiceFields({ group, values, }: {
55
+ export declare function getInitialKycChoiceFields({ group, values, blankText, }: {
53
56
  group: KycFieldGroup;
54
57
  values: KycFormValues;
58
+ blankText?: Record<KycFieldPart, string>;
55
59
  }): KycField[];
56
60
  export declare function getHiddenFilledParts({ group, chosenFields, values, }: {
57
61
  group: KycFieldGroup;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import type { SelectOption } from '../optionFilter';
3
+ export default function CitizenshipField({ merchantCountry, value, countries, onChange, }: {
4
+ merchantCountry: string;
5
+ value: string;
6
+ countries: SelectOption[];
7
+ onChange: (country: string) => void;
8
+ }): React.JSX.Element;
@@ -5,6 +5,7 @@ import type { SelectOption } from '../optionFilter';
5
5
  export type KycInputProps = {
6
6
  values: KycFormValues;
7
7
  countries: SelectOption[];
8
+ merchantCountry: string | null;
8
9
  onChange: (part: KycFieldPart, value: string) => void;
9
10
  onFile: KycPartsOnFile;
10
11
  };
@@ -0,0 +1 @@
1
+ export declare function useMerchantCountry(): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "3.18.8",
3
+ "version": "3.19.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": {