walletrpc: expose dry run support for ImportAccount

This commit is contained in:
Wilmer Paulino committed 2021-05-07 13:06:27 -07:00
1 parent 994405709a
commit e180023843
4 files changed
+497 -367

No files matched your search

+25
View File
@@ -387,8 +387,33 @@ message ImportAccountRequest {
address scheme it belongs to.
*/
AddressType address_type = 4;
/*
Whether a dry run should be attempted when importing the account. This
serves as a way to confirm whether the account is being imported correctly
by returning the first N addresses for the external and internal branches of
the account. If these addresses match as expected, then it should be safe to
import the account as is.
*/
bool dry_run = 5;
}
message ImportAccountResponse {
// The details of the imported account.
Account account = 1;
/*
The first N addresses that belong to the external branch of the account.
The external branch is typically used for external non-change addresses.
These are only returned if a dry run was specified within the request.
*/
repeated string dry_run_external_addrs = 2;
/*
The first N addresses that belong to the internal branch of the account.
The internal branch is typically used for change addresses. These are only
returned if a dry run was specified within the request.
*/
repeated string dry_run_internal_addrs = 3;
}
message ImportPublicKeyRequest {