walletrpc: add note to poorly named field

Fixes #2986.
This commit is contained in:
Oliver Gugger
2023-05-12 10:17:34 +02:00
parent 56dba2df03
commit 31330f1ffc
3 changed files with 7 additions and 3 deletions

View File

@@ -2246,7 +2246,9 @@ type Transaction struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The raw serialized transaction.
// The raw serialized transaction. Despite the field name, this does need to be
// specified in raw bytes (or base64 encoded when using REST) and not in hex.
// To not break existing software, the field can't simply be renamed.
TxHex []byte `protobuf:"bytes,1,opt,name=tx_hex,json=txHex,proto3" json:"tx_hex,omitempty"`
// An optional label to save with the transaction. Limited to 500 characters.
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`

View File

@@ -712,7 +712,9 @@ message ImportTapscriptResponse {
message Transaction {
/*
The raw serialized transaction.
The raw serialized transaction. Despite the field name, this does need to be
specified in raw bytes (or base64 encoded when using REST) and not in hex.
To not break existing software, the field can't simply be renamed.
*/
bytes tx_hex = 1;

View File

@@ -1893,7 +1893,7 @@
"tx_hex": {
"type": "string",
"format": "byte",
"description": "The raw serialized transaction."
"description": "The raw serialized transaction. Despite the field name, this does need to be\nspecified in raw bytes (or base64 encoded when using REST) and not in hex.\nTo not break existing software, the field can't simply be renamed."
},
"label": {
"type": "string",