@txnlab/use-wallet 4.4.0-beta.1 → 4.4.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.
package/dist/index.d.cts CHANGED
@@ -73,12 +73,14 @@ declare enum NetworkId {
73
73
 
74
74
  declare abstract class BaseWallet {
75
75
  readonly id: WalletId;
76
+ /** Unique key for this wallet instance. Used for state storage and session isolation. */
77
+ readonly walletKey: WalletKey;
76
78
  readonly metadata: WalletMetadata;
77
79
  protected store: Store<State>;
78
80
  protected getAlgodClient: () => algosdk.Algodv2;
79
81
  subscribe: (callback: (state: State) => void) => () => void;
80
82
  protected logger: ReturnType<typeof logger.createScopedLogger>;
81
- protected constructor({ id, metadata, store, subscribe, getAlgodClient }: WalletConstructor<WalletId>);
83
+ protected constructor({ id, walletKey, metadata, store, subscribe, getAlgodClient }: WalletConstructor<WalletId>);
82
84
  static defaultMetadata: WalletMetadata;
83
85
  abstract connect(args?: Record<string, any>): Promise<WalletAccount[]>;
84
86
  abstract disconnect(): Promise<void>;
@@ -99,7 +101,7 @@ declare abstract class BaseWallet {
99
101
  get isActive(): boolean;
100
102
  get activeNetworkConfig(): NetworkConfig;
101
103
  protected onDisconnect: () => void;
102
- protected manageWalletConnectSession: (action: "backup" | "restore", targetWalletId?: WalletId) => void;
104
+ protected manageWalletConnectSession: (action: "backup" | "restore", targetWalletKey?: WalletKey) => void;
103
105
  }
104
106
 
105
107
  type CustomProvider = {
@@ -464,7 +466,19 @@ interface SignClientOptions {
464
466
  metadata?: SignClientTypes.Metadata;
465
467
  }
466
468
  type WalletConnectModalOptions = Pick<WalletConnectModalConfig, 'enableExplorer' | 'explorerRecommendedWalletIds' | 'privacyPolicyUrl' | 'termsOfServiceUrl' | 'themeMode' | 'themeVariables'>;
467
- type WalletConnectOptions = SignClientOptions & WalletConnectModalOptions;
469
+ type WalletConnectBaseOptions = SignClientOptions & WalletConnectModalOptions;
470
+ interface WalletConnectOptions extends WalletConnectBaseOptions {
471
+ /**
472
+ * Optional skin to apply to this WalletConnect instance.
473
+ * Can be either:
474
+ * - A string ID referencing a built-in skin (e.g., 'biatec')
475
+ * - A full skin object with id, name, and icon
476
+ *
477
+ * When a skin is applied, the wallet will use the skin's metadata
478
+ * and a unique walletKey for state isolation.
479
+ */
480
+ skin?: WalletConnectSkinOption;
481
+ }
468
482
  type SignTxnsResponse = Array<Uint8Array | number[] | string | null | undefined>;
469
483
  declare class SessionError extends Error {
470
484
  constructor(message: string);
@@ -738,7 +752,17 @@ declare class Web3AuthWallet extends BaseWallet {
738
752
  signTransactions: <T extends algosdk.Transaction[] | Uint8Array[]>(txnGroup: T | T[], indexesToSign?: number[]) => Promise<(Uint8Array | null)[]>;
739
753
  }
740
754
 
755
+ /**
756
+ * @deprecated BiatecWallet is deprecated and will be removed in v5.
757
+ * Use WalletConnect with the 'biatec' skin instead:
758
+ *
759
+ * ```typescript
760
+ * { id: WalletId.WALLETCONNECT, options: { projectId: '...', skin: 'biatec' } }
761
+ * ```
762
+ */
741
763
  declare class BiatecWallet extends WalletConnect {
764
+ private static deprecationWarningShown;
765
+ constructor(args: WalletConstructor<WalletId.BIATEC>);
742
766
  static defaultMetadata: {
743
767
  name: string;
744
768
  icon: string;
@@ -783,6 +807,30 @@ declare enum WalletId {
783
807
  WEB3AUTH = "web3auth",
784
808
  W3_WALLET = "w3-wallet"
785
809
  }
810
+ /**
811
+ * Metadata for a WalletConnect skin. Used to customize the appearance of
812
+ * a WalletConnect-based wallet in the UI.
813
+ */
814
+ interface WalletConnectSkin {
815
+ /** Unique identifier for the skin (e.g., 'biatec', 'voiwallet') */
816
+ id: string;
817
+ /** Display name for the wallet */
818
+ name: string;
819
+ /** Wallet icon as a data URI or URL */
820
+ icon: string;
821
+ }
822
+ /**
823
+ * Skin option can be either:
824
+ * - A string ID referencing a built-in skin (e.g., 'biatec')
825
+ * - A full WalletConnectSkin object for custom skins
826
+ */
827
+ type WalletConnectSkinOption = string | WalletConnectSkin;
828
+ /**
829
+ * Composite key type that can be either:
830
+ * - A standard WalletId (for backward compatibility)
831
+ * - A composite string for skinned WalletConnect instances (e.g., 'walletconnect:biatec')
832
+ */
833
+ type WalletKey = WalletId | `${WalletId.WALLETCONNECT}:${string}`;
786
834
  type WalletMap = {
787
835
  [WalletId.BIATEC]: typeof BiatecWallet;
788
836
  [WalletId.CUSTOM]: typeof CustomWallet;
@@ -837,6 +885,8 @@ type WalletMetadata = {
837
885
  };
838
886
  interface BaseWalletConstructor {
839
887
  id: WalletId;
888
+ /** Optional wallet key override. Defaults to id. Used for skinned WalletConnect instances. */
889
+ walletKey?: WalletKey;
840
890
  metadata: Partial<WalletMetadata> | undefined;
841
891
  getAlgodClient: () => algosdk.Algodv2;
842
892
  store: Store<State>;
@@ -976,11 +1026,11 @@ type WalletState = {
976
1026
  accounts: WalletAccount[];
977
1027
  activeAccount: WalletAccount | null;
978
1028
  };
979
- type WalletStateMap = Partial<Record<WalletId, WalletState>>;
1029
+ type WalletStateMap = Partial<Record<WalletKey, WalletState>>;
980
1030
  type ManagerStatus = 'initializing' | 'ready';
981
1031
  interface State {
982
1032
  wallets: WalletStateMap;
983
- activeWallet: WalletId | null;
1033
+ activeWallet: WalletKey | null;
984
1034
  activeNetwork: string;
985
1035
  algodClient: algosdk.Algodv2;
986
1036
  managerStatus: ManagerStatus;
@@ -1001,7 +1051,7 @@ interface WalletManagerConfig {
1001
1051
  options?: WalletManagerOptions;
1002
1052
  }
1003
1053
  declare class WalletManager {
1004
- _clients: Map<WalletId, BaseWallet>;
1054
+ _clients: Map<WalletKey, BaseWallet>;
1005
1055
  private baseNetworkConfig;
1006
1056
  store: Store<State>;
1007
1057
  subscribe: (callback: (state: State) => void) => () => void;
@@ -1018,9 +1068,15 @@ declare class WalletManager {
1018
1068
  private savePersistedState;
1019
1069
  get status(): ManagerStatus;
1020
1070
  get isReady(): boolean;
1071
+ /**
1072
+ * Derive the wallet key from wallet config.
1073
+ * For WalletConnect with a skin option, returns 'walletconnect:skinId'.
1074
+ * For other wallets, returns the wallet ID.
1075
+ */
1076
+ private deriveWalletKey;
1021
1077
  private initializeWallets;
1022
1078
  get wallets(): BaseWallet[];
1023
- getWallet(walletId: WalletId): BaseWallet | undefined;
1079
+ getWallet(walletKey: WalletKey): BaseWallet | undefined;
1024
1080
  resumeSessions(): Promise<void>;
1025
1081
  disconnect(): Promise<void>;
1026
1082
  private initNetworkConfig;
@@ -1126,8 +1182,54 @@ declare const webpackFallback: {
1126
1182
  '@perawallet/connect': boolean;
1127
1183
  '@walletconnect/modal': boolean;
1128
1184
  '@walletconnect/sign-client': boolean;
1185
+ '@web3auth/base': boolean;
1186
+ '@web3auth/base-provider': boolean;
1187
+ '@web3auth/modal': boolean;
1188
+ '@web3auth/single-factor-auth': boolean;
1129
1189
  'lute-connect': boolean;
1130
1190
  'magic-sdk': boolean;
1131
1191
  };
1132
1192
 
1133
- export { type AlgodConfig, BaseWallet, type BaseWalletConstructor, BiatecWallet, type CustomProvider, CustomWallet, type CustomWalletOptions, DEFAULT_NETWORK_CONFIG, DEFAULT_STATE, DEFLY_WEB_PROVIDER_ID, DeflyWallet, type DeflyWalletConnectOptions, DeflyWebWallet, type EnableResult, type Exodus, type ExodusOptions, ExodusWallet, ICON, type JsonRpcRequest, KIBISIS_AVM_WEB_PROVIDER_ID, KibisisWallet, type KmdOptions, KmdWallet, LOCAL_STORAGE_MNEMONIC_KEY, LogLevel, type LuteConnectOptions, LuteWallet, MagicAuth, type MagicAuthClient, type MagicAuthOptions, type ManagerStatus, type MnemonicOptions, MnemonicWallet, type MultisigMetadata, type NetworkConfig, NetworkConfigBuilder, NetworkId, PeraWallet, type PeraWalletConnectOptions, ScopeType, SecureKeyContainer, SessionError, type SignData, SignDataError, type SignDataResponse, type SignMetadata, SignTxnsError, type SignTxnsResponse, type SignTxnsResult, type SignerTransaction, type Siwa, type State, StorageAdapter, type SupportedWallet, type SupportedWallets, W3Wallet, type W3WalletProvider, type WalletAccount, type WalletConfig, type WalletConfigMap, WalletConnect, type WalletConnectOptions, type WalletConstructor, WalletId, type WalletIdConfig, WalletManager, type WalletManagerConfig, type WalletManagerOptions, type WalletMap, type WalletMetadata, type WalletOptions, type WalletOptionsMap, type WalletState, type WalletTransaction, type Web3AuthCredentials, type Web3AuthCustomAuth, type Web3AuthOptions, Web3AuthWallet, type WindowExtended, webpackFallback, withSecureKey, withSecureKeySync, zeroMemory, zeroString };
1193
+ /**
1194
+ * Built-in skins that ship with the library.
1195
+ * PRs to add new WalletConnect-compatible wallets should add entries here.
1196
+ */
1197
+ declare const BUILTIN_SKINS: Record<string, WalletConnectSkin>;
1198
+ /**
1199
+ * Register a custom WalletConnect skin at runtime.
1200
+ * This allows developers to add their own wallet skins without PRing the library.
1201
+ *
1202
+ * @param skin - The skin definition to register
1203
+ * @throws Error if attempting to override a built-in skin
1204
+ *
1205
+ * @example
1206
+ * ```typescript
1207
+ * import { registerSkin } from '@txnlab/use-wallet'
1208
+ *
1209
+ * registerSkin({
1210
+ * id: 'mywallet',
1211
+ * name: 'My Custom Wallet',
1212
+ * icon: 'data:image/svg+xml;base64,...'
1213
+ * })
1214
+ * ```
1215
+ */
1216
+ declare function registerSkin(skin: WalletConnectSkin): void;
1217
+ /**
1218
+ * Get a skin by its ID from either built-in or custom registries.
1219
+ *
1220
+ * @param skinId - The skin identifier
1221
+ * @returns The skin definition, or undefined if not found
1222
+ */
1223
+ declare function getSkin(skinId: string): WalletConnectSkin | undefined;
1224
+ /**
1225
+ * Resolve a skin option to a full WalletConnectSkin object.
1226
+ *
1227
+ * If the option is a string, looks up the skin in the registries.
1228
+ * If the option is a full skin object, registers it as a custom skin and returns it.
1229
+ *
1230
+ * @param skinOption - Either a skin ID string or a full skin definition
1231
+ * @returns The resolved skin, or undefined if not found (when string ID provided)
1232
+ */
1233
+ declare function resolveSkin(skinOption: WalletConnectSkinOption): WalletConnectSkin | undefined;
1234
+
1235
+ export { type AlgodConfig, BUILTIN_SKINS, BaseWallet, type BaseWalletConstructor, BiatecWallet, type CustomProvider, CustomWallet, type CustomWalletOptions, DEFAULT_NETWORK_CONFIG, DEFAULT_STATE, DEFLY_WEB_PROVIDER_ID, DeflyWallet, type DeflyWalletConnectOptions, DeflyWebWallet, type EnableResult, type Exodus, type ExodusOptions, ExodusWallet, ICON, type JsonRpcRequest, KIBISIS_AVM_WEB_PROVIDER_ID, KibisisWallet, type KmdOptions, KmdWallet, LOCAL_STORAGE_MNEMONIC_KEY, LogLevel, type LuteConnectOptions, LuteWallet, MagicAuth, type MagicAuthClient, type MagicAuthOptions, type ManagerStatus, type MnemonicOptions, MnemonicWallet, type MultisigMetadata, type NetworkConfig, NetworkConfigBuilder, NetworkId, PeraWallet, type PeraWalletConnectOptions, ScopeType, SecureKeyContainer, SessionError, type SignData, SignDataError, type SignDataResponse, type SignMetadata, SignTxnsError, type SignTxnsResponse, type SignTxnsResult, type SignerTransaction, type Siwa, type State, StorageAdapter, type SupportedWallet, type SupportedWallets, W3Wallet, type W3WalletProvider, type WalletAccount, type WalletConfig, type WalletConfigMap, WalletConnect, type WalletConnectOptions, type WalletConnectSkin, type WalletConnectSkinOption, type WalletConstructor, WalletId, type WalletIdConfig, type WalletKey, WalletManager, type WalletManagerConfig, type WalletManagerOptions, type WalletMap, type WalletMetadata, type WalletOptions, type WalletOptionsMap, type WalletState, type WalletTransaction, type Web3AuthCredentials, type Web3AuthCustomAuth, type Web3AuthOptions, Web3AuthWallet, type WindowExtended, getSkin, registerSkin, resolveSkin, webpackFallback, withSecureKey, withSecureKeySync, zeroMemory, zeroString };
package/dist/index.d.ts CHANGED
@@ -73,12 +73,14 @@ declare enum NetworkId {
73
73
 
74
74
  declare abstract class BaseWallet {
75
75
  readonly id: WalletId;
76
+ /** Unique key for this wallet instance. Used for state storage and session isolation. */
77
+ readonly walletKey: WalletKey;
76
78
  readonly metadata: WalletMetadata;
77
79
  protected store: Store<State>;
78
80
  protected getAlgodClient: () => algosdk.Algodv2;
79
81
  subscribe: (callback: (state: State) => void) => () => void;
80
82
  protected logger: ReturnType<typeof logger.createScopedLogger>;
81
- protected constructor({ id, metadata, store, subscribe, getAlgodClient }: WalletConstructor<WalletId>);
83
+ protected constructor({ id, walletKey, metadata, store, subscribe, getAlgodClient }: WalletConstructor<WalletId>);
82
84
  static defaultMetadata: WalletMetadata;
83
85
  abstract connect(args?: Record<string, any>): Promise<WalletAccount[]>;
84
86
  abstract disconnect(): Promise<void>;
@@ -99,7 +101,7 @@ declare abstract class BaseWallet {
99
101
  get isActive(): boolean;
100
102
  get activeNetworkConfig(): NetworkConfig;
101
103
  protected onDisconnect: () => void;
102
- protected manageWalletConnectSession: (action: "backup" | "restore", targetWalletId?: WalletId) => void;
104
+ protected manageWalletConnectSession: (action: "backup" | "restore", targetWalletKey?: WalletKey) => void;
103
105
  }
104
106
 
105
107
  type CustomProvider = {
@@ -464,7 +466,19 @@ interface SignClientOptions {
464
466
  metadata?: SignClientTypes.Metadata;
465
467
  }
466
468
  type WalletConnectModalOptions = Pick<WalletConnectModalConfig, 'enableExplorer' | 'explorerRecommendedWalletIds' | 'privacyPolicyUrl' | 'termsOfServiceUrl' | 'themeMode' | 'themeVariables'>;
467
- type WalletConnectOptions = SignClientOptions & WalletConnectModalOptions;
469
+ type WalletConnectBaseOptions = SignClientOptions & WalletConnectModalOptions;
470
+ interface WalletConnectOptions extends WalletConnectBaseOptions {
471
+ /**
472
+ * Optional skin to apply to this WalletConnect instance.
473
+ * Can be either:
474
+ * - A string ID referencing a built-in skin (e.g., 'biatec')
475
+ * - A full skin object with id, name, and icon
476
+ *
477
+ * When a skin is applied, the wallet will use the skin's metadata
478
+ * and a unique walletKey for state isolation.
479
+ */
480
+ skin?: WalletConnectSkinOption;
481
+ }
468
482
  type SignTxnsResponse = Array<Uint8Array | number[] | string | null | undefined>;
469
483
  declare class SessionError extends Error {
470
484
  constructor(message: string);
@@ -738,7 +752,17 @@ declare class Web3AuthWallet extends BaseWallet {
738
752
  signTransactions: <T extends algosdk.Transaction[] | Uint8Array[]>(txnGroup: T | T[], indexesToSign?: number[]) => Promise<(Uint8Array | null)[]>;
739
753
  }
740
754
 
755
+ /**
756
+ * @deprecated BiatecWallet is deprecated and will be removed in v5.
757
+ * Use WalletConnect with the 'biatec' skin instead:
758
+ *
759
+ * ```typescript
760
+ * { id: WalletId.WALLETCONNECT, options: { projectId: '...', skin: 'biatec' } }
761
+ * ```
762
+ */
741
763
  declare class BiatecWallet extends WalletConnect {
764
+ private static deprecationWarningShown;
765
+ constructor(args: WalletConstructor<WalletId.BIATEC>);
742
766
  static defaultMetadata: {
743
767
  name: string;
744
768
  icon: string;
@@ -783,6 +807,30 @@ declare enum WalletId {
783
807
  WEB3AUTH = "web3auth",
784
808
  W3_WALLET = "w3-wallet"
785
809
  }
810
+ /**
811
+ * Metadata for a WalletConnect skin. Used to customize the appearance of
812
+ * a WalletConnect-based wallet in the UI.
813
+ */
814
+ interface WalletConnectSkin {
815
+ /** Unique identifier for the skin (e.g., 'biatec', 'voiwallet') */
816
+ id: string;
817
+ /** Display name for the wallet */
818
+ name: string;
819
+ /** Wallet icon as a data URI or URL */
820
+ icon: string;
821
+ }
822
+ /**
823
+ * Skin option can be either:
824
+ * - A string ID referencing a built-in skin (e.g., 'biatec')
825
+ * - A full WalletConnectSkin object for custom skins
826
+ */
827
+ type WalletConnectSkinOption = string | WalletConnectSkin;
828
+ /**
829
+ * Composite key type that can be either:
830
+ * - A standard WalletId (for backward compatibility)
831
+ * - A composite string for skinned WalletConnect instances (e.g., 'walletconnect:biatec')
832
+ */
833
+ type WalletKey = WalletId | `${WalletId.WALLETCONNECT}:${string}`;
786
834
  type WalletMap = {
787
835
  [WalletId.BIATEC]: typeof BiatecWallet;
788
836
  [WalletId.CUSTOM]: typeof CustomWallet;
@@ -837,6 +885,8 @@ type WalletMetadata = {
837
885
  };
838
886
  interface BaseWalletConstructor {
839
887
  id: WalletId;
888
+ /** Optional wallet key override. Defaults to id. Used for skinned WalletConnect instances. */
889
+ walletKey?: WalletKey;
840
890
  metadata: Partial<WalletMetadata> | undefined;
841
891
  getAlgodClient: () => algosdk.Algodv2;
842
892
  store: Store<State>;
@@ -976,11 +1026,11 @@ type WalletState = {
976
1026
  accounts: WalletAccount[];
977
1027
  activeAccount: WalletAccount | null;
978
1028
  };
979
- type WalletStateMap = Partial<Record<WalletId, WalletState>>;
1029
+ type WalletStateMap = Partial<Record<WalletKey, WalletState>>;
980
1030
  type ManagerStatus = 'initializing' | 'ready';
981
1031
  interface State {
982
1032
  wallets: WalletStateMap;
983
- activeWallet: WalletId | null;
1033
+ activeWallet: WalletKey | null;
984
1034
  activeNetwork: string;
985
1035
  algodClient: algosdk.Algodv2;
986
1036
  managerStatus: ManagerStatus;
@@ -1001,7 +1051,7 @@ interface WalletManagerConfig {
1001
1051
  options?: WalletManagerOptions;
1002
1052
  }
1003
1053
  declare class WalletManager {
1004
- _clients: Map<WalletId, BaseWallet>;
1054
+ _clients: Map<WalletKey, BaseWallet>;
1005
1055
  private baseNetworkConfig;
1006
1056
  store: Store<State>;
1007
1057
  subscribe: (callback: (state: State) => void) => () => void;
@@ -1018,9 +1068,15 @@ declare class WalletManager {
1018
1068
  private savePersistedState;
1019
1069
  get status(): ManagerStatus;
1020
1070
  get isReady(): boolean;
1071
+ /**
1072
+ * Derive the wallet key from wallet config.
1073
+ * For WalletConnect with a skin option, returns 'walletconnect:skinId'.
1074
+ * For other wallets, returns the wallet ID.
1075
+ */
1076
+ private deriveWalletKey;
1021
1077
  private initializeWallets;
1022
1078
  get wallets(): BaseWallet[];
1023
- getWallet(walletId: WalletId): BaseWallet | undefined;
1079
+ getWallet(walletKey: WalletKey): BaseWallet | undefined;
1024
1080
  resumeSessions(): Promise<void>;
1025
1081
  disconnect(): Promise<void>;
1026
1082
  private initNetworkConfig;
@@ -1126,8 +1182,54 @@ declare const webpackFallback: {
1126
1182
  '@perawallet/connect': boolean;
1127
1183
  '@walletconnect/modal': boolean;
1128
1184
  '@walletconnect/sign-client': boolean;
1185
+ '@web3auth/base': boolean;
1186
+ '@web3auth/base-provider': boolean;
1187
+ '@web3auth/modal': boolean;
1188
+ '@web3auth/single-factor-auth': boolean;
1129
1189
  'lute-connect': boolean;
1130
1190
  'magic-sdk': boolean;
1131
1191
  };
1132
1192
 
1133
- export { type AlgodConfig, BaseWallet, type BaseWalletConstructor, BiatecWallet, type CustomProvider, CustomWallet, type CustomWalletOptions, DEFAULT_NETWORK_CONFIG, DEFAULT_STATE, DEFLY_WEB_PROVIDER_ID, DeflyWallet, type DeflyWalletConnectOptions, DeflyWebWallet, type EnableResult, type Exodus, type ExodusOptions, ExodusWallet, ICON, type JsonRpcRequest, KIBISIS_AVM_WEB_PROVIDER_ID, KibisisWallet, type KmdOptions, KmdWallet, LOCAL_STORAGE_MNEMONIC_KEY, LogLevel, type LuteConnectOptions, LuteWallet, MagicAuth, type MagicAuthClient, type MagicAuthOptions, type ManagerStatus, type MnemonicOptions, MnemonicWallet, type MultisigMetadata, type NetworkConfig, NetworkConfigBuilder, NetworkId, PeraWallet, type PeraWalletConnectOptions, ScopeType, SecureKeyContainer, SessionError, type SignData, SignDataError, type SignDataResponse, type SignMetadata, SignTxnsError, type SignTxnsResponse, type SignTxnsResult, type SignerTransaction, type Siwa, type State, StorageAdapter, type SupportedWallet, type SupportedWallets, W3Wallet, type W3WalletProvider, type WalletAccount, type WalletConfig, type WalletConfigMap, WalletConnect, type WalletConnectOptions, type WalletConstructor, WalletId, type WalletIdConfig, WalletManager, type WalletManagerConfig, type WalletManagerOptions, type WalletMap, type WalletMetadata, type WalletOptions, type WalletOptionsMap, type WalletState, type WalletTransaction, type Web3AuthCredentials, type Web3AuthCustomAuth, type Web3AuthOptions, Web3AuthWallet, type WindowExtended, webpackFallback, withSecureKey, withSecureKeySync, zeroMemory, zeroString };
1193
+ /**
1194
+ * Built-in skins that ship with the library.
1195
+ * PRs to add new WalletConnect-compatible wallets should add entries here.
1196
+ */
1197
+ declare const BUILTIN_SKINS: Record<string, WalletConnectSkin>;
1198
+ /**
1199
+ * Register a custom WalletConnect skin at runtime.
1200
+ * This allows developers to add their own wallet skins without PRing the library.
1201
+ *
1202
+ * @param skin - The skin definition to register
1203
+ * @throws Error if attempting to override a built-in skin
1204
+ *
1205
+ * @example
1206
+ * ```typescript
1207
+ * import { registerSkin } from '@txnlab/use-wallet'
1208
+ *
1209
+ * registerSkin({
1210
+ * id: 'mywallet',
1211
+ * name: 'My Custom Wallet',
1212
+ * icon: 'data:image/svg+xml;base64,...'
1213
+ * })
1214
+ * ```
1215
+ */
1216
+ declare function registerSkin(skin: WalletConnectSkin): void;
1217
+ /**
1218
+ * Get a skin by its ID from either built-in or custom registries.
1219
+ *
1220
+ * @param skinId - The skin identifier
1221
+ * @returns The skin definition, or undefined if not found
1222
+ */
1223
+ declare function getSkin(skinId: string): WalletConnectSkin | undefined;
1224
+ /**
1225
+ * Resolve a skin option to a full WalletConnectSkin object.
1226
+ *
1227
+ * If the option is a string, looks up the skin in the registries.
1228
+ * If the option is a full skin object, registers it as a custom skin and returns it.
1229
+ *
1230
+ * @param skinOption - Either a skin ID string or a full skin definition
1231
+ * @returns The resolved skin, or undefined if not found (when string ID provided)
1232
+ */
1233
+ declare function resolveSkin(skinOption: WalletConnectSkinOption): WalletConnectSkin | undefined;
1234
+
1235
+ export { type AlgodConfig, BUILTIN_SKINS, BaseWallet, type BaseWalletConstructor, BiatecWallet, type CustomProvider, CustomWallet, type CustomWalletOptions, DEFAULT_NETWORK_CONFIG, DEFAULT_STATE, DEFLY_WEB_PROVIDER_ID, DeflyWallet, type DeflyWalletConnectOptions, DeflyWebWallet, type EnableResult, type Exodus, type ExodusOptions, ExodusWallet, ICON, type JsonRpcRequest, KIBISIS_AVM_WEB_PROVIDER_ID, KibisisWallet, type KmdOptions, KmdWallet, LOCAL_STORAGE_MNEMONIC_KEY, LogLevel, type LuteConnectOptions, LuteWallet, MagicAuth, type MagicAuthClient, type MagicAuthOptions, type ManagerStatus, type MnemonicOptions, MnemonicWallet, type MultisigMetadata, type NetworkConfig, NetworkConfigBuilder, NetworkId, PeraWallet, type PeraWalletConnectOptions, ScopeType, SecureKeyContainer, SessionError, type SignData, SignDataError, type SignDataResponse, type SignMetadata, SignTxnsError, type SignTxnsResponse, type SignTxnsResult, type SignerTransaction, type Siwa, type State, StorageAdapter, type SupportedWallet, type SupportedWallets, W3Wallet, type W3WalletProvider, type WalletAccount, type WalletConfig, type WalletConfigMap, WalletConnect, type WalletConnectOptions, type WalletConnectSkin, type WalletConnectSkinOption, type WalletConstructor, WalletId, type WalletIdConfig, type WalletKey, WalletManager, type WalletManagerConfig, type WalletManagerOptions, type WalletMap, type WalletMetadata, type WalletOptions, type WalletOptionsMap, type WalletState, type WalletTransaction, type Web3AuthCredentials, type Web3AuthCustomAuth, type Web3AuthOptions, Web3AuthWallet, type WindowExtended, getSkin, registerSkin, resolveSkin, webpackFallback, withSecureKey, withSecureKeySync, zeroMemory, zeroString };