lnrpc: add new unused address types for NewAddressRequest

In this commit, we add two new address types to `NewAddressRequest`.
These address types will allow the caller to retrieve the last _unused_
address, rather than always rotating to the next address in the
keychain.
This commit is contained in:
Olaoluwa Osuntokun 2019-02-19 19:14:33 -08:00
parent 3be894bc28
commit 7703567b0b
3 changed files with 584 additions and 571 deletions

File diff suppressed because it is too large Load Diff

View File

@ -900,6 +900,8 @@ message ListUnspentResponse {
enum AddressType {
WITNESS_PUBKEY_HASH = 0;
NESTED_PUBKEY_HASH = 1;
UNUSED_WITNESS_PUBKEY_HASH = 2;
UNUSED_NESTED_PUBKEY_HASH = 3;
}
message NewAddressRequest {

View File

@ -793,7 +793,9 @@
"type": "string",
"enum": [
"WITNESS_PUBKEY_HASH",
"NESTED_PUBKEY_HASH"
"NESTED_PUBKEY_HASH",
"UNUSED_WITNESS_PUBKEY_HASH",
"UNUSED_NESTED_PUBKEY_HASH"
],
"default": "WITNESS_PUBKEY_HASH"
}
@ -1289,7 +1291,9 @@
"type": "string",
"enum": [
"WITNESS_PUBKEY_HASH",
"NESTED_PUBKEY_HASH"
"NESTED_PUBKEY_HASH",
"UNUSED_WITNESS_PUBKEY_HASH",
"UNUSED_NESTED_PUBKEY_HASH"
],
"default": "WITNESS_PUBKEY_HASH",
"description": "- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)\n- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)",