Utilities Introduction
You can think of utilities as helper functions on top of the SDK. You could implement them yourself, but we’ve found that these are common tasks and so have done the legwork for you.
You can import them directly from the @dynamic-labs/sdk-react-core package, for example:
getAuthToken: Used to get a JWT token generated by Dynamic which is stored inside of localStorage
getNetwork: Used to find the current network used by a wallet. It receives the wallet connector and returns a promise that will resolve with the network.
isZeroDevConnector: Used to type check if a wallet connector is a ZeroDev connector
isAuthenticatedWithAWallet: Used to check is the user has authenticated with a wallet
isLedgerSolanaWallet: Determine if a given wallet is connected as a Ledger Solana wallet
Was this page helpful?