@notabene/javascript-sdk 2.16.0 → 2.17.0-next.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.
@@ -272,7 +272,6 @@ declare type BeneficiaryFields = {
272
272
 
273
273
  declare type BeneficiaryV2 = {
274
274
  beneficiaryPerson: PersonV2[];
275
- customerIdentification?: string;
276
275
  };
277
276
 
278
277
  /**
@@ -754,6 +753,26 @@ export declare type ConnectionResult<T extends ComponentRequest> = {
754
753
 
755
754
  export declare type ConnectionStatus = 'active' | 'completed' | 'closed';
756
755
 
756
+ /**
757
+ * Configuration for the contact support action.
758
+ *
759
+ * @remarks
760
+ * Contact support is **enabled** by including `'contact-support'` in
761
+ * `agentSections.main` or `agentSections.fallback`. This object only
762
+ * configures the behaviour when the feature is enabled.
763
+ *
764
+ * - With `contactSupport: { supportUrl: "..." }` — clicking sends an info
765
+ * message to the host **and** attempts to open the URL as a fallback.
766
+ * - Without `contactSupport` — clicking only sends an info message; the
767
+ * host decides what to do.
768
+ *
769
+ * @public
770
+ */
771
+ export declare interface ContactSupportConfig {
772
+ /** URL to open when the user clicks the support button */
773
+ supportUrl: string;
774
+ }
775
+
757
776
  /**
758
777
  * Metadata for Cosmos ownership proofs
759
778
  * @remarks
@@ -879,7 +898,7 @@ export declare interface DepositRequest extends DepositRequestFields, ComponentR
879
898
  declare type DepositRequestFields = {
880
899
  destination: BlockchainAddress | CAIP10;
881
900
  asset: TransactionAsset;
882
- amountDecimal: number;
901
+ amountDecimal: string | number;
883
902
  travelAddress?: TravelAddress;
884
903
  cryptoCredential?: CryptoCredential;
885
904
  };
@@ -1157,14 +1176,24 @@ export declare enum IdentityVerificationMethod {
1157
1176
  * Represents an info component message
1158
1177
  * @param message - Info message
1159
1178
  * @param description - Description of the info message
1179
+ * @param identifier - Identifier code of the info message
1160
1180
  * @public
1161
1181
  */
1162
1182
  declare type Info = {
1163
1183
  type: CMType.INFO;
1164
1184
  message: string;
1165
1185
  description?: string;
1186
+ identifier?: InfoIdentifierCode;
1166
1187
  };
1167
1188
 
1189
+ /**
1190
+ * Identifier codes for info messages
1191
+ * @public
1192
+ */
1193
+ export declare enum InfoIdentifierCode {
1194
+ CONTACT_SUPPORT = "CONTACT_SUPPORT"
1195
+ }
1196
+
1168
1197
  /**
1169
1198
  * Intermediary VASP
1170
1199
  * Represents an intermediary Virtual Asset Service Provider
@@ -2107,6 +2136,7 @@ declare type NaturalPersonNationalIdentifierTypeCode = Omit<NationalIdentifierTy
2107
2136
 
2108
2137
  declare type NaturalPersonV2 = Omit<NaturalPerson_2, 'name'> & {
2109
2138
  name: NaturalPersonNameV2;
2139
+ customerIdentification?: string;
2110
2140
  };
2111
2141
 
2112
2142
  /**
@@ -2450,7 +2480,6 @@ declare type OriginatorFields = {
2450
2480
 
2451
2481
  declare type OriginatorV2 = {
2452
2482
  originatorPerson: PersonV2[];
2453
- customerIdentification?: string;
2454
2483
  };
2455
2484
 
2456
2485
  /**
@@ -2925,13 +2954,14 @@ export declare interface ScreenshotProof extends OwnershipProof {
2925
2954
  * - `'signature'` — wallet connection for ownership proof via signature
2926
2955
  * - `'manual-signing'` — ownership proof via manual message signing
2927
2956
  * - `'add-vasp'` — manually add an unlisted exchange/VASP (hosted flow)
2957
+ * - `'contact-support'` — show a contact support button
2928
2958
  *
2929
2959
  * Options are automatically filtered by flow (e.g. `add-vasp` is ignored in self-hosted).
2930
2960
  * Including an option implicitly enables that capability.
2931
2961
  *
2932
2962
  * @public
2933
2963
  */
2934
- export declare type SectionOption = 'self-declaration' | 'screenshot' | 'microtransfer' | 'signature' | 'manual-signing' | 'add-vasp';
2964
+ export declare type SectionOption = 'self-declaration' | 'screenshot' | 'microtransfer' | 'signature' | 'manual-signing' | 'add-vasp' | 'contact-support';
2935
2965
 
2936
2966
  /**
2937
2967
  * Interface for signature-based ownership proofs that use cryptographic message signing
@@ -3220,7 +3250,7 @@ export declare interface Transaction extends ComponentRequest {
3220
3250
  agent: Agent;
3221
3251
  counterparty: Counterparty;
3222
3252
  asset: TransactionAsset;
3223
- amountDecimal: number;
3253
+ amountDecimal: string | number;
3224
3254
  proof?: OwnershipProof;
3225
3255
  assetPrice?: {
3226
3256
  price: number;
@@ -3300,6 +3330,12 @@ export declare interface TransactionOptions {
3300
3330
  vasps?: VASPOptions;
3301
3331
  hide?: ValidationSections[];
3302
3332
  counterpartyAssist?: CounterpartyAssistConfig;
3333
+ /**
3334
+ * Configuration for the contact support button.
3335
+ * Enablement is controlled via `agentSections` — include `'contact-support'`
3336
+ * in `main` or `fallback` to show the button.
3337
+ */
3338
+ contactSupport?: ContactSupportConfig;
3303
3339
  autoSubmit?: boolean;
3304
3340
  }
3305
3341
 
@@ -3517,13 +3553,37 @@ export declare interface VASP extends Agent {
3517
3553
  }
3518
3554
 
3519
3555
  /**
3520
- * Options for which VASPs to be searchable
3556
+ * Options controlling which VASPs are listed and searchable in the picker.
3557
+ *
3558
+ * Two mutually exclusive variants:
3559
+ *
3560
+ * - **V1** — `addUnknown`, `onlyActive`, `searchable` (filters by {@link VASPSearchControl} status).
3561
+ * - **V2** — `addUnknown`, `onlyActive`, `showTrustStatus` (filters by {@link VASPTrustStatus}).
3562
+ *
3563
+ * `searchable` (V1-only) cannot be combined with `showTrustStatus` (V2-only);
3564
+ * TypeScript will reject the mix at compile time. `addUnknown` and `onlyActive` are valid in both variants.
3565
+ *
3566
+ * @example V1
3567
+ * ```ts
3568
+ * { addUnknown: true, onlyActive: true, searchable: [VASPSearchControl.ALLOWED] }
3569
+ * ```
3570
+ *
3571
+ * @example V2
3572
+ * ```ts
3573
+ * { addUnknown: true, onlyActive: true, showTrustStatus: ['TRUSTED', 'NEW'] }
3574
+ * ```
3575
+ *
3521
3576
  * @public
3522
3577
  */
3523
3578
  export declare type VASPOptions = {
3524
3579
  addUnknown?: boolean;
3525
3580
  onlyActive?: boolean;
3526
3581
  searchable?: VASPSearchControl[];
3582
+ } | {
3583
+ searchable?: undefined;
3584
+ addUnknown?: boolean;
3585
+ onlyActive?: boolean;
3586
+ showTrustStatus?: VASPTrustStatus[];
3527
3587
  };
3528
3588
 
3529
3589
  /**
@@ -3539,6 +3599,15 @@ export declare enum VASPSearchControl {
3539
3599
  PENDING = "pending"
3540
3600
  }
3541
3601
 
3602
+ /**
3603
+ * Trust status assigned to a VASP in the Notabene network.
3604
+ *
3605
+ * Used by {@link VASPOptions.showTrustStatus} to filter which VASPs are listed in the picker.
3606
+ *
3607
+ * @public
3608
+ */
3609
+ export declare type VASPTrustStatus = 'TRUSTED' | 'NEW' | 'FLAGGED' | 'BANNED';
3610
+
3542
3611
  /**
3543
3612
  * A wallet agent acting on behalf of the counterparty
3544
3613
  * @public
@@ -10,7 +10,7 @@
10
10
  "author": "Notabene <developers@notabene.id>",
11
11
  "license": "MIT",
12
12
  "packageManager": "yarn@4.5.1",
13
- "version": "2.16.0",
13
+ "version": "2.17.0-next.4",
14
14
  "source": "src/notabene.ts",
15
15
  "main": "dist/cjs/notabene.cjs",
16
16
  "module": "dist/esm/notabene.js",
@@ -272,7 +272,6 @@ declare type BeneficiaryFields = {
272
272
 
273
273
  declare type BeneficiaryV2 = {
274
274
  beneficiaryPerson: PersonV2[];
275
- customerIdentification?: string;
276
275
  };
277
276
 
278
277
  /**
@@ -754,6 +753,26 @@ export declare type ConnectionResult<T extends ComponentRequest> = {
754
753
 
755
754
  export declare type ConnectionStatus = 'active' | 'completed' | 'closed';
756
755
 
756
+ /**
757
+ * Configuration for the contact support action.
758
+ *
759
+ * @remarks
760
+ * Contact support is **enabled** by including `'contact-support'` in
761
+ * `agentSections.main` or `agentSections.fallback`. This object only
762
+ * configures the behaviour when the feature is enabled.
763
+ *
764
+ * - With `contactSupport: { supportUrl: "..." }` — clicking sends an info
765
+ * message to the host **and** attempts to open the URL as a fallback.
766
+ * - Without `contactSupport` — clicking only sends an info message; the
767
+ * host decides what to do.
768
+ *
769
+ * @public
770
+ */
771
+ export declare interface ContactSupportConfig {
772
+ /** URL to open when the user clicks the support button */
773
+ supportUrl: string;
774
+ }
775
+
757
776
  /**
758
777
  * Metadata for Cosmos ownership proofs
759
778
  * @remarks
@@ -879,7 +898,7 @@ export declare interface DepositRequest extends DepositRequestFields, ComponentR
879
898
  declare type DepositRequestFields = {
880
899
  destination: BlockchainAddress | CAIP10;
881
900
  asset: TransactionAsset;
882
- amountDecimal: number;
901
+ amountDecimal: string | number;
883
902
  travelAddress?: TravelAddress;
884
903
  cryptoCredential?: CryptoCredential;
885
904
  };
@@ -1157,14 +1176,24 @@ export declare enum IdentityVerificationMethod {
1157
1176
  * Represents an info component message
1158
1177
  * @param message - Info message
1159
1178
  * @param description - Description of the info message
1179
+ * @param identifier - Identifier code of the info message
1160
1180
  * @public
1161
1181
  */
1162
1182
  declare type Info = {
1163
1183
  type: CMType.INFO;
1164
1184
  message: string;
1165
1185
  description?: string;
1186
+ identifier?: InfoIdentifierCode;
1166
1187
  };
1167
1188
 
1189
+ /**
1190
+ * Identifier codes for info messages
1191
+ * @public
1192
+ */
1193
+ export declare enum InfoIdentifierCode {
1194
+ CONTACT_SUPPORT = "CONTACT_SUPPORT"
1195
+ }
1196
+
1168
1197
  /**
1169
1198
  * Intermediary VASP
1170
1199
  * Represents an intermediary Virtual Asset Service Provider
@@ -2107,6 +2136,7 @@ declare type NaturalPersonNationalIdentifierTypeCode = Omit<NationalIdentifierTy
2107
2136
 
2108
2137
  declare type NaturalPersonV2 = Omit<NaturalPerson_2, 'name'> & {
2109
2138
  name: NaturalPersonNameV2;
2139
+ customerIdentification?: string;
2110
2140
  };
2111
2141
 
2112
2142
  /**
@@ -2450,7 +2480,6 @@ declare type OriginatorFields = {
2450
2480
 
2451
2481
  declare type OriginatorV2 = {
2452
2482
  originatorPerson: PersonV2[];
2453
- customerIdentification?: string;
2454
2483
  };
2455
2484
 
2456
2485
  /**
@@ -2925,13 +2954,14 @@ export declare interface ScreenshotProof extends OwnershipProof {
2925
2954
  * - `'signature'` — wallet connection for ownership proof via signature
2926
2955
  * - `'manual-signing'` — ownership proof via manual message signing
2927
2956
  * - `'add-vasp'` — manually add an unlisted exchange/VASP (hosted flow)
2957
+ * - `'contact-support'` — show a contact support button
2928
2958
  *
2929
2959
  * Options are automatically filtered by flow (e.g. `add-vasp` is ignored in self-hosted).
2930
2960
  * Including an option implicitly enables that capability.
2931
2961
  *
2932
2962
  * @public
2933
2963
  */
2934
- export declare type SectionOption = 'self-declaration' | 'screenshot' | 'microtransfer' | 'signature' | 'manual-signing' | 'add-vasp';
2964
+ export declare type SectionOption = 'self-declaration' | 'screenshot' | 'microtransfer' | 'signature' | 'manual-signing' | 'add-vasp' | 'contact-support';
2935
2965
 
2936
2966
  /**
2937
2967
  * Interface for signature-based ownership proofs that use cryptographic message signing
@@ -3220,7 +3250,7 @@ export declare interface Transaction extends ComponentRequest {
3220
3250
  agent: Agent;
3221
3251
  counterparty: Counterparty;
3222
3252
  asset: TransactionAsset;
3223
- amountDecimal: number;
3253
+ amountDecimal: string | number;
3224
3254
  proof?: OwnershipProof;
3225
3255
  assetPrice?: {
3226
3256
  price: number;
@@ -3300,6 +3330,12 @@ export declare interface TransactionOptions {
3300
3330
  vasps?: VASPOptions;
3301
3331
  hide?: ValidationSections[];
3302
3332
  counterpartyAssist?: CounterpartyAssistConfig;
3333
+ /**
3334
+ * Configuration for the contact support button.
3335
+ * Enablement is controlled via `agentSections` — include `'contact-support'`
3336
+ * in `main` or `fallback` to show the button.
3337
+ */
3338
+ contactSupport?: ContactSupportConfig;
3303
3339
  autoSubmit?: boolean;
3304
3340
  }
3305
3341
 
@@ -3517,13 +3553,37 @@ export declare interface VASP extends Agent {
3517
3553
  }
3518
3554
 
3519
3555
  /**
3520
- * Options for which VASPs to be searchable
3556
+ * Options controlling which VASPs are listed and searchable in the picker.
3557
+ *
3558
+ * Two mutually exclusive variants:
3559
+ *
3560
+ * - **V1** — `addUnknown`, `onlyActive`, `searchable` (filters by {@link VASPSearchControl} status).
3561
+ * - **V2** — `addUnknown`, `onlyActive`, `showTrustStatus` (filters by {@link VASPTrustStatus}).
3562
+ *
3563
+ * `searchable` (V1-only) cannot be combined with `showTrustStatus` (V2-only);
3564
+ * TypeScript will reject the mix at compile time. `addUnknown` and `onlyActive` are valid in both variants.
3565
+ *
3566
+ * @example V1
3567
+ * ```ts
3568
+ * { addUnknown: true, onlyActive: true, searchable: [VASPSearchControl.ALLOWED] }
3569
+ * ```
3570
+ *
3571
+ * @example V2
3572
+ * ```ts
3573
+ * { addUnknown: true, onlyActive: true, showTrustStatus: ['TRUSTED', 'NEW'] }
3574
+ * ```
3575
+ *
3521
3576
  * @public
3522
3577
  */
3523
3578
  export declare type VASPOptions = {
3524
3579
  addUnknown?: boolean;
3525
3580
  onlyActive?: boolean;
3526
3581
  searchable?: VASPSearchControl[];
3582
+ } | {
3583
+ searchable?: undefined;
3584
+ addUnknown?: boolean;
3585
+ onlyActive?: boolean;
3586
+ showTrustStatus?: VASPTrustStatus[];
3527
3587
  };
3528
3588
 
3529
3589
  /**
@@ -3539,6 +3599,15 @@ export declare enum VASPSearchControl {
3539
3599
  PENDING = "pending"
3540
3600
  }
3541
3601
 
3602
+ /**
3603
+ * Trust status assigned to a VASP in the Notabene network.
3604
+ *
3605
+ * Used by {@link VASPOptions.showTrustStatus} to filter which VASPs are listed in the picker.
3606
+ *
3607
+ * @public
3608
+ */
3609
+ export declare type VASPTrustStatus = 'TRUSTED' | 'NEW' | 'FLAGGED' | 'BANNED';
3610
+
3542
3611
  /**
3543
3612
  * A wallet agent acting on behalf of the counterparty
3544
3613
  * @public