Function Signature
DynamicEvmWalletClient, DynamicSvmWalletClient, DynamicBtcWalletClient, DynamicTonWalletClient).
Description
Refreshes the Dynamic user JWT using the current session and installs the new token for all subsequent API calls. Returns the new JWT so you can persist it — the previous token is superseded, so overwrite your stored copy on every call. The server enforces a hard refresh limit through the JWT’srefreshExp claim. Once reached, refresh fails with a 401 and the user must sign in again; refresh cannot extend a session indefinitely without the user re-approving.
The session signer passed to authenticateJwt is preserved across refreshes.
Parameters
None.Returns
Promise<string>- The new JWT, already installed on the client.
Example
Error Handling
Related Functions
authenticateJwt()- Install a user JWTcreateAuthClient()- Sign the user in again when the refresh limit is reached