Write some showAddress docs

This commit is contained in:
Simon Warta 2022-01-25 16:36:29 +01:00
parent e48101f8a7
commit 75d5722df5
2 changed files with 17 additions and 1 deletions

View File

@ -172,6 +172,14 @@ export class LaunchpadLedger {
await this.verifyCosmosAppIsOpen();
}
/**
* Shows the user's address in the device and returns an address/pubkey pair.
*
* The address will be shown with the native prefix of the app (e.g. cosmos, persistence, desmos)
* and does not support the usage of other address prefixes.
*
* @param path The HD path to show the address for. If unset, this is the first account.
*/
public async showAddress(hdPath?: HdPath): Promise<AddressAndPubkey> {
await this.verifyDeviceIsReady();

View File

@ -37,7 +37,15 @@ export class LedgerSigner implements OfflineAminoSigner {
return this.accounts;
}
public async showAddress(path: HdPath): Promise<AddressAndPubkey> {
/**
* Shows the user's address in the device and returns an address/pubkey pair.
*
* The address will be shown with the native prefix of the app (e.g. cosmos, persistence, desmos)
* and does not support the usage of other address prefixes.
*
* @param path The HD path to show the address for. If unset, this is the first account.
*/
public async showAddress(path?: HdPath): Promise<AddressAndPubkey> {
return this.ledger.showAddress(path);
}