DODO Docs
Search…
⌃K

API

Name
Type
Default
Text
provider
Eip1193Provider Or JsonRpcProvider
undefined
EIP-1193 provider
jsonRpcUrlMap
{ [chainId: number]: string[] }
Specify nodes of different chains
defaultChainId
number
1
Default Chain ID
tokenList
{
chainId: number;
address: string;
name: string;
decimals: number;
symbol: string;
logoURI: string;
}[]
Selectable Token List
popularTokenList
{
chainId: number;
address: string;
name: string;
decimals: number;
symbol: string;
logoURI: string;
}[]
undefined
Selectable List of Popular Tokens
defaultFromToken
{
chainId: number;
address: string;
name: string;
decimals: number;
symbol: string;
logoURI: string;
}
undefined
Default Origin Token
defaultToToken
{
chainId: number;
address: string;
name: string;
decimals: number;
symbol: string;
logoURI: string;
}
undefined
Default Destination Token
feeRate
number
0
Transaction fee rate. Unit: 1e18
rebateTo
string
undefined
Profit sharing address
theme
Theme
undefined
Can override theme, text, and style. Refer to the Instructions page for more information.
colorMode
'light' Or 'dark'
'light'
Light or dark mode
accessToken
string
undefined
Passed onto the accessTokenof the price inquiry interface
width
string Or number
375
Widget width
height
string Or number
494
Widget height
onTxFail
(error: Error, data: any) => void
undefined
Triggered if transaction fails
onTxSubmit
(tx: string, data: any) => void
undefined
Triggered after transaction is submitted
onTxSuccess
(tx: string, data: any) => void
undefined
Triggered if transaction executes successfully