Skip to content

Commit 04f0687

Browse files
committed
feat(hwi): add address subcommand for hwi
1 parent f706813 commit 04f0687

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

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
@@ -631,6 +631,10 @@ pub async fn handle_offline_wallet_subcommand(
631631
//TODO: return status of wallet registration
632632
Ok(json!({ "hmac": hmac }))
633633
}
634+
HwiSubCommand::Address => {
635+
let address = wallet.next_unused_address(KeychainKind::External);
636+
Ok(json!({ "address": address.address }))
637+
}
634638
},
635639
}
636640
}

0 commit comments

Comments
 (0)