mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 22:54:26 +01:00
lnrpc+rpcserver: replace ChanPoint w/ OutPoint in Utxo msg
This commit is contained in:
1153
lnrpc/rpc.pb.go
1153
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@@ -669,25 +669,23 @@ service Lightning {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message Utxo {
|
message Utxo {
|
||||||
/// The type of address
|
/// The type of address
|
||||||
AddressType type = 1 [json_name = "address_type"];
|
AddressType type = 1 [json_name = "address_type"];
|
||||||
|
|
||||||
/// The address
|
/// The address
|
||||||
string address = 2 [json_name = "address"];
|
string address = 2 [json_name = "address"];
|
||||||
|
|
||||||
/// The value of the unspent coin in satoshis
|
/// The value of the unspent coin in satoshis
|
||||||
int64 amount_sat = 3 [json_name = "amount_sat"];
|
int64 amount_sat = 3 [json_name = "amount_sat"];
|
||||||
|
|
||||||
/// The scriptpubkey in hex
|
/// The scriptpubkey in hex
|
||||||
string script_pubkey = 4 [json_name = "script_pubkey"];
|
string script_pubkey = 4 [json_name = "script_pubkey"];
|
||||||
|
|
||||||
/// The outpoint in format txid:n
|
/// The outpoint in format txid:n
|
||||||
/// Note that this reuses the `ChannelPoint` message but
|
OutPoint outpoint = 5 [json_name = "outpoint"];
|
||||||
/// is not actually a channel related outpoint, of course
|
|
||||||
ChannelPoint outpoint = 5 [json_name = "outpoint"];
|
|
||||||
|
|
||||||
/// The number of confirmations for the Utxo
|
/// The number of confirmations for the Utxo
|
||||||
int64 confirmations = 6 [json_name = "confirmations"];
|
int64 confirmations = 6 [json_name = "confirmations"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message Transaction {
|
message Transaction {
|
||||||
@@ -800,6 +798,17 @@ message ChannelPoint {
|
|||||||
uint32 output_index = 3 [json_name = "output_index"];
|
uint32 output_index = 3 [json_name = "output_index"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message OutPoint {
|
||||||
|
/// Raw bytes representing the transaction id.
|
||||||
|
bytes txid_bytes = 1 [json_name = "txid_bytes"];
|
||||||
|
|
||||||
|
/// Reversed, hex-encoded string representing the transaction id.
|
||||||
|
string txid_str = 2 [json_name = "txid_str"];
|
||||||
|
|
||||||
|
/// The index of the output on the transaction.
|
||||||
|
uint32 output_index = 3 [json_name = "output_index"];
|
||||||
|
}
|
||||||
|
|
||||||
message LightningAddress {
|
message LightningAddress {
|
||||||
/// The identity pubkey of the Lightning node
|
/// The identity pubkey of the Lightning node
|
||||||
string pubkey = 1 [json_name = "pubkey"];
|
string pubkey = 1 [json_name = "pubkey"];
|
||||||
|
|||||||
@@ -2435,6 +2435,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lnrpcOutPoint": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"txid_bytes": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "byte",
|
||||||
|
"description": "/ Raw bytes representing the transaction id."
|
||||||
|
},
|
||||||
|
"txid_str": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "/ Reversed, hex-encoded string representing the transaction id."
|
||||||
|
},
|
||||||
|
"output_index": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"description": "/ The index of the output on the transaction."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"lnrpcPayReq": {
|
"lnrpcPayReq": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -3014,8 +3033,8 @@
|
|||||||
"title": "/ The scriptpubkey in hex"
|
"title": "/ The scriptpubkey in hex"
|
||||||
},
|
},
|
||||||
"outpoint": {
|
"outpoint": {
|
||||||
"$ref": "#/definitions/lnrpcChannelPoint",
|
"$ref": "#/definitions/lnrpcOutPoint",
|
||||||
"title": "/ The outpoint in format txid:n\n/ Note that this reuses the `ChannelPoint` message but\n/ is not actually a channel related outpoint, of course"
|
"title": "/ The outpoint in format txid:n"
|
||||||
},
|
},
|
||||||
"confirmations": {
|
"confirmations": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -717,10 +717,9 @@ func (r *rpcServer) ListUnspent(ctx context.Context,
|
|||||||
|
|
||||||
// Now that we know we have a proper mapping to an address,
|
// Now that we know we have a proper mapping to an address,
|
||||||
// we'll convert the regular outpoint to an lnrpc variant.
|
// we'll convert the regular outpoint to an lnrpc variant.
|
||||||
outpoint := &lnrpc.ChannelPoint{
|
outpoint := &lnrpc.OutPoint{
|
||||||
FundingTxid: &lnrpc.ChannelPoint_FundingTxidStr{
|
TxidBytes: utxo.OutPoint.Hash[:],
|
||||||
FundingTxidStr: utxo.OutPoint.Hash.String(),
|
TxidStr: utxo.OutPoint.Hash.String(),
|
||||||
},
|
|
||||||
OutputIndex: utxo.OutPoint.Index,
|
OutputIndex: utxo.OutPoint.Index,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user