Skip to content

Commit abf9e88

Browse files
committed
feat(hwi): add address subcommand for hwi
1 parent 31cfff2 commit abf9e88

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/commands.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ pub enum HwiSubCommand {
478478
Devices,
479479
/// Register hardware wallet
480480
Register,
481+
/// Generate address
482+
Address,
481483
}
482484

483485
/// Subcommands available in REPL mode.

src/handlers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,10 @@ pub async fn handle_offline_wallet_subcommand(
626626
//TODO: return status of wallet registration
627627
Ok(json!({ "hmac": hmac }))
628628
}
629+
HwiSubCommand::Address => {
630+
let address = wallet.next_unused_address(KeychainKind::External);
631+
Ok(json!({ "address": address.address }))
632+
}
629633
},
630634
}
631635
}

0 commit comments

Comments
 (0)