@notabene/javascript-sdk 2.22.0-next.2 → 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.
@@ -1753,6 +1753,17 @@ declare interface JsonLdObject<T extends string> {
1753
1753
  "@type": T;
1754
1754
  }
1755
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
+
1756
1767
  declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1757
1768
 
1758
1769
  /**
@@ -3434,6 +3445,32 @@ export declare interface TransactionOptions {
3434
3445
  * ```
3435
3446
  */
3436
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[];
3437
3474
  };
3438
3475
  }
3439
3476
 
@@ -3718,6 +3755,23 @@ export declare interface Wallet extends Agent {
3718
3755
  wallet_connect_id?: string;
3719
3756
  }
3720
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
+
3721
3775
  /**
3722
3776
  * Represents a warning component message
3723
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.2",
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",
@@ -1753,6 +1753,17 @@ declare interface JsonLdObject<T extends string> {
1753
1753
  "@type": T;
1754
1754
  }
1755
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
+
1756
1767
  declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1757
1768
 
1758
1769
  /**
@@ -3434,6 +3445,32 @@ export declare interface TransactionOptions {
3434
3445
  * ```
3435
3446
  */
3436
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[];
3437
3474
  };
3438
3475
  }
3439
3476
 
@@ -3718,6 +3755,23 @@ export declare interface Wallet extends Agent {
3718
3755
  wallet_connect_id?: string;
3719
3756
  }
3720
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
+
3721
3775
  /**
3722
3776
  * Represents a warning component message
3723
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.2",
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",
@@ -1753,6 +1753,17 @@ declare interface JsonLdObject<T extends string> {
1753
1753
  "@type": T;
1754
1754
  }
1755
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
+
1756
1767
  declare type LegalEntityNationalIdentifierTypeCode = Omit<NationalIdentifierTypeCode_2, "ARNU" | "CCPT" | "DRLC" | "SOCS" | "IDCD">;
1757
1768
 
1758
1769
  /**
@@ -3434,6 +3445,32 @@ export declare interface TransactionOptions {
3434
3445
  * ```
3435
3446
  */
3436
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[];
3437
3474
  };
3438
3475
  }
3439
3476
 
@@ -3718,6 +3755,23 @@ export declare interface Wallet extends Agent {
3718
3755
  wallet_connect_id?: string;
3719
3756
  }
3720
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
+
3721
3775
  /**
3722
3776
  * Represents a warning component message
3723
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.2",
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
@@ -35,6 +35,7 @@ import type {
35
35
  InvalidValue,
36
36
  InvoiceReaderResponse,
37
37
  IVMS101,
38
+ KnownWalletId,
38
39
  LegalPerson,
39
40
  LegalPersonFieldName,
40
41
  LegalPersonFields,
@@ -68,6 +69,7 @@ import type {
68
69
  VASPOptions,
69
70
  VASPTrustStatus,
70
71
  Wallet,
72
+ WalletId,
71
73
  Withdrawal,
72
74
  } from './types';
73
75
  import {
@@ -165,6 +167,7 @@ export type {
165
167
  InvalidValue,
166
168
  InvoiceReaderResponse,
167
169
  IVMS101,
170
+ KnownWalletId,
168
171
  LegalPerson,
169
172
  LegalPersonFieldName,
170
173
  LegalPersonFields,
@@ -199,6 +202,7 @@ export type {
199
202
  VASPOptions,
200
203
  VASPTrustStatus,
201
204
  Wallet,
205
+ WalletId,
202
206
  Withdrawal,
203
207
  };
204
208
 
package/src/types.ts CHANGED
@@ -914,6 +914,38 @@ 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
+
917
949
  /**
918
950
  * A section of a WithdrawalAssist or DepositAssist screen that can be left out,
919
951
  * via {@link TransactionOptions.hide}.
@@ -1139,6 +1171,32 @@ export interface TransactionOptions {
1139
1171
  * ```
1140
1172
  */
1141
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[];
1142
1200
  };
1143
1201
  }
1144
1202
  /**