From 31330f1ffc2f03c679076d74867ee3b7e7459b56 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 12 May 2023 10:17:34 +0200 Subject: [PATCH] walletrpc: add note to poorly named field Fixes #2986. --- lnrpc/walletrpc/walletkit.pb.go | 4 +++- lnrpc/walletrpc/walletkit.proto | 4 +++- lnrpc/walletrpc/walletkit.swagger.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lnrpc/walletrpc/walletkit.pb.go b/lnrpc/walletrpc/walletkit.pb.go index 739d3e915..ac055a8da 100644 --- a/lnrpc/walletrpc/walletkit.pb.go +++ b/lnrpc/walletrpc/walletkit.pb.go @@ -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"` diff --git a/lnrpc/walletrpc/walletkit.proto b/lnrpc/walletrpc/walletkit.proto index a9c741213..0d3fd9512 100644 --- a/lnrpc/walletrpc/walletkit.proto +++ b/lnrpc/walletrpc/walletkit.proto @@ -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; diff --git a/lnrpc/walletrpc/walletkit.swagger.json b/lnrpc/walletrpc/walletkit.swagger.json index d2cb16f0c..5297ec23b 100644 --- a/lnrpc/walletrpc/walletkit.swagger.json +++ b/lnrpc/walletrpc/walletkit.swagger.json @@ -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",