From 75d5722df53ecd73e6b956a7f13919f5ec3d876c Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 25 Jan 2022 16:36:29 +0100 Subject: [PATCH] Write some showAddress docs --- packages/ledger-amino/src/launchpadledger.ts | 8 ++++++++ packages/ledger-amino/src/ledgersigner.ts | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/ledger-amino/src/launchpadledger.ts b/packages/ledger-amino/src/launchpadledger.ts index d2f17d0c..f5c90710 100644 --- a/packages/ledger-amino/src/launchpadledger.ts +++ b/packages/ledger-amino/src/launchpadledger.ts @@ -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 { await this.verifyDeviceIsReady(); diff --git a/packages/ledger-amino/src/ledgersigner.ts b/packages/ledger-amino/src/ledgersigner.ts index a5200148..7ed6d80a 100644 --- a/packages/ledger-amino/src/ledgersigner.ts +++ b/packages/ledger-amino/src/ledgersigner.ts @@ -37,7 +37,15 @@ export class LedgerSigner implements OfflineAminoSigner { return this.accounts; } - public async showAddress(path: HdPath): Promise { + /** + * 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 { return this.ledger.showAddress(path); }