Skip to main content
Account-related methods work across multiple blockchains and provide access to account information, addresses, and public keys.

getAccountInfo

Retrieves detailed account information including balance, transaction history, and addresses.
coin
string
required
Coin name or shortcut. Determines network definition specified in coins.json file.
path
string
BIP32 derivation path (e.g., m/44'/0'/0'). Either path or descriptor is required.
descriptor
string
Account descriptor (xpub, output descriptor). Either path or descriptor is required.
identity
string
Optional device identity for account isolation.
defaultAccountType
string
Account type for discovery: p2pkh, p2sh, p2tr, or p2wpkh.
derivationType
number
Cardano-specific derivation type.
suppressBackupWarning
boolean
Suppress backup warning dialog.
details
string
Level of detail: basic, tokens, or tokenBalances.
tokens
string
Filter for specific tokens: used, derived, or token addresses.
pageSize
number
Number of transactions per page.
page
number
Page number for pagination.
from
number
Block height to start from.
to
number
Block height to end at.
contractFilter
string
Filter transactions by contract address.
descriptor
string
Account descriptor (xpub or output descriptor).
balance
string
Total account balance.
availableBalance
string
Available balance (excluding unconfirmed).
empty
boolean
Whether the account has been used.
history
object
Transaction history.
addresses
object
Account addresses.
tokens
array
Token balances for the account.
utxo
array
Bitcoin UTXOs (Bitcoin-like chains only).
path
string
BIP32 derivation path.
legacyXpub
string
Legacy xpub format for metadata/labeling.
descriptorChecksum
string
Descriptor checksum.
const result = await TrezorConnect.getAccountInfo({
    coin: 'btc',
    path: "m/84'/0'/0'",
    details: 'tokens',
});

if (result.success) {
    console.log('Balance:', result.payload.balance);
    console.log('Transactions:', result.payload.history.total);
}

getAddress

Retrieves a single address or multiple addresses from the device. Can optionally display address on device screen for verification.
path
string | number[]
required
BIP32 derivation path (e.g., m/44'/0'/0'/0/0).
coin
string
Coin name or shortcut (e.g., btc, eth).
showOnTrezor
boolean
Show address on device screen for verification.
crossChain
boolean
Enable cross-chain address derivation.
multisig
object
Multisig redeem script configuration.
scriptType
string
Script type: SPENDADDRESS, SPENDWITNESS, SPENDP2SHWITNESS, SPENDTAPROOT.
unlockPath
object
Path unlock configuration for advanced use cases.
address
string
Expected address for verification (optional).
chunkify
boolean
Split large requests into chunks.
address
string
The requested address.
path
number[]
Derivation path as integer array.
serializedPath
string
Derivation path as string.
// Get single address
const result = await TrezorConnect.getAddress({
    path: "m/84'/0'/0'/0/0",
    coin: 'btc',
    showOnTrezor: true,
});

// Get multiple addresses (bundle)
const bundle = await TrezorConnect.getAddress({
    bundle: [
        { path: "m/84'/0'/0'/0/0", coin: 'btc' },
        { path: "m/84'/0'/0'/0/1", coin: 'btc' },
    ],
});

getPublicKey

Retrieves public key (xpub) from the device. Can optionally display on device screen for verification.
path
string | number[]
required
BIP32 derivation path (e.g., m/44'/0'/0').
coin
string
default:"btc"
Coin name or shortcut. If not set, API will try to detect from path.
showOnTrezor
boolean
Show public key on device screen for verification.
crossChain
boolean
Enable cross-chain derivation.
scriptType
string
Script type: SPENDADDRESS, SPENDWITNESS, SPENDP2SHWITNESS, SPENDTAPROOT.
ignoreXpubMagic
boolean
Ignore xpub magic bytes validation.
ecdsaCurveName
string
ECDSA curve name for derivation.
unlockPath
object
Path unlock configuration.
xpub
string
Extended public key in standard format.
xpubSegwit
string
Extended public key in SegWit format (if applicable).
chainCode
string
BIP32 chain code.
publicKey
string
Raw public key in hex format.
path
number[]
Derivation path as integer array.
serializedPath
string
Derivation path as string.
childNum
number
Child number.
fingerprint
number
Key fingerprint.
depth
number
Derivation depth.
descriptor
string
Output descriptor.
descriptorChecksum
string
Descriptor checksum.
// Get single public key
const result = await TrezorConnect.getPublicKey({
    path: "m/84'/0'/0'",
    coin: 'btc',
});

if (result.success) {
    console.log('Xpub:', result.payload.xpub);
}

// Get multiple public keys (bundle)
const bundle = await TrezorConnect.getPublicKey({
    bundle: [
        { path: "m/44'/0'/0'", coin: 'btc' },
        { path: "m/84'/0'/0'", coin: 'btc' },
    ],
});

getAccountDescriptor

Returns account descriptor (xpub or output descriptor) for a given coin and account path.
coin
string
required
Coin name or shortcut.
path
string
required
Account derivation path.
identity
string
Device identity for account isolation.
descriptor
string
Account descriptor.
legacyXpub
string
Legacy xpub format (if applicable).
const result = await TrezorConnect.getAccountDescriptor({
    coin: 'btc',
    path: "m/84'/0'/0'",
});

discoverAccounts

Discovers accounts on the device by checking multiple derivation paths.
coin
string
required
Coin name or shortcut.
identity
string
Device identity for account isolation.
accounts
array
Array of discovered accounts with balances and descriptors.
const result = await TrezorConnect.discoverAccounts({
    coin: 'btc',
});

if (result.success) {
    result.payload.forEach(account => {
        console.log(`Account ${account.label}: ${account.balance}`);
    });
}

Build docs developers (and LLMs) love