Prerequisites
Before this page:- Create and initialize a Dynamic client.
- Establish an authenticated session.
Check whether screening is enabled
CallisExternalWalletScreeningEnabled() before screening a transaction. The function returns true when the environment has enabled screening for connected-wallet transactions. It requires project settings to be loaded.
Screen a transaction
screenTransaction requires an authenticated session and returns a verdict. It does not block a transaction by itself. When the response has a decision of block, stop your signing flow and show the appropriate experience.
- JavaScript
- React
Parameters
Return value
screenTransaction returns a ScreenTransactionResponse:
Undecodable payloads and sanctions-provider errors fail open with an
allow decision. Other screening failures reject the promise. A block verdict resolves normally, so always branch on decision before signing.
Use a chain helper
The chain packages provide helpers that build the screening context for you. They use the sameScreenTransactionResponse verdict and do not block by themselves.
Dynamic’s MPC-backed embedded wallets are screened server-side during signing, so each helper throws ScreeningNotRequiredError (exported from @dynamic-labs-sdk/client) when you pass an embedded wallet account. Call the helpers only for external wallets.
EVM
screenEvmTransactions accepts:
transactions: { to?: string }[]walletAccount: EvmWalletAccountnetworkId?: stringsenderAddress?: string, which defaults to the wallet account addresssignal?: AbortSignal
InvalidParamError when the wallet account is not an EVM wallet account.
Solana
screenSolanaTransactions accepts:
transactions: (Transaction | VersionedTransaction)[]walletAccount: SolanaWalletAccountsenderAddress?: string, which defaults to the wallet account addresssignal?: AbortSignal
ScreenTransactionResponse for the batch. Legacy transactions must already have a recent blockhash and fee payer so they can be serialized for screening. It rejects when a transaction cannot be serialized for screening.
Bitcoin
screenBitcoinTransactions accepts:
transactions: { psbt?: string; recipientAddress?: string }[]walletAccount: BitcoinWalletAccountnetworkId?: stringsenderAddress?: string, which defaults to the wallet account addresssignal?: AbortSignal
networkId is omitted, and rejects wallet accounts that do not use a Bitcoin provider.
React hook
useScreenTransaction wraps screenTransaction as a mutation. Call mutate or mutateAsync with the same parameters as screenTransaction. A block verdict is returned in data, not thrown as an error.
See also
- Handling blocked wallets for connect-time screening during wallet verification
- Get Wallet Options Catalogue for choosing external wallets