Quick Access
Coin Methods
Ethereum
Miscellaneous
Methods
Ethereum
ethereumGetAddress

Ethereum: get address

Display requested address derived by given BIP32 path on device and returns it to caller. User is presented with a description of the requested key and asked to confirm the export on Trezor.

const result = await TrezorConnect.ethereumGetAddress(params);

Params

Including CommonParams

GetAddress

address

String

Optional

address for validation (read Handle button request section below)

showOnTrezor

Boolean

Optional

determines if address will be displayed on device. Default is set to true

chunkify

Boolean

Optional

determines if address will be displayed in chunks of 4 characters. Default is set to false

Bundle(GetAddress)

Example

Display address of first ethereum account:

TrezorConnect.ethereumGetAddress({
    path: "m/44'/60'/0'/0/0",
});

Return a bundle of ethereum addresses without displaying them on device:

TrezorConnect.ethereumGetAddress({
    bundle: [
        { path: "m/44'/60'/0'/0/0", showOnTrezor: false }, // account 1
        { path: "m/44'/60'/1'/0/0", showOnTrezor: false }, // account 2
        { path: "m/44'/60'/2'/0/0", showOnTrezor: false }, // account 3
    ],
});

Validate address using custom UI inside of your application:

import TrezorConnect, { UI } from '@trezor/connect';
 
TrezorConnect.on(UI.ADDRESS_VALIDATION, data => {
    console.log('Handle button request', data.address, data.serializedPath);
    // here you can display custom UI inside of your app
});
 
const result = await TrezorConnect.ethereumGetAddress({
    path: "m/44'/60'/0'/0/0",
    address: '0x73d0385F4d8E00C5e6504C6030F47BF6212736A8',
});
// dont forget to hide your custom UI after you get the result!

Result

Address type

Result with only one address

{
    success: true,
    payload: {
        address: string,     // displayed address
        path: Array<number>, // hardended path
        serializedPath: string,
    }
}

Result with bundle of addresses sorted by FIFO

{
    success: true,
    payload: [
        { address: string, path: Array<number>, serializedPath: string }, // account 1
        { address: string, path: Array<number>, serializedPath: string }, // account 2
        { address: string, path: Array<number>, serializedPath: string }  // account 3
    ]
}

Error

{
    success: false,
    payload: {
        error: string // error message
    }
}