staticaddr: expose addresses in deposit listings

Include the owning static address in every deposit RPC response and CLI
listing. Users can distinguish deposits created by different receive and
change addresses without reconstructing scripts externally.

Update generated RPC artifacts and command replay fixtures for the new
field.
This commit is contained in:
Slyghtning 2026-05-11 13:43:43 +02:00
parent 88039c2125
commit 4bc75d8ec6
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF
17 changed files with 159 additions and 69 deletions

View file

@ -5741,7 +5741,9 @@ type Deposit struct {
BlocksUntilExpiry int64 `protobuf:"varint,6,opt,name=blocks_until_expiry,json=blocksUntilExpiry,proto3" json:"blocks_until_expiry,omitempty"`
// The swap hash of the swap that this deposit is part of. This field is only
// set if the deposit is part of a loop-in swap.
SwapHash []byte `protobuf:"bytes,7,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
SwapHash []byte `protobuf:"bytes,7,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
// The static address that the deposit was sent to.
StaticAddress string `protobuf:"bytes,8,opt,name=static_address,json=staticAddress,proto3" json:"static_address,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -5825,6 +5827,13 @@ func (x *Deposit) GetSwapHash() []byte {
return nil
}
func (x *Deposit) GetStaticAddress() string {
if x != nil {
return x.StaticAddress
}
return ""
}
type StaticAddressWithdrawal struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The transaction id of the withdrawal transaction.
@ -7062,7 +7071,7 @@ const file_client_proto_rawDesc = "" +
"\x18value_looped_in_satoshis\x18\b \x01(\x03R\x15valueLoopedInSatoshis\x12J\n" +
"\"value_htlc_timeout_sweeps_satoshis\x18\t \x01(\x03R\x1evalueHtlcTimeoutSweepsSatoshis\x122\n" +
"\x15value_channels_opened\x18\n" +
" \x01(\x03R\x13valueChannelsOpened\"\xf6\x01\n" +
" \x01(\x03R\x13valueChannelsOpened\"\x9d\x02\n" +
"\aDeposit\x12\x0e\n" +
"\x02id\x18\x01 \x01(\fR\x02id\x12+\n" +
"\x05state\x18\x02 \x01(\x0e2\x15.looprpc.DepositStateR\x05state\x12\x1a\n" +
@ -7070,7 +7079,8 @@ const file_client_proto_rawDesc = "" +
"\x05value\x18\x04 \x01(\x03R\x05value\x12/\n" +
"\x13confirmation_height\x18\x05 \x01(\x03R\x12confirmationHeight\x12.\n" +
"\x13blocks_until_expiry\x18\x06 \x01(\x03R\x11blocksUntilExpiry\x12\x1b\n" +
"\tswap_hash\x18\a \x01(\fR\bswapHash\"\xc2\x02\n" +
"\tswap_hash\x18\a \x01(\fR\bswapHash\x12%\n" +
"\x0estatic_address\x18\b \x01(\tR\rstaticAddress\"\xc2\x02\n" +
"\x17StaticAddressWithdrawal\x12\x13\n" +
"\x05tx_id\x18\x01 \x01(\tR\x04txId\x12,\n" +
"\bdeposits\x18\x02 \x03(\v2\x10.looprpc.DepositR\bdeposits\x12A\n" +

View file

@ -2100,6 +2100,11 @@ message Deposit {
set if the deposit is part of a loop-in swap.
*/
bytes swap_hash = 7;
/*
The static address that the deposit was sent to.
*/
string static_address = 8;
}
message StaticAddressWithdrawal {

View file

@ -1697,6 +1697,10 @@
"type": "string",
"format": "byte",
"description": "The swap hash of the swap that this deposit is part of. This field is only\nset if the deposit is part of a loop-in swap."
},
"static_address": {
"type": "string",
"description": "The static address that the deposit was sent to."
}
}
},