Skip to content

Commit cf3201d

Browse files
committed
feat(hwi): add address subcommand for hwi
1 parent ad4f677 commit cf3201d

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
@@ -472,6 +472,8 @@ pub enum HwiSubCommand {
472472
Devices,
473473
/// Register hardware wallet
474474
Register,
475+
/// Generate address
476+
Address,
475477
}
476478

477479
/// Subcommands available in REPL mode.

src/handlers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ pub async fn handle_offline_wallet_subcommand(
375375
//TODO: return status of wallet registration
376376
Ok(json!({ "hmac": hmac }))
377377
}
378+
HwiSubCommand::Address => {
379+
let address = wallet.next_unused_address(KeychainKind::External);
380+
Ok(json!({ "address": address.address }))
381+
}
378382
},
379383
}
380384
}

0 commit comments

Comments
 (0)