Esc

View as Markdownllms.txt

To MegaName

Retrieve the MegaName of a wallet address if registered.

import { mega } from '@megaeth-labs/wallet-sdk';

const name = await mega.toMegaName('0xFD8D73c93385271d06138FA0Ff6E9c639C3Bd8b0');
Runs on testnet with your wallet
ts
// Resolves to the address's MegaName, or undefined if it has none
toMegaName: (address: `0x${string}`) => Promise<string | undefined>;