logoAnt Design Web3

Types

This defines the unified types of Ant Design Web3, which may be used in multiple components.

Account

PropertyDescriptionTypeDefaultVersion
addressAccount address (When multiple addresses are supported by the adapter, this represents the first address (addresses[0]))string--
nameAccount name, For example, ENS in Ethereumstring--
addressesList of wallet addresses authorized by the user (implemented by the adapter, supported in some chains)string[]--

ChainIds

This is an enum type that contains the IDs of some commonly used chains. Its value is a number, which can be used to determine whether the current chain is a specific chain.

Chain

PropertyDescriptionTypeDefaultVersion
idChain IDChainIds--
nameChain namestring--
iconChain iconReact.ReactNode--
typeChain Type: EVM compatible chains/SolanaVM chain/Bitcoin chainEVM | SVM | Bitcoin--
browserChain browser configChainBrowser--

ChainBrowser

PropertyDescriptionTypeDefaultVersion
iconChain browser iconReact.ReactNode--
getBrowserLinkGet chain browser record url hanlder(address: string, type: 'address' | 'transaction') => string--

Wallet

PropertyDescriptionTypeDefaultVersion
nameWallet namestring--
iconWallet iconstring | React.ReactNode--
remarkWallet descriptionstring--
keyWallet keyReact.Key--
extensionsList of browser extensions supported by the walletfalse | ExtensionItem[]--
appWhether the wallet supports APP callsfalse | { link: string }--
groupWallet group namestring--
hasWalletReadyWhether the wallet is ready() => boolean--
hasExtensionInstalledWhether the browser extension is installed() => boolean--
getQrCodeGet the QR code of the wallet() => { uri: string }--
customQrCodePanelCustom QR code display panelbooleanfalse1.17.0
universalProtocolUniversal protocol config{ link: string }--
deeplinkMobile wallet deeplink config{ urlTemplate: string }-2.22.0

ExtensionItem

PropertyDescriptionTypeDefaultVersion
linkLink to browser extensionstring--
keyBrowser extension key'Chrome' | 'Firefox' | 'Edge' | 'Safari' | (string & {})--
browserIconBrowser iconstring--
browserNameBrowser extension namestring--
descriptionDescription of browser extensionstring--

NFTMetadata

PropertyDescriptionTypeDefaultVersion
nameName of the NFTstring--
descriptionDescription of the NFTstring--
imageImage link of the NFTstring--
dnaDNA or genetic encoding of the NFTstring--
editionVersion number of the NFTnumber--
dateDate of the NFTnumber--
attributesList of additional attributes of the NFT, including an array of objects with trait_type and value properties.Attribute[]--
compilerCompiler or tool used to create the NFTstring--

Attribute

PropertyDescriptionTypeDefaultVersion
trait_typeThe type of the attribute representing the characteristic type of the NFT.string--
valueThe value of the attribute representing the characteristic of the NFT.string--

ConnectOptions

PropertyDescriptionTypeDefaultVersion
connectTypeConnection type'extension' | 'qrCode'--

SignConfig

PropertyDescriptionTypeDefaultVersion
signInSign In(address: string) => Promise<void>;--
signOutSign Out() => Promise<void>;--

UniversalWeb3ProviderInterface

PropertyDescriptionTypeDefaultVersion
accountCurrent accountAccount--
chainCurrent chainChain--
availableChainsList of available chainsChain[]--
availableWalletsList of available walletsWallet[]--
connectConnect to the wallet(wallet: Wallet, options?: ConnectOptions) => Promise<void | Account>--
disconnectDisconnect from the chain() => Promise<void>--
switchChainSwitch to another chain(chainId: ChainIds) => Promise<void>--
getNFTMetadataGet the metadata of the NFT(contractAddress: string, tokenId?: string) => Promise<NFTMetadata>--
signSign-in configurationSignConfig-1.20.0

Token

PropertyDescriptionTypeDefaultVersion
nameName of the tokenstring--
symbolSymbol of the tokenstring--
iconThe icon of the tokenReact.ReactNode--
decimalThe decimal of the tokennumber--
availableChainsList of available chainsTokenChain[]--

TokenChain

PropertyDescriptionTypeDefaultVersion
chainThe chain of tokenChain--
contractThe contract address of tokenstring-

Locale

Internationalization support text can be found in the code.

  • Last updated:
    HooksBitcoin