On this page
evmGetAddress
Ethereum: get address
Derives and returns the address at the specified path. When showOnOneKey is true, the user must confirm the address on the device.
const response = await HardwareSDK.evmGetAddress(connectId, deviceId, params)Params
Single address
path- requiredstring | Array<number>SDK minimum length is3. more informationshowOnOneKey- optionalbooleanWhether to display the address on the device. Defaults totrue.chainId- optionalnumberThe ChainId in ETH is a unique identifier for a specific Ethereum network, used to distinguish different versions of the blockchain. Reference .
Multiple addresses
bundle- array of objects withpathandshowOnOneKeyfields
Example
Display the address for the first ethereum account:
HardwareSDK.evmGetAddress(connectId, deviceId, {
path: "m/44'/60'/0'/0/0",
chainId: 1
});Return a bundle of ethereum addresses without displaying them on the device:
HardwareSDK.evmGetAddress(connectId, deviceId, {
bundle: [
{ path: "m/44'/60'/0'/0/0", chainId: 1, showOnOneKey: false }, // account 1
{ path: "m/44'/60'/1'/0/0", chainId: 1, showOnOneKey: false }, // account 2
{ path: "m/44'/60'/2'/0/0", chainId: 1, showOnOneKey: false } // account 3
]
});Result
Single-address response
{
success: true,
payload: {
address: string, // displayed address
path: string // serialized BIP32 path
}
}
Batch response, in the same order as the request
{
success: true,
payload: [
{ address: string, path: string }, // account 1
{ address: string, path: string }, // account 2
{ address: string, path: string } // account 3
]
}Error
{
success: false,
payload: {
error: string, // error message
code?: string | number // error code
}
}Last updated on