@notabene/javascript-sdk 2.22.0-next.1 → 2.22.0-next.3

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/README.md CHANGED
@@ -898,7 +898,7 @@ const options: TransactionOptions = {
898
898
  contactSupport: { // Configures the contact support button (enabled via agentSections)
899
899
  supportUrl: 'https://support.example.com',
900
900
  },
901
- hide: [ValidationSections.ASSET, ValidationSections.DESTINATION], // Don't show specific sections of component
901
+ hide: ['asset', 'destination'], // Don't show specific sections of component. Also accepts 'header' to drop the card header (icon, title, description, participant logo)
902
902
  autoSubmit: false // Automatically sends the complete event and hides the complete button - Default false
903
903
  };
904
904
 
@@ -1163,6 +1163,18 @@ export declare type FieldTypes = {
1163
1163
  */
1164
1164
  export declare function getRefreshResult<T extends ComponentRequest>(refreshSource: Pick<RefreshSource, 'url' | 'key'>): Promise<ConnectionResult<T>>;
1165
1165
 
1166
+ /**
1167
+ * A section of a WithdrawalAssist or DepositAssist screen that can be left out,
1168
+ * via {@link TransactionOptions.hide}.
1169
+ *
1170
+ * `'header'` is the card header — its status icon, title, description and
1171
+ * participant logo. The card body and footer are unaffected, so the Notabene
1172
+ * attribution in the footer still shows.
1173
+ *
1174
+ * @public
1175
+ */
1176
+ export declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header';
1177
+
1166
1178
  /**
1167
1179
  * Host Message Type enum representing different message types that can be sent
1168
1180
  * from the host application.
@@ -1741,6 +1753,17 @@ declare interface JsonLdObject<T extends string> {
1741
1753
  "@type": T;
1742
1754
  }
1743
1755
 
1756
+ /**
1757
+ * Ids of the wallets the embedded component always offers under a fixed id.
1758
+ *
1759
+ * `'ledger-usb-wallet'` and `'ledger-bluetooth-wallet'` are the two Ledger transports,
1760
+ * `'trezor'` is Trezor over Trezor Connect, and `'wallet-connect'` is the WalletConnect
1761
+ * (Reown AppKit) card that lists mobile wallets.
1762
+ *
1763
+ * @public
1764
+ */
1765
+ export declare type KnownWalletId = 'ledger-usb-wallet' | 'ledger-bluetooth-wallet' | 'trezor' | 'wallet-connect';
1766
+
1744
1767
  declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1745
1768
 
1746
1769
  /**
@@ -3356,7 +3379,12 @@ export declare interface TransactionOptions {
3356
3379
  allowedCounterpartyTypes?: PersonType[];
3357
3380
  fields?: FieldTypes;
3358
3381
  vasps?: VASPOptions;
3359
- hide?: ValidationSections[];
3382
+ /**
3383
+ * Sections of the component to leave out. Hiding `'header'` is useful when the
3384
+ * surrounding page already states what the user is being asked to do, so ours
3385
+ * would repeat or contradict it.
3386
+ */
3387
+ hide?: HideSection[];
3360
3388
  counterpartyAssist?: CounterpartyAssistConfig;
3361
3389
  contactSupport?: ContactSupportConfig;
3362
3390
  consent?: ConsentConfig;
@@ -3417,6 +3445,32 @@ export declare interface TransactionOptions {
3417
3445
  * ```
3418
3446
  */
3419
3447
  allowedWalletConnectIds?: string[];
3448
+ /**
3449
+ * Never offer these wallets in the component's wallet picker, whatever the user's
3450
+ * browser has installed.
3451
+ *
3452
+ * Useful when you don't want to present specific wallets, for example hardware wallets.
3453
+ * This only controls which connectors the component offers. It isn't a policy on
3454
+ * addresses: a user can still reach the same device another way, such as Ledger Live
3455
+ * over WalletConnect, or prove an address with a non-wallet proof type where you allow
3456
+ * one.
3457
+ *
3458
+ * Entries are {@link WalletId}s and are matched case-insensitively. Hardware wallets and
3459
+ * the WalletConnect card have fixed ids, listed in {@link KnownWalletId}. Browser extension
3460
+ * wallets are matched by the id the component discovers them under.
3461
+ *
3462
+ * Disabling `'wallet-connect'` removes the WalletConnect card entirely; to offer some
3463
+ * mobile wallets but not others, use `allowedWalletConnectIds` instead.
3464
+ *
3465
+ * Absent or empty means every discovered wallet is offered.
3466
+ *
3467
+ * @example
3468
+ * ```ts
3469
+ * // No hardware wallets
3470
+ * disabledWallets: ['ledger-usb-wallet', 'ledger-bluetooth-wallet', 'trezor']
3471
+ * ```
3472
+ */
3473
+ disabledWallets?: WalletId[];
3420
3474
  };
3421
3475
  }
3422
3476
 
@@ -3612,6 +3666,9 @@ export declare type ValidationError = {
3612
3666
  /**
3613
3667
  * Sections in a WithdrawalAssist screen
3614
3668
  *
3669
+ * @deprecated Use {@link HideSection} instead. Members stay assignable to their
3670
+ * literals, so existing callers keep compiling.
3671
+ *
3615
3672
  * @alpha
3616
3673
  */
3617
3674
  export declare enum ValidationSections {
@@ -3698,6 +3755,23 @@ export declare interface Wallet extends Agent {
3698
3755
  wallet_connect_id?: string;
3699
3756
  }
3700
3757
 
3758
+ /**
3759
+ * A wallet id as the embedded component reports it, for use in
3760
+ * {@link TransactionOptions.wallets}.
3761
+ *
3762
+ * A {@link KnownWalletId}, or any id of a wallet the component discovers in the user's
3763
+ * browser. Browser extension wallets on EVM chains use their EIP-6963 reverse domain
3764
+ * name, for example `'io.metamask'` or `'com.coinbase.wallet'`. Wallets on other chains
3765
+ * use the chain namespace followed by the wallet's name in lower case, for example
3766
+ * `'solana-phantom'`, `'bitcoin-xverse'`, `'tron-tronlink'`, `'cardano-nami'`,
3767
+ * `'ripple-gemwallet'` or `'concordium-browser'`.
3768
+ *
3769
+ * The component reports every id it discovers in the `wallet_discovered` analytics event.
3770
+ *
3771
+ * @public
3772
+ */
3773
+ export declare type WalletId = KnownWalletId | (string & {});
3774
+
3701
3775
  /**
3702
3776
  * Represents a warning component message
3703
3777
  * @param message - Warning message
@@ -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.22.0-next.1",
13
+ "version": "2.22.0-next.3",
14
14
  "source": "src/notabene.ts",
15
15
  "main": "dist/cjs/notabene.cjs",
16
16
  "module": "dist/esm/notabene.js",
@@ -1163,6 +1163,18 @@ export declare type FieldTypes = {
1163
1163
  */
1164
1164
  export declare function getRefreshResult<T extends ComponentRequest>(refreshSource: Pick<RefreshSource, 'url' | 'key'>): Promise<ConnectionResult<T>>;
1165
1165
 
1166
+ /**
1167
+ * A section of a WithdrawalAssist or DepositAssist screen that can be left out,
1168
+ * via {@link TransactionOptions.hide}.
1169
+ *
1170
+ * `'header'` is the card header — its status icon, title, description and
1171
+ * participant logo. The card body and footer are unaffected, so the Notabene
1172
+ * attribution in the footer still shows.
1173
+ *
1174
+ * @public
1175
+ */
1176
+ export declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header';
1177
+
1166
1178
  /**
1167
1179
  * Host Message Type enum representing different message types that can be sent
1168
1180
  * from the host application.
@@ -1741,6 +1753,17 @@ declare interface JsonLdObject<T extends string> {
1741
1753
  "@type": T;
1742
1754
  }
1743
1755
 
1756
+ /**
1757
+ * Ids of the wallets the embedded component always offers under a fixed id.
1758
+ *
1759
+ * `'ledger-usb-wallet'` and `'ledger-bluetooth-wallet'` are the two Ledger transports,
1760
+ * `'trezor'` is Trezor over Trezor Connect, and `'wallet-connect'` is the WalletConnect
1761
+ * (Reown AppKit) card that lists mobile wallets.
1762
+ *
1763
+ * @public
1764
+ */
1765
+ export declare type KnownWalletId = 'ledger-usb-wallet' | 'ledger-bluetooth-wallet' | 'trezor' | 'wallet-connect';
1766
+
1744
1767
  declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1745
1768
 
1746
1769
  /**
@@ -3356,7 +3379,12 @@ export declare interface TransactionOptions {
3356
3379
  allowedCounterpartyTypes?: PersonType[];
3357
3380
  fields?: FieldTypes;
3358
3381
  vasps?: VASPOptions;
3359
- hide?: ValidationSections[];
3382
+ /**
3383
+ * Sections of the component to leave out. Hiding `'header'` is useful when the
3384
+ * surrounding page already states what the user is being asked to do, so ours
3385
+ * would repeat or contradict it.
3386
+ */
3387
+ hide?: HideSection[];
3360
3388
  counterpartyAssist?: CounterpartyAssistConfig;
3361
3389
  contactSupport?: ContactSupportConfig;
3362
3390
  consent?: ConsentConfig;
@@ -3417,6 +3445,32 @@ export declare interface TransactionOptions {
3417
3445
  * ```
3418
3446
  */
3419
3447
  allowedWalletConnectIds?: string[];
3448
+ /**
3449
+ * Never offer these wallets in the component's wallet picker, whatever the user's
3450
+ * browser has installed.
3451
+ *
3452
+ * Useful when you don't want to present specific wallets, for example hardware wallets.
3453
+ * This only controls which connectors the component offers. It isn't a policy on
3454
+ * addresses: a user can still reach the same device another way, such as Ledger Live
3455
+ * over WalletConnect, or prove an address with a non-wallet proof type where you allow
3456
+ * one.
3457
+ *
3458
+ * Entries are {@link WalletId}s and are matched case-insensitively. Hardware wallets and
3459
+ * the WalletConnect card have fixed ids, listed in {@link KnownWalletId}. Browser extension
3460
+ * wallets are matched by the id the component discovers them under.
3461
+ *
3462
+ * Disabling `'wallet-connect'` removes the WalletConnect card entirely; to offer some
3463
+ * mobile wallets but not others, use `allowedWalletConnectIds` instead.
3464
+ *
3465
+ * Absent or empty means every discovered wallet is offered.
3466
+ *
3467
+ * @example
3468
+ * ```ts
3469
+ * // No hardware wallets
3470
+ * disabledWallets: ['ledger-usb-wallet', 'ledger-bluetooth-wallet', 'trezor']
3471
+ * ```
3472
+ */
3473
+ disabledWallets?: WalletId[];
3420
3474
  };
3421
3475
  }
3422
3476
 
@@ -3612,6 +3666,9 @@ export declare type ValidationError = {
3612
3666
  /**
3613
3667
  * Sections in a WithdrawalAssist screen
3614
3668
  *
3669
+ * @deprecated Use {@link HideSection} instead. Members stay assignable to their
3670
+ * literals, so existing callers keep compiling.
3671
+ *
3615
3672
  * @alpha
3616
3673
  */
3617
3674
  export declare enum ValidationSections {
@@ -3698,6 +3755,23 @@ export declare interface Wallet extends Agent {
3698
3755
  wallet_connect_id?: string;
3699
3756
  }
3700
3757
 
3758
+ /**
3759
+ * A wallet id as the embedded component reports it, for use in
3760
+ * {@link TransactionOptions.wallets}.
3761
+ *
3762
+ * A {@link KnownWalletId}, or any id of a wallet the component discovers in the user's
3763
+ * browser. Browser extension wallets on EVM chains use their EIP-6963 reverse domain
3764
+ * name, for example `'io.metamask'` or `'com.coinbase.wallet'`. Wallets on other chains
3765
+ * use the chain namespace followed by the wallet's name in lower case, for example
3766
+ * `'solana-phantom'`, `'bitcoin-xverse'`, `'tron-tronlink'`, `'cardano-nami'`,
3767
+ * `'ripple-gemwallet'` or `'concordium-browser'`.
3768
+ *
3769
+ * The component reports every id it discovers in the `wallet_discovered` analytics event.
3770
+ *
3771
+ * @public
3772
+ */
3773
+ export declare type WalletId = KnownWalletId | (string & {});
3774
+
3701
3775
  /**
3702
3776
  * Represents a warning component message
3703
3777
  * @param message - Warning message
@@ -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.22.0-next.1",
13
+ "version": "2.22.0-next.3",
14
14
  "source": "src/notabene.ts",
15
15
  "main": "dist/cjs/notabene.cjs",
16
16
  "module": "dist/esm/notabene.js",
@@ -1163,6 +1163,18 @@ export declare type FieldTypes = {
1163
1163
  */
1164
1164
  export declare function getRefreshResult<T extends ComponentRequest>(refreshSource: Pick<RefreshSource, 'url' | 'key'>): Promise<ConnectionResult<T>>;
1165
1165
 
1166
+ /**
1167
+ * A section of a WithdrawalAssist or DepositAssist screen that can be left out,
1168
+ * via {@link TransactionOptions.hide}.
1169
+ *
1170
+ * `'header'` is the card header — its status icon, title, description and
1171
+ * participant logo. The card body and footer are unaffected, so the Notabene
1172
+ * attribution in the footer still shows.
1173
+ *
1174
+ * @public
1175
+ */
1176
+ export declare type HideSection = 'asset' | 'destination' | 'counterparty' | 'agent' | 'header';
1177
+
1166
1178
  /**
1167
1179
  * Host Message Type enum representing different message types that can be sent
1168
1180
  * from the host application.
@@ -1741,6 +1753,17 @@ declare interface JsonLdObject<T extends string> {
1741
1753
  "@type": T;
1742
1754
  }
1743
1755
 
1756
+ /**
1757
+ * Ids of the wallets the embedded component always offers under a fixed id.
1758
+ *
1759
+ * `'ledger-usb-wallet'` and `'ledger-bluetooth-wallet'` are the two Ledger transports,
1760
+ * `'trezor'` is Trezor over Trezor Connect, and `'wallet-connect'` is the WalletConnect
1761
+ * (Reown AppKit) card that lists mobile wallets.
1762
+ *
1763
+ * @public
1764
+ */
1765
+ export declare type KnownWalletId = 'ledger-usb-wallet' | 'ledger-bluetooth-wallet' | 'trezor' | 'wallet-connect';
1766
+
1744
1767
  declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1745
1768
 
1746
1769
  /**
@@ -3356,7 +3379,12 @@ export declare interface TransactionOptions {
3356
3379
  allowedCounterpartyTypes?: PersonType[];
3357
3380
  fields?: FieldTypes;
3358
3381
  vasps?: VASPOptions;
3359
- hide?: ValidationSections[];
3382
+ /**
3383
+ * Sections of the component to leave out. Hiding `'header'` is useful when the
3384
+ * surrounding page already states what the user is being asked to do, so ours
3385
+ * would repeat or contradict it.
3386
+ */
3387
+ hide?: HideSection[];
3360
3388
  counterpartyAssist?: CounterpartyAssistConfig;
3361
3389
  contactSupport?: ContactSupportConfig;
3362
3390
  consent?: ConsentConfig;
@@ -3417,6 +3445,32 @@ export declare interface TransactionOptions {
3417
3445
  * ```
3418
3446
  */
3419
3447
  allowedWalletConnectIds?: string[];
3448
+ /**
3449
+ * Never offer these wallets in the component's wallet picker, whatever the user's
3450
+ * browser has installed.
3451
+ *
3452
+ * Useful when you don't want to present specific wallets, for example hardware wallets.
3453
+ * This only controls which connectors the component offers. It isn't a policy on
3454
+ * addresses: a user can still reach the same device another way, such as Ledger Live
3455
+ * over WalletConnect, or prove an address with a non-wallet proof type where you allow
3456
+ * one.
3457
+ *
3458
+ * Entries are {@link WalletId}s and are matched case-insensitively. Hardware wallets and
3459
+ * the WalletConnect card have fixed ids, listed in {@link KnownWalletId}. Browser extension
3460
+ * wallets are matched by the id the component discovers them under.
3461
+ *
3462
+ * Disabling `'wallet-connect'` removes the WalletConnect card entirely; to offer some
3463
+ * mobile wallets but not others, use `allowedWalletConnectIds` instead.
3464
+ *
3465
+ * Absent or empty means every discovered wallet is offered.
3466
+ *
3467
+ * @example
3468
+ * ```ts
3469
+ * // No hardware wallets
3470
+ * disabledWallets: ['ledger-usb-wallet', 'ledger-bluetooth-wallet', 'trezor']
3471
+ * ```
3472
+ */
3473
+ disabledWallets?: WalletId[];
3420
3474
  };
3421
3475
  }
3422
3476
 
@@ -3612,6 +3666,9 @@ export declare type ValidationError = {
3612
3666
  /**
3613
3667
  * Sections in a WithdrawalAssist screen
3614
3668
  *
3669
+ * @deprecated Use {@link HideSection} instead. Members stay assignable to their
3670
+ * literals, so existing callers keep compiling.
3671
+ *
3615
3672
  * @alpha
3616
3673
  */
3617
3674
  export declare enum ValidationSections {
@@ -3698,6 +3755,23 @@ export declare interface Wallet extends Agent {
3698
3755
  wallet_connect_id?: string;
3699
3756
  }
3700
3757
 
3758
+ /**
3759
+ * A wallet id as the embedded component reports it, for use in
3760
+ * {@link TransactionOptions.wallets}.
3761
+ *
3762
+ * A {@link KnownWalletId}, or any id of a wallet the component discovers in the user's
3763
+ * browser. Browser extension wallets on EVM chains use their EIP-6963 reverse domain
3764
+ * name, for example `'io.metamask'` or `'com.coinbase.wallet'`. Wallets on other chains
3765
+ * use the chain namespace followed by the wallet's name in lower case, for example
3766
+ * `'solana-phantom'`, `'bitcoin-xverse'`, `'tron-tronlink'`, `'cardano-nami'`,
3767
+ * `'ripple-gemwallet'` or `'concordium-browser'`.
3768
+ *
3769
+ * The component reports every id it discovers in the `wallet_discovered` analytics event.
3770
+ *
3771
+ * @public
3772
+ */
3773
+ export declare type WalletId = KnownWalletId | (string & {});
3774
+
3701
3775
  /**
3702
3776
  * Represents a warning component message
3703
3777
  * @param message - Warning message
package/package.json CHANGED
@@ -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.22.0-next.1",
13
+ "version": "2.22.0-next.3",
14
14
  "source": "src/notabene.ts",
15
15
  "main": "dist/cjs/notabene.cjs",
16
16
  "module": "dist/esm/notabene.js",
package/src/notabene.ts CHANGED
@@ -30,10 +30,12 @@ import type {
30
30
  Error,
31
31
  FieldOptions,
32
32
  FieldTypes,
33
+ HideSection,
33
34
  HostMessage,
34
35
  InvalidValue,
35
36
  InvoiceReaderResponse,
36
37
  IVMS101,
38
+ KnownWalletId,
37
39
  LegalPerson,
38
40
  LegalPersonFieldName,
39
41
  LegalPersonFields,
@@ -67,6 +69,7 @@ import type {
67
69
  VASPOptions,
68
70
  VASPTrustStatus,
69
71
  Wallet,
72
+ WalletId,
70
73
  Withdrawal,
71
74
  } from './types';
72
75
  import {
@@ -159,10 +162,12 @@ export type {
159
162
  Error,
160
163
  FieldOptions,
161
164
  FieldTypes,
165
+ HideSection,
162
166
  HostMessage,
163
167
  InvalidValue,
164
168
  InvoiceReaderResponse,
165
169
  IVMS101,
170
+ KnownWalletId,
166
171
  LegalPerson,
167
172
  LegalPersonFieldName,
168
173
  LegalPersonFields,
@@ -197,6 +202,7 @@ export type {
197
202
  VASPOptions,
198
203
  VASPTrustStatus,
199
204
  Wallet,
205
+ WalletId,
200
206
  Withdrawal,
201
207
  };
202
208
 
package/src/types.ts CHANGED
@@ -914,9 +914,61 @@ export type CounterpartyAssistConfig =
914
914
  webhookUrl?: string;
915
915
  };
916
916
 
917
+ /**
918
+ * Ids of the wallets the embedded component always offers under a fixed id.
919
+ *
920
+ * `'ledger-usb-wallet'` and `'ledger-bluetooth-wallet'` are the two Ledger transports,
921
+ * `'trezor'` is Trezor over Trezor Connect, and `'wallet-connect'` is the WalletConnect
922
+ * (Reown AppKit) card that lists mobile wallets.
923
+ *
924
+ * @public
925
+ */
926
+ export type KnownWalletId =
927
+ | 'ledger-usb-wallet'
928
+ | 'ledger-bluetooth-wallet'
929
+ | 'trezor'
930
+ | 'wallet-connect';
931
+
932
+ /**
933
+ * A wallet id as the embedded component reports it, for use in
934
+ * {@link TransactionOptions.wallets}.
935
+ *
936
+ * A {@link KnownWalletId}, or any id of a wallet the component discovers in the user's
937
+ * browser. Browser extension wallets on EVM chains use their EIP-6963 reverse domain
938
+ * name, for example `'io.metamask'` or `'com.coinbase.wallet'`. Wallets on other chains
939
+ * use the chain namespace followed by the wallet's name in lower case, for example
940
+ * `'solana-phantom'`, `'bitcoin-xverse'`, `'tron-tronlink'`, `'cardano-nami'`,
941
+ * `'ripple-gemwallet'` or `'concordium-browser'`.
942
+ *
943
+ * The component reports every id it discovers in the `wallet_discovered` analytics event.
944
+ *
945
+ * @public
946
+ */
947
+ export type WalletId = KnownWalletId | (string & {});
948
+
949
+ /**
950
+ * A section of a WithdrawalAssist or DepositAssist screen that can be left out,
951
+ * via {@link TransactionOptions.hide}.
952
+ *
953
+ * `'header'` is the card header — its status icon, title, description and
954
+ * participant logo. The card body and footer are unaffected, so the Notabene
955
+ * attribution in the footer still shows.
956
+ *
957
+ * @public
958
+ */
959
+ export type HideSection =
960
+ | 'asset'
961
+ | 'destination'
962
+ | 'counterparty'
963
+ | 'agent'
964
+ | 'header';
965
+
917
966
  /**
918
967
  * Sections in a WithdrawalAssist screen
919
968
  *
969
+ * @deprecated Use {@link HideSection} instead. Members stay assignable to their
970
+ * literals, so existing callers keep compiling.
971
+ *
920
972
  * @alpha
921
973
  */
922
974
  export enum ValidationSections {
@@ -1053,7 +1105,12 @@ export interface TransactionOptions {
1053
1105
  allowedCounterpartyTypes?: PersonType[]; // Defaults to All
1054
1106
  fields?: FieldTypes;
1055
1107
  vasps?: VASPOptions;
1056
- hide?: ValidationSections[]; // You can hide a specific section of the component by listing it here
1108
+ /**
1109
+ * Sections of the component to leave out. Hiding `'header'` is useful when the
1110
+ * surrounding page already states what the user is being asked to do, so ours
1111
+ * would repeat or contradict it.
1112
+ */
1113
+ hide?: HideSection[];
1057
1114
  counterpartyAssist?: CounterpartyAssistConfig;
1058
1115
  contactSupport?: ContactSupportConfig; // Requires 'contact-support' in agentSections
1059
1116
  consent?: ConsentConfig; // Defaults to true
@@ -1114,6 +1171,32 @@ export interface TransactionOptions {
1114
1171
  * ```
1115
1172
  */
1116
1173
  allowedWalletConnectIds?: string[];
1174
+ /**
1175
+ * Never offer these wallets in the component's wallet picker, whatever the user's
1176
+ * browser has installed.
1177
+ *
1178
+ * Useful when you don't want to present specific wallets, for example hardware wallets.
1179
+ * This only controls which connectors the component offers. It isn't a policy on
1180
+ * addresses: a user can still reach the same device another way, such as Ledger Live
1181
+ * over WalletConnect, or prove an address with a non-wallet proof type where you allow
1182
+ * one.
1183
+ *
1184
+ * Entries are {@link WalletId}s and are matched case-insensitively. Hardware wallets and
1185
+ * the WalletConnect card have fixed ids, listed in {@link KnownWalletId}. Browser extension
1186
+ * wallets are matched by the id the component discovers them under.
1187
+ *
1188
+ * Disabling `'wallet-connect'` removes the WalletConnect card entirely; to offer some
1189
+ * mobile wallets but not others, use `allowedWalletConnectIds` instead.
1190
+ *
1191
+ * Absent or empty means every discovered wallet is offered.
1192
+ *
1193
+ * @example
1194
+ * ```ts
1195
+ * // No hardware wallets
1196
+ * disabledWallets: ['ledger-usb-wallet', 'ledger-bluetooth-wallet', 'trezor']
1197
+ * ```
1198
+ */
1199
+ disabledWallets?: WalletId[];
1117
1200
  };
1118
1201
  }
1119
1202
  /**
@@ -18,6 +18,7 @@ import type {
18
18
  DepositRequestOptions,
19
19
  DID,
20
20
  FieldTypes,
21
+ HideSection,
21
22
  ISOCurrency,
22
23
  ISODate,
23
24
  NaturalPerson,
@@ -30,13 +31,7 @@ import type {
30
31
  VASPTrustStatus,
31
32
  Withdrawal,
32
33
  } from '../types';
33
- import {
34
- AgentType,
35
- PersonType,
36
- ProofTypes,
37
- ValidationSections,
38
- VASPSearchControl,
39
- } from '../types';
34
+ import { AgentType, PersonType, ProofTypes, VASPSearchControl } from '../types';
40
35
  import {
41
36
  CAIP10_MATCHER,
42
37
  CAIP19_MATCHER,
@@ -295,7 +290,15 @@ export const arbitraryTransactionOptions =
295
290
  fields: fc.option(arbitraryFieldTypes()),
296
291
  vasps: fc.option(arbitraryVASPOptions()),
297
292
  hide: fc.option(
298
- fc.array(fc.constantFrom(...Object.values(ValidationSections))),
293
+ fc.array(
294
+ fc.constantFrom<HideSection>(
295
+ 'asset',
296
+ 'destination',
297
+ 'counterparty',
298
+ 'agent',
299
+ 'header',
300
+ ),
301
+ ),
299
302
  ),
300
303
  contactSupport: fc.option(arbitraryContactSupportConfig()),
301
304
  });