On this page
alephiumGetAddress
Requirements
- Minimum firmware versions
- Touch: 4.10.0
Alephium: 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 result = await HardwareSDK.alephiumGetAddress(connectId, deviceId, {
path: "m/44'/1234'/0'/0/0",
showOnOneKey: false,
group: 0,
includePublicKey: true
});Params
Single address
path- requiredstring | Array<number>SDK minimum length is3group- requirednumber | undefined | null. Passundefinedfor group 0, ornullto omit the target group.includePublicKey- optionalbooleanReturnpuband itspublicKeyalias; defaultfalse.showOnOneKey- optionalbooleanWhether to display the address on the device. Defaults totrue.
Multiple addresses
bundle- array of objects withpathandshowOnOneKeyandgroupfields
Example
// Get single address
const response = await HardwareSDK.alephiumGetAddress(connectId, deviceId, {
path: "m/44'/1234'/0'/0/0",
showOnOneKey: true,
group: undefined
});
// Get multiple addresses
const batchResponse = await HardwareSDK.alephiumGetAddress(connectId, deviceId, {
bundle: [
{
path: "m/44'/1234'/0'/0/0",
showOnOneKey: false,
group: undefined
},
{
path: "m/44'/1234'/1'/0/0",
showOnOneKey: false,
group: undefined
}
]
});Result
Single-address response
{
success: true,
payload: {
address: string, // displayed address
derivedPath: string,
pub?: string,
publicKey?: string,
path: string // serialized BIP32 path
}
}Batch response, in the same order as the request
{
success: true,
payload: [
{ address: string, derivedPath: string, pub?: string, publicKey?: string, path: string }, // account 1
{ address: string, derivedPath: string, pub?: string, publicKey?: string, path: string }, // account 2
{ address: string, derivedPath: string, pub?: string, publicKey?: string, path: string } // account 3
]
}Error
{
success: false,
payload: {
error: string, // error message
code?: string | number // error code
}
}Last updated on