Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@dynamic-labs/multi-wallet

Package Overview
Dependencies
Maintainers
2
Versions
1111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynamic-labs/multi-wallet

Multi-wallet is a toolkit for working with many different wallets to create and verify signatures

npmnpm
Version
4.37.1
Version published
Weekly downloads
16K
-10.46%
Maintainers
2
Weekly downloads
 
Created
Source

@dynamic-labs/multi-wallet

Overview

The multi-wallet package provides utility functions for filtering and configuring wallet connectors in the Dynamic Labs SDK. It contains helper functions used by the main SDK to determine which wallets should be available based on project settings and enabled chains.

Key Features

  • Wallet filtering: Filters wallet connectors based on enabled chains and project settings
  • Configuration building: Creates configuration objects needed to instantiate wallet connectors
  • Message generation: Generates standardized messages for wallet signature operations
  • Provider filtering: Determines which authentication providers are enabled

Core Functions

getSupportedWallets(opts)

Main function that returns a filtered list of available wallet connectors based on:

  • Project settings and enabled providers
  • Platform compatibility (mobile/desktop)
  • Wallet availability and installation status
  • User preferences and disabled connectors

getWalletConnectorConstructorOptions(params)

Builds configuration options for wallet connector constructors, including:

  • Network configurations for all supported chains
  • API providers and RPC configurations
  • Authentication modes and UI utilities
  • WalletConnect project settings

getEnabledWallets(props)

Filters wallet connectors based on enabled chains. Takes an object with:

  • enabledChains: Array of Chain types that are enabled
  • getSupportedWalletOpts: Configuration options for getting supported wallets

generateMessageToSign(params)

Creates standardized messages for wallet signing operations. Takes a MessageParameters object with fields like:

  • blockchain: The blockchain type (Chain)
  • domain: The domain requesting the signature
  • nonce: Unique nonce for the request
  • publicKey: User's public key
  • uri: URI of the requesting application
  • Additional optional fields for chainId, statement, resources, etc.

getEnabledProviders(providers)

Filters providers to return only those that are enabled (have enabledAt set, or are MagicLink with providerProjectId, or are Turnkey).

getSupportedChainsForWalletConnector(walletBook, walletConnector)

Returns the supported chains for a specific wallet connector by combining information from the wallet book and the connector's native supported chains.

Usage

import { getSupportedWallets } from '@dynamic-labs/multi-wallet';

const wallets = getSupportedWallets({
  settings: projectSettings,
  walletConnectorsProp: walletConnectors,
  walletBook: walletBookData,
  chainRpcProviders: rpcProviders,
  // ... other options
});

Usage in Dynamic SDK

This package is primarily used internally by the Dynamic SDK React Core package. The main usage patterns are:

  • Wallet List Building: getEnabledWallets is used to filter available wallets based on enabled chains
  • Configuration Setup: getWalletConnectorConstructorOptions builds the options needed to create wallet connector instances
  • Message Signing: generateMessageToSign creates SIWE-compliant messages for wallet authentication

Development

Running unit tests

npx nx test multi-wallet

Building the package

npx nx build multi-wallet

FAQs

Package last updated on 08 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts