Skip to content

useEVMAddress

Gets the EVM address from a public key. If no public key is provided, it uses the connected payment or ordinals account's public key.

Import

ts
import { useEVMAddress } from "@midl/executor-react";

Example

ts
const evmAddress = useEVMAddress({ from: 'bcrt...' });

Parameters

NameTypeDescription
fromstring(optional) BTC address of the account to get the EVM address from.
configConfig(optional) Custom configuration to override the default.

Returns

NameTypeDescription
evmAddressstringThe EVM address as a string (or zero address if not available).