mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
lnrpc: re-compile protos w/ Go 1.19
This commit is contained in:
parent
65a5eeb24e
commit
b3998ddb5c
@ -302,9 +302,8 @@ type SetScoresRequest struct {
|
||||
|
||||
// The name of the heuristic to provide scores to.
|
||||
Heuristic string `protobuf:"bytes,1,opt,name=heuristic,proto3" json:"heuristic,omitempty"`
|
||||
//
|
||||
//A map from hex-encoded public keys to scores. Scores must be in the range
|
||||
//[0.0, 1.0].
|
||||
// A map from hex-encoded public keys to scores. Scores must be in the range
|
||||
// [0.0, 1.0].
|
||||
Scores map[string]float64 `protobuf:"bytes,2,rep,name=scores,proto3" json:"scores,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
|
@ -18,21 +18,17 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type AutopilotClient interface {
|
||||
//
|
||||
//Status returns whether the daemon's autopilot agent is active.
|
||||
// Status returns whether the daemon's autopilot agent is active.
|
||||
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
||||
//
|
||||
//ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
//enabling or disabling it.
|
||||
// ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
// enabling or disabling it.
|
||||
ModifyStatus(ctx context.Context, in *ModifyStatusRequest, opts ...grpc.CallOption) (*ModifyStatusResponse, error)
|
||||
//
|
||||
//QueryScores queries all available autopilot heuristics, in addition to any
|
||||
//active combination of these heruristics, for the scores they would give to
|
||||
//the given nodes.
|
||||
// QueryScores queries all available autopilot heuristics, in addition to any
|
||||
// active combination of these heruristics, for the scores they would give to
|
||||
// the given nodes.
|
||||
QueryScores(ctx context.Context, in *QueryScoresRequest, opts ...grpc.CallOption) (*QueryScoresResponse, error)
|
||||
//
|
||||
//SetScores attempts to set the scores used by the running autopilot agent,
|
||||
//if the external scoring heuristic is enabled.
|
||||
// SetScores attempts to set the scores used by the running autopilot agent,
|
||||
// if the external scoring heuristic is enabled.
|
||||
SetScores(ctx context.Context, in *SetScoresRequest, opts ...grpc.CallOption) (*SetScoresResponse, error)
|
||||
}
|
||||
|
||||
@ -84,21 +80,17 @@ func (c *autopilotClient) SetScores(ctx context.Context, in *SetScoresRequest, o
|
||||
// All implementations must embed UnimplementedAutopilotServer
|
||||
// for forward compatibility
|
||||
type AutopilotServer interface {
|
||||
//
|
||||
//Status returns whether the daemon's autopilot agent is active.
|
||||
// Status returns whether the daemon's autopilot agent is active.
|
||||
Status(context.Context, *StatusRequest) (*StatusResponse, error)
|
||||
//
|
||||
//ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
//enabling or disabling it.
|
||||
// ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
// enabling or disabling it.
|
||||
ModifyStatus(context.Context, *ModifyStatusRequest) (*ModifyStatusResponse, error)
|
||||
//
|
||||
//QueryScores queries all available autopilot heuristics, in addition to any
|
||||
//active combination of these heruristics, for the scores they would give to
|
||||
//the given nodes.
|
||||
// QueryScores queries all available autopilot heuristics, in addition to any
|
||||
// active combination of these heruristics, for the scores they would give to
|
||||
// the given nodes.
|
||||
QueryScores(context.Context, *QueryScoresRequest) (*QueryScoresResponse, error)
|
||||
//
|
||||
//SetScores attempts to set the scores used by the running autopilot agent,
|
||||
//if the external scoring heuristic is enabled.
|
||||
// SetScores attempts to set the scores used by the running autopilot agent,
|
||||
// if the external scoring heuristic is enabled.
|
||||
SetScores(context.Context, *SetScoresRequest) (*SetScoresResponse, error)
|
||||
mustEmbedUnimplementedAutopilotServer()
|
||||
}
|
||||
|
@ -25,29 +25,24 @@ type ConfRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The transaction hash for which we should request a confirmation notification
|
||||
//for. If set to a hash of all zeros, then the confirmation notification will
|
||||
//be requested for the script instead.
|
||||
// The transaction hash for which we should request a confirmation notification
|
||||
// for. If set to a hash of all zeros, then the confirmation notification will
|
||||
// be requested for the script instead.
|
||||
Txid []byte `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"`
|
||||
//
|
||||
//An output script within a transaction with the hash above which will be used
|
||||
//by light clients to match block filters. If the transaction hash is set to a
|
||||
//hash of all zeros, then a confirmation notification will be requested for
|
||||
//this script instead.
|
||||
// An output script within a transaction with the hash above which will be used
|
||||
// by light clients to match block filters. If the transaction hash is set to a
|
||||
// hash of all zeros, then a confirmation notification will be requested for
|
||||
// this script instead.
|
||||
Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"`
|
||||
//
|
||||
//The number of desired confirmations the transaction/output script should
|
||||
//reach before dispatching a confirmation notification.
|
||||
// The number of desired confirmations the transaction/output script should
|
||||
// reach before dispatching a confirmation notification.
|
||||
NumConfs uint32 `protobuf:"varint,3,opt,name=num_confs,json=numConfs,proto3" json:"num_confs,omitempty"`
|
||||
//
|
||||
//The earliest height in the chain for which the transaction/output script
|
||||
//could have been included in a block. This should in most cases be set to the
|
||||
//broadcast height of the transaction/output script.
|
||||
// The earliest height in the chain for which the transaction/output script
|
||||
// could have been included in a block. This should in most cases be set to the
|
||||
// broadcast height of the transaction/output script.
|
||||
HeightHint uint32 `protobuf:"varint,4,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"`
|
||||
//
|
||||
//If true, then the block that mines the specified txid/script will be
|
||||
//included in eventual the notification event.
|
||||
// If true, then the block that mines the specified txid/script will be
|
||||
// included in eventual the notification event.
|
||||
IncludeBlock bool `protobuf:"varint,5,opt,name=include_block,json=includeBlock,proto3" json:"include_block,omitempty"`
|
||||
}
|
||||
|
||||
@ -132,9 +127,8 @@ type ConfDetails struct {
|
||||
BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
|
||||
// The index of the confirmed transaction within the transaction.
|
||||
TxIndex uint32 `protobuf:"varint,4,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
|
||||
//
|
||||
//The raw bytes of the block that mined the transaction. Only included if
|
||||
//include_block was set in the request.
|
||||
// The raw bytes of the block that mined the transaction. Only included if
|
||||
// include_block was set in the request.
|
||||
RawBlock []byte `protobuf:"bytes,5,opt,name=raw_block,json=rawBlock,proto3" json:"raw_block,omitempty"`
|
||||
}
|
||||
|
||||
@ -249,6 +243,7 @@ type ConfEvent struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Event:
|
||||
//
|
||||
// *ConfEvent_Conf
|
||||
// *ConfEvent_Reorg
|
||||
Event isConfEvent_Event `protobuf_oneof:"event"`
|
||||
@ -312,16 +307,14 @@ type isConfEvent_Event interface {
|
||||
}
|
||||
|
||||
type ConfEvent_Conf struct {
|
||||
//
|
||||
//An event that includes the confirmation details of the request
|
||||
//(txid/ouput script).
|
||||
// An event that includes the confirmation details of the request
|
||||
// (txid/ouput script).
|
||||
Conf *ConfDetails `protobuf:"bytes,1,opt,name=conf,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ConfEvent_Reorg struct {
|
||||
//
|
||||
//An event send when the transaction of the request is reorged out of the
|
||||
//chain.
|
||||
// An event send when the transaction of the request is reorged out of the
|
||||
// chain.
|
||||
Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"`
|
||||
}
|
||||
|
||||
@ -391,24 +384,21 @@ type SpendRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The outpoint for which we should request a spend notification for. If set to
|
||||
//a zero outpoint, then the spend notification will be requested for the
|
||||
//script instead. A zero or nil outpoint is not supported for Taproot spends
|
||||
//because the output script cannot reliably be computed from the witness alone
|
||||
//and the spent output script is not always available in the rescan context.
|
||||
//So an outpoint must _always_ be specified when registering a spend
|
||||
//notification for a Taproot output.
|
||||
// The outpoint for which we should request a spend notification for. If set to
|
||||
// a zero outpoint, then the spend notification will be requested for the
|
||||
// script instead. A zero or nil outpoint is not supported for Taproot spends
|
||||
// because the output script cannot reliably be computed from the witness alone
|
||||
// and the spent output script is not always available in the rescan context.
|
||||
// So an outpoint must _always_ be specified when registering a spend
|
||||
// notification for a Taproot output.
|
||||
Outpoint *Outpoint `protobuf:"bytes,1,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
|
||||
//
|
||||
//The output script for the outpoint above. This will be used by light clients
|
||||
//to match block filters. If the outpoint is set to a zero outpoint, then a
|
||||
//spend notification will be requested for this script instead.
|
||||
// The output script for the outpoint above. This will be used by light clients
|
||||
// to match block filters. If the outpoint is set to a zero outpoint, then a
|
||||
// spend notification will be requested for this script instead.
|
||||
Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"`
|
||||
//
|
||||
//The earliest height in the chain for which the outpoint/output script could
|
||||
//have been spent. This should in most cases be set to the broadcast height of
|
||||
//the outpoint/output script.
|
||||
// The earliest height in the chain for which the outpoint/output script could
|
||||
// have been spent. This should in most cases be set to the broadcast height of
|
||||
// the outpoint/output script.
|
||||
HeightHint uint32 `protobuf:"varint,3,opt,name=height_hint,json=heightHint,proto3" json:"height_hint,omitempty"`
|
||||
}
|
||||
|
||||
@ -555,6 +545,7 @@ type SpendEvent struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Event:
|
||||
//
|
||||
// *SpendEvent_Spend
|
||||
// *SpendEvent_Reorg
|
||||
Event isSpendEvent_Event `protobuf_oneof:"event"`
|
||||
@ -618,16 +609,14 @@ type isSpendEvent_Event interface {
|
||||
}
|
||||
|
||||
type SpendEvent_Spend struct {
|
||||
//
|
||||
//An event that includes the details of the spending transaction of the
|
||||
//request (outpoint/output script).
|
||||
// An event that includes the details of the spending transaction of the
|
||||
// request (outpoint/output script).
|
||||
Spend *SpendDetails `protobuf:"bytes,1,opt,name=spend,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SpendEvent_Reorg struct {
|
||||
//
|
||||
//An event sent when the spending transaction of the request was
|
||||
//reorged out of the chain.
|
||||
// An event sent when the spending transaction of the request was
|
||||
// reorged out of the chain.
|
||||
Reorg *Reorg `protobuf:"bytes,2,opt,name=reorg,proto3,oneof"`
|
||||
}
|
||||
|
||||
|
@ -18,35 +18,32 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ChainNotifierClient interface {
|
||||
// RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
// registers an intent for a client to be notified once a confirmation request
|
||||
// has reached its required number of confirmations on-chain.
|
||||
//
|
||||
//RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
//registers an intent for a client to be notified once a confirmation request
|
||||
//has reached its required number of confirmations on-chain.
|
||||
//
|
||||
//A confirmation request must have a valid output script. It is also possible
|
||||
//to give a transaction ID. If the transaction ID is not set, a notification
|
||||
//is sent once the output script confirms. If the transaction ID is also set,
|
||||
//a notification is sent once the output script confirms in the given
|
||||
//transaction.
|
||||
// A confirmation request must have a valid output script. It is also possible
|
||||
// to give a transaction ID. If the transaction ID is not set, a notification
|
||||
// is sent once the output script confirms. If the transaction ID is also set,
|
||||
// a notification is sent once the output script confirms in the given
|
||||
// transaction.
|
||||
RegisterConfirmationsNtfn(ctx context.Context, in *ConfRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterConfirmationsNtfnClient, error)
|
||||
// RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
// intent for a client to be notification once a spend request has been spent
|
||||
// by a transaction that has confirmed on-chain.
|
||||
//
|
||||
//RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
//intent for a client to be notification once a spend request has been spent
|
||||
//by a transaction that has confirmed on-chain.
|
||||
//
|
||||
//A client can specify whether the spend request should be for a particular
|
||||
//outpoint or for an output script by specifying a zero outpoint.
|
||||
// A client can specify whether the spend request should be for a particular
|
||||
// outpoint or for an output script by specifying a zero outpoint.
|
||||
RegisterSpendNtfn(ctx context.Context, in *SpendRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterSpendNtfnClient, error)
|
||||
// RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
// registers an intent for a client to be notified of blocks in the chain. The
|
||||
// stream will return a hash and height tuple of a block for each new/stale
|
||||
// block in the chain. It is the client's responsibility to determine whether
|
||||
// the tuple returned is for a new or stale block in the chain.
|
||||
//
|
||||
//RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
//registers an intent for a client to be notified of blocks in the chain. The
|
||||
//stream will return a hash and height tuple of a block for each new/stale
|
||||
//block in the chain. It is the client's responsibility to determine whether
|
||||
//the tuple returned is for a new or stale block in the chain.
|
||||
//
|
||||
//A client can also request a historical backlog of blocks from a particular
|
||||
//point. This allows clients to be idempotent by ensuring that they do not
|
||||
//missing processing a single block within the chain.
|
||||
// A client can also request a historical backlog of blocks from a particular
|
||||
// point. This allows clients to be idempotent by ensuring that they do not
|
||||
// missing processing a single block within the chain.
|
||||
RegisterBlockEpochNtfn(ctx context.Context, in *BlockEpoch, opts ...grpc.CallOption) (ChainNotifier_RegisterBlockEpochNtfnClient, error)
|
||||
}
|
||||
|
||||
@ -158,35 +155,32 @@ func (x *chainNotifierRegisterBlockEpochNtfnClient) Recv() (*BlockEpoch, error)
|
||||
// All implementations must embed UnimplementedChainNotifierServer
|
||||
// for forward compatibility
|
||||
type ChainNotifierServer interface {
|
||||
// RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
// registers an intent for a client to be notified once a confirmation request
|
||||
// has reached its required number of confirmations on-chain.
|
||||
//
|
||||
//RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
|
||||
//registers an intent for a client to be notified once a confirmation request
|
||||
//has reached its required number of confirmations on-chain.
|
||||
//
|
||||
//A confirmation request must have a valid output script. It is also possible
|
||||
//to give a transaction ID. If the transaction ID is not set, a notification
|
||||
//is sent once the output script confirms. If the transaction ID is also set,
|
||||
//a notification is sent once the output script confirms in the given
|
||||
//transaction.
|
||||
// A confirmation request must have a valid output script. It is also possible
|
||||
// to give a transaction ID. If the transaction ID is not set, a notification
|
||||
// is sent once the output script confirms. If the transaction ID is also set,
|
||||
// a notification is sent once the output script confirms in the given
|
||||
// transaction.
|
||||
RegisterConfirmationsNtfn(*ConfRequest, ChainNotifier_RegisterConfirmationsNtfnServer) error
|
||||
// RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
// intent for a client to be notification once a spend request has been spent
|
||||
// by a transaction that has confirmed on-chain.
|
||||
//
|
||||
//RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
|
||||
//intent for a client to be notification once a spend request has been spent
|
||||
//by a transaction that has confirmed on-chain.
|
||||
//
|
||||
//A client can specify whether the spend request should be for a particular
|
||||
//outpoint or for an output script by specifying a zero outpoint.
|
||||
// A client can specify whether the spend request should be for a particular
|
||||
// outpoint or for an output script by specifying a zero outpoint.
|
||||
RegisterSpendNtfn(*SpendRequest, ChainNotifier_RegisterSpendNtfnServer) error
|
||||
// RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
// registers an intent for a client to be notified of blocks in the chain. The
|
||||
// stream will return a hash and height tuple of a block for each new/stale
|
||||
// block in the chain. It is the client's responsibility to determine whether
|
||||
// the tuple returned is for a new or stale block in the chain.
|
||||
//
|
||||
//RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
|
||||
//registers an intent for a client to be notified of blocks in the chain. The
|
||||
//stream will return a hash and height tuple of a block for each new/stale
|
||||
//block in the chain. It is the client's responsibility to determine whether
|
||||
//the tuple returned is for a new or stale block in the chain.
|
||||
//
|
||||
//A client can also request a historical backlog of blocks from a particular
|
||||
//point. This allows clients to be idempotent by ensuring that they do not
|
||||
//missing processing a single block within the chain.
|
||||
// A client can also request a historical backlog of blocks from a particular
|
||||
// point. This allows clients to be idempotent by ensuring that they do not
|
||||
// missing processing a single block within the chain.
|
||||
RegisterBlockEpochNtfn(*BlockEpoch, ChainNotifier_RegisterBlockEpochNtfnServer) error
|
||||
mustEmbedUnimplementedChainNotifierServer()
|
||||
}
|
||||
|
@ -19,9 +19,8 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type DevClient interface {
|
||||
//
|
||||
//ImportGraph imports a ChannelGraph into the graph database. Should only be
|
||||
//used for development.
|
||||
// ImportGraph imports a ChannelGraph into the graph database. Should only be
|
||||
// used for development.
|
||||
ImportGraph(ctx context.Context, in *lnrpc.ChannelGraph, opts ...grpc.CallOption) (*ImportGraphResponse, error)
|
||||
}
|
||||
|
||||
@ -46,9 +45,8 @@ func (c *devClient) ImportGraph(ctx context.Context, in *lnrpc.ChannelGraph, opt
|
||||
// All implementations must embed UnimplementedDevServer
|
||||
// for forward compatibility
|
||||
type DevServer interface {
|
||||
//
|
||||
//ImportGraph imports a ChannelGraph into the graph database. Should only be
|
||||
//used for development.
|
||||
// ImportGraph imports a ChannelGraph into the graph database. Should only be
|
||||
// used for development.
|
||||
ImportGraph(context.Context, *lnrpc.ChannelGraph) (*ImportGraphResponse, error)
|
||||
mustEmbedUnimplementedDevServer()
|
||||
}
|
||||
|
@ -26,15 +26,13 @@ type LookupModifier int32
|
||||
const (
|
||||
// The default look up modifier, no look up behavior is changed.
|
||||
LookupModifier_DEFAULT LookupModifier = 0
|
||||
//
|
||||
//Indicates that when a look up is done based on a set_id, then only that set
|
||||
//of HTLCs related to that set ID should be returned.
|
||||
// Indicates that when a look up is done based on a set_id, then only that set
|
||||
// of HTLCs related to that set ID should be returned.
|
||||
LookupModifier_HTLC_SET_ONLY LookupModifier = 1
|
||||
//
|
||||
//Indicates that when a look up is done using a payment_addr, then no HTLCs
|
||||
//related to the payment_addr should be returned. This is useful when one
|
||||
//wants to be able to obtain the set of associated setIDs with a given
|
||||
//invoice, then look up the sub-invoices "projected" by that set ID.
|
||||
// Indicates that when a look up is done using a payment_addr, then no HTLCs
|
||||
// related to the payment_addr should be returned. This is useful when one
|
||||
// wants to be able to obtain the set of associated setIDs with a given
|
||||
// invoice, then look up the sub-invoices "projected" by that set ID.
|
||||
LookupModifier_HTLC_SET_BLANK LookupModifier = 2
|
||||
)
|
||||
|
||||
@ -171,28 +169,24 @@ type AddHoldInvoiceRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//An optional memo to attach along with the invoice. Used for record keeping
|
||||
//purposes for the invoice's creator, and will also be set in the description
|
||||
//field of the encoded payment request if the description_hash field is not
|
||||
//being used.
|
||||
// An optional memo to attach along with the invoice. Used for record keeping
|
||||
// purposes for the invoice's creator, and will also be set in the description
|
||||
// field of the encoded payment request if the description_hash field is not
|
||||
// being used.
|
||||
Memo string `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"`
|
||||
// The hash of the preimage
|
||||
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
// The value of this invoice in satoshis
|
||||
//
|
||||
//The value of this invoice in satoshis
|
||||
//
|
||||
//The fields value and value_msat are mutually exclusive.
|
||||
// The fields value and value_msat are mutually exclusive.
|
||||
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
// The value of this invoice in millisatoshis
|
||||
//
|
||||
//The value of this invoice in millisatoshis
|
||||
//
|
||||
//The fields value and value_msat are mutually exclusive.
|
||||
// The fields value and value_msat are mutually exclusive.
|
||||
ValueMsat int64 `protobuf:"varint,10,opt,name=value_msat,json=valueMsat,proto3" json:"value_msat,omitempty"`
|
||||
//
|
||||
//Hash (SHA-256) of a description of the payment. Used if the description of
|
||||
//payment (memo) is too long to naturally fit within the description field
|
||||
//of an encoded payment request.
|
||||
// Hash (SHA-256) of a description of the payment. Used if the description of
|
||||
// payment (memo) is too long to naturally fit within the description field
|
||||
// of an encoded payment request.
|
||||
DescriptionHash []byte `protobuf:"bytes,4,opt,name=description_hash,json=descriptionHash,proto3" json:"description_hash,omitempty"`
|
||||
// Payment request expiry time in seconds. Default is 3600 (1 hour).
|
||||
Expiry int64 `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
|
||||
@ -200,9 +194,8 @@ type AddHoldInvoiceRequest struct {
|
||||
FallbackAddr string `protobuf:"bytes,6,opt,name=fallback_addr,json=fallbackAddr,proto3" json:"fallback_addr,omitempty"`
|
||||
// Delta to use for the time-lock of the CLTV extended to the final hop.
|
||||
CltvExpiry uint64 `protobuf:"varint,7,opt,name=cltv_expiry,json=cltvExpiry,proto3" json:"cltv_expiry,omitempty"`
|
||||
//
|
||||
//Route hints that can each be individually used to assist in reaching the
|
||||
//invoice's destination.
|
||||
// Route hints that can each be individually used to assist in reaching the
|
||||
// invoice's destination.
|
||||
RouteHints []*lnrpc.RouteHint `protobuf:"bytes,8,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
|
||||
// Whether this invoice should include routing hints for private channels.
|
||||
Private bool `protobuf:"varint,9,opt,name=private,proto3" json:"private,omitempty"`
|
||||
@ -315,21 +308,18 @@ type AddHoldInvoiceResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
//details of the invoice, the sender has all the data necessary to send a
|
||||
//payment to the recipient.
|
||||
// A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
// details of the invoice, the sender has all the data necessary to send a
|
||||
// payment to the recipient.
|
||||
PaymentRequest string `protobuf:"bytes,1,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
|
||||
//
|
||||
//The "add" index of this invoice. Each newly created invoice will increment
|
||||
//this index making it monotonically increasing. Callers to the
|
||||
//SubscribeInvoices call can use this to instantly get notified of all added
|
||||
//invoices with an add_index greater than this one.
|
||||
// The "add" index of this invoice. Each newly created invoice will increment
|
||||
// this index making it monotonically increasing. Callers to the
|
||||
// SubscribeInvoices call can use this to instantly get notified of all added
|
||||
// invoices with an add_index greater than this one.
|
||||
AddIndex uint64 `protobuf:"varint,2,opt,name=add_index,json=addIndex,proto3" json:"add_index,omitempty"`
|
||||
//
|
||||
//The payment address of the generated invoice. This value should be used
|
||||
//in all payments for this invoice as we require it for end to end
|
||||
//security.
|
||||
// The payment address of the generated invoice. This value should be used
|
||||
// in all payments for this invoice as we require it for end to end
|
||||
// security.
|
||||
PaymentAddr []byte `protobuf:"bytes,3,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
|
||||
}
|
||||
|
||||
@ -528,6 +518,7 @@ type LookupInvoiceMsg struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to InvoiceRef:
|
||||
//
|
||||
// *LookupInvoiceMsg_PaymentHash
|
||||
// *LookupInvoiceMsg_PaymentAddr
|
||||
// *LookupInvoiceMsg_SetId
|
||||
|
@ -19,27 +19,22 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type InvoicesClient interface {
|
||||
//
|
||||
//SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
//to notify the client of state transitions of the specified invoice.
|
||||
//Initially the current invoice state is always sent out.
|
||||
// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
// to notify the client of state transitions of the specified invoice.
|
||||
// Initially the current invoice state is always sent out.
|
||||
SubscribeSingleInvoice(ctx context.Context, in *SubscribeSingleInvoiceRequest, opts ...grpc.CallOption) (Invoices_SubscribeSingleInvoiceClient, error)
|
||||
//
|
||||
//CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
//canceled, this call will succeed. If the invoice is already settled, it will
|
||||
//fail.
|
||||
// CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
// canceled, this call will succeed. If the invoice is already settled, it will
|
||||
// fail.
|
||||
CancelInvoice(ctx context.Context, in *CancelInvoiceMsg, opts ...grpc.CallOption) (*CancelInvoiceResp, error)
|
||||
//
|
||||
//AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
//supplied in the request.
|
||||
// AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
// supplied in the request.
|
||||
AddHoldInvoice(ctx context.Context, in *AddHoldInvoiceRequest, opts ...grpc.CallOption) (*AddHoldInvoiceResp, error)
|
||||
//
|
||||
//SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
//settled, this call will succeed.
|
||||
// SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
// settled, this call will succeed.
|
||||
SettleInvoice(ctx context.Context, in *SettleInvoiceMsg, opts ...grpc.CallOption) (*SettleInvoiceResp, error)
|
||||
//
|
||||
//LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
//using either its payment hash, payment address, or set ID.
|
||||
// LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
// using either its payment hash, payment address, or set ID.
|
||||
LookupInvoiceV2(ctx context.Context, in *LookupInvoiceMsg, opts ...grpc.CallOption) (*lnrpc.Invoice, error)
|
||||
}
|
||||
|
||||
@ -123,27 +118,22 @@ func (c *invoicesClient) LookupInvoiceV2(ctx context.Context, in *LookupInvoiceM
|
||||
// All implementations must embed UnimplementedInvoicesServer
|
||||
// for forward compatibility
|
||||
type InvoicesServer interface {
|
||||
//
|
||||
//SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
//to notify the client of state transitions of the specified invoice.
|
||||
//Initially the current invoice state is always sent out.
|
||||
// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
||||
// to notify the client of state transitions of the specified invoice.
|
||||
// Initially the current invoice state is always sent out.
|
||||
SubscribeSingleInvoice(*SubscribeSingleInvoiceRequest, Invoices_SubscribeSingleInvoiceServer) error
|
||||
//
|
||||
//CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
//canceled, this call will succeed. If the invoice is already settled, it will
|
||||
//fail.
|
||||
// CancelInvoice cancels a currently open invoice. If the invoice is already
|
||||
// canceled, this call will succeed. If the invoice is already settled, it will
|
||||
// fail.
|
||||
CancelInvoice(context.Context, *CancelInvoiceMsg) (*CancelInvoiceResp, error)
|
||||
//
|
||||
//AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
//supplied in the request.
|
||||
// AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
|
||||
// supplied in the request.
|
||||
AddHoldInvoice(context.Context, *AddHoldInvoiceRequest) (*AddHoldInvoiceResp, error)
|
||||
//
|
||||
//SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
//settled, this call will succeed.
|
||||
// SettleInvoice settles an accepted invoice. If the invoice is already
|
||||
// settled, this call will succeed.
|
||||
SettleInvoice(context.Context, *SettleInvoiceMsg) (*SettleInvoiceResp, error)
|
||||
//
|
||||
//LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
//using either its payment hash, payment address, or set ID.
|
||||
// LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
// using either its payment hash, payment address, or set ID.
|
||||
LookupInvoiceV2(context.Context, *LookupInvoiceMsg) (*lnrpc.Invoice, error)
|
||||
mustEmbedUnimplementedInvoicesServer()
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -18,33 +18,25 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type NeutrinoKitClient interface {
|
||||
//
|
||||
//Status returns the status of the light client neutrino instance,
|
||||
//along with height and hash of the best block, and a list of connected
|
||||
//peers.
|
||||
// Status returns the status of the light client neutrino instance,
|
||||
// along with height and hash of the best block, and a list of connected
|
||||
// peers.
|
||||
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
||||
//
|
||||
//AddPeer adds a new peer that has already been connected to the server.
|
||||
// AddPeer adds a new peer that has already been connected to the server.
|
||||
AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerResponse, error)
|
||||
//
|
||||
//DisconnectPeer disconnects a peer by target address. Both outbound and
|
||||
//inbound nodes will be searched for the target node. An error message will
|
||||
//be returned if the peer was not found.
|
||||
// DisconnectPeer disconnects a peer by target address. Both outbound and
|
||||
// inbound nodes will be searched for the target node. An error message will
|
||||
// be returned if the peer was not found.
|
||||
DisconnectPeer(ctx context.Context, in *DisconnectPeerRequest, opts ...grpc.CallOption) (*DisconnectPeerResponse, error)
|
||||
//
|
||||
//IsBanned returns true if the peer is banned, otherwise false.
|
||||
// IsBanned returns true if the peer is banned, otherwise false.
|
||||
IsBanned(ctx context.Context, in *IsBannedRequest, opts ...grpc.CallOption) (*IsBannedResponse, error)
|
||||
//
|
||||
//GetBlockHeader returns a block header with a particular block hash.
|
||||
// GetBlockHeader returns a block header with a particular block hash.
|
||||
GetBlockHeader(ctx context.Context, in *GetBlockHeaderRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error)
|
||||
//
|
||||
//GetBlock returns a block with a particular block hash.
|
||||
// GetBlock returns a block with a particular block hash.
|
||||
GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)
|
||||
//
|
||||
//GetCFilter returns a compact filter from a block.
|
||||
// GetCFilter returns a compact filter from a block.
|
||||
GetCFilter(ctx context.Context, in *GetCFilterRequest, opts ...grpc.CallOption) (*GetCFilterResponse, error)
|
||||
//
|
||||
//GetBlockHash returns the header hash of a block at a given height.
|
||||
// GetBlockHash returns the header hash of a block at a given height.
|
||||
GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error)
|
||||
}
|
||||
|
||||
@ -132,33 +124,25 @@ func (c *neutrinoKitClient) GetBlockHash(ctx context.Context, in *GetBlockHashRe
|
||||
// All implementations must embed UnimplementedNeutrinoKitServer
|
||||
// for forward compatibility
|
||||
type NeutrinoKitServer interface {
|
||||
//
|
||||
//Status returns the status of the light client neutrino instance,
|
||||
//along with height and hash of the best block, and a list of connected
|
||||
//peers.
|
||||
// Status returns the status of the light client neutrino instance,
|
||||
// along with height and hash of the best block, and a list of connected
|
||||
// peers.
|
||||
Status(context.Context, *StatusRequest) (*StatusResponse, error)
|
||||
//
|
||||
//AddPeer adds a new peer that has already been connected to the server.
|
||||
// AddPeer adds a new peer that has already been connected to the server.
|
||||
AddPeer(context.Context, *AddPeerRequest) (*AddPeerResponse, error)
|
||||
//
|
||||
//DisconnectPeer disconnects a peer by target address. Both outbound and
|
||||
//inbound nodes will be searched for the target node. An error message will
|
||||
//be returned if the peer was not found.
|
||||
// DisconnectPeer disconnects a peer by target address. Both outbound and
|
||||
// inbound nodes will be searched for the target node. An error message will
|
||||
// be returned if the peer was not found.
|
||||
DisconnectPeer(context.Context, *DisconnectPeerRequest) (*DisconnectPeerResponse, error)
|
||||
//
|
||||
//IsBanned returns true if the peer is banned, otherwise false.
|
||||
// IsBanned returns true if the peer is banned, otherwise false.
|
||||
IsBanned(context.Context, *IsBannedRequest) (*IsBannedResponse, error)
|
||||
//
|
||||
//GetBlockHeader returns a block header with a particular block hash.
|
||||
// GetBlockHeader returns a block header with a particular block hash.
|
||||
GetBlockHeader(context.Context, *GetBlockHeaderRequest) (*GetBlockHeaderResponse, error)
|
||||
//
|
||||
//GetBlock returns a block with a particular block hash.
|
||||
// GetBlock returns a block with a particular block hash.
|
||||
GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error)
|
||||
//
|
||||
//GetCFilter returns a compact filter from a block.
|
||||
// GetCFilter returns a compact filter from a block.
|
||||
GetCFilter(context.Context, *GetCFilterRequest) (*GetCFilterResponse, error)
|
||||
//
|
||||
//GetBlockHash returns the header hash of a block at a given height.
|
||||
// GetBlockHash returns the header hash of a block at a given height.
|
||||
GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error)
|
||||
mustEmbedUnimplementedNeutrinoKitServer()
|
||||
}
|
||||
|
@ -73,26 +73,21 @@ func (UpdateAction) EnumDescriptor() ([]byte, []int) {
|
||||
type FeatureSet int32
|
||||
|
||||
const (
|
||||
//
|
||||
//SET_INIT identifies features that should be sent in an Init message to
|
||||
//a remote peer.
|
||||
// SET_INIT identifies features that should be sent in an Init message to
|
||||
// a remote peer.
|
||||
FeatureSet_SET_INIT FeatureSet = 0
|
||||
//
|
||||
//SET_LEGACY_GLOBAL identifies features that should be set in the legacy
|
||||
//GlobalFeatures field of an Init message, which maintains backwards
|
||||
//compatibility with nodes that haven't implemented flat features.
|
||||
// SET_LEGACY_GLOBAL identifies features that should be set in the legacy
|
||||
// GlobalFeatures field of an Init message, which maintains backwards
|
||||
// compatibility with nodes that haven't implemented flat features.
|
||||
FeatureSet_SET_LEGACY_GLOBAL FeatureSet = 1
|
||||
//
|
||||
//SET_NODE_ANN identifies features that should be advertised on node
|
||||
//announcements.
|
||||
// SET_NODE_ANN identifies features that should be advertised on node
|
||||
// announcements.
|
||||
FeatureSet_SET_NODE_ANN FeatureSet = 2
|
||||
//
|
||||
//SET_INVOICE identifies features that should be advertised on invoices
|
||||
//generated by the daemon.
|
||||
// SET_INVOICE identifies features that should be advertised on invoices
|
||||
// generated by the daemon.
|
||||
FeatureSet_SET_INVOICE FeatureSet = 3
|
||||
//
|
||||
//SET_INVOICE_AMP identifies the features that should be advertised on
|
||||
//AMP invoices generated by the daemon.
|
||||
// SET_INVOICE_AMP identifies the features that should be advertised on
|
||||
// AMP invoices generated by the daemon.
|
||||
FeatureSet_SET_INVOICE_AMP FeatureSet = 4
|
||||
)
|
||||
|
||||
|
@ -19,8 +19,8 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PeersClient interface {
|
||||
// lncli: peers updatenodeannouncement
|
||||
//UpdateNodeAnnouncement allows the caller to update the node parameters
|
||||
//and broadcasts a new version of the node announcement to its peers.
|
||||
// UpdateNodeAnnouncement allows the caller to update the node parameters
|
||||
// and broadcasts a new version of the node announcement to its peers.
|
||||
UpdateNodeAnnouncement(ctx context.Context, in *NodeAnnouncementUpdateRequest, opts ...grpc.CallOption) (*NodeAnnouncementUpdateResponse, error)
|
||||
}
|
||||
|
||||
@ -46,8 +46,8 @@ func (c *peersClient) UpdateNodeAnnouncement(ctx context.Context, in *NodeAnnoun
|
||||
// for forward compatibility
|
||||
type PeersServer interface {
|
||||
// lncli: peers updatenodeannouncement
|
||||
//UpdateNodeAnnouncement allows the caller to update the node parameters
|
||||
//and broadcasts a new version of the node announcement to its peers.
|
||||
// UpdateNodeAnnouncement allows the caller to update the node parameters
|
||||
// and broadcasts a new version of the node announcement to its peers.
|
||||
UpdateNodeAnnouncement(context.Context, *NodeAnnouncementUpdateRequest) (*NodeAnnouncementUpdateResponse, error)
|
||||
mustEmbedUnimplementedPeersServer()
|
||||
}
|
||||
|
@ -133,28 +133,21 @@ func (FailureDetail) EnumDescriptor() ([]byte, []int) {
|
||||
type PaymentState int32
|
||||
|
||||
const (
|
||||
//
|
||||
//Payment is still in flight.
|
||||
// Payment is still in flight.
|
||||
PaymentState_IN_FLIGHT PaymentState = 0
|
||||
//
|
||||
//Payment completed successfully.
|
||||
// Payment completed successfully.
|
||||
PaymentState_SUCCEEDED PaymentState = 1
|
||||
//
|
||||
//There are more routes to try, but the payment timeout was exceeded.
|
||||
// There are more routes to try, but the payment timeout was exceeded.
|
||||
PaymentState_FAILED_TIMEOUT PaymentState = 2
|
||||
//
|
||||
//All possible routes were tried and failed permanently. Or were no
|
||||
//routes to the destination at all.
|
||||
// All possible routes were tried and failed permanently. Or were no
|
||||
// routes to the destination at all.
|
||||
PaymentState_FAILED_NO_ROUTE PaymentState = 3
|
||||
//
|
||||
//A non-recoverable error has occurred.
|
||||
// A non-recoverable error has occurred.
|
||||
PaymentState_FAILED_ERROR PaymentState = 4
|
||||
//
|
||||
//Payment details incorrect (unknown hash, invalid amt or
|
||||
//invalid final cltv delta)
|
||||
// Payment details incorrect (unknown hash, invalid amt or
|
||||
// invalid final cltv delta)
|
||||
PaymentState_FAILED_INCORRECT_PAYMENT_DETAILS PaymentState = 5
|
||||
//
|
||||
//Insufficient local balance.
|
||||
// Insufficient local balance.
|
||||
PaymentState_FAILED_INSUFFICIENT_BALANCE PaymentState = 6
|
||||
)
|
||||
|
||||
@ -364,112 +357,93 @@ type SendPaymentRequest struct {
|
||||
|
||||
// The identity pubkey of the payment recipient
|
||||
Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
|
||||
// Number of satoshis to send.
|
||||
//
|
||||
//Number of satoshis to send.
|
||||
//
|
||||
//The fields amt and amt_msat are mutually exclusive.
|
||||
// The fields amt and amt_msat are mutually exclusive.
|
||||
Amt int64 `protobuf:"varint,2,opt,name=amt,proto3" json:"amt,omitempty"`
|
||||
// Number of millisatoshis to send.
|
||||
//
|
||||
//Number of millisatoshis to send.
|
||||
//
|
||||
//The fields amt and amt_msat are mutually exclusive.
|
||||
// The fields amt and amt_msat are mutually exclusive.
|
||||
AmtMsat int64 `protobuf:"varint,12,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
|
||||
// The hash to use within the payment's HTLC
|
||||
PaymentHash []byte `protobuf:"bytes,3,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||
//
|
||||
//The CLTV delta from the current height that should be used to set the
|
||||
//timelock for the final hop.
|
||||
// The CLTV delta from the current height that should be used to set the
|
||||
// timelock for the final hop.
|
||||
FinalCltvDelta int32 `protobuf:"varint,4,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"`
|
||||
// An optional payment addr to be included within the last hop of the route.
|
||||
PaymentAddr []byte `protobuf:"bytes,20,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
|
||||
//
|
||||
//A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
//details of the invoice, the sender has all the data necessary to send a
|
||||
//payment to the recipient. The amount in the payment request may be zero. In
|
||||
//that case it is required to set the amt field as well. If no payment request
|
||||
//is specified, the following fields are required: dest, amt and payment_hash.
|
||||
// A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
// details of the invoice, the sender has all the data necessary to send a
|
||||
// payment to the recipient. The amount in the payment request may be zero. In
|
||||
// that case it is required to set the amt field as well. If no payment request
|
||||
// is specified, the following fields are required: dest, amt and payment_hash.
|
||||
PaymentRequest string `protobuf:"bytes,5,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
|
||||
//
|
||||
//An upper limit on the amount of time we should spend when attempting to
|
||||
//fulfill the payment. This is expressed in seconds. If we cannot make a
|
||||
//successful payment within this time frame, an error will be returned.
|
||||
//This field must be non-zero.
|
||||
// An upper limit on the amount of time we should spend when attempting to
|
||||
// fulfill the payment. This is expressed in seconds. If we cannot make a
|
||||
// successful payment within this time frame, an error will be returned.
|
||||
// This field must be non-zero.
|
||||
TimeoutSeconds int32 `protobuf:"varint,6,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
|
||||
// The maximum number of satoshis that will be paid as a fee of the payment.
|
||||
// If this field is left to the default value of 0, only zero-fee routes will
|
||||
// be considered. This usually means single hop routes connecting directly to
|
||||
// the destination. To send the payment without a fee limit, use max int here.
|
||||
//
|
||||
//The maximum number of satoshis that will be paid as a fee of the payment.
|
||||
//If this field is left to the default value of 0, only zero-fee routes will
|
||||
//be considered. This usually means single hop routes connecting directly to
|
||||
//the destination. To send the payment without a fee limit, use max int here.
|
||||
//
|
||||
//The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||
// The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||
FeeLimitSat int64 `protobuf:"varint,7,opt,name=fee_limit_sat,json=feeLimitSat,proto3" json:"fee_limit_sat,omitempty"`
|
||||
// The maximum number of millisatoshis that will be paid as a fee of the
|
||||
// payment. If this field is left to the default value of 0, only zero-fee
|
||||
// routes will be considered. This usually means single hop routes connecting
|
||||
// directly to the destination. To send the payment without a fee limit, use
|
||||
// max int here.
|
||||
//
|
||||
//The maximum number of millisatoshis that will be paid as a fee of the
|
||||
//payment. If this field is left to the default value of 0, only zero-fee
|
||||
//routes will be considered. This usually means single hop routes connecting
|
||||
//directly to the destination. To send the payment without a fee limit, use
|
||||
//max int here.
|
||||
//
|
||||
//The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||
// The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||
FeeLimitMsat int64 `protobuf:"varint,13,opt,name=fee_limit_msat,json=feeLimitMsat,proto3" json:"fee_limit_msat,omitempty"`
|
||||
//
|
||||
//Deprecated, use outgoing_chan_ids. The channel id of the channel that must
|
||||
//be taken to the first hop. If zero, any channel may be used (unless
|
||||
//outgoing_chan_ids are set).
|
||||
// Deprecated, use outgoing_chan_ids. The channel id of the channel that must
|
||||
// be taken to the first hop. If zero, any channel may be used (unless
|
||||
// outgoing_chan_ids are set).
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
|
||||
//
|
||||
//The channel ids of the channels are allowed for the first hop. If empty,
|
||||
//any channel may be used.
|
||||
// The channel ids of the channels are allowed for the first hop. If empty,
|
||||
// any channel may be used.
|
||||
OutgoingChanIds []uint64 `protobuf:"varint,19,rep,packed,name=outgoing_chan_ids,json=outgoingChanIds,proto3" json:"outgoing_chan_ids,omitempty"`
|
||||
//
|
||||
//The pubkey of the last hop of the route. If empty, any hop may be used.
|
||||
// The pubkey of the last hop of the route. If empty, any hop may be used.
|
||||
LastHopPubkey []byte `protobuf:"bytes,14,opt,name=last_hop_pubkey,json=lastHopPubkey,proto3" json:"last_hop_pubkey,omitempty"`
|
||||
//
|
||||
//An optional maximum total time lock for the route. This should not exceed
|
||||
//lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
||||
//`--max-cltv-expiry` is enforced.
|
||||
// An optional maximum total time lock for the route. This should not exceed
|
||||
// lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
||||
// `--max-cltv-expiry` is enforced.
|
||||
CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
|
||||
//
|
||||
//Optional route hints to reach the destination through private channels.
|
||||
// Optional route hints to reach the destination through private channels.
|
||||
RouteHints []*lnrpc.RouteHint `protobuf:"bytes,10,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"`
|
||||
//
|
||||
//An optional field that can be used to pass an arbitrary set of TLV records
|
||||
//to a peer which understands the new records. This can be used to pass
|
||||
//application specific data during the payment attempt. Record types are
|
||||
//required to be in the custom range >= 65536. When using REST, the values
|
||||
//must be encoded as base64.
|
||||
// An optional field that can be used to pass an arbitrary set of TLV records
|
||||
// to a peer which understands the new records. This can be used to pass
|
||||
// application specific data during the payment attempt. Record types are
|
||||
// required to be in the custom range >= 65536. When using REST, the values
|
||||
// must be encoded as base64.
|
||||
DestCustomRecords map[uint64][]byte `protobuf:"bytes,11,rep,name=dest_custom_records,json=destCustomRecords,proto3" json:"dest_custom_records,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// If set, circular payments to self are permitted.
|
||||
AllowSelfPayment bool `protobuf:"varint,15,opt,name=allow_self_payment,json=allowSelfPayment,proto3" json:"allow_self_payment,omitempty"`
|
||||
//
|
||||
//Features assumed to be supported by the final node. All transitive feature
|
||||
//dependencies must also be set properly. For a given feature bit pair, either
|
||||
//optional or remote may be set, but not both. If this field is nil or empty,
|
||||
//the router will try to load destination features from the graph as a
|
||||
//fallback.
|
||||
// Features assumed to be supported by the final node. All transitive feature
|
||||
// dependencies must also be set properly. For a given feature bit pair, either
|
||||
// optional or remote may be set, but not both. If this field is nil or empty,
|
||||
// the router will try to load destination features from the graph as a
|
||||
// fallback.
|
||||
DestFeatures []lnrpc.FeatureBit `protobuf:"varint,16,rep,packed,name=dest_features,json=destFeatures,proto3,enum=lnrpc.FeatureBit" json:"dest_features,omitempty"`
|
||||
//
|
||||
//The maximum number of partial payments that may be use to complete the full
|
||||
//amount.
|
||||
// The maximum number of partial payments that may be use to complete the full
|
||||
// amount.
|
||||
MaxParts uint32 `protobuf:"varint,17,opt,name=max_parts,json=maxParts,proto3" json:"max_parts,omitempty"`
|
||||
//
|
||||
//If set, only the final payment update is streamed back. Intermediate updates
|
||||
//that show which htlcs are still in flight are suppressed.
|
||||
// If set, only the final payment update is streamed back. Intermediate updates
|
||||
// that show which htlcs are still in flight are suppressed.
|
||||
NoInflightUpdates bool `protobuf:"varint,18,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"`
|
||||
//
|
||||
//The largest payment split that should be attempted when making a payment if
|
||||
//splitting is necessary. Setting this value will effectively cause lnd to
|
||||
//split more aggressively, vs only when it thinks it needs to. Note that this
|
||||
//value is in milli-satoshis.
|
||||
// The largest payment split that should be attempted when making a payment if
|
||||
// splitting is necessary. Setting this value will effectively cause lnd to
|
||||
// split more aggressively, vs only when it thinks it needs to. Note that this
|
||||
// value is in milli-satoshis.
|
||||
MaxShardSizeMsat uint64 `protobuf:"varint,21,opt,name=max_shard_size_msat,json=maxShardSizeMsat,proto3" json:"max_shard_size_msat,omitempty"`
|
||||
//
|
||||
//If set, an AMP-payment will be attempted.
|
||||
// If set, an AMP-payment will be attempted.
|
||||
Amp bool `protobuf:"varint,22,opt,name=amp,proto3" json:"amp,omitempty"`
|
||||
//
|
||||
//The time preference for this payment. Set to -1 to optimize for fees
|
||||
//only, to 1 to optimize for reliability only or a value inbetween for a mix.
|
||||
// The time preference for this payment. Set to -1 to optimize for fees
|
||||
// only, to 1 to optimize for reliability only or a value inbetween for a mix.
|
||||
TimePref float64 `protobuf:"fixed64,23,opt,name=time_pref,json=timePref,proto3" json:"time_pref,omitempty"`
|
||||
}
|
||||
|
||||
@ -674,9 +648,8 @@ type TrackPaymentRequest struct {
|
||||
|
||||
// The hash of the payment to look up.
|
||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||
//
|
||||
//If set, only the final payment update is streamed back. Intermediate updates
|
||||
//that show which htlcs are still in flight are suppressed.
|
||||
// If set, only the final payment update is streamed back. Intermediate updates
|
||||
// that show which htlcs are still in flight are suppressed.
|
||||
NoInflightUpdates bool `protobuf:"varint,2,opt,name=no_inflight_updates,json=noInflightUpdates,proto3" json:"no_inflight_updates,omitempty"`
|
||||
}
|
||||
|
||||
@ -731,11 +704,9 @@ type RouteFeeRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The destination once wishes to obtain a routing fee quote to.
|
||||
// The destination once wishes to obtain a routing fee quote to.
|
||||
Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
|
||||
//
|
||||
//The amount one wishes to send to the target destination.
|
||||
// The amount one wishes to send to the target destination.
|
||||
AmtSat int64 `protobuf:"varint,2,opt,name=amt_sat,json=amtSat,proto3" json:"amt_sat,omitempty"`
|
||||
}
|
||||
|
||||
@ -790,14 +761,12 @@ type RouteFeeResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//A lower bound of the estimated fee to the target destination within the
|
||||
//network, expressed in milli-satoshis.
|
||||
// A lower bound of the estimated fee to the target destination within the
|
||||
// network, expressed in milli-satoshis.
|
||||
RoutingFeeMsat int64 `protobuf:"varint,1,opt,name=routing_fee_msat,json=routingFeeMsat,proto3" json:"routing_fee_msat,omitempty"`
|
||||
//
|
||||
//An estimate of the worst case time delay that can occur. Note that callers
|
||||
//will still need to factor in the final CLTV delta of the last hop into this
|
||||
//value.
|
||||
// An estimate of the worst case time delay that can occur. Note that callers
|
||||
// will still need to factor in the final CLTV delta of the last hop into this
|
||||
// value.
|
||||
TimeLockDelay int64 `protobuf:"varint,2,opt,name=time_lock_delay,json=timeLockDelay,proto3" json:"time_lock_delay,omitempty"`
|
||||
}
|
||||
|
||||
@ -856,11 +825,10 @@ type SendToRouteRequest struct {
|
||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||
// Route that should be used to attempt to complete the payment.
|
||||
Route *lnrpc.Route `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
|
||||
//
|
||||
//Whether the payment should be marked as failed when a temporary error is
|
||||
//returned from the given route. Set it to true so the payment won't be
|
||||
//failed unless a terminal error is occurred, such as payment timeout, no
|
||||
//routes, incorrect payment details, or insufficient funds.
|
||||
// Whether the payment should be marked as failed when a temporary error is
|
||||
// returned from the given route. Set it to true so the payment won't be
|
||||
// failed unless a terminal error is occurred, such as payment timeout, no
|
||||
// routes, incorrect payment details, or insufficient funds.
|
||||
SkipTempErr bool `protobuf:"varint,3,opt,name=skip_temp_err,json=skipTempErr,proto3" json:"skip_temp_err,omitempty"`
|
||||
}
|
||||
|
||||
@ -1307,13 +1275,11 @@ type PairData struct {
|
||||
|
||||
// Time of last failure.
|
||||
FailTime int64 `protobuf:"varint,1,opt,name=fail_time,json=failTime,proto3" json:"fail_time,omitempty"`
|
||||
//
|
||||
//Lowest amount that failed to forward rounded to whole sats. This may be
|
||||
//set to zero if the failure is independent of amount.
|
||||
// Lowest amount that failed to forward rounded to whole sats. This may be
|
||||
// set to zero if the failure is independent of amount.
|
||||
FailAmtSat int64 `protobuf:"varint,2,opt,name=fail_amt_sat,json=failAmtSat,proto3" json:"fail_amt_sat,omitempty"`
|
||||
//
|
||||
//Lowest amount that failed to forward in millisats. This may be
|
||||
//set to zero if the failure is independent of amount.
|
||||
// Lowest amount that failed to forward in millisats. This may be
|
||||
// set to zero if the failure is independent of amount.
|
||||
FailAmtMsat int64 `protobuf:"varint,4,opt,name=fail_amt_msat,json=failAmtMsat,proto3" json:"fail_amt_msat,omitempty"`
|
||||
// Time of last success.
|
||||
SuccessTime int64 `protobuf:"varint,5,opt,name=success_time,json=successTime,proto3" json:"success_time,omitempty"`
|
||||
@ -1440,8 +1406,7 @@ type GetMissionControlConfigResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Mission control's currently active config.
|
||||
// Mission control's currently active config.
|
||||
Config *MissionControlConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
|
||||
}
|
||||
|
||||
@ -1489,9 +1454,8 @@ type SetMissionControlConfigRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The config to set for mission control. Note that all values *must* be set,
|
||||
//because the full config will be applied.
|
||||
// The config to set for mission control. Note that all values *must* be set,
|
||||
// because the full config will be applied.
|
||||
Config *MissionControlConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
|
||||
}
|
||||
|
||||
@ -1577,33 +1541,28 @@ type MissionControlConfig struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The amount of time mission control will take to restore a penalized node
|
||||
//or channel back to 50% success probability, expressed in seconds. Setting
|
||||
//this value to a higher value will penalize failures for longer, making
|
||||
//mission control less likely to route through nodes and channels that we
|
||||
//have previously recorded failures for.
|
||||
// The amount of time mission control will take to restore a penalized node
|
||||
// or channel back to 50% success probability, expressed in seconds. Setting
|
||||
// this value to a higher value will penalize failures for longer, making
|
||||
// mission control less likely to route through nodes and channels that we
|
||||
// have previously recorded failures for.
|
||||
HalfLifeSeconds uint64 `protobuf:"varint,1,opt,name=half_life_seconds,json=halfLifeSeconds,proto3" json:"half_life_seconds,omitempty"`
|
||||
//
|
||||
//The probability of success mission control should assign to hop in a route
|
||||
//where it has no other information available. Higher values will make mission
|
||||
//control more willing to try hops that we have no information about, lower
|
||||
//values will discourage trying these hops.
|
||||
// The probability of success mission control should assign to hop in a route
|
||||
// where it has no other information available. Higher values will make mission
|
||||
// control more willing to try hops that we have no information about, lower
|
||||
// values will discourage trying these hops.
|
||||
HopProbability float32 `protobuf:"fixed32,2,opt,name=hop_probability,json=hopProbability,proto3" json:"hop_probability,omitempty"`
|
||||
//
|
||||
//The importance that mission control should place on historical results,
|
||||
//expressed as a value in [0;1]. Setting this value to 1 will ignore all
|
||||
//historical payments and just use the hop probability to assess the
|
||||
//probability of success for each hop. A zero value ignores hop probability
|
||||
//completely and relies entirely on historical results, unless none are
|
||||
//available.
|
||||
// The importance that mission control should place on historical results,
|
||||
// expressed as a value in [0;1]. Setting this value to 1 will ignore all
|
||||
// historical payments and just use the hop probability to assess the
|
||||
// probability of success for each hop. A zero value ignores hop probability
|
||||
// completely and relies entirely on historical results, unless none are
|
||||
// available.
|
||||
Weight float32 `protobuf:"fixed32,3,opt,name=weight,proto3" json:"weight,omitempty"`
|
||||
//
|
||||
//The maximum number of payment results that mission control will store.
|
||||
// The maximum number of payment results that mission control will store.
|
||||
MaximumPaymentResults uint32 `protobuf:"varint,4,opt,name=maximum_payment_results,json=maximumPaymentResults,proto3" json:"maximum_payment_results,omitempty"`
|
||||
//
|
||||
//The minimum time that must have passed since the previously recorded failure
|
||||
//before we raise the failure amount.
|
||||
// The minimum time that must have passed since the previously recorded failure
|
||||
// before we raise the failure amount.
|
||||
MinimumFailureRelaxInterval uint64 `protobuf:"varint,5,opt,name=minimum_failure_relax_interval,json=minimumFailureRelaxInterval,proto3" json:"minimum_failure_relax_interval,omitempty"`
|
||||
}
|
||||
|
||||
@ -1802,21 +1761,17 @@ type BuildRouteRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The amount to send expressed in msat. If set to zero, the minimum routable
|
||||
//amount is used.
|
||||
// The amount to send expressed in msat. If set to zero, the minimum routable
|
||||
// amount is used.
|
||||
AmtMsat int64 `protobuf:"varint,1,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
|
||||
//
|
||||
//CLTV delta from the current height that should be used for the timelock
|
||||
//of the final hop
|
||||
// CLTV delta from the current height that should be used for the timelock
|
||||
// of the final hop
|
||||
FinalCltvDelta int32 `protobuf:"varint,2,opt,name=final_cltv_delta,json=finalCltvDelta,proto3" json:"final_cltv_delta,omitempty"`
|
||||
//
|
||||
//The channel id of the channel that must be taken to the first hop. If zero,
|
||||
//any channel may be used.
|
||||
// The channel id of the channel that must be taken to the first hop. If zero,
|
||||
// any channel may be used.
|
||||
OutgoingChanId uint64 `protobuf:"varint,3,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
|
||||
//
|
||||
//A list of hops that defines the route. This does not include the source hop
|
||||
//pubkey.
|
||||
// A list of hops that defines the route. This does not include the source hop
|
||||
// pubkey.
|
||||
HopPubkeys [][]byte `protobuf:"bytes,4,rep,name=hop_pubkeys,json=hopPubkeys,proto3" json:"hop_pubkeys,omitempty"`
|
||||
// An optional payment addr to be included within the last hop of the route.
|
||||
PaymentAddr []byte `protobuf:"bytes,5,opt,name=payment_addr,json=paymentAddr,proto3" json:"payment_addr,omitempty"`
|
||||
@ -1894,8 +1849,7 @@ type BuildRouteResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Fully specified route that can be used to execute the payment.
|
||||
// Fully specified route that can be used to execute the payment.
|
||||
Route *lnrpc.Route `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
|
||||
}
|
||||
|
||||
@ -1976,42 +1930,36 @@ func (*SubscribeHtlcEventsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_routerrpc_router_proto_rawDescGZIP(), []int{23}
|
||||
}
|
||||
|
||||
//
|
||||
//HtlcEvent contains the htlc event that was processed. These are served on a
|
||||
//best-effort basis; events are not persisted, delivery is not guaranteed
|
||||
//(in the event of a crash in the switch, forward events may be lost) and
|
||||
//some events may be replayed upon restart. Events consumed from this package
|
||||
//should be de-duplicated by the htlc's unique combination of incoming and
|
||||
//outgoing channel id and htlc id. [EXPERIMENTAL]
|
||||
// HtlcEvent contains the htlc event that was processed. These are served on a
|
||||
// best-effort basis; events are not persisted, delivery is not guaranteed
|
||||
// (in the event of a crash in the switch, forward events may be lost) and
|
||||
// some events may be replayed upon restart. Events consumed from this package
|
||||
// should be de-duplicated by the htlc's unique combination of incoming and
|
||||
// outgoing channel id and htlc id. [EXPERIMENTAL]
|
||||
type HtlcEvent struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The short channel id that the incoming htlc arrived at our node on. This
|
||||
//value is zero for sends.
|
||||
// The short channel id that the incoming htlc arrived at our node on. This
|
||||
// value is zero for sends.
|
||||
IncomingChannelId uint64 `protobuf:"varint,1,opt,name=incoming_channel_id,json=incomingChannelId,proto3" json:"incoming_channel_id,omitempty"`
|
||||
//
|
||||
//The short channel id that the outgoing htlc left our node on. This value
|
||||
//is zero for receives.
|
||||
// The short channel id that the outgoing htlc left our node on. This value
|
||||
// is zero for receives.
|
||||
OutgoingChannelId uint64 `protobuf:"varint,2,opt,name=outgoing_channel_id,json=outgoingChannelId,proto3" json:"outgoing_channel_id,omitempty"`
|
||||
//
|
||||
//Incoming id is the index of the incoming htlc in the incoming channel.
|
||||
//This value is zero for sends.
|
||||
// Incoming id is the index of the incoming htlc in the incoming channel.
|
||||
// This value is zero for sends.
|
||||
IncomingHtlcId uint64 `protobuf:"varint,3,opt,name=incoming_htlc_id,json=incomingHtlcId,proto3" json:"incoming_htlc_id,omitempty"`
|
||||
//
|
||||
//Outgoing id is the index of the outgoing htlc in the outgoing channel.
|
||||
//This value is zero for receives.
|
||||
// Outgoing id is the index of the outgoing htlc in the outgoing channel.
|
||||
// This value is zero for receives.
|
||||
OutgoingHtlcId uint64 `protobuf:"varint,4,opt,name=outgoing_htlc_id,json=outgoingHtlcId,proto3" json:"outgoing_htlc_id,omitempty"`
|
||||
//
|
||||
//The time in unix nanoseconds that the event occurred.
|
||||
// The time in unix nanoseconds that the event occurred.
|
||||
TimestampNs uint64 `protobuf:"varint,5,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"`
|
||||
//
|
||||
//The event type indicates whether the htlc was part of a send, receive or
|
||||
//forward.
|
||||
// The event type indicates whether the htlc was part of a send, receive or
|
||||
// forward.
|
||||
EventType HtlcEvent_EventType `protobuf:"varint,6,opt,name=event_type,json=eventType,proto3,enum=routerrpc.HtlcEvent_EventType" json:"event_type,omitempty"`
|
||||
// Types that are assignable to Event:
|
||||
//
|
||||
// *HtlcEvent_ForwardEvent
|
||||
// *HtlcEvent_ForwardFailEvent
|
||||
// *HtlcEvent_SettleEvent
|
||||
@ -2374,10 +2322,9 @@ type LinkFailEvent struct {
|
||||
Info *HtlcInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
||||
// FailureCode is the BOLT error code for the failure.
|
||||
WireFailure lnrpc.Failure_FailureCode `protobuf:"varint,2,opt,name=wire_failure,json=wireFailure,proto3,enum=lnrpc.Failure_FailureCode" json:"wire_failure,omitempty"`
|
||||
//
|
||||
//FailureDetail provides additional information about the reason for the
|
||||
//failure. This detail enriches the information provided by the wire message
|
||||
//and may be 'no detail' if the wire message requires no additional metadata.
|
||||
// FailureDetail provides additional information about the reason for the
|
||||
// failure. This detail enriches the information provided by the wire message
|
||||
// and may be 'no detail' if the wire message requires no additional metadata.
|
||||
FailureDetail FailureDetail `protobuf:"varint,3,opt,name=failure_detail,json=failureDetail,proto3,enum=routerrpc.FailureDetail" json:"failure_detail,omitempty"`
|
||||
// A string representation of the link failure.
|
||||
FailureString string `protobuf:"bytes,4,opt,name=failure_string,json=failureString,proto3" json:"failure_string,omitempty"`
|
||||
@ -2450,11 +2397,9 @@ type PaymentStatus struct {
|
||||
|
||||
// Current state the payment is in.
|
||||
State PaymentState `protobuf:"varint,1,opt,name=state,proto3,enum=routerrpc.PaymentState" json:"state,omitempty"`
|
||||
//
|
||||
//The pre-image of the payment when state is SUCCEEDED.
|
||||
// The pre-image of the payment when state is SUCCEEDED.
|
||||
Preimage []byte `protobuf:"bytes,2,opt,name=preimage,proto3" json:"preimage,omitempty"`
|
||||
//
|
||||
//The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
|
||||
// The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
|
||||
Htlcs []*lnrpc.HTLCAttempt `protobuf:"bytes,4,rep,name=htlcs,proto3" json:"htlcs,omitempty"`
|
||||
}
|
||||
|
||||
@ -2516,9 +2461,9 @@ type CircuitKey struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
/// The id of the channel that the is part of this circuit.
|
||||
// / The id of the channel that the is part of this circuit.
|
||||
ChanId uint64 `protobuf:"varint,1,opt,name=chan_id,json=chanId,proto3" json:"chan_id,omitempty"`
|
||||
/// The index of the incoming htlc in the incoming channel.
|
||||
// / The index of the incoming htlc in the incoming channel.
|
||||
HtlcId uint64 `protobuf:"varint,2,opt,name=htlc_id,json=htlcId,proto3" json:"htlc_id,omitempty"`
|
||||
}
|
||||
|
||||
@ -2573,17 +2518,15 @@ type ForwardHtlcInterceptRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The key of this forwarded htlc. It defines the incoming channel id and
|
||||
//the index in this channel.
|
||||
// The key of this forwarded htlc. It defines the incoming channel id and
|
||||
// the index in this channel.
|
||||
IncomingCircuitKey *CircuitKey `protobuf:"bytes,1,opt,name=incoming_circuit_key,json=incomingCircuitKey,proto3" json:"incoming_circuit_key,omitempty"`
|
||||
// The incoming htlc amount.
|
||||
IncomingAmountMsat uint64 `protobuf:"varint,5,opt,name=incoming_amount_msat,json=incomingAmountMsat,proto3" json:"incoming_amount_msat,omitempty"`
|
||||
// The incoming htlc expiry.
|
||||
IncomingExpiry uint32 `protobuf:"varint,6,opt,name=incoming_expiry,json=incomingExpiry,proto3" json:"incoming_expiry,omitempty"`
|
||||
//
|
||||
//The htlc payment hash. This value is not guaranteed to be unique per
|
||||
//request.
|
||||
// The htlc payment hash. This value is not guaranteed to be unique per
|
||||
// request.
|
||||
PaymentHash []byte `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||
// The requested outgoing channel id for this forwarded htlc. Because of
|
||||
// non-strict forwarding, this isn't necessarily the channel over which the
|
||||
@ -2695,20 +2638,20 @@ func (x *ForwardHtlcInterceptRequest) GetOnionBlob() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
//*
|
||||
//ForwardHtlcInterceptResponse enables the caller to resolve a previously hold
|
||||
//forward. The caller can choose either to:
|
||||
//- `Resume`: Execute the default behavior (usually forward).
|
||||
//- `Reject`: Fail the htlc backwards.
|
||||
//- `Settle`: Settle this htlc with a given preimage.
|
||||
// *
|
||||
// ForwardHtlcInterceptResponse enables the caller to resolve a previously hold
|
||||
// forward. The caller can choose either to:
|
||||
// - `Resume`: Execute the default behavior (usually forward).
|
||||
// - `Reject`: Fail the htlc backwards.
|
||||
// - `Settle`: Settle this htlc with a given preimage.
|
||||
type ForwardHtlcInterceptResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//*
|
||||
//The key of this forwarded htlc. It defines the incoming channel id and
|
||||
//the index in this channel.
|
||||
// *
|
||||
// The key of this forwarded htlc. It defines the incoming channel id and
|
||||
// the index in this channel.
|
||||
IncomingCircuitKey *CircuitKey `protobuf:"bytes,1,opt,name=incoming_circuit_key,json=incomingCircuitKey,proto3" json:"incoming_circuit_key,omitempty"`
|
||||
// The resolve action for this intercepted htlc.
|
||||
Action ResolveHoldForwardAction `protobuf:"varint,2,opt,name=action,proto3,enum=routerrpc.ResolveHoldForwardAction" json:"action,omitempty"`
|
||||
|
@ -19,90 +19,77 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type RouterClient interface {
|
||||
//
|
||||
//SendPaymentV2 attempts to route a payment described by the passed
|
||||
//PaymentRequest to the final destination. The call returns a stream of
|
||||
//payment updates.
|
||||
// SendPaymentV2 attempts to route a payment described by the passed
|
||||
// PaymentRequest to the final destination. The call returns a stream of
|
||||
// payment updates.
|
||||
SendPaymentV2(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentV2Client, error)
|
||||
//
|
||||
//TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
//payment hash.
|
||||
// TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
// payment hash.
|
||||
TrackPaymentV2(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentV2Client, error)
|
||||
//
|
||||
//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
//may cost to send an HTLC to the target end destination.
|
||||
// EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
// may cost to send an HTLC to the target end destination.
|
||||
EstimateRouteFee(ctx context.Context, in *RouteFeeRequest, opts ...grpc.CallOption) (*RouteFeeResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
//the specified route. This method differs from SendPayment in that it
|
||||
//allows users to specify a full route manually. This can be used for
|
||||
//things like rebalancing, and atomic swaps. It differs from the newer
|
||||
//SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
// Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
// the specified route. This method differs from SendPayment in that it
|
||||
// allows users to specify a full route manually. This can be used for
|
||||
// things like rebalancing, and atomic swaps. It differs from the newer
|
||||
// SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
SendToRoute(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*SendToRouteResponse, error)
|
||||
//
|
||||
//SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
//method differs from SendPayment in that it allows users to specify a full
|
||||
//route manually. This can be used for things like rebalancing, and atomic
|
||||
//swaps.
|
||||
// SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
// method differs from SendPayment in that it allows users to specify a full
|
||||
// route manually. This can be used for things like rebalancing, and atomic
|
||||
// swaps.
|
||||
SendToRouteV2(ctx context.Context, in *SendToRouteRequest, opts ...grpc.CallOption) (*lnrpc.HTLCAttempt, error)
|
||||
//
|
||||
//ResetMissionControl clears all mission control state and starts with a clean
|
||||
//slate.
|
||||
// ResetMissionControl clears all mission control state and starts with a clean
|
||||
// slate.
|
||||
ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error)
|
||||
//
|
||||
//QueryMissionControl exposes the internal mission control state to callers.
|
||||
//It is a development feature.
|
||||
// QueryMissionControl exposes the internal mission control state to callers.
|
||||
// It is a development feature.
|
||||
QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error)
|
||||
//
|
||||
//XImportMissionControl is an experimental API that imports the state provided
|
||||
//to the internal mission control's state, using all results which are more
|
||||
//recent than our existing values. These values will only be imported
|
||||
//in-memory, and will not be persisted across restarts.
|
||||
// XImportMissionControl is an experimental API that imports the state provided
|
||||
// to the internal mission control's state, using all results which are more
|
||||
// recent than our existing values. These values will only be imported
|
||||
// in-memory, and will not be persisted across restarts.
|
||||
XImportMissionControl(ctx context.Context, in *XImportMissionControlRequest, opts ...grpc.CallOption) (*XImportMissionControlResponse, error)
|
||||
//
|
||||
//GetMissionControlConfig returns mission control's current config.
|
||||
// GetMissionControlConfig returns mission control's current config.
|
||||
GetMissionControlConfig(ctx context.Context, in *GetMissionControlConfigRequest, opts ...grpc.CallOption) (*GetMissionControlConfigResponse, error)
|
||||
//
|
||||
//SetMissionControlConfig will set mission control's config, if the config
|
||||
//provided is valid.
|
||||
// SetMissionControlConfig will set mission control's config, if the config
|
||||
// provided is valid.
|
||||
SetMissionControlConfig(ctx context.Context, in *SetMissionControlConfigRequest, opts ...grpc.CallOption) (*SetMissionControlConfigResponse, error)
|
||||
//
|
||||
//QueryProbability returns the current success probability estimate for a
|
||||
//given node pair and amount.
|
||||
// QueryProbability returns the current success probability estimate for a
|
||||
// given node pair and amount.
|
||||
QueryProbability(ctx context.Context, in *QueryProbabilityRequest, opts ...grpc.CallOption) (*QueryProbabilityResponse, error)
|
||||
//
|
||||
//BuildRoute builds a fully specified route based on a list of hop public
|
||||
//keys. It retrieves the relevant channel policies from the graph in order to
|
||||
//calculate the correct fees and time locks.
|
||||
// BuildRoute builds a fully specified route based on a list of hop public
|
||||
// keys. It retrieves the relevant channel policies from the graph in order to
|
||||
// calculate the correct fees and time locks.
|
||||
BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error)
|
||||
//
|
||||
//SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
//the client which delivers a stream of htlc events.
|
||||
// SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
// the client which delivers a stream of htlc events.
|
||||
SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
//described by the passed PaymentRequest to the final destination. The call
|
||||
//returns a stream of payment status updates.
|
||||
// Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
// described by the passed PaymentRequest to the final destination. The call
|
||||
// returns a stream of payment status updates.
|
||||
SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (Router_SendPaymentClient, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
//the payment identified by the payment hash.
|
||||
// Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
// the payment identified by the payment hash.
|
||||
TrackPayment(ctx context.Context, in *TrackPaymentRequest, opts ...grpc.CallOption) (Router_TrackPaymentClient, error)
|
||||
//*
|
||||
//HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
//Forwarded HTLC requests are sent to the client and the client responds with
|
||||
//a boolean that tells LND if this htlc should be intercepted.
|
||||
//In case of interception, the htlc can be either settled, cancelled or
|
||||
//resumed later by using the ResolveHoldForward endpoint.
|
||||
// *
|
||||
// HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
// Forwarded HTLC requests are sent to the client and the client responds with
|
||||
// a boolean that tells LND if this htlc should be intercepted.
|
||||
// In case of interception, the htlc can be either settled, cancelled or
|
||||
// resumed later by using the ResolveHoldForward endpoint.
|
||||
HtlcInterceptor(ctx context.Context, opts ...grpc.CallOption) (Router_HtlcInterceptorClient, error)
|
||||
//
|
||||
//UpdateChanStatus attempts to manually set the state of a channel
|
||||
//(enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
//channel to stay disabled until a subsequent manual request of either
|
||||
//"enable" or "auto".
|
||||
// UpdateChanStatus attempts to manually set the state of a channel
|
||||
// (enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
// channel to stay disabled until a subsequent manual request of either
|
||||
// "enable" or "auto".
|
||||
UpdateChanStatus(ctx context.Context, in *UpdateChanStatusRequest, opts ...grpc.CallOption) (*UpdateChanStatusResponse, error)
|
||||
}
|
||||
|
||||
@ -411,90 +398,77 @@ func (c *routerClient) UpdateChanStatus(ctx context.Context, in *UpdateChanStatu
|
||||
// All implementations must embed UnimplementedRouterServer
|
||||
// for forward compatibility
|
||||
type RouterServer interface {
|
||||
//
|
||||
//SendPaymentV2 attempts to route a payment described by the passed
|
||||
//PaymentRequest to the final destination. The call returns a stream of
|
||||
//payment updates.
|
||||
// SendPaymentV2 attempts to route a payment described by the passed
|
||||
// PaymentRequest to the final destination. The call returns a stream of
|
||||
// payment updates.
|
||||
SendPaymentV2(*SendPaymentRequest, Router_SendPaymentV2Server) error
|
||||
//
|
||||
//TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
//payment hash.
|
||||
// TrackPaymentV2 returns an update stream for the payment identified by the
|
||||
// payment hash.
|
||||
TrackPaymentV2(*TrackPaymentRequest, Router_TrackPaymentV2Server) error
|
||||
//
|
||||
//EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
//may cost to send an HTLC to the target end destination.
|
||||
// EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
// may cost to send an HTLC to the target end destination.
|
||||
EstimateRouteFee(context.Context, *RouteFeeRequest) (*RouteFeeResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
//the specified route. This method differs from SendPayment in that it
|
||||
//allows users to specify a full route manually. This can be used for
|
||||
//things like rebalancing, and atomic swaps. It differs from the newer
|
||||
//SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
// Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
||||
// the specified route. This method differs from SendPayment in that it
|
||||
// allows users to specify a full route manually. This can be used for
|
||||
// things like rebalancing, and atomic swaps. It differs from the newer
|
||||
// SendToRouteV2 in that it doesn't return the full HTLC information.
|
||||
SendToRoute(context.Context, *SendToRouteRequest) (*SendToRouteResponse, error)
|
||||
//
|
||||
//SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
//method differs from SendPayment in that it allows users to specify a full
|
||||
//route manually. This can be used for things like rebalancing, and atomic
|
||||
//swaps.
|
||||
// SendToRouteV2 attempts to make a payment via the specified route. This
|
||||
// method differs from SendPayment in that it allows users to specify a full
|
||||
// route manually. This can be used for things like rebalancing, and atomic
|
||||
// swaps.
|
||||
SendToRouteV2(context.Context, *SendToRouteRequest) (*lnrpc.HTLCAttempt, error)
|
||||
//
|
||||
//ResetMissionControl clears all mission control state and starts with a clean
|
||||
//slate.
|
||||
// ResetMissionControl clears all mission control state and starts with a clean
|
||||
// slate.
|
||||
ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error)
|
||||
//
|
||||
//QueryMissionControl exposes the internal mission control state to callers.
|
||||
//It is a development feature.
|
||||
// QueryMissionControl exposes the internal mission control state to callers.
|
||||
// It is a development feature.
|
||||
QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error)
|
||||
//
|
||||
//XImportMissionControl is an experimental API that imports the state provided
|
||||
//to the internal mission control's state, using all results which are more
|
||||
//recent than our existing values. These values will only be imported
|
||||
//in-memory, and will not be persisted across restarts.
|
||||
// XImportMissionControl is an experimental API that imports the state provided
|
||||
// to the internal mission control's state, using all results which are more
|
||||
// recent than our existing values. These values will only be imported
|
||||
// in-memory, and will not be persisted across restarts.
|
||||
XImportMissionControl(context.Context, *XImportMissionControlRequest) (*XImportMissionControlResponse, error)
|
||||
//
|
||||
//GetMissionControlConfig returns mission control's current config.
|
||||
// GetMissionControlConfig returns mission control's current config.
|
||||
GetMissionControlConfig(context.Context, *GetMissionControlConfigRequest) (*GetMissionControlConfigResponse, error)
|
||||
//
|
||||
//SetMissionControlConfig will set mission control's config, if the config
|
||||
//provided is valid.
|
||||
// SetMissionControlConfig will set mission control's config, if the config
|
||||
// provided is valid.
|
||||
SetMissionControlConfig(context.Context, *SetMissionControlConfigRequest) (*SetMissionControlConfigResponse, error)
|
||||
//
|
||||
//QueryProbability returns the current success probability estimate for a
|
||||
//given node pair and amount.
|
||||
// QueryProbability returns the current success probability estimate for a
|
||||
// given node pair and amount.
|
||||
QueryProbability(context.Context, *QueryProbabilityRequest) (*QueryProbabilityResponse, error)
|
||||
//
|
||||
//BuildRoute builds a fully specified route based on a list of hop public
|
||||
//keys. It retrieves the relevant channel policies from the graph in order to
|
||||
//calculate the correct fees and time locks.
|
||||
// BuildRoute builds a fully specified route based on a list of hop public
|
||||
// keys. It retrieves the relevant channel policies from the graph in order to
|
||||
// calculate the correct fees and time locks.
|
||||
BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error)
|
||||
//
|
||||
//SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
//the client which delivers a stream of htlc events.
|
||||
// SubscribeHtlcEvents creates a uni-directional stream from the server to
|
||||
// the client which delivers a stream of htlc events.
|
||||
SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
//described by the passed PaymentRequest to the final destination. The call
|
||||
//returns a stream of payment status updates.
|
||||
// Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
||||
// described by the passed PaymentRequest to the final destination. The call
|
||||
// returns a stream of payment status updates.
|
||||
SendPayment(*SendPaymentRequest, Router_SendPaymentServer) error
|
||||
// Deprecated: Do not use.
|
||||
//
|
||||
//Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
//the payment identified by the payment hash.
|
||||
// Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
||||
// the payment identified by the payment hash.
|
||||
TrackPayment(*TrackPaymentRequest, Router_TrackPaymentServer) error
|
||||
//*
|
||||
//HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
//Forwarded HTLC requests are sent to the client and the client responds with
|
||||
//a boolean that tells LND if this htlc should be intercepted.
|
||||
//In case of interception, the htlc can be either settled, cancelled or
|
||||
//resumed later by using the ResolveHoldForward endpoint.
|
||||
// *
|
||||
// HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
||||
// Forwarded HTLC requests are sent to the client and the client responds with
|
||||
// a boolean that tells LND if this htlc should be intercepted.
|
||||
// In case of interception, the htlc can be either settled, cancelled or
|
||||
// resumed later by using the ResolveHoldForward endpoint.
|
||||
HtlcInterceptor(Router_HtlcInterceptorServer) error
|
||||
//
|
||||
//UpdateChanStatus attempts to manually set the state of a channel
|
||||
//(enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
//channel to stay disabled until a subsequent manual request of either
|
||||
//"enable" or "auto".
|
||||
// UpdateChanStatus attempts to manually set the state of a channel
|
||||
// (enabled, disabled, or auto). A manual "disable" request will cause the
|
||||
// channel to stay disabled until a subsequent manual request of either
|
||||
// "enable" or "auto".
|
||||
UpdateChanStatus(context.Context, *UpdateChanStatusRequest) (*UpdateChanStatusResponse, error)
|
||||
mustEmbedUnimplementedRouterServer()
|
||||
}
|
||||
|
@ -23,21 +23,17 @@ const (
|
||||
type SignMethod int32
|
||||
|
||||
const (
|
||||
//
|
||||
//Specifies that a SegWit v0 (p2wkh, np2wkh, p2wsh) input script should be
|
||||
//signed.
|
||||
// Specifies that a SegWit v0 (p2wkh, np2wkh, p2wsh) input script should be
|
||||
// signed.
|
||||
SignMethod_SIGN_METHOD_WITNESS_V0 SignMethod = 0
|
||||
//
|
||||
//Specifies that a SegWit v1 (p2tr) input should be signed by using the
|
||||
//BIP0086 method (commit to internal key only).
|
||||
// Specifies that a SegWit v1 (p2tr) input should be signed by using the
|
||||
// BIP0086 method (commit to internal key only).
|
||||
SignMethod_SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086 SignMethod = 1
|
||||
//
|
||||
//Specifies that a SegWit v1 (p2tr) input should be signed by using a given
|
||||
//taproot hash to commit to in addition to the internal key.
|
||||
// Specifies that a SegWit v1 (p2tr) input should be signed by using a given
|
||||
// taproot hash to commit to in addition to the internal key.
|
||||
SignMethod_SIGN_METHOD_TAPROOT_KEY_SPEND SignMethod = 2
|
||||
//
|
||||
//Specifies that a SegWit v1 (p2tr) input should be spent using the script
|
||||
//path and that a specific leaf script should be signed for.
|
||||
// Specifies that a SegWit v1 (p2tr) input should be spent using the script
|
||||
// path and that a specific leaf script should be signed for.
|
||||
SignMethod_SIGN_METHOD_TAPROOT_SCRIPT_SPEND SignMethod = 3
|
||||
)
|
||||
|
||||
@ -146,13 +142,11 @@ type KeyDescriptor struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The raw bytes of the public key in the key pair being identified. Either
|
||||
//this or the KeyLocator must be specified.
|
||||
// The raw bytes of the public key in the key pair being identified. Either
|
||||
// this or the KeyLocator must be specified.
|
||||
RawKeyBytes []byte `protobuf:"bytes,1,opt,name=raw_key_bytes,json=rawKeyBytes,proto3" json:"raw_key_bytes,omitempty"`
|
||||
//
|
||||
//The key locator that identifies which private key to use for signing.
|
||||
//Either this or the raw bytes of the target public key must be specified.
|
||||
// The key locator that identifies which private key to use for signing.
|
||||
// Either this or the raw bytes of the target public key must be specified.
|
||||
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
||||
}
|
||||
|
||||
@ -264,65 +258,56 @@ type SignDescriptor struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// A descriptor that precisely describes *which* key to use for signing. This
|
||||
// may provide the raw public key directly, or require the Signer to re-derive
|
||||
// the key according to the populated derivation path.
|
||||
//
|
||||
//A descriptor that precisely describes *which* key to use for signing. This
|
||||
//may provide the raw public key directly, or require the Signer to re-derive
|
||||
//the key according to the populated derivation path.
|
||||
//
|
||||
//Note that if the key descriptor was obtained through walletrpc.DeriveKey,
|
||||
//then the key locator MUST always be provided, since the derived keys are not
|
||||
//persisted unlike with DeriveNextKey.
|
||||
// Note that if the key descriptor was obtained through walletrpc.DeriveKey,
|
||||
// then the key locator MUST always be provided, since the derived keys are not
|
||||
// persisted unlike with DeriveNextKey.
|
||||
KeyDesc *KeyDescriptor `protobuf:"bytes,1,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
|
||||
//
|
||||
//A scalar value that will be added to the private key corresponding to the
|
||||
//above public key to obtain the private key to be used to sign this input.
|
||||
//This value is typically derived via the following computation:
|
||||
// A scalar value that will be added to the private key corresponding to the
|
||||
// above public key to obtain the private key to be used to sign this input.
|
||||
// This value is typically derived via the following computation:
|
||||
//
|
||||
// derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N
|
||||
SingleTweak []byte `protobuf:"bytes,2,opt,name=single_tweak,json=singleTweak,proto3" json:"single_tweak,omitempty"`
|
||||
//
|
||||
//A private key that will be used in combination with its corresponding
|
||||
//private key to derive the private key that is to be used to sign the target
|
||||
//input. Within the Lightning protocol, this value is typically the
|
||||
//commitment secret from a previously revoked commitment transaction. This
|
||||
//value is in combination with two hash values, and the original private key
|
||||
//to derive the private key to be used when signing.
|
||||
// A private key that will be used in combination with its corresponding
|
||||
// private key to derive the private key that is to be used to sign the target
|
||||
// input. Within the Lightning protocol, this value is typically the
|
||||
// commitment secret from a previously revoked commitment transaction. This
|
||||
// value is in combination with two hash values, and the original private key
|
||||
// to derive the private key to be used when signing.
|
||||
//
|
||||
// k = (privKey*sha256(pubKey || tweakPub) +
|
||||
//tweakPriv*sha256(tweakPub || pubKey)) mod N
|
||||
// tweakPriv*sha256(tweakPub || pubKey)) mod N
|
||||
DoubleTweak []byte `protobuf:"bytes,3,opt,name=double_tweak,json=doubleTweak,proto3" json:"double_tweak,omitempty"`
|
||||
// The 32 byte input to the taproot tweak derivation that is used to derive
|
||||
// the output key from an internal key: outputKey = internalKey +
|
||||
// tagged_hash("tapTweak", internalKey || tapTweak).
|
||||
//
|
||||
//The 32 byte input to the taproot tweak derivation that is used to derive
|
||||
//the output key from an internal key: outputKey = internalKey +
|
||||
//tagged_hash("tapTweak", internalKey || tapTweak).
|
||||
// When doing a BIP 86 spend, this field can be an empty byte slice.
|
||||
//
|
||||
//When doing a BIP 86 spend, this field can be an empty byte slice.
|
||||
//
|
||||
//When doing a normal key path spend, with the output key committing to an
|
||||
//actual script root, then this field should be: the tapscript root hash.
|
||||
// When doing a normal key path spend, with the output key committing to an
|
||||
// actual script root, then this field should be: the tapscript root hash.
|
||||
TapTweak []byte `protobuf:"bytes,10,opt,name=tap_tweak,json=tapTweak,proto3" json:"tap_tweak,omitempty"`
|
||||
//
|
||||
//The full script required to properly redeem the output. This field will
|
||||
//only be populated if a p2tr, p2wsh or a p2sh output is being signed. If a
|
||||
//taproot script path spend is being attempted, then this should be the raw
|
||||
//leaf script.
|
||||
// The full script required to properly redeem the output. This field will
|
||||
// only be populated if a p2tr, p2wsh or a p2sh output is being signed. If a
|
||||
// taproot script path spend is being attempted, then this should be the raw
|
||||
// leaf script.
|
||||
WitnessScript []byte `protobuf:"bytes,4,opt,name=witness_script,json=witnessScript,proto3" json:"witness_script,omitempty"`
|
||||
//
|
||||
//A description of the output being spent. The value and script MUST be
|
||||
//provided.
|
||||
// A description of the output being spent. The value and script MUST be
|
||||
// provided.
|
||||
Output *TxOut `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
|
||||
//
|
||||
//The target sighash type that should be used when generating the final
|
||||
//sighash, and signature.
|
||||
// The target sighash type that should be used when generating the final
|
||||
// sighash, and signature.
|
||||
Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"`
|
||||
//
|
||||
//The target input within the transaction that should be signed.
|
||||
// The target input within the transaction that should be signed.
|
||||
InputIndex int32 `protobuf:"varint,8,opt,name=input_index,json=inputIndex,proto3" json:"input_index,omitempty"`
|
||||
//
|
||||
//The sign method specifies how the input should be signed. Depending on the
|
||||
//method, either the tap_tweak, witness_script or both need to be specified.
|
||||
//Defaults to SegWit v0 signing to be backward compatible with older RPC
|
||||
//clients.
|
||||
// The sign method specifies how the input should be signed. Depending on the
|
||||
// method, either the tap_tweak, witness_script or both need to be specified.
|
||||
// Defaults to SegWit v0 signing to be backward compatible with older RPC
|
||||
// clients.
|
||||
SignMethod SignMethod `protobuf:"varint,9,opt,name=sign_method,json=signMethod,proto3,enum=signrpc.SignMethod" json:"sign_method,omitempty"`
|
||||
}
|
||||
|
||||
@ -430,9 +415,8 @@ type SignReq struct {
|
||||
RawTxBytes []byte `protobuf:"bytes,1,opt,name=raw_tx_bytes,json=rawTxBytes,proto3" json:"raw_tx_bytes,omitempty"`
|
||||
// A set of sign descriptors, for each input to be signed.
|
||||
SignDescs []*SignDescriptor `protobuf:"bytes,2,rep,name=sign_descs,json=signDescs,proto3" json:"sign_descs,omitempty"`
|
||||
//
|
||||
//The full list of UTXO information for each of the inputs being spent. This
|
||||
//is required when spending one or more taproot (SegWit v1) outputs.
|
||||
// The full list of UTXO information for each of the inputs being spent. This
|
||||
// is required when spending one or more taproot (SegWit v1) outputs.
|
||||
PrevOutputs []*TxOut `protobuf:"bytes,3,rep,name=prev_outputs,json=prevOutputs,proto3" json:"prev_outputs,omitempty"`
|
||||
}
|
||||
|
||||
@ -494,9 +478,8 @@ type SignResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//A set of signatures realized in a fixed 64-byte format ordered in ascending
|
||||
//input order.
|
||||
// A set of signatures realized in a fixed 64-byte format ordered in ascending
|
||||
// input order.
|
||||
RawSigs [][]byte `protobuf:"bytes,1,rep,name=raw_sigs,json=rawSigs,proto3" json:"raw_sigs,omitempty"`
|
||||
}
|
||||
|
||||
@ -546,9 +529,8 @@ type InputScript struct {
|
||||
|
||||
// The serializes witness stack for the specified input.
|
||||
Witness [][]byte `protobuf:"bytes,1,rep,name=witness,proto3" json:"witness,omitempty"`
|
||||
//
|
||||
//The optional sig script for the specified witness that will only be set if
|
||||
//the input specified is a nested p2sh witness program.
|
||||
// The optional sig script for the specified witness that will only be set if
|
||||
// the input specified is a nested p2sh witness program.
|
||||
SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"`
|
||||
}
|
||||
|
||||
@ -651,25 +633,21 @@ type SignMessageReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The message to be signed. When using REST, this field must be encoded as
|
||||
//base64.
|
||||
// The message to be signed. When using REST, this field must be encoded as
|
||||
// base64.
|
||||
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
// The key locator that identifies which key to use for signing.
|
||||
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
||||
// Double-SHA256 hash instead of just the default single round.
|
||||
DoubleHash bool `protobuf:"varint,3,opt,name=double_hash,json=doubleHash,proto3" json:"double_hash,omitempty"`
|
||||
//
|
||||
//Use the compact (pubkey recoverable) format instead of the raw lnwire
|
||||
//format. This option cannot be used with Schnorr signatures.
|
||||
// Use the compact (pubkey recoverable) format instead of the raw lnwire
|
||||
// format. This option cannot be used with Schnorr signatures.
|
||||
CompactSig bool `protobuf:"varint,4,opt,name=compact_sig,json=compactSig,proto3" json:"compact_sig,omitempty"`
|
||||
//
|
||||
//Use Schnorr signature. This option cannot be used with compact format.
|
||||
// Use Schnorr signature. This option cannot be used with compact format.
|
||||
SchnorrSig bool `protobuf:"varint,5,opt,name=schnorr_sig,json=schnorrSig,proto3" json:"schnorr_sig,omitempty"`
|
||||
//
|
||||
//The optional Taproot tweak bytes to apply to the private key before creating
|
||||
//a Schnorr signature. The private key is tweaked as described in BIP-341:
|
||||
//privKey + h_tapTweak(internalKey || tapTweak)
|
||||
// The optional Taproot tweak bytes to apply to the private key before creating
|
||||
// a Schnorr signature. The private key is tweaked as described in BIP-341:
|
||||
// privKey + h_tapTweak(internalKey || tapTweak)
|
||||
SchnorrSigTapTweak []byte `protobuf:"bytes,6,opt,name=schnorr_sig_tap_tweak,json=schnorrSigTapTweak,proto3" json:"schnorr_sig_tap_tweak,omitempty"`
|
||||
}
|
||||
|
||||
@ -752,8 +730,7 @@ type SignMessageResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The signature for the given message in the fixed-size LN wire format.
|
||||
// The signature for the given message in the fixed-size LN wire format.
|
||||
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
}
|
||||
|
||||
@ -804,18 +781,15 @@ type VerifyMessageReq struct {
|
||||
// The message over which the signature is to be verified. When using
|
||||
// REST, this field must be encoded as base64.
|
||||
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
//
|
||||
//The fixed-size LN wire encoded signature to be verified over the given
|
||||
//message. When using REST, this field must be encoded as base64.
|
||||
// The fixed-size LN wire encoded signature to be verified over the given
|
||||
// message. When using REST, this field must be encoded as base64.
|
||||
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
//
|
||||
//The public key the signature has to be valid for. When using REST, this
|
||||
//field must be encoded as base64. If the is_schnorr_sig option is true, then
|
||||
//the public key is expected to be in the 32-byte x-only serialization
|
||||
//according to BIP-340.
|
||||
// The public key the signature has to be valid for. When using REST, this
|
||||
// field must be encoded as base64. If the is_schnorr_sig option is true, then
|
||||
// the public key is expected to be in the 32-byte x-only serialization
|
||||
// according to BIP-340.
|
||||
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
//
|
||||
//Specifies if the signature is a Schnorr signature.
|
||||
// Specifies if the signature is a Schnorr signature.
|
||||
IsSchnorrSig bool `protobuf:"varint,4,opt,name=is_schnorr_sig,json=isSchnorrSig,proto3" json:"is_schnorr_sig,omitempty"`
|
||||
}
|
||||
|
||||
@ -934,17 +908,15 @@ type SharedKeyRequest struct {
|
||||
|
||||
// The ephemeral public key to use for the DH key derivation.
|
||||
EphemeralPubkey []byte `protobuf:"bytes,1,opt,name=ephemeral_pubkey,json=ephemeralPubkey,proto3" json:"ephemeral_pubkey,omitempty"`
|
||||
//
|
||||
//Deprecated. The optional key locator of the local key that should be used.
|
||||
//If this parameter is not set then the node's identity private key will be
|
||||
//used.
|
||||
// Deprecated. The optional key locator of the local key that should be used.
|
||||
// If this parameter is not set then the node's identity private key will be
|
||||
// used.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
||||
//
|
||||
//A key descriptor describes the key used for performing ECDH. Either a key
|
||||
//locator or a raw public key is expected, if neither is supplied, defaults to
|
||||
//the node's identity private key.
|
||||
// A key descriptor describes the key used for performing ECDH. Either a key
|
||||
// locator or a raw public key is expected, if neither is supplied, defaults to
|
||||
// the node's identity private key.
|
||||
KeyDesc *KeyDescriptor `protobuf:"bytes,3,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
|
||||
}
|
||||
|
||||
@ -1055,13 +1027,11 @@ type TweakDesc struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Tweak is the 32-byte value that will modify the public key.
|
||||
// Tweak is the 32-byte value that will modify the public key.
|
||||
Tweak []byte `protobuf:"bytes,1,opt,name=tweak,proto3" json:"tweak,omitempty"`
|
||||
//
|
||||
//Specifies if the target key should be converted to an x-only public key
|
||||
//before tweaking. If true, then the public key will be mapped to an x-only
|
||||
//key before the tweaking operation is applied.
|
||||
// Specifies if the target key should be converted to an x-only public key
|
||||
// before tweaking. If true, then the public key will be mapped to an x-only
|
||||
// key before the tweaking operation is applied.
|
||||
IsXOnly bool `protobuf:"varint,2,opt,name=is_x_only,json=isXOnly,proto3" json:"is_x_only,omitempty"`
|
||||
}
|
||||
|
||||
@ -1116,18 +1086,16 @@ type TaprootTweakDesc struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The root hash of the tapscript tree if a script path is committed to. If
|
||||
//the MuSig2 key put on chain doesn't also commit to a script path (BIP-0086
|
||||
//key spend only), then this needs to be empty and the key_spend_only field
|
||||
//below must be set to true. This is required because gRPC cannot
|
||||
//differentiate between a zero-size byte slice and a nil byte slice (both
|
||||
//would be serialized the same way). So the extra boolean is required.
|
||||
// The root hash of the tapscript tree if a script path is committed to. If
|
||||
// the MuSig2 key put on chain doesn't also commit to a script path (BIP-0086
|
||||
// key spend only), then this needs to be empty and the key_spend_only field
|
||||
// below must be set to true. This is required because gRPC cannot
|
||||
// differentiate between a zero-size byte slice and a nil byte slice (both
|
||||
// would be serialized the same way). So the extra boolean is required.
|
||||
ScriptRoot []byte `protobuf:"bytes,1,opt,name=script_root,json=scriptRoot,proto3" json:"script_root,omitempty"`
|
||||
//
|
||||
//Indicates that the above script_root is expected to be empty because this
|
||||
//is a BIP-0086 key spend only commitment where only the internal key is
|
||||
//committed to instead of also including a script root hash.
|
||||
// Indicates that the above script_root is expected to be empty because this
|
||||
// is a BIP-0086 key spend only commitment where only the internal key is
|
||||
// committed to instead of also including a script root hash.
|
||||
KeySpendOnly bool `protobuf:"varint,2,opt,name=key_spend_only,json=keySpendOnly,proto3" json:"key_spend_only,omitempty"`
|
||||
}
|
||||
|
||||
@ -1182,20 +1150,17 @@ type MuSig2CombineKeysRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//A list of all public keys (serialized in 32-byte x-only format!)
|
||||
//participating in the signing session. The list will always be sorted
|
||||
//lexicographically internally. This must include the local key which is
|
||||
//described by the above key_loc.
|
||||
// A list of all public keys (serialized in 32-byte x-only format!)
|
||||
// participating in the signing session. The list will always be sorted
|
||||
// lexicographically internally. This must include the local key which is
|
||||
// described by the above key_loc.
|
||||
AllSignerPubkeys [][]byte `protobuf:"bytes,1,rep,name=all_signer_pubkeys,json=allSignerPubkeys,proto3" json:"all_signer_pubkeys,omitempty"`
|
||||
//
|
||||
//A series of optional generic tweaks to be applied to the the aggregated
|
||||
//public key.
|
||||
// A series of optional generic tweaks to be applied to the the aggregated
|
||||
// public key.
|
||||
Tweaks []*TweakDesc `protobuf:"bytes,2,rep,name=tweaks,proto3" json:"tweaks,omitempty"`
|
||||
//
|
||||
//An optional taproot specific tweak that must be specified if the MuSig2
|
||||
//combined key will be used as the main taproot key of a taproot output
|
||||
//on-chain.
|
||||
// An optional taproot specific tweak that must be specified if the MuSig2
|
||||
// combined key will be used as the main taproot key of a taproot output
|
||||
// on-chain.
|
||||
TaprootTweak *TaprootTweakDesc `protobuf:"bytes,3,opt,name=taproot_tweak,json=taprootTweak,proto3" json:"taproot_tweak,omitempty"`
|
||||
}
|
||||
|
||||
@ -1257,16 +1222,14 @@ type MuSig2CombineKeysResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The combined public key (in the 32-byte x-only format) with all tweaks
|
||||
//applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
//taproot key that can be put into the on-chain output.
|
||||
// The combined public key (in the 32-byte x-only format) with all tweaks
|
||||
// applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
// taproot key that can be put into the on-chain output.
|
||||
CombinedKey []byte `protobuf:"bytes,1,opt,name=combined_key,json=combinedKey,proto3" json:"combined_key,omitempty"`
|
||||
//
|
||||
//The raw combined public key (in the 32-byte x-only format) before any tweaks
|
||||
//are applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
//internal key that needs to be put into the witness if the script spend path
|
||||
//is used.
|
||||
// The raw combined public key (in the 32-byte x-only format) before any tweaks
|
||||
// are applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
// internal key that needs to be put into the witness if the script spend path
|
||||
// is used.
|
||||
TaprootInternalKey []byte `protobuf:"bytes,2,opt,name=taproot_internal_key,json=taprootInternalKey,proto3" json:"taproot_internal_key,omitempty"`
|
||||
}
|
||||
|
||||
@ -1321,27 +1284,22 @@ type MuSig2SessionRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The key locator that identifies which key to use for signing.
|
||||
// The key locator that identifies which key to use for signing.
|
||||
KeyLoc *KeyLocator `protobuf:"bytes,1,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
||||
//
|
||||
//A list of all public keys (serialized in 32-byte x-only format!)
|
||||
//participating in the signing session. The list will always be sorted
|
||||
//lexicographically internally. This must include the local key which is
|
||||
//described by the above key_loc.
|
||||
// A list of all public keys (serialized in 32-byte x-only format!)
|
||||
// participating in the signing session. The list will always be sorted
|
||||
// lexicographically internally. This must include the local key which is
|
||||
// described by the above key_loc.
|
||||
AllSignerPubkeys [][]byte `protobuf:"bytes,2,rep,name=all_signer_pubkeys,json=allSignerPubkeys,proto3" json:"all_signer_pubkeys,omitempty"`
|
||||
//
|
||||
//An optional list of all public nonces of other signing participants that
|
||||
//might already be known.
|
||||
// An optional list of all public nonces of other signing participants that
|
||||
// might already be known.
|
||||
OtherSignerPublicNonces [][]byte `protobuf:"bytes,3,rep,name=other_signer_public_nonces,json=otherSignerPublicNonces,proto3" json:"other_signer_public_nonces,omitempty"`
|
||||
//
|
||||
//A series of optional generic tweaks to be applied to the the aggregated
|
||||
//public key.
|
||||
// A series of optional generic tweaks to be applied to the the aggregated
|
||||
// public key.
|
||||
Tweaks []*TweakDesc `protobuf:"bytes,4,rep,name=tweaks,proto3" json:"tweaks,omitempty"`
|
||||
//
|
||||
//An optional taproot specific tweak that must be specified if the MuSig2
|
||||
//combined key will be used as the main taproot key of a taproot output
|
||||
//on-chain.
|
||||
// An optional taproot specific tweak that must be specified if the MuSig2
|
||||
// combined key will be used as the main taproot key of a taproot output
|
||||
// on-chain.
|
||||
TaprootTweak *TaprootTweakDesc `protobuf:"bytes,5,opt,name=taproot_tweak,json=taprootTweak,proto3" json:"taproot_tweak,omitempty"`
|
||||
}
|
||||
|
||||
@ -1417,30 +1375,25 @@ type MuSig2SessionResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The unique ID that represents this signing session. A session can be used
|
||||
//for producing a signature a single time. If the signing fails for any
|
||||
//reason, a new session with the same participants needs to be created.
|
||||
// The unique ID that represents this signing session. A session can be used
|
||||
// for producing a signature a single time. If the signing fails for any
|
||||
// reason, a new session with the same participants needs to be created.
|
||||
SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
//
|
||||
//The combined public key (in the 32-byte x-only format) with all tweaks
|
||||
//applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
//taproot key that can be put into the on-chain output.
|
||||
// The combined public key (in the 32-byte x-only format) with all tweaks
|
||||
// applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
// taproot key that can be put into the on-chain output.
|
||||
CombinedKey []byte `protobuf:"bytes,2,opt,name=combined_key,json=combinedKey,proto3" json:"combined_key,omitempty"`
|
||||
//
|
||||
//The raw combined public key (in the 32-byte x-only format) before any tweaks
|
||||
//are applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
//internal key that needs to be put into the witness if the script spend path
|
||||
//is used.
|
||||
// The raw combined public key (in the 32-byte x-only format) before any tweaks
|
||||
// are applied to it. If a taproot tweak is specified, this corresponds to the
|
||||
// internal key that needs to be put into the witness if the script spend path
|
||||
// is used.
|
||||
TaprootInternalKey []byte `protobuf:"bytes,3,opt,name=taproot_internal_key,json=taprootInternalKey,proto3" json:"taproot_internal_key,omitempty"`
|
||||
//
|
||||
//The two public nonces the local signer uses, combined into a single value
|
||||
//of 66 bytes. Can be split into the two 33-byte points to get the individual
|
||||
//nonces.
|
||||
// The two public nonces the local signer uses, combined into a single value
|
||||
// of 66 bytes. Can be split into the two 33-byte points to get the individual
|
||||
// nonces.
|
||||
LocalPublicNonces []byte `protobuf:"bytes,4,opt,name=local_public_nonces,json=localPublicNonces,proto3" json:"local_public_nonces,omitempty"`
|
||||
//
|
||||
//Indicates whether all nonces required to start the signing process are known
|
||||
//now.
|
||||
// Indicates whether all nonces required to start the signing process are known
|
||||
// now.
|
||||
HaveAllNonces bool `protobuf:"varint,5,opt,name=have_all_nonces,json=haveAllNonces,proto3" json:"have_all_nonces,omitempty"`
|
||||
}
|
||||
|
||||
@ -1516,12 +1469,10 @@ type MuSig2RegisterNoncesRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The unique ID of the signing session those nonces should be registered with.
|
||||
// The unique ID of the signing session those nonces should be registered with.
|
||||
SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
//
|
||||
//A list of all public nonces of other signing participants that should be
|
||||
//registered.
|
||||
// A list of all public nonces of other signing participants that should be
|
||||
// registered.
|
||||
OtherSignerPublicNonces [][]byte `protobuf:"bytes,3,rep,name=other_signer_public_nonces,json=otherSignerPublicNonces,proto3" json:"other_signer_public_nonces,omitempty"`
|
||||
}
|
||||
|
||||
@ -1576,9 +1527,8 @@ type MuSig2RegisterNoncesResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Indicates whether all nonces required to start the signing process are known
|
||||
//now.
|
||||
// Indicates whether all nonces required to start the signing process are known
|
||||
// now.
|
||||
HaveAllNonces bool `protobuf:"varint,1,opt,name=have_all_nonces,json=haveAllNonces,proto3" json:"have_all_nonces,omitempty"`
|
||||
}
|
||||
|
||||
@ -1626,16 +1576,13 @@ type MuSig2SignRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The unique ID of the signing session to use for signing.
|
||||
// The unique ID of the signing session to use for signing.
|
||||
SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
//
|
||||
//The 32-byte SHA256 digest of the message to sign.
|
||||
// The 32-byte SHA256 digest of the message to sign.
|
||||
MessageDigest []byte `protobuf:"bytes,2,opt,name=message_digest,json=messageDigest,proto3" json:"message_digest,omitempty"`
|
||||
//
|
||||
//Cleanup indicates that after signing, the session state can be cleaned up,
|
||||
//since another participant is going to be responsible for combining the
|
||||
//partial signatures.
|
||||
// Cleanup indicates that after signing, the session state can be cleaned up,
|
||||
// since another participant is going to be responsible for combining the
|
||||
// partial signatures.
|
||||
Cleanup bool `protobuf:"varint,3,opt,name=cleanup,proto3" json:"cleanup,omitempty"`
|
||||
}
|
||||
|
||||
@ -1697,8 +1644,7 @@ type MuSig2SignResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The partial signature created by the local signer.
|
||||
// The partial signature created by the local signer.
|
||||
LocalPartialSignature []byte `protobuf:"bytes,1,opt,name=local_partial_signature,json=localPartialSignature,proto3" json:"local_partial_signature,omitempty"`
|
||||
}
|
||||
|
||||
@ -1746,12 +1692,10 @@ type MuSig2CombineSigRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The unique ID of the signing session to combine the signatures for.
|
||||
// The unique ID of the signing session to combine the signatures for.
|
||||
SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
//
|
||||
//The list of all other participants' partial signatures to add to the current
|
||||
//session.
|
||||
// The list of all other participants' partial signatures to add to the current
|
||||
// session.
|
||||
OtherPartialSignatures [][]byte `protobuf:"bytes,2,rep,name=other_partial_signatures,json=otherPartialSignatures,proto3" json:"other_partial_signatures,omitempty"`
|
||||
}
|
||||
|
||||
@ -1806,13 +1750,11 @@ type MuSig2CombineSigResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Indicates whether all partial signatures required to create a final, full
|
||||
//signature are known yet. If this is true, then the final_signature field is
|
||||
//set, otherwise it is empty.
|
||||
// Indicates whether all partial signatures required to create a final, full
|
||||
// signature are known yet. If this is true, then the final_signature field is
|
||||
// set, otherwise it is empty.
|
||||
HaveAllSignatures bool `protobuf:"varint,1,opt,name=have_all_signatures,json=haveAllSignatures,proto3" json:"have_all_signatures,omitempty"`
|
||||
//
|
||||
//The final, full signature that is valid for the combined public key.
|
||||
// The final, full signature that is valid for the combined public key.
|
||||
FinalSignature []byte `protobuf:"bytes,2,opt,name=final_signature,json=finalSignature,proto3" json:"final_signature,omitempty"`
|
||||
}
|
||||
|
||||
@ -1867,8 +1809,7 @@ type MuSig2CleanupRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The unique ID of the signing session that should be removed/cleaned up.
|
||||
// The unique ID of the signing session that should be removed/cleaned up.
|
||||
SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -18,116 +18,105 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type SignerClient interface {
|
||||
// SignOutputRaw is a method that can be used to generated a signature for a
|
||||
// set of inputs/outputs to a transaction. Each request specifies details
|
||||
// concerning how the outputs should be signed, which keys they should be
|
||||
// signed with, and also any optional tweaks. The return value is a fixed
|
||||
// 64-byte signature (the same format as we use on the wire in Lightning).
|
||||
//
|
||||
//SignOutputRaw is a method that can be used to generated a signature for a
|
||||
//set of inputs/outputs to a transaction. Each request specifies details
|
||||
//concerning how the outputs should be signed, which keys they should be
|
||||
//signed with, and also any optional tweaks. The return value is a fixed
|
||||
//64-byte signature (the same format as we use on the wire in Lightning).
|
||||
//
|
||||
//If we are unable to sign using the specified keys, then an error will be
|
||||
//returned.
|
||||
// If we are unable to sign using the specified keys, then an error will be
|
||||
// returned.
|
||||
SignOutputRaw(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*SignResp, error)
|
||||
// ComputeInputScript generates a complete InputIndex for the passed
|
||||
// transaction with the signature as defined within the passed SignDescriptor.
|
||||
// This method should be capable of generating the proper input script for both
|
||||
// regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
|
||||
// output.
|
||||
//
|
||||
//ComputeInputScript generates a complete InputIndex for the passed
|
||||
//transaction with the signature as defined within the passed SignDescriptor.
|
||||
//This method should be capable of generating the proper input script for both
|
||||
//regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
|
||||
//output.
|
||||
//
|
||||
//Note that when using this method to sign inputs belonging to the wallet,
|
||||
//the only items of the SignDescriptor that need to be populated are pkScript
|
||||
//in the TxOut field, the value in that same field, and finally the input
|
||||
//index.
|
||||
// Note that when using this method to sign inputs belonging to the wallet,
|
||||
// the only items of the SignDescriptor that need to be populated are pkScript
|
||||
// in the TxOut field, the value in that same field, and finally the input
|
||||
// index.
|
||||
ComputeInputScript(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*InputScriptResp, error)
|
||||
// SignMessage signs a message with the key specified in the key locator. The
|
||||
// returned signature is fixed-size LN wire format encoded.
|
||||
//
|
||||
//SignMessage signs a message with the key specified in the key locator. The
|
||||
//returned signature is fixed-size LN wire format encoded.
|
||||
//
|
||||
//The main difference to SignMessage in the main RPC is that a specific key is
|
||||
//used to sign the message instead of the node identity private key.
|
||||
// The main difference to SignMessage in the main RPC is that a specific key is
|
||||
// used to sign the message instead of the node identity private key.
|
||||
SignMessage(ctx context.Context, in *SignMessageReq, opts ...grpc.CallOption) (*SignMessageResp, error)
|
||||
// VerifyMessage verifies a signature over a message using the public key
|
||||
// provided. The signature must be fixed-size LN wire format encoded.
|
||||
//
|
||||
//VerifyMessage verifies a signature over a message using the public key
|
||||
//provided. The signature must be fixed-size LN wire format encoded.
|
||||
//
|
||||
//The main difference to VerifyMessage in the main RPC is that the public key
|
||||
//used to sign the message does not have to be a node known to the network.
|
||||
// The main difference to VerifyMessage in the main RPC is that the public key
|
||||
// used to sign the message does not have to be a node known to the network.
|
||||
VerifyMessage(ctx context.Context, in *VerifyMessageReq, opts ...grpc.CallOption) (*VerifyMessageResp, error)
|
||||
//
|
||||
//DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
||||
//derivation between the ephemeral public key in the request and the node's
|
||||
//key specified in the key_desc parameter. Either a key locator or a raw
|
||||
//public key is expected in the key_desc, if neither is supplied, defaults to
|
||||
//the node's identity private key:
|
||||
//P_shared = privKeyNode * ephemeralPubkey
|
||||
//The resulting shared public key is serialized in the compressed format and
|
||||
//hashed with sha256, resulting in the final key length of 256bit.
|
||||
// DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
||||
// derivation between the ephemeral public key in the request and the node's
|
||||
// key specified in the key_desc parameter. Either a key locator or a raw
|
||||
// public key is expected in the key_desc, if neither is supplied, defaults to
|
||||
// the node's identity private key:
|
||||
// P_shared = privKeyNode * ephemeralPubkey
|
||||
// The resulting shared public key is serialized in the compressed format and
|
||||
// hashed with sha256, resulting in the final key length of 256bit.
|
||||
DeriveSharedKey(ctx context.Context, in *SharedKeyRequest, opts ...grpc.CallOption) (*SharedKeyResponse, error)
|
||||
// MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
|
||||
// to calculate the combined MuSig2 public key from a list of all participating
|
||||
// signers' public keys. This RPC is completely stateless and deterministic and
|
||||
// does not create any signing session. It can be used to determine the Taproot
|
||||
// public key that should be put in an on-chain output once all public keys are
|
||||
// known. A signing session is only needed later when that output should be
|
||||
// _spent_ again.
|
||||
//
|
||||
//MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
|
||||
//to calculate the combined MuSig2 public key from a list of all participating
|
||||
//signers' public keys. This RPC is completely stateless and deterministic and
|
||||
//does not create any signing session. It can be used to determine the Taproot
|
||||
//public key that should be put in an on-chain output once all public keys are
|
||||
//known. A signing session is only needed later when that output should be
|
||||
//_spent_ again.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2CombineKeys(ctx context.Context, in *MuSig2CombineKeysRequest, opts ...grpc.CallOption) (*MuSig2CombineKeysResponse, error)
|
||||
// MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
|
||||
// using the local key identified by the key locator. The complete list of all
|
||||
// public keys of all signing parties must be provided, including the public
|
||||
// key of the local signing key. If nonces of other parties are already known,
|
||||
// they can be submitted as well to reduce the number of RPC calls necessary
|
||||
// later on.
|
||||
//
|
||||
//MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
|
||||
//using the local key identified by the key locator. The complete list of all
|
||||
//public keys of all signing parties must be provided, including the public
|
||||
//key of the local signing key. If nonces of other parties are already known,
|
||||
//they can be submitted as well to reduce the number of RPC calls necessary
|
||||
//later on.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2CreateSession(ctx context.Context, in *MuSig2SessionRequest, opts ...grpc.CallOption) (*MuSig2SessionResponse, error)
|
||||
// MuSig2RegisterNonces (experimental!) registers one or more public nonces of
|
||||
// other signing participants for a session identified by its ID. This RPC can
|
||||
// be called multiple times until all nonces are registered.
|
||||
//
|
||||
//MuSig2RegisterNonces (experimental!) registers one or more public nonces of
|
||||
//other signing participants for a session identified by its ID. This RPC can
|
||||
//be called multiple times until all nonces are registered.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2RegisterNonces(ctx context.Context, in *MuSig2RegisterNoncesRequest, opts ...grpc.CallOption) (*MuSig2RegisterNoncesResponse, error)
|
||||
// MuSig2Sign (experimental!) creates a partial signature using the local
|
||||
// signing key that was specified when the session was created. This can only
|
||||
// be called when all public nonces of all participants are known and have been
|
||||
// registered with the session. If this node isn't responsible for combining
|
||||
// all the partial signatures, then the cleanup flag should be set, indicating
|
||||
// that the session can be removed from memory once the signature was produced.
|
||||
//
|
||||
//MuSig2Sign (experimental!) creates a partial signature using the local
|
||||
//signing key that was specified when the session was created. This can only
|
||||
//be called when all public nonces of all participants are known and have been
|
||||
//registered with the session. If this node isn't responsible for combining
|
||||
//all the partial signatures, then the cleanup flag should be set, indicating
|
||||
//that the session can be removed from memory once the signature was produced.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2Sign(ctx context.Context, in *MuSig2SignRequest, opts ...grpc.CallOption) (*MuSig2SignResponse, error)
|
||||
// MuSig2CombineSig (experimental!) combines the given partial signature(s)
|
||||
// with the local one, if it already exists. Once a partial signature of all
|
||||
// participants is registered, the final signature will be combined and
|
||||
// returned.
|
||||
//
|
||||
//MuSig2CombineSig (experimental!) combines the given partial signature(s)
|
||||
//with the local one, if it already exists. Once a partial signature of all
|
||||
//participants is registered, the final signature will be combined and
|
||||
//returned.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2CombineSig(ctx context.Context, in *MuSig2CombineSigRequest, opts ...grpc.CallOption) (*MuSig2CombineSigResponse, error)
|
||||
// MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
|
||||
// cases where it's obvious that the signing session won't succeed and the
|
||||
// resources can be released.
|
||||
//
|
||||
//MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
|
||||
//cases where it's obvious that the signing session won't succeed and the
|
||||
//resources can be released.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2Cleanup(ctx context.Context, in *MuSig2CleanupRequest, opts ...grpc.CallOption) (*MuSig2CleanupResponse, error)
|
||||
}
|
||||
|
||||
@ -242,116 +231,105 @@ func (c *signerClient) MuSig2Cleanup(ctx context.Context, in *MuSig2CleanupReque
|
||||
// All implementations must embed UnimplementedSignerServer
|
||||
// for forward compatibility
|
||||
type SignerServer interface {
|
||||
// SignOutputRaw is a method that can be used to generated a signature for a
|
||||
// set of inputs/outputs to a transaction. Each request specifies details
|
||||
// concerning how the outputs should be signed, which keys they should be
|
||||
// signed with, and also any optional tweaks. The return value is a fixed
|
||||
// 64-byte signature (the same format as we use on the wire in Lightning).
|
||||
//
|
||||
//SignOutputRaw is a method that can be used to generated a signature for a
|
||||
//set of inputs/outputs to a transaction. Each request specifies details
|
||||
//concerning how the outputs should be signed, which keys they should be
|
||||
//signed with, and also any optional tweaks. The return value is a fixed
|
||||
//64-byte signature (the same format as we use on the wire in Lightning).
|
||||
//
|
||||
//If we are unable to sign using the specified keys, then an error will be
|
||||
//returned.
|
||||
// If we are unable to sign using the specified keys, then an error will be
|
||||
// returned.
|
||||
SignOutputRaw(context.Context, *SignReq) (*SignResp, error)
|
||||
// ComputeInputScript generates a complete InputIndex for the passed
|
||||
// transaction with the signature as defined within the passed SignDescriptor.
|
||||
// This method should be capable of generating the proper input script for both
|
||||
// regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
|
||||
// output.
|
||||
//
|
||||
//ComputeInputScript generates a complete InputIndex for the passed
|
||||
//transaction with the signature as defined within the passed SignDescriptor.
|
||||
//This method should be capable of generating the proper input script for both
|
||||
//regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh
|
||||
//output.
|
||||
//
|
||||
//Note that when using this method to sign inputs belonging to the wallet,
|
||||
//the only items of the SignDescriptor that need to be populated are pkScript
|
||||
//in the TxOut field, the value in that same field, and finally the input
|
||||
//index.
|
||||
// Note that when using this method to sign inputs belonging to the wallet,
|
||||
// the only items of the SignDescriptor that need to be populated are pkScript
|
||||
// in the TxOut field, the value in that same field, and finally the input
|
||||
// index.
|
||||
ComputeInputScript(context.Context, *SignReq) (*InputScriptResp, error)
|
||||
// SignMessage signs a message with the key specified in the key locator. The
|
||||
// returned signature is fixed-size LN wire format encoded.
|
||||
//
|
||||
//SignMessage signs a message with the key specified in the key locator. The
|
||||
//returned signature is fixed-size LN wire format encoded.
|
||||
//
|
||||
//The main difference to SignMessage in the main RPC is that a specific key is
|
||||
//used to sign the message instead of the node identity private key.
|
||||
// The main difference to SignMessage in the main RPC is that a specific key is
|
||||
// used to sign the message instead of the node identity private key.
|
||||
SignMessage(context.Context, *SignMessageReq) (*SignMessageResp, error)
|
||||
// VerifyMessage verifies a signature over a message using the public key
|
||||
// provided. The signature must be fixed-size LN wire format encoded.
|
||||
//
|
||||
//VerifyMessage verifies a signature over a message using the public key
|
||||
//provided. The signature must be fixed-size LN wire format encoded.
|
||||
//
|
||||
//The main difference to VerifyMessage in the main RPC is that the public key
|
||||
//used to sign the message does not have to be a node known to the network.
|
||||
// The main difference to VerifyMessage in the main RPC is that the public key
|
||||
// used to sign the message does not have to be a node known to the network.
|
||||
VerifyMessage(context.Context, *VerifyMessageReq) (*VerifyMessageResp, error)
|
||||
//
|
||||
//DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
||||
//derivation between the ephemeral public key in the request and the node's
|
||||
//key specified in the key_desc parameter. Either a key locator or a raw
|
||||
//public key is expected in the key_desc, if neither is supplied, defaults to
|
||||
//the node's identity private key:
|
||||
//P_shared = privKeyNode * ephemeralPubkey
|
||||
//The resulting shared public key is serialized in the compressed format and
|
||||
//hashed with sha256, resulting in the final key length of 256bit.
|
||||
// DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
||||
// derivation between the ephemeral public key in the request and the node's
|
||||
// key specified in the key_desc parameter. Either a key locator or a raw
|
||||
// public key is expected in the key_desc, if neither is supplied, defaults to
|
||||
// the node's identity private key:
|
||||
// P_shared = privKeyNode * ephemeralPubkey
|
||||
// The resulting shared public key is serialized in the compressed format and
|
||||
// hashed with sha256, resulting in the final key length of 256bit.
|
||||
DeriveSharedKey(context.Context, *SharedKeyRequest) (*SharedKeyResponse, error)
|
||||
// MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
|
||||
// to calculate the combined MuSig2 public key from a list of all participating
|
||||
// signers' public keys. This RPC is completely stateless and deterministic and
|
||||
// does not create any signing session. It can be used to determine the Taproot
|
||||
// public key that should be put in an on-chain output once all public keys are
|
||||
// known. A signing session is only needed later when that output should be
|
||||
// _spent_ again.
|
||||
//
|
||||
//MuSig2CombineKeys (experimental!) is a stateless helper RPC that can be used
|
||||
//to calculate the combined MuSig2 public key from a list of all participating
|
||||
//signers' public keys. This RPC is completely stateless and deterministic and
|
||||
//does not create any signing session. It can be used to determine the Taproot
|
||||
//public key that should be put in an on-chain output once all public keys are
|
||||
//known. A signing session is only needed later when that output should be
|
||||
//_spent_ again.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2CombineKeys(context.Context, *MuSig2CombineKeysRequest) (*MuSig2CombineKeysResponse, error)
|
||||
// MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
|
||||
// using the local key identified by the key locator. The complete list of all
|
||||
// public keys of all signing parties must be provided, including the public
|
||||
// key of the local signing key. If nonces of other parties are already known,
|
||||
// they can be submitted as well to reduce the number of RPC calls necessary
|
||||
// later on.
|
||||
//
|
||||
//MuSig2CreateSession (experimental!) creates a new MuSig2 signing session
|
||||
//using the local key identified by the key locator. The complete list of all
|
||||
//public keys of all signing parties must be provided, including the public
|
||||
//key of the local signing key. If nonces of other parties are already known,
|
||||
//they can be submitted as well to reduce the number of RPC calls necessary
|
||||
//later on.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2CreateSession(context.Context, *MuSig2SessionRequest) (*MuSig2SessionResponse, error)
|
||||
// MuSig2RegisterNonces (experimental!) registers one or more public nonces of
|
||||
// other signing participants for a session identified by its ID. This RPC can
|
||||
// be called multiple times until all nonces are registered.
|
||||
//
|
||||
//MuSig2RegisterNonces (experimental!) registers one or more public nonces of
|
||||
//other signing participants for a session identified by its ID. This RPC can
|
||||
//be called multiple times until all nonces are registered.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2RegisterNonces(context.Context, *MuSig2RegisterNoncesRequest) (*MuSig2RegisterNoncesResponse, error)
|
||||
// MuSig2Sign (experimental!) creates a partial signature using the local
|
||||
// signing key that was specified when the session was created. This can only
|
||||
// be called when all public nonces of all participants are known and have been
|
||||
// registered with the session. If this node isn't responsible for combining
|
||||
// all the partial signatures, then the cleanup flag should be set, indicating
|
||||
// that the session can be removed from memory once the signature was produced.
|
||||
//
|
||||
//MuSig2Sign (experimental!) creates a partial signature using the local
|
||||
//signing key that was specified when the session was created. This can only
|
||||
//be called when all public nonces of all participants are known and have been
|
||||
//registered with the session. If this node isn't responsible for combining
|
||||
//all the partial signatures, then the cleanup flag should be set, indicating
|
||||
//that the session can be removed from memory once the signature was produced.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2Sign(context.Context, *MuSig2SignRequest) (*MuSig2SignResponse, error)
|
||||
// MuSig2CombineSig (experimental!) combines the given partial signature(s)
|
||||
// with the local one, if it already exists. Once a partial signature of all
|
||||
// participants is registered, the final signature will be combined and
|
||||
// returned.
|
||||
//
|
||||
//MuSig2CombineSig (experimental!) combines the given partial signature(s)
|
||||
//with the local one, if it already exists. Once a partial signature of all
|
||||
//participants is registered, the final signature will be combined and
|
||||
//returned.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2CombineSig(context.Context, *MuSig2CombineSigRequest) (*MuSig2CombineSigResponse, error)
|
||||
// MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
|
||||
// cases where it's obvious that the signing session won't succeed and the
|
||||
// resources can be released.
|
||||
//
|
||||
//MuSig2Cleanup (experimental!) allows a caller to clean up a session early in
|
||||
//cases where it's obvious that the signing session won't succeed and the
|
||||
//resources can be released.
|
||||
//
|
||||
//NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
//considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
//releases. Backward compatibility is not guaranteed!
|
||||
// NOTE: The MuSig2 BIP is not final yet and therefore this API must be
|
||||
// considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
|
||||
// releases. Backward compatibility is not guaranteed!
|
||||
MuSig2Cleanup(context.Context, *MuSig2CleanupRequest) (*MuSig2CleanupResponse, error)
|
||||
mustEmbedUnimplementedSignerServer()
|
||||
}
|
||||
|
@ -19,8 +19,8 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type VersionerClient interface {
|
||||
// lncli: `version`
|
||||
//GetVersion returns the current version and build information of the running
|
||||
//daemon.
|
||||
// GetVersion returns the current version and build information of the running
|
||||
// daemon.
|
||||
GetVersion(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*Version, error)
|
||||
}
|
||||
|
||||
@ -46,8 +46,8 @@ func (c *versionerClient) GetVersion(ctx context.Context, in *VersionRequest, op
|
||||
// for forward compatibility
|
||||
type VersionerServer interface {
|
||||
// lncli: `version`
|
||||
//GetVersion returns the current version and build information of the running
|
||||
//daemon.
|
||||
// GetVersion returns the current version and build information of the running
|
||||
// daemon.
|
||||
GetVersion(context.Context, *VersionRequest) (*Version, error)
|
||||
mustEmbedUnimplementedVersionerServer()
|
||||
}
|
||||
|
@ -81,65 +81,52 @@ type WitnessType int32
|
||||
|
||||
const (
|
||||
WitnessType_UNKNOWN_WITNESS WitnessType = 0
|
||||
//
|
||||
//A witness that allows us to spend the output of a commitment transaction
|
||||
//after a relative lock-time lockout.
|
||||
// A witness that allows us to spend the output of a commitment transaction
|
||||
// after a relative lock-time lockout.
|
||||
WitnessType_COMMITMENT_TIME_LOCK WitnessType = 1
|
||||
//
|
||||
//A witness that allows us to spend a settled no-delay output immediately on a
|
||||
//counterparty's commitment transaction.
|
||||
// A witness that allows us to spend a settled no-delay output immediately on a
|
||||
// counterparty's commitment transaction.
|
||||
WitnessType_COMMITMENT_NO_DELAY WitnessType = 2
|
||||
//
|
||||
//A witness that allows us to sweep the settled output of a malicious
|
||||
//counterparty's who broadcasts a revoked commitment transaction.
|
||||
// A witness that allows us to sweep the settled output of a malicious
|
||||
// counterparty's who broadcasts a revoked commitment transaction.
|
||||
WitnessType_COMMITMENT_REVOKE WitnessType = 3
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC which we offered to the remote
|
||||
//party in the case that they broadcast a revoked commitment state.
|
||||
// A witness that allows us to sweep an HTLC which we offered to the remote
|
||||
// party in the case that they broadcast a revoked commitment state.
|
||||
WitnessType_HTLC_OFFERED_REVOKE WitnessType = 4
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC output sent to us in the case that
|
||||
//the remote party broadcasts a revoked commitment state.
|
||||
// A witness that allows us to sweep an HTLC output sent to us in the case that
|
||||
// the remote party broadcasts a revoked commitment state.
|
||||
WitnessType_HTLC_ACCEPTED_REVOKE WitnessType = 5
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC output that we extended to a
|
||||
//party, but was never fulfilled. This HTLC output isn't directly on the
|
||||
//commitment transaction, but is the result of a confirmed second-level HTLC
|
||||
//transaction. As a result, we can only spend this after a CSV delay.
|
||||
// A witness that allows us to sweep an HTLC output that we extended to a
|
||||
// party, but was never fulfilled. This HTLC output isn't directly on the
|
||||
// commitment transaction, but is the result of a confirmed second-level HTLC
|
||||
// transaction. As a result, we can only spend this after a CSV delay.
|
||||
WitnessType_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL WitnessType = 6
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC output that was offered to us, and
|
||||
//for which we have a payment preimage. This HTLC output isn't directly on our
|
||||
//commitment transaction, but is the result of confirmed second-level HTLC
|
||||
//transaction. As a result, we can only spend this after a CSV delay.
|
||||
// A witness that allows us to sweep an HTLC output that was offered to us, and
|
||||
// for which we have a payment preimage. This HTLC output isn't directly on our
|
||||
// commitment transaction, but is the result of confirmed second-level HTLC
|
||||
// transaction. As a result, we can only spend this after a CSV delay.
|
||||
WitnessType_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL WitnessType = 7
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC that we offered to the remote
|
||||
//party which lies in the commitment transaction of the remote party. We can
|
||||
//spend this output after the absolute CLTV timeout of the HTLC as passed.
|
||||
// A witness that allows us to sweep an HTLC that we offered to the remote
|
||||
// party which lies in the commitment transaction of the remote party. We can
|
||||
// spend this output after the absolute CLTV timeout of the HTLC as passed.
|
||||
WitnessType_HTLC_OFFERED_REMOTE_TIMEOUT WitnessType = 8
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC that was offered to us by the
|
||||
//remote party. We use this witness in the case that the remote party goes to
|
||||
//chain, and we know the pre-image to the HTLC. We can sweep this without any
|
||||
//additional timeout.
|
||||
// A witness that allows us to sweep an HTLC that was offered to us by the
|
||||
// remote party. We use this witness in the case that the remote party goes to
|
||||
// chain, and we know the pre-image to the HTLC. We can sweep this without any
|
||||
// additional timeout.
|
||||
WitnessType_HTLC_ACCEPTED_REMOTE_SUCCESS WitnessType = 9
|
||||
//
|
||||
//A witness that allows us to sweep an HTLC from the remote party's commitment
|
||||
//transaction in the case that the broadcast a revoked commitment, but then
|
||||
//also immediately attempt to go to the second level to claim the HTLC.
|
||||
// A witness that allows us to sweep an HTLC from the remote party's commitment
|
||||
// transaction in the case that the broadcast a revoked commitment, but then
|
||||
// also immediately attempt to go to the second level to claim the HTLC.
|
||||
WitnessType_HTLC_SECOND_LEVEL_REVOKE WitnessType = 10
|
||||
//
|
||||
//A witness type that allows us to spend a regular p2wkh output that's sent to
|
||||
//an output which is under complete control of the backing wallet.
|
||||
// A witness type that allows us to spend a regular p2wkh output that's sent to
|
||||
// an output which is under complete control of the backing wallet.
|
||||
WitnessType_WITNESS_KEY_HASH WitnessType = 11
|
||||
//
|
||||
//A witness type that allows us to sweep an output that sends to a nested P2SH
|
||||
//script that pays to a key solely under our control.
|
||||
// A witness type that allows us to sweep an output that sends to a nested P2SH
|
||||
// script that pays to a key solely under our control.
|
||||
WitnessType_NESTED_WITNESS_KEY_HASH WitnessType = 12
|
||||
//
|
||||
//A witness type that allows us to spend our anchor on the commitment
|
||||
//transaction.
|
||||
// A witness type that allows us to spend our anchor on the commitment
|
||||
// transaction.
|
||||
WitnessType_COMMITMENT_ANCHOR WitnessType = 13
|
||||
)
|
||||
|
||||
@ -217,11 +204,10 @@ type ListUnspentRequest struct {
|
||||
MaxConfs int32 `protobuf:"varint,2,opt,name=max_confs,json=maxConfs,proto3" json:"max_confs,omitempty"`
|
||||
// An optional filter to only include outputs belonging to an account.
|
||||
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"`
|
||||
//
|
||||
//When min_confs and max_confs are zero, setting false implicitly
|
||||
//overrides max_confs to be MaxInt32, otherwise max_confs remains
|
||||
//zero. An error is returned if the value is true and both min_confs
|
||||
//and max_confs are non-zero. (default: false)
|
||||
// When min_confs and max_confs are zero, setting false implicitly
|
||||
// overrides max_confs to be MaxInt32, otherwise max_confs remains
|
||||
// zero. An error is returned if the value is true and both min_confs
|
||||
// and max_confs are non-zero. (default: false)
|
||||
UnconfirmedOnly bool `protobuf:"varint,4,opt,name=unconfirmed_only,json=unconfirmedOnly,proto3" json:"unconfirmed_only,omitempty"`
|
||||
}
|
||||
|
||||
@ -338,9 +324,8 @@ type LeaseOutputRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//An ID of 32 random bytes that must be unique for each distinct application
|
||||
//using this RPC which will be used to bound the output lease to.
|
||||
// An ID of 32 random bytes that must be unique for each distinct application
|
||||
// using this RPC which will be used to bound the output lease to.
|
||||
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// The identifying outpoint of the output being leased.
|
||||
Outpoint *lnrpc.OutPoint `protobuf:"bytes,2,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
|
||||
@ -407,8 +392,7 @@ type LeaseOutputResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The absolute expiration of the output lease represented as a unix timestamp.
|
||||
// The absolute expiration of the output lease represented as a unix timestamp.
|
||||
Expiration uint64 `protobuf:"varint,1,opt,name=expiration,proto3" json:"expiration,omitempty"`
|
||||
}
|
||||
|
||||
@ -551,14 +535,12 @@ type KeyReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Is the key finger print of the root pubkey that this request is targeting.
|
||||
//This allows the WalletKit to possibly serve out keys for multiple HD chains
|
||||
//via public derivation.
|
||||
// Is the key finger print of the root pubkey that this request is targeting.
|
||||
// This allows the WalletKit to possibly serve out keys for multiple HD chains
|
||||
// via public derivation.
|
||||
KeyFingerPrint int32 `protobuf:"varint,1,opt,name=key_finger_print,json=keyFingerPrint,proto3" json:"key_finger_print,omitempty"`
|
||||
//
|
||||
//The target key family to derive a key from. In other contexts, this is
|
||||
//known as the "account".
|
||||
// The target key family to derive a key from. In other contexts, this is
|
||||
// known as the "account".
|
||||
KeyFamily int32 `protobuf:"varint,2,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
|
||||
}
|
||||
|
||||
@ -613,15 +595,12 @@ type AddrRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The name of the account to retrieve the next address of. If empty, the
|
||||
//default wallet account is used.
|
||||
// The name of the account to retrieve the next address of. If empty, the
|
||||
// default wallet account is used.
|
||||
Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
//
|
||||
//The type of address to derive.
|
||||
// The type of address to derive.
|
||||
Type AddressType `protobuf:"varint,2,opt,name=type,proto3,enum=walletrpc.AddressType" json:"type,omitempty"`
|
||||
//
|
||||
//Whether a change address should be derived.
|
||||
// Whether a change address should be derived.
|
||||
Change bool `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"`
|
||||
}
|
||||
|
||||
@ -683,8 +662,7 @@ type AddrResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The address encoded using a bech32 format.
|
||||
// The address encoded using a bech32 format.
|
||||
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
|
||||
}
|
||||
|
||||
@ -736,31 +714,26 @@ type Account struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// The type of addresses the account supports.
|
||||
AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
|
||||
//
|
||||
//The public key backing the account that all keys are derived from
|
||||
//represented as an extended key. This will always be empty for the default
|
||||
//imported account in which single public keys are imported into.
|
||||
// The public key backing the account that all keys are derived from
|
||||
// represented as an extended key. This will always be empty for the default
|
||||
// imported account in which single public keys are imported into.
|
||||
ExtendedPublicKey string `protobuf:"bytes,3,opt,name=extended_public_key,json=extendedPublicKey,proto3" json:"extended_public_key,omitempty"`
|
||||
//
|
||||
//The fingerprint of the root key from which the account public key was
|
||||
//derived from. This will always be zero for the default imported account in
|
||||
//which single public keys are imported into. The bytes are in big-endian
|
||||
//order.
|
||||
// The fingerprint of the root key from which the account public key was
|
||||
// derived from. This will always be zero for the default imported account in
|
||||
// which single public keys are imported into. The bytes are in big-endian
|
||||
// order.
|
||||
MasterKeyFingerprint []byte `protobuf:"bytes,4,opt,name=master_key_fingerprint,json=masterKeyFingerprint,proto3" json:"master_key_fingerprint,omitempty"`
|
||||
//
|
||||
//The derivation path corresponding to the account public key. This will
|
||||
//always be empty for the default imported account in which single public keys
|
||||
//are imported into.
|
||||
// The derivation path corresponding to the account public key. This will
|
||||
// always be empty for the default imported account in which single public keys
|
||||
// are imported into.
|
||||
DerivationPath string `protobuf:"bytes,5,opt,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"`
|
||||
//
|
||||
//The number of keys derived from the external branch of the account public
|
||||
//key. This will always be zero for the default imported account in which
|
||||
//single public keys are imported into.
|
||||
// The number of keys derived from the external branch of the account public
|
||||
// key. This will always be zero for the default imported account in which
|
||||
// single public keys are imported into.
|
||||
ExternalKeyCount uint32 `protobuf:"varint,6,opt,name=external_key_count,json=externalKeyCount,proto3" json:"external_key_count,omitempty"`
|
||||
//
|
||||
//The number of keys derived from the internal branch of the account public
|
||||
//key. This will always be zero for the default imported account in which
|
||||
//single public keys are imported into.
|
||||
// The number of keys derived from the internal branch of the account public
|
||||
// key. This will always be zero for the default imported account in which
|
||||
// single public keys are imported into.
|
||||
InternalKeyCount uint32 `protobuf:"varint,7,opt,name=internal_key_count,json=internalKeyCount,proto3" json:"internal_key_count,omitempty"`
|
||||
// Whether the wallet stores private keys for the account.
|
||||
WatchOnly bool `protobuf:"varint,8,opt,name=watch_only,json=watchOnly,proto3" json:"watch_only,omitempty"`
|
||||
@ -859,15 +832,14 @@ type AddressProperty struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The address encoded using the appropriate format depending on the
|
||||
// address type (base58, bech32, bech32m).
|
||||
//
|
||||
//The address encoded using the appropriate format depending on the
|
||||
//address type (base58, bech32, bech32m).
|
||||
//
|
||||
//Note that lnd's internal/custom keys for channels and other
|
||||
//functionality are derived from the same scope. Since they
|
||||
//aren't really used as addresses and will never have an
|
||||
//on-chain balance, we'll show the public key instead (only if
|
||||
//the show_custom_accounts flag is provided).
|
||||
// Note that lnd's internal/custom keys for channels and other
|
||||
// functionality are derived from the same scope. Since they
|
||||
// aren't really used as addresses and will never have an
|
||||
// on-chain balance, we'll show the public key instead (only if
|
||||
// the show_custom_accounts flag is provided).
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
// Denotes if the address is a change address.
|
||||
IsInternal bool `protobuf:"varint,2,opt,name=is_internal,json=isInternal,proto3" json:"is_internal,omitempty"`
|
||||
@ -937,16 +909,14 @@ type AccountWithAddresses struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// The type of addresses the account supports.
|
||||
AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
|
||||
//
|
||||
//The derivation path corresponding to the account public key. This will
|
||||
//always be empty for the default imported account in which single public keys
|
||||
//are imported into.
|
||||
// The derivation path corresponding to the account public key. This will
|
||||
// always be empty for the default imported account in which single public keys
|
||||
// are imported into.
|
||||
DerivationPath string `protobuf:"bytes,3,opt,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"`
|
||||
//
|
||||
//List of address, its type internal/external & balance.
|
||||
//Note that the order of addresses will be random and not according to the
|
||||
//derivation index, since that information is not stored by the underlying
|
||||
//wallet.
|
||||
// List of address, its type internal/external & balance.
|
||||
// Note that the order of addresses will be random and not according to the
|
||||
// derivation index, since that information is not stored by the underlying
|
||||
// wallet.
|
||||
Addresses []*AddressProperty `protobuf:"bytes,4,rep,name=addresses,proto3" json:"addresses,omitempty"`
|
||||
}
|
||||
|
||||
@ -1323,28 +1293,24 @@ type ImportAccountRequest struct {
|
||||
|
||||
// A name to identify the account with.
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
//
|
||||
//A public key that corresponds to a wallet account represented as an extended
|
||||
//key. It must conform to a derivation path of the form
|
||||
//m/purpose'/coin_type'/account'.
|
||||
// A public key that corresponds to a wallet account represented as an extended
|
||||
// key. It must conform to a derivation path of the form
|
||||
// m/purpose'/coin_type'/account'.
|
||||
ExtendedPublicKey string `protobuf:"bytes,2,opt,name=extended_public_key,json=extendedPublicKey,proto3" json:"extended_public_key,omitempty"`
|
||||
//
|
||||
//The fingerprint of the root key (also known as the key with derivation path
|
||||
//m/) from which the account public key was derived from. This may be required
|
||||
//by some hardware wallets for proper identification and signing. The bytes
|
||||
//must be in big-endian order.
|
||||
// The fingerprint of the root key (also known as the key with derivation path
|
||||
// m/) from which the account public key was derived from. This may be required
|
||||
// by some hardware wallets for proper identification and signing. The bytes
|
||||
// must be in big-endian order.
|
||||
MasterKeyFingerprint []byte `protobuf:"bytes,3,opt,name=master_key_fingerprint,json=masterKeyFingerprint,proto3" json:"master_key_fingerprint,omitempty"`
|
||||
//
|
||||
//An address type is only required when the extended account public key has a
|
||||
//legacy version (xpub, tpub, etc.), such that the wallet cannot detect what
|
||||
//address scheme it belongs to.
|
||||
// An address type is only required when the extended account public key has a
|
||||
// legacy version (xpub, tpub, etc.), such that the wallet cannot detect what
|
||||
// address scheme it belongs to.
|
||||
AddressType AddressType `protobuf:"varint,4,opt,name=address_type,json=addressType,proto3,enum=walletrpc.AddressType" json:"address_type,omitempty"`
|
||||
//
|
||||
//Whether a dry run should be attempted when importing the account. This
|
||||
//serves as a way to confirm whether the account is being imported correctly
|
||||
//by returning the first N addresses for the external and internal branches of
|
||||
//the account. If these addresses match as expected, then it should be safe to
|
||||
//import the account as is.
|
||||
// Whether a dry run should be attempted when importing the account. This
|
||||
// serves as a way to confirm whether the account is being imported correctly
|
||||
// by returning the first N addresses for the external and internal branches of
|
||||
// the account. If these addresses match as expected, then it should be safe to
|
||||
// import the account as is.
|
||||
DryRun bool `protobuf:"varint,5,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"`
|
||||
}
|
||||
|
||||
@ -1422,15 +1388,13 @@ type ImportAccountResponse struct {
|
||||
|
||||
// The details of the imported account.
|
||||
Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
//
|
||||
//The first N addresses that belong to the external branch of the account.
|
||||
//The external branch is typically used for external non-change addresses.
|
||||
//These are only returned if a dry run was specified within the request.
|
||||
// The first N addresses that belong to the external branch of the account.
|
||||
// The external branch is typically used for external non-change addresses.
|
||||
// These are only returned if a dry run was specified within the request.
|
||||
DryRunExternalAddrs []string `protobuf:"bytes,2,rep,name=dry_run_external_addrs,json=dryRunExternalAddrs,proto3" json:"dry_run_external_addrs,omitempty"`
|
||||
//
|
||||
//The first N addresses that belong to the internal branch of the account.
|
||||
//The internal branch is typically used for change addresses. These are only
|
||||
//returned if a dry run was specified within the request.
|
||||
// The first N addresses that belong to the internal branch of the account.
|
||||
// The internal branch is typically used for change addresses. These are only
|
||||
// returned if a dry run was specified within the request.
|
||||
DryRunInternalAddrs []string `protobuf:"bytes,3,rep,name=dry_run_internal_addrs,json=dryRunInternalAddrs,proto3" json:"dry_run_internal_addrs,omitempty"`
|
||||
}
|
||||
|
||||
@ -1587,11 +1551,9 @@ type Transaction struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The raw serialized transaction.
|
||||
// The raw serialized transaction.
|
||||
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.
|
||||
// An optional label to save with the transaction. Limited to 500 characters.
|
||||
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
|
||||
}
|
||||
|
||||
@ -1646,12 +1608,11 @@ type PublishResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// If blank, then no error occurred and the transaction was successfully
|
||||
// published. If not the empty string, then a string representation of the
|
||||
// broadcast error.
|
||||
//
|
||||
//If blank, then no error occurred and the transaction was successfully
|
||||
//published. If not the empty string, then a string representation of the
|
||||
//broadcast error.
|
||||
//
|
||||
//TODO(roasbeef): map to a proper enum type
|
||||
// TODO(roasbeef): map to a proper enum type
|
||||
PublishError string `protobuf:"bytes,1,opt,name=publish_error,json=publishError,proto3" json:"publish_error,omitempty"`
|
||||
}
|
||||
|
||||
@ -1699,12 +1660,10 @@ type SendOutputsRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The number of satoshis per kilo weight that should be used when crafting
|
||||
//this transaction.
|
||||
// The number of satoshis per kilo weight that should be used when crafting
|
||||
// this transaction.
|
||||
SatPerKw int64 `protobuf:"varint,1,opt,name=sat_per_kw,json=satPerKw,proto3" json:"sat_per_kw,omitempty"`
|
||||
//
|
||||
//A slice of the outputs that should be created in the transaction produced.
|
||||
// A slice of the outputs that should be created in the transaction produced.
|
||||
Outputs []*signrpc.TxOut `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
|
||||
// An optional label for the transaction, limited to 500 characters.
|
||||
Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
|
||||
@ -1787,8 +1746,7 @@ type SendOutputsResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The serialized transaction sent out on the network.
|
||||
// The serialized transaction sent out on the network.
|
||||
RawTx []byte `protobuf:"bytes,1,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"`
|
||||
}
|
||||
|
||||
@ -1836,8 +1794,7 @@ type EstimateFeeRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The number of confirmations to shoot for when estimating the fee.
|
||||
// The number of confirmations to shoot for when estimating the fee.
|
||||
ConfTarget int32 `protobuf:"varint,1,opt,name=conf_target,json=confTarget,proto3" json:"conf_target,omitempty"`
|
||||
}
|
||||
|
||||
@ -1885,9 +1842,8 @@ type EstimateFeeResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The amount of satoshis per kw that should be used in order to reach the
|
||||
//confirmation target in the request.
|
||||
// The amount of satoshis per kw that should be used in order to reach the
|
||||
// confirmation target in the request.
|
||||
SatPerKw int64 `protobuf:"varint,1,opt,name=sat_per_kw,json=satPerKw,proto3" json:"sat_per_kw,omitempty"`
|
||||
}
|
||||
|
||||
@ -1941,19 +1897,17 @@ type PendingSweep struct {
|
||||
WitnessType WitnessType `protobuf:"varint,2,opt,name=witness_type,json=witnessType,proto3,enum=walletrpc.WitnessType" json:"witness_type,omitempty"`
|
||||
// The value of the output we're attempting to sweep.
|
||||
AmountSat uint32 `protobuf:"varint,3,opt,name=amount_sat,json=amountSat,proto3" json:"amount_sat,omitempty"`
|
||||
//
|
||||
//Deprecated, use sat_per_vbyte.
|
||||
//The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee
|
||||
//rate is only determined once a sweeping transaction for the output is
|
||||
//created, so it's possible for this to be 0 before this.
|
||||
// Deprecated, use sat_per_vbyte.
|
||||
// The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee
|
||||
// rate is only determined once a sweeping transaction for the output is
|
||||
// created, so it's possible for this to be 0 before this.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
SatPerByte uint32 `protobuf:"varint,4,opt,name=sat_per_byte,json=satPerByte,proto3" json:"sat_per_byte,omitempty"`
|
||||
// The number of broadcast attempts we've made to sweep the output.
|
||||
BroadcastAttempts uint32 `protobuf:"varint,5,opt,name=broadcast_attempts,json=broadcastAttempts,proto3" json:"broadcast_attempts,omitempty"`
|
||||
//
|
||||
//The next height of the chain at which we'll attempt to broadcast the
|
||||
//sweep transaction of the output.
|
||||
// The next height of the chain at which we'll attempt to broadcast the
|
||||
// sweep transaction of the output.
|
||||
NextBroadcastHeight uint32 `protobuf:"varint,6,opt,name=next_broadcast_height,json=nextBroadcastHeight,proto3" json:"next_broadcast_height,omitempty"`
|
||||
// The requested confirmation target for this output.
|
||||
RequestedConfTarget uint32 `protobuf:"varint,8,opt,name=requested_conf_target,json=requestedConfTarget,proto3" json:"requested_conf_target,omitempty"`
|
||||
@ -1962,16 +1916,14 @@ type PendingSweep struct {
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
RequestedSatPerByte uint32 `protobuf:"varint,9,opt,name=requested_sat_per_byte,json=requestedSatPerByte,proto3" json:"requested_sat_per_byte,omitempty"`
|
||||
//
|
||||
//The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee
|
||||
//rate is only determined once a sweeping transaction for the output is
|
||||
//created, so it's possible for this to be 0 before this.
|
||||
// The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee
|
||||
// rate is only determined once a sweeping transaction for the output is
|
||||
// created, so it's possible for this to be 0 before this.
|
||||
SatPerVbyte uint64 `protobuf:"varint,10,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
|
||||
// The requested fee rate, expressed in sat/vbyte, for this output.
|
||||
RequestedSatPerVbyte uint64 `protobuf:"varint,11,opt,name=requested_sat_per_vbyte,json=requestedSatPerVbyte,proto3" json:"requested_sat_per_vbyte,omitempty"`
|
||||
//
|
||||
//Whether this input must be force-swept. This means that it is swept even
|
||||
//if it has a negative yield.
|
||||
// Whether this input must be force-swept. This means that it is swept even
|
||||
// if it has a negative yield.
|
||||
Force bool `protobuf:"varint,7,opt,name=force,proto3" json:"force,omitempty"`
|
||||
}
|
||||
|
||||
@ -2129,8 +2081,7 @@ type PendingSweepsResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The set of outputs currently being swept by lnd's central batching engine.
|
||||
// The set of outputs currently being swept by lnd's central batching engine.
|
||||
PendingSweeps []*PendingSweep `protobuf:"bytes,1,rep,name=pending_sweeps,json=pendingSweeps,proto3" json:"pending_sweeps,omitempty"`
|
||||
}
|
||||
|
||||
@ -2182,20 +2133,17 @@ type BumpFeeRequest struct {
|
||||
Outpoint *lnrpc.OutPoint `protobuf:"bytes,1,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
|
||||
// The target number of blocks that the input should be spent within.
|
||||
TargetConf uint32 `protobuf:"varint,2,opt,name=target_conf,json=targetConf,proto3" json:"target_conf,omitempty"`
|
||||
//
|
||||
//Deprecated, use sat_per_vbyte.
|
||||
//The fee rate, expressed in sat/vbyte, that should be used to spend the input
|
||||
//with.
|
||||
// Deprecated, use sat_per_vbyte.
|
||||
// The fee rate, expressed in sat/vbyte, that should be used to spend the input
|
||||
// with.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
SatPerByte uint32 `protobuf:"varint,3,opt,name=sat_per_byte,json=satPerByte,proto3" json:"sat_per_byte,omitempty"`
|
||||
//
|
||||
//Whether this input must be force-swept. This means that it is swept even
|
||||
//if it has a negative yield.
|
||||
// Whether this input must be force-swept. This means that it is swept even
|
||||
// if it has a negative yield.
|
||||
Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"`
|
||||
//
|
||||
//The fee rate, expressed in sat/vbyte, that should be used to spend the input
|
||||
//with.
|
||||
// The fee rate, expressed in sat/vbyte, that should be used to spend the input
|
||||
// with.
|
||||
SatPerVbyte uint64 `protobuf:"varint,5,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"`
|
||||
}
|
||||
|
||||
@ -2310,10 +2258,9 @@ type ListSweepsRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Retrieve the full sweep transaction details. If false, only the sweep txids
|
||||
//will be returned. Note that some sweeps that LND publishes will have been
|
||||
//replaced-by-fee, so will not be included in this output.
|
||||
// Retrieve the full sweep transaction details. If false, only the sweep txids
|
||||
// will be returned. Note that some sweeps that LND publishes will have been
|
||||
// replaced-by-fee, so will not be included in this output.
|
||||
Verbose bool `protobuf:"varint,1,opt,name=verbose,proto3" json:"verbose,omitempty"`
|
||||
}
|
||||
|
||||
@ -2362,6 +2309,7 @@ type ListSweepsResponse struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Sweeps:
|
||||
//
|
||||
// *ListSweepsResponse_TransactionDetails
|
||||
// *ListSweepsResponse_TransactionIds
|
||||
Sweeps isListSweepsResponse_Sweeps `protobuf_oneof:"sweeps"`
|
||||
@ -2546,16 +2494,17 @@ type FundPsbtRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Template:
|
||||
//
|
||||
// *FundPsbtRequest_Psbt
|
||||
// *FundPsbtRequest_Raw
|
||||
Template isFundPsbtRequest_Template `protobuf_oneof:"template"`
|
||||
// Types that are assignable to Fees:
|
||||
//
|
||||
// *FundPsbtRequest_TargetConf
|
||||
// *FundPsbtRequest_SatPerVbyte
|
||||
Fees isFundPsbtRequest_Fees `protobuf_oneof:"fees"`
|
||||
//
|
||||
//The name of the account to fund the PSBT with. If empty, the default wallet
|
||||
//account is used.
|
||||
// The name of the account to fund the PSBT with. If empty, the default wallet
|
||||
// account is used.
|
||||
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
|
||||
// The minimum number of confirmations each one of your outputs used for
|
||||
// the transaction must satisfy.
|
||||
@ -2664,21 +2613,19 @@ type isFundPsbtRequest_Template interface {
|
||||
}
|
||||
|
||||
type FundPsbtRequest_Psbt struct {
|
||||
// Use an existing PSBT packet as the template for the funded PSBT.
|
||||
//
|
||||
//Use an existing PSBT packet as the template for the funded PSBT.
|
||||
//
|
||||
//The packet must contain at least one non-dust output. If one or more
|
||||
//inputs are specified, no coin selection is performed. In that case every
|
||||
//input must be an UTXO known to the wallet that has not been locked
|
||||
//before. The sum of all inputs must be sufficiently greater than the sum
|
||||
//of all outputs to pay a miner fee with the specified fee rate. A change
|
||||
//output is added to the PSBT if necessary.
|
||||
// The packet must contain at least one non-dust output. If one or more
|
||||
// inputs are specified, no coin selection is performed. In that case every
|
||||
// input must be an UTXO known to the wallet that has not been locked
|
||||
// before. The sum of all inputs must be sufficiently greater than the sum
|
||||
// of all outputs to pay a miner fee with the specified fee rate. A change
|
||||
// output is added to the PSBT if necessary.
|
||||
Psbt []byte `protobuf:"bytes,1,opt,name=psbt,proto3,oneof"`
|
||||
}
|
||||
|
||||
type FundPsbtRequest_Raw struct {
|
||||
//
|
||||
//Use the outputs and optional inputs from this raw template.
|
||||
// Use the outputs and optional inputs from this raw template.
|
||||
Raw *TxTemplate `protobuf:"bytes,2,opt,name=raw,proto3,oneof"`
|
||||
}
|
||||
|
||||
@ -2691,15 +2638,13 @@ type isFundPsbtRequest_Fees interface {
|
||||
}
|
||||
|
||||
type FundPsbtRequest_TargetConf struct {
|
||||
//
|
||||
//The target number of blocks that the transaction should be confirmed in.
|
||||
// The target number of blocks that the transaction should be confirmed in.
|
||||
TargetConf uint32 `protobuf:"varint,3,opt,name=target_conf,json=targetConf,proto3,oneof"`
|
||||
}
|
||||
|
||||
type FundPsbtRequest_SatPerVbyte struct {
|
||||
//
|
||||
//The fee rate, expressed in sat/vbyte, that should be used to spend the
|
||||
//input with.
|
||||
// The fee rate, expressed in sat/vbyte, that should be used to spend the
|
||||
// input with.
|
||||
SatPerVbyte uint64 `protobuf:"varint,4,opt,name=sat_per_vbyte,json=satPerVbyte,proto3,oneof"`
|
||||
}
|
||||
|
||||
@ -2712,15 +2657,12 @@ type FundPsbtResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The funded but not yet signed PSBT packet.
|
||||
// The funded but not yet signed PSBT packet.
|
||||
FundedPsbt []byte `protobuf:"bytes,1,opt,name=funded_psbt,json=fundedPsbt,proto3" json:"funded_psbt,omitempty"`
|
||||
//
|
||||
//The index of the added change output or -1 if no change was left over.
|
||||
// The index of the added change output or -1 if no change was left over.
|
||||
ChangeOutputIndex int32 `protobuf:"varint,2,opt,name=change_output_index,json=changeOutputIndex,proto3" json:"change_output_index,omitempty"`
|
||||
//
|
||||
//The list of lock leases that were acquired for the inputs in the funded PSBT
|
||||
//packet.
|
||||
// The list of lock leases that were acquired for the inputs in the funded PSBT
|
||||
// packet.
|
||||
LockedUtxos []*UtxoLease `protobuf:"bytes,3,rep,name=locked_utxos,json=lockedUtxos,proto3" json:"locked_utxos,omitempty"`
|
||||
}
|
||||
|
||||
@ -2782,17 +2724,15 @@ type TxTemplate struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// An optional list of inputs to use. Every input must be an UTXO known to the
|
||||
// wallet that has not been locked before. The sum of all inputs must be
|
||||
// sufficiently greater than the sum of all outputs to pay a miner fee with the
|
||||
// fee rate specified in the parent message.
|
||||
//
|
||||
//An optional list of inputs to use. Every input must be an UTXO known to the
|
||||
//wallet that has not been locked before. The sum of all inputs must be
|
||||
//sufficiently greater than the sum of all outputs to pay a miner fee with the
|
||||
//fee rate specified in the parent message.
|
||||
//
|
||||
//If no inputs are specified, coin selection will be performed instead and
|
||||
//inputs of sufficient value will be added to the resulting PSBT.
|
||||
// If no inputs are specified, coin selection will be performed instead and
|
||||
// inputs of sufficient value will be added to the resulting PSBT.
|
||||
Inputs []*lnrpc.OutPoint `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"`
|
||||
//
|
||||
//A map of all addresses and the amounts to send to in the funded PSBT.
|
||||
// A map of all addresses and the amounts to send to in the funded PSBT.
|
||||
Outputs map[string]uint64 `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
@ -2847,19 +2787,15 @@ type UtxoLease struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//A 32 byte random ID that identifies the lease.
|
||||
// A 32 byte random ID that identifies the lease.
|
||||
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// The identifying outpoint of the output being leased.
|
||||
Outpoint *lnrpc.OutPoint `protobuf:"bytes,2,opt,name=outpoint,proto3" json:"outpoint,omitempty"`
|
||||
//
|
||||
//The absolute expiration of the output lease represented as a unix timestamp.
|
||||
// The absolute expiration of the output lease represented as a unix timestamp.
|
||||
Expiration uint64 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"`
|
||||
//
|
||||
//The public key script of the leased output.
|
||||
// The public key script of the leased output.
|
||||
PkScript []byte `protobuf:"bytes,4,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
|
||||
//
|
||||
//The value of the leased output in satoshis.
|
||||
// The value of the leased output in satoshis.
|
||||
Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
@ -2935,9 +2871,8 @@ type SignPsbtRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The PSBT that should be signed. The PSBT must contain all required inputs,
|
||||
//outputs, UTXO data and custom fields required to identify the signing key.
|
||||
// The PSBT that should be signed. The PSBT must contain all required inputs,
|
||||
// outputs, UTXO data and custom fields required to identify the signing key.
|
||||
FundedPsbt []byte `protobuf:"bytes,1,opt,name=funded_psbt,json=fundedPsbt,proto3" json:"funded_psbt,omitempty"`
|
||||
}
|
||||
|
||||
@ -3042,14 +2977,12 @@ type FinalizePsbtRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//A PSBT that should be signed and finalized. The PSBT must contain all
|
||||
//required inputs, outputs, UTXO data and partial signatures of all other
|
||||
//signers.
|
||||
// A PSBT that should be signed and finalized. The PSBT must contain all
|
||||
// required inputs, outputs, UTXO data and partial signatures of all other
|
||||
// signers.
|
||||
FundedPsbt []byte `protobuf:"bytes,1,opt,name=funded_psbt,json=fundedPsbt,proto3" json:"funded_psbt,omitempty"`
|
||||
//
|
||||
//The name of the account to finalize the PSBT with. If empty, the default
|
||||
//wallet account is used.
|
||||
// The name of the account to finalize the PSBT with. If empty, the default
|
||||
// wallet account is used.
|
||||
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
|
||||
}
|
||||
|
||||
@ -3247,10 +3180,9 @@ type ListSweepsResponse_TransactionIDs struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Reversed, hex-encoded string representing the transaction ids of the
|
||||
//sweeps that our node has broadcast. Note that these transactions may
|
||||
//not have confirmed yet, we record sweeps on broadcast, not confirmation.
|
||||
// Reversed, hex-encoded string representing the transaction ids of the
|
||||
// sweeps that our node has broadcast. Note that these transactions may
|
||||
// not have confirmed yet, we record sweeps on broadcast, not confirmation.
|
||||
TransactionIds []string `protobuf:"bytes,1,rep,name=transaction_ids,json=transactionIds,proto3" json:"transaction_ids,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -19,195 +19,173 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type WalletKitClient interface {
|
||||
//
|
||||
//ListUnspent returns a list of all utxos spendable by the wallet with a
|
||||
//number of confirmations between the specified minimum and maximum. By
|
||||
//default, all utxos are listed. To list only the unconfirmed utxos, set
|
||||
//the unconfirmed_only to true.
|
||||
// ListUnspent returns a list of all utxos spendable by the wallet with a
|
||||
// number of confirmations between the specified minimum and maximum. By
|
||||
// default, all utxos are listed. To list only the unconfirmed utxos, set
|
||||
// the unconfirmed_only to true.
|
||||
ListUnspent(ctx context.Context, in *ListUnspentRequest, opts ...grpc.CallOption) (*ListUnspentResponse, error)
|
||||
//
|
||||
//LeaseOutput locks an output to the given ID, preventing it from being
|
||||
//available for any future coin selection attempts. The absolute time of the
|
||||
//lock's expiration is returned. The expiration of the lock can be extended by
|
||||
//successive invocations of this RPC. Outputs can be unlocked before their
|
||||
//expiration through `ReleaseOutput`.
|
||||
// LeaseOutput locks an output to the given ID, preventing it from being
|
||||
// available for any future coin selection attempts. The absolute time of the
|
||||
// lock's expiration is returned. The expiration of the lock can be extended by
|
||||
// successive invocations of this RPC. Outputs can be unlocked before their
|
||||
// expiration through `ReleaseOutput`.
|
||||
LeaseOutput(ctx context.Context, in *LeaseOutputRequest, opts ...grpc.CallOption) (*LeaseOutputResponse, error)
|
||||
//
|
||||
//ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
//selection if it remains unspent. The ID should match the one used to
|
||||
//originally lock the output.
|
||||
// ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
// selection if it remains unspent. The ID should match the one used to
|
||||
// originally lock the output.
|
||||
ReleaseOutput(ctx context.Context, in *ReleaseOutputRequest, opts ...grpc.CallOption) (*ReleaseOutputResponse, error)
|
||||
//
|
||||
//ListLeases lists all currently locked utxos.
|
||||
// ListLeases lists all currently locked utxos.
|
||||
ListLeases(ctx context.Context, in *ListLeasesRequest, opts ...grpc.CallOption) (*ListLeasesResponse, error)
|
||||
//
|
||||
//DeriveNextKey attempts to derive the *next* key within the key family
|
||||
//(account in BIP43) specified. This method should return the next external
|
||||
//child within this branch.
|
||||
// DeriveNextKey attempts to derive the *next* key within the key family
|
||||
// (account in BIP43) specified. This method should return the next external
|
||||
// child within this branch.
|
||||
DeriveNextKey(ctx context.Context, in *KeyReq, opts ...grpc.CallOption) (*signrpc.KeyDescriptor, error)
|
||||
//
|
||||
//DeriveKey attempts to derive an arbitrary key specified by the passed
|
||||
//KeyLocator.
|
||||
// DeriveKey attempts to derive an arbitrary key specified by the passed
|
||||
// KeyLocator.
|
||||
DeriveKey(ctx context.Context, in *signrpc.KeyLocator, opts ...grpc.CallOption) (*signrpc.KeyDescriptor, error)
|
||||
//
|
||||
//NextAddr returns the next unused address within the wallet.
|
||||
// NextAddr returns the next unused address within the wallet.
|
||||
NextAddr(ctx context.Context, in *AddrRequest, opts ...grpc.CallOption) (*AddrResponse, error)
|
||||
//
|
||||
//ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
//name and key scope filter can be provided to filter through all of the
|
||||
//wallet accounts and return only those matching.
|
||||
// ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
// name and key scope filter can be provided to filter through all of the
|
||||
// wallet accounts and return only those matching.
|
||||
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
||||
//
|
||||
//RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
//in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
//scales with the number of public anchor channels but is capped at a maximum.
|
||||
// RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
// in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
// scales with the number of public anchor channels but is capped at a maximum.
|
||||
RequiredReserve(ctx context.Context, in *RequiredReserveRequest, opts ...grpc.CallOption) (*RequiredReserveResponse, error)
|
||||
//
|
||||
//ListAddresses retrieves all the addresses along with their balance. An
|
||||
//account name filter can be provided to filter through all of the
|
||||
//wallet accounts and return the addresses of only those matching.
|
||||
// ListAddresses retrieves all the addresses along with their balance. An
|
||||
// account name filter can be provided to filter through all of the
|
||||
// wallet accounts and return the addresses of only those matching.
|
||||
ListAddresses(ctx context.Context, in *ListAddressesRequest, opts ...grpc.CallOption) (*ListAddressesResponse, error)
|
||||
// ImportAccount imports an account backed by an account extended public key.
|
||||
// The master key fingerprint denotes the fingerprint of the root key
|
||||
// corresponding to the account public key (also known as the key with
|
||||
// derivation path m/). This may be required by some hardware wallets for
|
||||
// proper identification and signing.
|
||||
//
|
||||
//ImportAccount imports an account backed by an account extended public key.
|
||||
//The master key fingerprint denotes the fingerprint of the root key
|
||||
//corresponding to the account public key (also known as the key with
|
||||
//derivation path m/). This may be required by some hardware wallets for
|
||||
//proper identification and signing.
|
||||
// The address type can usually be inferred from the key's version, but may be
|
||||
// required for certain keys to map them into the proper scope.
|
||||
//
|
||||
//The address type can usually be inferred from the key's version, but may be
|
||||
//required for certain keys to map them into the proper scope.
|
||||
// For BIP-0044 keys, an address type must be specified as we intend to not
|
||||
// support importing BIP-0044 keys into the wallet using the legacy
|
||||
// pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
|
||||
// the standard BIP-0049 derivation scheme, while a witness address type will
|
||||
// force the standard BIP-0084 derivation scheme.
|
||||
//
|
||||
//For BIP-0044 keys, an address type must be specified as we intend to not
|
||||
//support importing BIP-0044 keys into the wallet using the legacy
|
||||
//pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
|
||||
//the standard BIP-0049 derivation scheme, while a witness address type will
|
||||
//force the standard BIP-0084 derivation scheme.
|
||||
// For BIP-0049 keys, an address type must also be specified to make a
|
||||
// distinction between the standard BIP-0049 address schema (nested witness
|
||||
// pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
|
||||
// externally, witness pubkeys internally).
|
||||
//
|
||||
//For BIP-0049 keys, an address type must also be specified to make a
|
||||
//distinction between the standard BIP-0049 address schema (nested witness
|
||||
//pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
|
||||
//externally, witness pubkeys internally).
|
||||
//
|
||||
//NOTE: Events (deposits/spends) for keys derived from an account will only be
|
||||
//detected by lnd if they happen after the import. Rescans to detect past
|
||||
//events will be supported later on.
|
||||
// NOTE: Events (deposits/spends) for keys derived from an account will only be
|
||||
// detected by lnd if they happen after the import. Rescans to detect past
|
||||
// events will be supported later on.
|
||||
ImportAccount(ctx context.Context, in *ImportAccountRequest, opts ...grpc.CallOption) (*ImportAccountResponse, error)
|
||||
// ImportPublicKey imports a public key as watch-only into the wallet.
|
||||
//
|
||||
//ImportPublicKey imports a public key as watch-only into the wallet.
|
||||
//
|
||||
//NOTE: Events (deposits/spends) for a key will only be detected by lnd if
|
||||
//they happen after the import. Rescans to detect past events will be
|
||||
//supported later on.
|
||||
// NOTE: Events (deposits/spends) for a key will only be detected by lnd if
|
||||
// they happen after the import. Rescans to detect past events will be
|
||||
// supported later on.
|
||||
ImportPublicKey(ctx context.Context, in *ImportPublicKeyRequest, opts ...grpc.CallOption) (*ImportPublicKeyResponse, error)
|
||||
//
|
||||
//PublishTransaction attempts to publish the passed transaction to the
|
||||
//network. Once this returns without an error, the wallet will continually
|
||||
//attempt to re-broadcast the transaction on start up, until it enters the
|
||||
//chain.
|
||||
// PublishTransaction attempts to publish the passed transaction to the
|
||||
// network. Once this returns without an error, the wallet will continually
|
||||
// attempt to re-broadcast the transaction on start up, until it enters the
|
||||
// chain.
|
||||
PublishTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*PublishResponse, error)
|
||||
//
|
||||
//SendOutputs is similar to the existing sendmany call in Bitcoind, and
|
||||
//allows the caller to create a transaction that sends to several outputs at
|
||||
//once. This is ideal when wanting to batch create a set of transactions.
|
||||
// SendOutputs is similar to the existing sendmany call in Bitcoind, and
|
||||
// allows the caller to create a transaction that sends to several outputs at
|
||||
// once. This is ideal when wanting to batch create a set of transactions.
|
||||
SendOutputs(ctx context.Context, in *SendOutputsRequest, opts ...grpc.CallOption) (*SendOutputsResponse, error)
|
||||
//
|
||||
//EstimateFee attempts to query the internal fee estimator of the wallet to
|
||||
//determine the fee (in sat/kw) to attach to a transaction in order to
|
||||
//achieve the confirmation target.
|
||||
// EstimateFee attempts to query the internal fee estimator of the wallet to
|
||||
// determine the fee (in sat/kw) to attach to a transaction in order to
|
||||
// achieve the confirmation target.
|
||||
EstimateFee(ctx context.Context, in *EstimateFeeRequest, opts ...grpc.CallOption) (*EstimateFeeResponse, error)
|
||||
// PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
// attempting to sweep within its central batching engine. Outputs with similar
|
||||
// fee rates are batched together in order to sweep them within a single
|
||||
// transaction.
|
||||
//
|
||||
//PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
//attempting to sweep within its central batching engine. Outputs with similar
|
||||
//fee rates are batched together in order to sweep them within a single
|
||||
//transaction.
|
||||
//
|
||||
//NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
|
||||
//remain supported. This is an advanced API that depends on the internals of
|
||||
//the UtxoSweeper, so things may change.
|
||||
// NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
|
||||
// remain supported. This is an advanced API that depends on the internals of
|
||||
// the UtxoSweeper, so things may change.
|
||||
PendingSweeps(ctx context.Context, in *PendingSweepsRequest, opts ...grpc.CallOption) (*PendingSweepsResponse, error)
|
||||
// BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
// takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
// central batching engine in which inputs with similar fee rates are batched
|
||||
// together to save on transaction fees. Due to this, we cannot rely on
|
||||
// bumping the fee on a specific transaction, since transactions can change at
|
||||
// any point with the addition of new inputs. The list of inputs that
|
||||
// currently exist within lnd's central batching engine can be retrieved
|
||||
// through the PendingSweeps RPC.
|
||||
//
|
||||
//BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
//takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
//central batching engine in which inputs with similar fee rates are batched
|
||||
//together to save on transaction fees. Due to this, we cannot rely on
|
||||
//bumping the fee on a specific transaction, since transactions can change at
|
||||
//any point with the addition of new inputs. The list of inputs that
|
||||
//currently exist within lnd's central batching engine can be retrieved
|
||||
//through the PendingSweeps RPC.
|
||||
// When bumping the fee of an input that currently exists within lnd's central
|
||||
// batching engine, a higher fee transaction will be created that replaces the
|
||||
// lower fee transaction through the Replace-By-Fee (RBF) policy. If it
|
||||
//
|
||||
//When bumping the fee of an input that currently exists within lnd's central
|
||||
//batching engine, a higher fee transaction will be created that replaces the
|
||||
//lower fee transaction through the Replace-By-Fee (RBF) policy. If it
|
||||
// This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
|
||||
// (CPFP), where the child transaction pays for its parent's fee. This can be
|
||||
// done by specifying an outpoint within the low fee transaction that is under
|
||||
// the control of the wallet.
|
||||
//
|
||||
//This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
|
||||
//(CPFP), where the child transaction pays for its parent's fee. This can be
|
||||
//done by specifying an outpoint within the low fee transaction that is under
|
||||
//the control of the wallet.
|
||||
// The fee preference can be expressed either as a specific fee rate or a delta
|
||||
// of blocks in which the output should be swept on-chain within. If a fee
|
||||
// preference is not explicitly specified, then an error is returned.
|
||||
//
|
||||
//The fee preference can be expressed either as a specific fee rate or a delta
|
||||
//of blocks in which the output should be swept on-chain within. If a fee
|
||||
//preference is not explicitly specified, then an error is returned.
|
||||
//
|
||||
//Note that this RPC currently doesn't perform any validation checks on the
|
||||
//fee preference being provided. For now, the responsibility of ensuring that
|
||||
//the new fee preference is sufficient is delegated to the user.
|
||||
// Note that this RPC currently doesn't perform any validation checks on the
|
||||
// fee preference being provided. For now, the responsibility of ensuring that
|
||||
// the new fee preference is sufficient is delegated to the user.
|
||||
BumpFee(ctx context.Context, in *BumpFeeRequest, opts ...grpc.CallOption) (*BumpFeeResponse, error)
|
||||
//
|
||||
//ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
//Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
//broadcast, not confirmation.
|
||||
// ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
// Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
// broadcast, not confirmation.
|
||||
ListSweeps(ctx context.Context, in *ListSweepsRequest, opts ...grpc.CallOption) (*ListSweepsResponse, error)
|
||||
//
|
||||
//LabelTransaction adds a label to a transaction. If the transaction already
|
||||
//has a label the call will fail unless the overwrite bool is set. This will
|
||||
//overwrite the exiting transaction label. Labels must not be empty, and
|
||||
//cannot exceed 500 characters.
|
||||
// LabelTransaction adds a label to a transaction. If the transaction already
|
||||
// has a label the call will fail unless the overwrite bool is set. This will
|
||||
// overwrite the exiting transaction label. Labels must not be empty, and
|
||||
// cannot exceed 500 characters.
|
||||
LabelTransaction(ctx context.Context, in *LabelTransactionRequest, opts ...grpc.CallOption) (*LabelTransactionResponse, error)
|
||||
// FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
// the outputs specified in the template. There are two ways of specifying a
|
||||
// template: Either by passing in a PSBT with at least one output declared or
|
||||
// by passing in a raw TxTemplate message.
|
||||
//
|
||||
//FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
//the outputs specified in the template. There are two ways of specifying a
|
||||
//template: Either by passing in a PSBT with at least one output declared or
|
||||
//by passing in a raw TxTemplate message.
|
||||
// If there are no inputs specified in the template, coin selection is
|
||||
// performed automatically. If the template does contain any inputs, it is
|
||||
// assumed that full coin selection happened externally and no additional
|
||||
// inputs are added. If the specified inputs aren't enough to fund the outputs
|
||||
// with the given fee rate, an error is returned.
|
||||
//
|
||||
//If there are no inputs specified in the template, coin selection is
|
||||
//performed automatically. If the template does contain any inputs, it is
|
||||
//assumed that full coin selection happened externally and no additional
|
||||
//inputs are added. If the specified inputs aren't enough to fund the outputs
|
||||
//with the given fee rate, an error is returned.
|
||||
// After either selecting or verifying the inputs, all input UTXOs are locked
|
||||
// with an internal app ID.
|
||||
//
|
||||
//After either selecting or verifying the inputs, all input UTXOs are locked
|
||||
//with an internal app ID.
|
||||
//
|
||||
//NOTE: If this method returns without an error, it is the caller's
|
||||
//responsibility to either spend the locked UTXOs (by finalizing and then
|
||||
//publishing the transaction) or to unlock/release the locked UTXOs in case of
|
||||
//an error on the caller's side.
|
||||
// NOTE: If this method returns without an error, it is the caller's
|
||||
// responsibility to either spend the locked UTXOs (by finalizing and then
|
||||
// publishing the transaction) or to unlock/release the locked UTXOs in case of
|
||||
// an error on the caller's side.
|
||||
FundPsbt(ctx context.Context, in *FundPsbtRequest, opts ...grpc.CallOption) (*FundPsbtResponse, error)
|
||||
// SignPsbt expects a partial transaction with all inputs and outputs fully
|
||||
// declared and tries to sign all unsigned inputs that have all required fields
|
||||
// (UTXO information, BIP32 derivation information, witness or sig scripts)
|
||||
// set.
|
||||
// If no error is returned, the PSBT is ready to be given to the next signer or
|
||||
// to be finalized if lnd was the last signer.
|
||||
//
|
||||
//SignPsbt expects a partial transaction with all inputs and outputs fully
|
||||
//declared and tries to sign all unsigned inputs that have all required fields
|
||||
//(UTXO information, BIP32 derivation information, witness or sig scripts)
|
||||
//set.
|
||||
//If no error is returned, the PSBT is ready to be given to the next signer or
|
||||
//to be finalized if lnd was the last signer.
|
||||
//
|
||||
//NOTE: This RPC only signs inputs (and only those it can sign), it does not
|
||||
//perform any other tasks (such as coin selection, UTXO locking or
|
||||
//input/output/fee value validation, PSBT finalization). Any input that is
|
||||
//incomplete will be skipped.
|
||||
// NOTE: This RPC only signs inputs (and only those it can sign), it does not
|
||||
// perform any other tasks (such as coin selection, UTXO locking or
|
||||
// input/output/fee value validation, PSBT finalization). Any input that is
|
||||
// incomplete will be skipped.
|
||||
SignPsbt(ctx context.Context, in *SignPsbtRequest, opts ...grpc.CallOption) (*SignPsbtResponse, error)
|
||||
// FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
// declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
// the last signer of the transaction. That means, if there are any unsigned
|
||||
// non-witness inputs or inputs without UTXO information attached or inputs
|
||||
// without witness data that do not belong to lnd's wallet, this method will
|
||||
// fail. If no error is returned, the PSBT is ready to be extracted and the
|
||||
// final TX within to be broadcast.
|
||||
//
|
||||
//FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
//declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
//the last signer of the transaction. That means, if there are any unsigned
|
||||
//non-witness inputs or inputs without UTXO information attached or inputs
|
||||
//without witness data that do not belong to lnd's wallet, this method will
|
||||
//fail. If no error is returned, the PSBT is ready to be extracted and the
|
||||
//final TX within to be broadcast.
|
||||
//
|
||||
//NOTE: This method does NOT publish the transaction once finalized. It is the
|
||||
//caller's responsibility to either publish the transaction on success or
|
||||
//unlock/release any locked UTXOs in case of an error in this method.
|
||||
// NOTE: This method does NOT publish the transaction once finalized. It is the
|
||||
// caller's responsibility to either publish the transaction on success or
|
||||
// unlock/release any locked UTXOs in case of an error in this method.
|
||||
FinalizePsbt(ctx context.Context, in *FinalizePsbtRequest, opts ...grpc.CallOption) (*FinalizePsbtResponse, error)
|
||||
}
|
||||
|
||||
@ -421,195 +399,173 @@ func (c *walletKitClient) FinalizePsbt(ctx context.Context, in *FinalizePsbtRequ
|
||||
// All implementations must embed UnimplementedWalletKitServer
|
||||
// for forward compatibility
|
||||
type WalletKitServer interface {
|
||||
//
|
||||
//ListUnspent returns a list of all utxos spendable by the wallet with a
|
||||
//number of confirmations between the specified minimum and maximum. By
|
||||
//default, all utxos are listed. To list only the unconfirmed utxos, set
|
||||
//the unconfirmed_only to true.
|
||||
// ListUnspent returns a list of all utxos spendable by the wallet with a
|
||||
// number of confirmations between the specified minimum and maximum. By
|
||||
// default, all utxos are listed. To list only the unconfirmed utxos, set
|
||||
// the unconfirmed_only to true.
|
||||
ListUnspent(context.Context, *ListUnspentRequest) (*ListUnspentResponse, error)
|
||||
//
|
||||
//LeaseOutput locks an output to the given ID, preventing it from being
|
||||
//available for any future coin selection attempts. The absolute time of the
|
||||
//lock's expiration is returned. The expiration of the lock can be extended by
|
||||
//successive invocations of this RPC. Outputs can be unlocked before their
|
||||
//expiration through `ReleaseOutput`.
|
||||
// LeaseOutput locks an output to the given ID, preventing it from being
|
||||
// available for any future coin selection attempts. The absolute time of the
|
||||
// lock's expiration is returned. The expiration of the lock can be extended by
|
||||
// successive invocations of this RPC. Outputs can be unlocked before their
|
||||
// expiration through `ReleaseOutput`.
|
||||
LeaseOutput(context.Context, *LeaseOutputRequest) (*LeaseOutputResponse, error)
|
||||
//
|
||||
//ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
//selection if it remains unspent. The ID should match the one used to
|
||||
//originally lock the output.
|
||||
// ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
// selection if it remains unspent. The ID should match the one used to
|
||||
// originally lock the output.
|
||||
ReleaseOutput(context.Context, *ReleaseOutputRequest) (*ReleaseOutputResponse, error)
|
||||
//
|
||||
//ListLeases lists all currently locked utxos.
|
||||
// ListLeases lists all currently locked utxos.
|
||||
ListLeases(context.Context, *ListLeasesRequest) (*ListLeasesResponse, error)
|
||||
//
|
||||
//DeriveNextKey attempts to derive the *next* key within the key family
|
||||
//(account in BIP43) specified. This method should return the next external
|
||||
//child within this branch.
|
||||
// DeriveNextKey attempts to derive the *next* key within the key family
|
||||
// (account in BIP43) specified. This method should return the next external
|
||||
// child within this branch.
|
||||
DeriveNextKey(context.Context, *KeyReq) (*signrpc.KeyDescriptor, error)
|
||||
//
|
||||
//DeriveKey attempts to derive an arbitrary key specified by the passed
|
||||
//KeyLocator.
|
||||
// DeriveKey attempts to derive an arbitrary key specified by the passed
|
||||
// KeyLocator.
|
||||
DeriveKey(context.Context, *signrpc.KeyLocator) (*signrpc.KeyDescriptor, error)
|
||||
//
|
||||
//NextAddr returns the next unused address within the wallet.
|
||||
// NextAddr returns the next unused address within the wallet.
|
||||
NextAddr(context.Context, *AddrRequest) (*AddrResponse, error)
|
||||
//
|
||||
//ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
//name and key scope filter can be provided to filter through all of the
|
||||
//wallet accounts and return only those matching.
|
||||
// ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
// name and key scope filter can be provided to filter through all of the
|
||||
// wallet accounts and return only those matching.
|
||||
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
||||
//
|
||||
//RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
//in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
//scales with the number of public anchor channels but is capped at a maximum.
|
||||
// RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
// in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
// scales with the number of public anchor channels but is capped at a maximum.
|
||||
RequiredReserve(context.Context, *RequiredReserveRequest) (*RequiredReserveResponse, error)
|
||||
//
|
||||
//ListAddresses retrieves all the addresses along with their balance. An
|
||||
//account name filter can be provided to filter through all of the
|
||||
//wallet accounts and return the addresses of only those matching.
|
||||
// ListAddresses retrieves all the addresses along with their balance. An
|
||||
// account name filter can be provided to filter through all of the
|
||||
// wallet accounts and return the addresses of only those matching.
|
||||
ListAddresses(context.Context, *ListAddressesRequest) (*ListAddressesResponse, error)
|
||||
// ImportAccount imports an account backed by an account extended public key.
|
||||
// The master key fingerprint denotes the fingerprint of the root key
|
||||
// corresponding to the account public key (also known as the key with
|
||||
// derivation path m/). This may be required by some hardware wallets for
|
||||
// proper identification and signing.
|
||||
//
|
||||
//ImportAccount imports an account backed by an account extended public key.
|
||||
//The master key fingerprint denotes the fingerprint of the root key
|
||||
//corresponding to the account public key (also known as the key with
|
||||
//derivation path m/). This may be required by some hardware wallets for
|
||||
//proper identification and signing.
|
||||
// The address type can usually be inferred from the key's version, but may be
|
||||
// required for certain keys to map them into the proper scope.
|
||||
//
|
||||
//The address type can usually be inferred from the key's version, but may be
|
||||
//required for certain keys to map them into the proper scope.
|
||||
// For BIP-0044 keys, an address type must be specified as we intend to not
|
||||
// support importing BIP-0044 keys into the wallet using the legacy
|
||||
// pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
|
||||
// the standard BIP-0049 derivation scheme, while a witness address type will
|
||||
// force the standard BIP-0084 derivation scheme.
|
||||
//
|
||||
//For BIP-0044 keys, an address type must be specified as we intend to not
|
||||
//support importing BIP-0044 keys into the wallet using the legacy
|
||||
//pay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force
|
||||
//the standard BIP-0049 derivation scheme, while a witness address type will
|
||||
//force the standard BIP-0084 derivation scheme.
|
||||
// For BIP-0049 keys, an address type must also be specified to make a
|
||||
// distinction between the standard BIP-0049 address schema (nested witness
|
||||
// pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
|
||||
// externally, witness pubkeys internally).
|
||||
//
|
||||
//For BIP-0049 keys, an address type must also be specified to make a
|
||||
//distinction between the standard BIP-0049 address schema (nested witness
|
||||
//pubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys
|
||||
//externally, witness pubkeys internally).
|
||||
//
|
||||
//NOTE: Events (deposits/spends) for keys derived from an account will only be
|
||||
//detected by lnd if they happen after the import. Rescans to detect past
|
||||
//events will be supported later on.
|
||||
// NOTE: Events (deposits/spends) for keys derived from an account will only be
|
||||
// detected by lnd if they happen after the import. Rescans to detect past
|
||||
// events will be supported later on.
|
||||
ImportAccount(context.Context, *ImportAccountRequest) (*ImportAccountResponse, error)
|
||||
// ImportPublicKey imports a public key as watch-only into the wallet.
|
||||
//
|
||||
//ImportPublicKey imports a public key as watch-only into the wallet.
|
||||
//
|
||||
//NOTE: Events (deposits/spends) for a key will only be detected by lnd if
|
||||
//they happen after the import. Rescans to detect past events will be
|
||||
//supported later on.
|
||||
// NOTE: Events (deposits/spends) for a key will only be detected by lnd if
|
||||
// they happen after the import. Rescans to detect past events will be
|
||||
// supported later on.
|
||||
ImportPublicKey(context.Context, *ImportPublicKeyRequest) (*ImportPublicKeyResponse, error)
|
||||
//
|
||||
//PublishTransaction attempts to publish the passed transaction to the
|
||||
//network. Once this returns without an error, the wallet will continually
|
||||
//attempt to re-broadcast the transaction on start up, until it enters the
|
||||
//chain.
|
||||
// PublishTransaction attempts to publish the passed transaction to the
|
||||
// network. Once this returns without an error, the wallet will continually
|
||||
// attempt to re-broadcast the transaction on start up, until it enters the
|
||||
// chain.
|
||||
PublishTransaction(context.Context, *Transaction) (*PublishResponse, error)
|
||||
//
|
||||
//SendOutputs is similar to the existing sendmany call in Bitcoind, and
|
||||
//allows the caller to create a transaction that sends to several outputs at
|
||||
//once. This is ideal when wanting to batch create a set of transactions.
|
||||
// SendOutputs is similar to the existing sendmany call in Bitcoind, and
|
||||
// allows the caller to create a transaction that sends to several outputs at
|
||||
// once. This is ideal when wanting to batch create a set of transactions.
|
||||
SendOutputs(context.Context, *SendOutputsRequest) (*SendOutputsResponse, error)
|
||||
//
|
||||
//EstimateFee attempts to query the internal fee estimator of the wallet to
|
||||
//determine the fee (in sat/kw) to attach to a transaction in order to
|
||||
//achieve the confirmation target.
|
||||
// EstimateFee attempts to query the internal fee estimator of the wallet to
|
||||
// determine the fee (in sat/kw) to attach to a transaction in order to
|
||||
// achieve the confirmation target.
|
||||
EstimateFee(context.Context, *EstimateFeeRequest) (*EstimateFeeResponse, error)
|
||||
// PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
// attempting to sweep within its central batching engine. Outputs with similar
|
||||
// fee rates are batched together in order to sweep them within a single
|
||||
// transaction.
|
||||
//
|
||||
//PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
//attempting to sweep within its central batching engine. Outputs with similar
|
||||
//fee rates are batched together in order to sweep them within a single
|
||||
//transaction.
|
||||
//
|
||||
//NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
|
||||
//remain supported. This is an advanced API that depends on the internals of
|
||||
//the UtxoSweeper, so things may change.
|
||||
// NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to
|
||||
// remain supported. This is an advanced API that depends on the internals of
|
||||
// the UtxoSweeper, so things may change.
|
||||
PendingSweeps(context.Context, *PendingSweepsRequest) (*PendingSweepsResponse, error)
|
||||
// BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
// takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
// central batching engine in which inputs with similar fee rates are batched
|
||||
// together to save on transaction fees. Due to this, we cannot rely on
|
||||
// bumping the fee on a specific transaction, since transactions can change at
|
||||
// any point with the addition of new inputs. The list of inputs that
|
||||
// currently exist within lnd's central batching engine can be retrieved
|
||||
// through the PendingSweeps RPC.
|
||||
//
|
||||
//BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
//takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
//central batching engine in which inputs with similar fee rates are batched
|
||||
//together to save on transaction fees. Due to this, we cannot rely on
|
||||
//bumping the fee on a specific transaction, since transactions can change at
|
||||
//any point with the addition of new inputs. The list of inputs that
|
||||
//currently exist within lnd's central batching engine can be retrieved
|
||||
//through the PendingSweeps RPC.
|
||||
// When bumping the fee of an input that currently exists within lnd's central
|
||||
// batching engine, a higher fee transaction will be created that replaces the
|
||||
// lower fee transaction through the Replace-By-Fee (RBF) policy. If it
|
||||
//
|
||||
//When bumping the fee of an input that currently exists within lnd's central
|
||||
//batching engine, a higher fee transaction will be created that replaces the
|
||||
//lower fee transaction through the Replace-By-Fee (RBF) policy. If it
|
||||
// This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
|
||||
// (CPFP), where the child transaction pays for its parent's fee. This can be
|
||||
// done by specifying an outpoint within the low fee transaction that is under
|
||||
// the control of the wallet.
|
||||
//
|
||||
//This RPC also serves useful when wanting to perform a Child-Pays-For-Parent
|
||||
//(CPFP), where the child transaction pays for its parent's fee. This can be
|
||||
//done by specifying an outpoint within the low fee transaction that is under
|
||||
//the control of the wallet.
|
||||
// The fee preference can be expressed either as a specific fee rate or a delta
|
||||
// of blocks in which the output should be swept on-chain within. If a fee
|
||||
// preference is not explicitly specified, then an error is returned.
|
||||
//
|
||||
//The fee preference can be expressed either as a specific fee rate or a delta
|
||||
//of blocks in which the output should be swept on-chain within. If a fee
|
||||
//preference is not explicitly specified, then an error is returned.
|
||||
//
|
||||
//Note that this RPC currently doesn't perform any validation checks on the
|
||||
//fee preference being provided. For now, the responsibility of ensuring that
|
||||
//the new fee preference is sufficient is delegated to the user.
|
||||
// Note that this RPC currently doesn't perform any validation checks on the
|
||||
// fee preference being provided. For now, the responsibility of ensuring that
|
||||
// the new fee preference is sufficient is delegated to the user.
|
||||
BumpFee(context.Context, *BumpFeeRequest) (*BumpFeeResponse, error)
|
||||
//
|
||||
//ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
//Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
//broadcast, not confirmation.
|
||||
// ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
// Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
// broadcast, not confirmation.
|
||||
ListSweeps(context.Context, *ListSweepsRequest) (*ListSweepsResponse, error)
|
||||
//
|
||||
//LabelTransaction adds a label to a transaction. If the transaction already
|
||||
//has a label the call will fail unless the overwrite bool is set. This will
|
||||
//overwrite the exiting transaction label. Labels must not be empty, and
|
||||
//cannot exceed 500 characters.
|
||||
// LabelTransaction adds a label to a transaction. If the transaction already
|
||||
// has a label the call will fail unless the overwrite bool is set. This will
|
||||
// overwrite the exiting transaction label. Labels must not be empty, and
|
||||
// cannot exceed 500 characters.
|
||||
LabelTransaction(context.Context, *LabelTransactionRequest) (*LabelTransactionResponse, error)
|
||||
// FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
// the outputs specified in the template. There are two ways of specifying a
|
||||
// template: Either by passing in a PSBT with at least one output declared or
|
||||
// by passing in a raw TxTemplate message.
|
||||
//
|
||||
//FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
//the outputs specified in the template. There are two ways of specifying a
|
||||
//template: Either by passing in a PSBT with at least one output declared or
|
||||
//by passing in a raw TxTemplate message.
|
||||
// If there are no inputs specified in the template, coin selection is
|
||||
// performed automatically. If the template does contain any inputs, it is
|
||||
// assumed that full coin selection happened externally and no additional
|
||||
// inputs are added. If the specified inputs aren't enough to fund the outputs
|
||||
// with the given fee rate, an error is returned.
|
||||
//
|
||||
//If there are no inputs specified in the template, coin selection is
|
||||
//performed automatically. If the template does contain any inputs, it is
|
||||
//assumed that full coin selection happened externally and no additional
|
||||
//inputs are added. If the specified inputs aren't enough to fund the outputs
|
||||
//with the given fee rate, an error is returned.
|
||||
// After either selecting or verifying the inputs, all input UTXOs are locked
|
||||
// with an internal app ID.
|
||||
//
|
||||
//After either selecting or verifying the inputs, all input UTXOs are locked
|
||||
//with an internal app ID.
|
||||
//
|
||||
//NOTE: If this method returns without an error, it is the caller's
|
||||
//responsibility to either spend the locked UTXOs (by finalizing and then
|
||||
//publishing the transaction) or to unlock/release the locked UTXOs in case of
|
||||
//an error on the caller's side.
|
||||
// NOTE: If this method returns without an error, it is the caller's
|
||||
// responsibility to either spend the locked UTXOs (by finalizing and then
|
||||
// publishing the transaction) or to unlock/release the locked UTXOs in case of
|
||||
// an error on the caller's side.
|
||||
FundPsbt(context.Context, *FundPsbtRequest) (*FundPsbtResponse, error)
|
||||
// SignPsbt expects a partial transaction with all inputs and outputs fully
|
||||
// declared and tries to sign all unsigned inputs that have all required fields
|
||||
// (UTXO information, BIP32 derivation information, witness or sig scripts)
|
||||
// set.
|
||||
// If no error is returned, the PSBT is ready to be given to the next signer or
|
||||
// to be finalized if lnd was the last signer.
|
||||
//
|
||||
//SignPsbt expects a partial transaction with all inputs and outputs fully
|
||||
//declared and tries to sign all unsigned inputs that have all required fields
|
||||
//(UTXO information, BIP32 derivation information, witness or sig scripts)
|
||||
//set.
|
||||
//If no error is returned, the PSBT is ready to be given to the next signer or
|
||||
//to be finalized if lnd was the last signer.
|
||||
//
|
||||
//NOTE: This RPC only signs inputs (and only those it can sign), it does not
|
||||
//perform any other tasks (such as coin selection, UTXO locking or
|
||||
//input/output/fee value validation, PSBT finalization). Any input that is
|
||||
//incomplete will be skipped.
|
||||
// NOTE: This RPC only signs inputs (and only those it can sign), it does not
|
||||
// perform any other tasks (such as coin selection, UTXO locking or
|
||||
// input/output/fee value validation, PSBT finalization). Any input that is
|
||||
// incomplete will be skipped.
|
||||
SignPsbt(context.Context, *SignPsbtRequest) (*SignPsbtResponse, error)
|
||||
// FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
// declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
// the last signer of the transaction. That means, if there are any unsigned
|
||||
// non-witness inputs or inputs without UTXO information attached or inputs
|
||||
// without witness data that do not belong to lnd's wallet, this method will
|
||||
// fail. If no error is returned, the PSBT is ready to be extracted and the
|
||||
// final TX within to be broadcast.
|
||||
//
|
||||
//FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
//declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
//the last signer of the transaction. That means, if there are any unsigned
|
||||
//non-witness inputs or inputs without UTXO information attached or inputs
|
||||
//without witness data that do not belong to lnd's wallet, this method will
|
||||
//fail. If no error is returned, the PSBT is ready to be extracted and the
|
||||
//final TX within to be broadcast.
|
||||
//
|
||||
//NOTE: This method does NOT publish the transaction once finalized. It is the
|
||||
//caller's responsibility to either publish the transaction on success or
|
||||
//unlock/release any locked UTXOs in case of an error in this method.
|
||||
// NOTE: This method does NOT publish the transaction once finalized. It is the
|
||||
// caller's responsibility to either publish the transaction on success or
|
||||
// unlock/release any locked UTXOs in case of an error in this method.
|
||||
FinalizePsbt(context.Context, *FinalizePsbtRequest) (*FinalizePsbtResponse, error)
|
||||
mustEmbedUnimplementedWalletKitServer()
|
||||
}
|
||||
|
@ -25,15 +25,13 @@ type GenSeedRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
//to encrypt the generated aezeed cipher seed. When using REST, this field
|
||||
//must be encoded as base64.
|
||||
// aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
// to encrypt the generated aezeed cipher seed. When using REST, this field
|
||||
// must be encoded as base64.
|
||||
AezeedPassphrase []byte `protobuf:"bytes,1,opt,name=aezeed_passphrase,json=aezeedPassphrase,proto3" json:"aezeed_passphrase,omitempty"`
|
||||
//
|
||||
//seed_entropy is an optional 16-bytes generated via CSPRNG. If not
|
||||
//specified, then a fresh set of randomness will be used to create the seed.
|
||||
//When using REST, this field must be encoded as base64.
|
||||
// seed_entropy is an optional 16-bytes generated via CSPRNG. If not
|
||||
// specified, then a fresh set of randomness will be used to create the seed.
|
||||
// When using REST, this field must be encoded as base64.
|
||||
SeedEntropy []byte `protobuf:"bytes,2,opt,name=seed_entropy,json=seedEntropy,proto3" json:"seed_entropy,omitempty"`
|
||||
}
|
||||
|
||||
@ -88,16 +86,14 @@ type GenSeedResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
|
||||
//cipher seed obtained by the user. This field is optional, as if not
|
||||
//provided, then the daemon will generate a new cipher seed for the user.
|
||||
//Otherwise, then the daemon will attempt to recover the wallet state linked
|
||||
//to this cipher seed.
|
||||
// cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
|
||||
// cipher seed obtained by the user. This field is optional, as if not
|
||||
// provided, then the daemon will generate a new cipher seed for the user.
|
||||
// Otherwise, then the daemon will attempt to recover the wallet state linked
|
||||
// to this cipher seed.
|
||||
CipherSeedMnemonic []string `protobuf:"bytes,1,rep,name=cipher_seed_mnemonic,json=cipherSeedMnemonic,proto3" json:"cipher_seed_mnemonic,omitempty"`
|
||||
//
|
||||
//enciphered_seed are the raw aezeed cipher seed bytes. This is the raw
|
||||
//cipher text before run through our mnemonic encoding scheme.
|
||||
// enciphered_seed are the raw aezeed cipher seed bytes. This is the raw
|
||||
// cipher text before run through our mnemonic encoding scheme.
|
||||
EncipheredSeed []byte `protobuf:"bytes,2,opt,name=enciphered_seed,json=encipheredSeed,proto3" json:"enciphered_seed,omitempty"`
|
||||
}
|
||||
|
||||
@ -152,77 +148,67 @@ type InitWalletRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//wallet_password is the passphrase that should be used to encrypt the
|
||||
//wallet. This MUST be at least 8 chars in length. After creation, this
|
||||
//password is required to unlock the daemon. When using REST, this field
|
||||
//must be encoded as base64.
|
||||
// wallet_password is the passphrase that should be used to encrypt the
|
||||
// wallet. This MUST be at least 8 chars in length. After creation, this
|
||||
// password is required to unlock the daemon. When using REST, this field
|
||||
// must be encoded as base64.
|
||||
WalletPassword []byte `protobuf:"bytes,1,opt,name=wallet_password,json=walletPassword,proto3" json:"wallet_password,omitempty"`
|
||||
//
|
||||
//cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
|
||||
//cipher seed obtained by the user. This may have been generated by the
|
||||
//GenSeed method, or be an existing seed.
|
||||
// cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
|
||||
// cipher seed obtained by the user. This may have been generated by the
|
||||
// GenSeed method, or be an existing seed.
|
||||
CipherSeedMnemonic []string `protobuf:"bytes,2,rep,name=cipher_seed_mnemonic,json=cipherSeedMnemonic,proto3" json:"cipher_seed_mnemonic,omitempty"`
|
||||
//
|
||||
//aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
//to encrypt the generated aezeed cipher seed. When using REST, this field
|
||||
//must be encoded as base64.
|
||||
// aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
// to encrypt the generated aezeed cipher seed. When using REST, this field
|
||||
// must be encoded as base64.
|
||||
AezeedPassphrase []byte `protobuf:"bytes,3,opt,name=aezeed_passphrase,json=aezeedPassphrase,proto3" json:"aezeed_passphrase,omitempty"`
|
||||
//
|
||||
//recovery_window is an optional argument specifying the address lookahead
|
||||
//when restoring a wallet seed. The recovery window applies to each
|
||||
//individual branch of the BIP44 derivation paths. Supplying a recovery
|
||||
//window of zero indicates that no addresses should be recovered, such after
|
||||
//the first initialization of the wallet.
|
||||
// recovery_window is an optional argument specifying the address lookahead
|
||||
// when restoring a wallet seed. The recovery window applies to each
|
||||
// individual branch of the BIP44 derivation paths. Supplying a recovery
|
||||
// window of zero indicates that no addresses should be recovered, such after
|
||||
// the first initialization of the wallet.
|
||||
RecoveryWindow int32 `protobuf:"varint,4,opt,name=recovery_window,json=recoveryWindow,proto3" json:"recovery_window,omitempty"`
|
||||
//
|
||||
//channel_backups is an optional argument that allows clients to recover the
|
||||
//settled funds within a set of channels. This should be populated if the
|
||||
//user was unable to close out all channels and sweep funds before partial or
|
||||
//total data loss occurred. If specified, then after on-chain recovery of
|
||||
//funds, lnd begin to carry out the data loss recovery protocol in order to
|
||||
//recover the funds in each channel from a remote force closed transaction.
|
||||
// channel_backups is an optional argument that allows clients to recover the
|
||||
// settled funds within a set of channels. This should be populated if the
|
||||
// user was unable to close out all channels and sweep funds before partial or
|
||||
// total data loss occurred. If specified, then after on-chain recovery of
|
||||
// funds, lnd begin to carry out the data loss recovery protocol in order to
|
||||
// recover the funds in each channel from a remote force closed transaction.
|
||||
ChannelBackups *ChanBackupSnapshot `protobuf:"bytes,5,opt,name=channel_backups,json=channelBackups,proto3" json:"channel_backups,omitempty"`
|
||||
//
|
||||
//stateless_init is an optional argument instructing the daemon NOT to create
|
||||
//any *.macaroon files in its filesystem. If this parameter is set, then the
|
||||
//admin macaroon returned in the response MUST be stored by the caller of the
|
||||
//RPC as otherwise all access to the daemon will be lost!
|
||||
// stateless_init is an optional argument instructing the daemon NOT to create
|
||||
// any *.macaroon files in its filesystem. If this parameter is set, then the
|
||||
// admin macaroon returned in the response MUST be stored by the caller of the
|
||||
// RPC as otherwise all access to the daemon will be lost!
|
||||
StatelessInit bool `protobuf:"varint,6,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
|
||||
//
|
||||
//extended_master_key is an alternative to specifying cipher_seed_mnemonic and
|
||||
//aezeed_passphrase. Instead of deriving the master root key from the entropy
|
||||
//of an aezeed cipher seed, the given extended master root key is used
|
||||
//directly as the wallet's master key. This allows users to import/use a
|
||||
//master key from another wallet. When doing so, lnd still uses its default
|
||||
//SegWit only (BIP49/84) derivation paths and funds from custom/non-default
|
||||
//derivation paths will not automatically appear in the on-chain wallet. Using
|
||||
//an 'xprv' instead of an aezeed also has the disadvantage that the wallet's
|
||||
//birthday is not known as that is an information that's only encoded in the
|
||||
//aezeed, not the xprv. Therefore a birthday needs to be specified in
|
||||
//extended_master_key_birthday_timestamp or a "safe" default value will be
|
||||
//used.
|
||||
// extended_master_key is an alternative to specifying cipher_seed_mnemonic and
|
||||
// aezeed_passphrase. Instead of deriving the master root key from the entropy
|
||||
// of an aezeed cipher seed, the given extended master root key is used
|
||||
// directly as the wallet's master key. This allows users to import/use a
|
||||
// master key from another wallet. When doing so, lnd still uses its default
|
||||
// SegWit only (BIP49/84) derivation paths and funds from custom/non-default
|
||||
// derivation paths will not automatically appear in the on-chain wallet. Using
|
||||
// an 'xprv' instead of an aezeed also has the disadvantage that the wallet's
|
||||
// birthday is not known as that is an information that's only encoded in the
|
||||
// aezeed, not the xprv. Therefore a birthday needs to be specified in
|
||||
// extended_master_key_birthday_timestamp or a "safe" default value will be
|
||||
// used.
|
||||
ExtendedMasterKey string `protobuf:"bytes,7,opt,name=extended_master_key,json=extendedMasterKey,proto3" json:"extended_master_key,omitempty"`
|
||||
//
|
||||
//extended_master_key_birthday_timestamp is the optional unix timestamp in
|
||||
//seconds to use as the wallet's birthday when using an extended master key
|
||||
//to restore the wallet. lnd will only start scanning for funds in blocks that
|
||||
//are after the birthday which can speed up the process significantly. If the
|
||||
//birthday is not known, this should be left at its default value of 0 in
|
||||
//which case lnd will start scanning from the first SegWit block (481824 on
|
||||
//mainnet).
|
||||
// extended_master_key_birthday_timestamp is the optional unix timestamp in
|
||||
// seconds to use as the wallet's birthday when using an extended master key
|
||||
// to restore the wallet. lnd will only start scanning for funds in blocks that
|
||||
// are after the birthday which can speed up the process significantly. If the
|
||||
// birthday is not known, this should be left at its default value of 0 in
|
||||
// which case lnd will start scanning from the first SegWit block (481824 on
|
||||
// mainnet).
|
||||
ExtendedMasterKeyBirthdayTimestamp uint64 `protobuf:"varint,8,opt,name=extended_master_key_birthday_timestamp,json=extendedMasterKeyBirthdayTimestamp,proto3" json:"extended_master_key_birthday_timestamp,omitempty"`
|
||||
//
|
||||
//watch_only is the third option of initializing a wallet: by importing
|
||||
//account xpubs only and therefore creating a watch-only wallet that does not
|
||||
//contain any private keys. That means the wallet won't be able to sign for
|
||||
//any of the keys and _needs_ to be run with a remote signer that has the
|
||||
//corresponding private keys and can serve signing RPC requests.
|
||||
// watch_only is the third option of initializing a wallet: by importing
|
||||
// account xpubs only and therefore creating a watch-only wallet that does not
|
||||
// contain any private keys. That means the wallet won't be able to sign for
|
||||
// any of the keys and _needs_ to be run with a remote signer that has the
|
||||
// corresponding private keys and can serve signing RPC requests.
|
||||
WatchOnly *WatchOnly `protobuf:"bytes,9,opt,name=watch_only,json=watchOnly,proto3" json:"watch_only,omitempty"`
|
||||
//
|
||||
//macaroon_root_key is an optional 32 byte macaroon root key that can be
|
||||
//provided when initializing the wallet rather than letting lnd generate one
|
||||
//on its own.
|
||||
// macaroon_root_key is an optional 32 byte macaroon root key that can be
|
||||
// provided when initializing the wallet rather than letting lnd generate one
|
||||
// on its own.
|
||||
MacaroonRootKey []byte `protobuf:"bytes,10,opt,name=macaroon_root_key,json=macaroonRootKey,proto3" json:"macaroon_root_key,omitempty"`
|
||||
}
|
||||
|
||||
@ -333,12 +319,11 @@ type InitWalletResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The binary serialized admin macaroon that can be used to access the daemon
|
||||
//after creating the wallet. If the stateless_init parameter was set to true,
|
||||
//this is the ONLY copy of the macaroon and MUST be stored safely by the
|
||||
//caller. Otherwise a copy of this macaroon is also persisted on disk by the
|
||||
//daemon, together with other macaroon files.
|
||||
// The binary serialized admin macaroon that can be used to access the daemon
|
||||
// after creating the wallet. If the stateless_init parameter was set to true,
|
||||
// this is the ONLY copy of the macaroon and MUST be stored safely by the
|
||||
// caller. Otherwise a copy of this macaroon is also persisted on disk by the
|
||||
// daemon, together with other macaroon files.
|
||||
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
|
||||
}
|
||||
|
||||
@ -386,25 +371,22 @@ type WatchOnly struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The unix timestamp in seconds of when the master key was created. lnd will
|
||||
//only start scanning for funds in blocks that are after the birthday which
|
||||
//can speed up the process significantly. If the birthday is not known, this
|
||||
//should be left at its default value of 0 in which case lnd will start
|
||||
//scanning from the first SegWit block (481824 on mainnet).
|
||||
// The unix timestamp in seconds of when the master key was created. lnd will
|
||||
// only start scanning for funds in blocks that are after the birthday which
|
||||
// can speed up the process significantly. If the birthday is not known, this
|
||||
// should be left at its default value of 0 in which case lnd will start
|
||||
// scanning from the first SegWit block (481824 on mainnet).
|
||||
MasterKeyBirthdayTimestamp uint64 `protobuf:"varint,1,opt,name=master_key_birthday_timestamp,json=masterKeyBirthdayTimestamp,proto3" json:"master_key_birthday_timestamp,omitempty"`
|
||||
//
|
||||
//The fingerprint of the root key (also known as the key with derivation path
|
||||
//m/) from which the account public keys were derived from. This may be
|
||||
//required by some hardware wallets for proper identification and signing. The
|
||||
//bytes must be in big-endian order.
|
||||
// The fingerprint of the root key (also known as the key with derivation path
|
||||
// m/) from which the account public keys were derived from. This may be
|
||||
// required by some hardware wallets for proper identification and signing. The
|
||||
// bytes must be in big-endian order.
|
||||
MasterKeyFingerprint []byte `protobuf:"bytes,2,opt,name=master_key_fingerprint,json=masterKeyFingerprint,proto3" json:"master_key_fingerprint,omitempty"`
|
||||
//
|
||||
//The list of accounts to import. There _must_ be an account for all of lnd's
|
||||
//main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the
|
||||
//coin type is always 0, even for testnet/regtest) and lnd's internal key
|
||||
//scope (m/1017'/<coin_type>'/<account>'), where account is the key family as
|
||||
//defined in `keychain/derivation.go` (currently indices 0 to 9).
|
||||
// The list of accounts to import. There _must_ be an account for all of lnd's
|
||||
// main key scopes: BIP49/BIP84 (m/49'/0'/0', m/84'/0'/0', note that the
|
||||
// coin type is always 0, even for testnet/regtest) and lnd's internal key
|
||||
// scope (m/1017'/<coin_type>'/<account>'), where account is the key family as
|
||||
// defined in `keychain/derivation.go` (currently indices 0 to 9).
|
||||
Accounts []*WatchOnlyAccount `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"`
|
||||
}
|
||||
|
||||
@ -466,24 +448,20 @@ type WatchOnlyAccount struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//Purpose is the first number in the derivation path, must be either 49, 84
|
||||
//or 1017.
|
||||
// Purpose is the first number in the derivation path, must be either 49, 84
|
||||
// or 1017.
|
||||
Purpose uint32 `protobuf:"varint,1,opt,name=purpose,proto3" json:"purpose,omitempty"`
|
||||
//
|
||||
//Coin type is the second number in the derivation path, this is _always_ 0
|
||||
//for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on
|
||||
//testnet or regtest.
|
||||
// Coin type is the second number in the derivation path, this is _always_ 0
|
||||
// for purposes 49 and 84. It only needs to be set to 1 for purpose 1017 on
|
||||
// testnet or regtest.
|
||||
CoinType uint32 `protobuf:"varint,2,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"`
|
||||
//
|
||||
//Account is the third number in the derivation path. For purposes 49 and 84
|
||||
//at least the default account (index 0) needs to be created but optional
|
||||
//additional accounts are allowed. For purpose 1017 there needs to be exactly
|
||||
//one account for each of the key families defined in `keychain/derivation.go`
|
||||
//(currently indices 0 to 9)
|
||||
// Account is the third number in the derivation path. For purposes 49 and 84
|
||||
// at least the default account (index 0) needs to be created but optional
|
||||
// additional accounts are allowed. For purpose 1017 there needs to be exactly
|
||||
// one account for each of the key families defined in `keychain/derivation.go`
|
||||
// (currently indices 0 to 9)
|
||||
Account uint32 `protobuf:"varint,3,opt,name=account,proto3" json:"account,omitempty"`
|
||||
//
|
||||
//The extended public key at depth 3 for the given account.
|
||||
// The extended public key at depth 3 for the given account.
|
||||
Xpub string `protobuf:"bytes,4,opt,name=xpub,proto3" json:"xpub,omitempty"`
|
||||
}
|
||||
|
||||
@ -552,29 +530,25 @@ type UnlockWalletRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//wallet_password should be the current valid passphrase for the daemon. This
|
||||
//will be required to decrypt on-disk material that the daemon requires to
|
||||
//function properly. When using REST, this field must be encoded as base64.
|
||||
// wallet_password should be the current valid passphrase for the daemon. This
|
||||
// will be required to decrypt on-disk material that the daemon requires to
|
||||
// function properly. When using REST, this field must be encoded as base64.
|
||||
WalletPassword []byte `protobuf:"bytes,1,opt,name=wallet_password,json=walletPassword,proto3" json:"wallet_password,omitempty"`
|
||||
//
|
||||
//recovery_window is an optional argument specifying the address lookahead
|
||||
//when restoring a wallet seed. The recovery window applies to each
|
||||
//individual branch of the BIP44 derivation paths. Supplying a recovery
|
||||
//window of zero indicates that no addresses should be recovered, such after
|
||||
//the first initialization of the wallet.
|
||||
// recovery_window is an optional argument specifying the address lookahead
|
||||
// when restoring a wallet seed. The recovery window applies to each
|
||||
// individual branch of the BIP44 derivation paths. Supplying a recovery
|
||||
// window of zero indicates that no addresses should be recovered, such after
|
||||
// the first initialization of the wallet.
|
||||
RecoveryWindow int32 `protobuf:"varint,2,opt,name=recovery_window,json=recoveryWindow,proto3" json:"recovery_window,omitempty"`
|
||||
//
|
||||
//channel_backups is an optional argument that allows clients to recover the
|
||||
//settled funds within a set of channels. This should be populated if the
|
||||
//user was unable to close out all channels and sweep funds before partial or
|
||||
//total data loss occurred. If specified, then after on-chain recovery of
|
||||
//funds, lnd begin to carry out the data loss recovery protocol in order to
|
||||
//recover the funds in each channel from a remote force closed transaction.
|
||||
// channel_backups is an optional argument that allows clients to recover the
|
||||
// settled funds within a set of channels. This should be populated if the
|
||||
// user was unable to close out all channels and sweep funds before partial or
|
||||
// total data loss occurred. If specified, then after on-chain recovery of
|
||||
// funds, lnd begin to carry out the data loss recovery protocol in order to
|
||||
// recover the funds in each channel from a remote force closed transaction.
|
||||
ChannelBackups *ChanBackupSnapshot `protobuf:"bytes,3,opt,name=channel_backups,json=channelBackups,proto3" json:"channel_backups,omitempty"`
|
||||
//
|
||||
//stateless_init is an optional argument instructing the daemon NOT to create
|
||||
//any *.macaroon files in its file system.
|
||||
// stateless_init is an optional argument instructing the daemon NOT to create
|
||||
// any *.macaroon files in its file system.
|
||||
StatelessInit bool `protobuf:"varint,4,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
|
||||
}
|
||||
|
||||
@ -681,24 +655,20 @@ type ChangePasswordRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//current_password should be the current valid passphrase used to unlock the
|
||||
//daemon. When using REST, this field must be encoded as base64.
|
||||
// current_password should be the current valid passphrase used to unlock the
|
||||
// daemon. When using REST, this field must be encoded as base64.
|
||||
CurrentPassword []byte `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"`
|
||||
//
|
||||
//new_password should be the new passphrase that will be needed to unlock the
|
||||
//daemon. When using REST, this field must be encoded as base64.
|
||||
// new_password should be the new passphrase that will be needed to unlock the
|
||||
// daemon. When using REST, this field must be encoded as base64.
|
||||
NewPassword []byte `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
|
||||
//
|
||||
//stateless_init is an optional argument instructing the daemon NOT to create
|
||||
//any *.macaroon files in its filesystem. If this parameter is set, then the
|
||||
//admin macaroon returned in the response MUST be stored by the caller of the
|
||||
//RPC as otherwise all access to the daemon will be lost!
|
||||
// stateless_init is an optional argument instructing the daemon NOT to create
|
||||
// any *.macaroon files in its filesystem. If this parameter is set, then the
|
||||
// admin macaroon returned in the response MUST be stored by the caller of the
|
||||
// RPC as otherwise all access to the daemon will be lost!
|
||||
StatelessInit bool `protobuf:"varint,3,opt,name=stateless_init,json=statelessInit,proto3" json:"stateless_init,omitempty"`
|
||||
//
|
||||
//new_macaroon_root_key is an optional argument instructing the daemon to
|
||||
//rotate the macaroon root key when set to true. This will invalidate all
|
||||
//previously generated macaroons.
|
||||
// new_macaroon_root_key is an optional argument instructing the daemon to
|
||||
// rotate the macaroon root key when set to true. This will invalidate all
|
||||
// previously generated macaroons.
|
||||
NewMacaroonRootKey bool `protobuf:"varint,4,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"`
|
||||
}
|
||||
|
||||
@ -767,13 +737,12 @@ type ChangePasswordResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The binary serialized admin macaroon that can be used to access the daemon
|
||||
//after rotating the macaroon root key. If both the stateless_init and
|
||||
//new_macaroon_root_key parameter were set to true, this is the ONLY copy of
|
||||
//the macaroon that was created from the new root key and MUST be stored
|
||||
//safely by the caller. Otherwise a copy of this macaroon is also persisted on
|
||||
//disk by the daemon, together with other macaroon files.
|
||||
// The binary serialized admin macaroon that can be used to access the daemon
|
||||
// after rotating the macaroon root key. If both the stateless_init and
|
||||
// new_macaroon_root_key parameter were set to true, this is the ONLY copy of
|
||||
// the macaroon that was created from the new root key and MUST be stored
|
||||
// safely by the caller. Otherwise a copy of this macaroon is also persisted on
|
||||
// disk by the daemon, together with other macaroon files.
|
||||
AdminMacaroon []byte `protobuf:"bytes,1,opt,name=admin_macaroon,json=adminMacaroon,proto3" json:"admin_macaroon,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -18,37 +18,35 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type WalletUnlockerClient interface {
|
||||
// GenSeed is the first method that should be used to instantiate a new lnd
|
||||
// instance. This method allows a caller to generate a new aezeed cipher seed
|
||||
// given an optional passphrase. If provided, the passphrase will be necessary
|
||||
// to decrypt the cipherseed to expose the internal wallet seed.
|
||||
//
|
||||
//GenSeed is the first method that should be used to instantiate a new lnd
|
||||
//instance. This method allows a caller to generate a new aezeed cipher seed
|
||||
//given an optional passphrase. If provided, the passphrase will be necessary
|
||||
//to decrypt the cipherseed to expose the internal wallet seed.
|
||||
//
|
||||
//Once the cipherseed is obtained and verified by the user, the InitWallet
|
||||
//method should be used to commit the newly generated seed, and create the
|
||||
//wallet.
|
||||
// Once the cipherseed is obtained and verified by the user, the InitWallet
|
||||
// method should be used to commit the newly generated seed, and create the
|
||||
// wallet.
|
||||
GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error)
|
||||
// InitWallet is used when lnd is starting up for the first time to fully
|
||||
// initialize the daemon and its internal wallet. At the very least a wallet
|
||||
// password must be provided. This will be used to encrypt sensitive material
|
||||
// on disk.
|
||||
//
|
||||
//InitWallet is used when lnd is starting up for the first time to fully
|
||||
//initialize the daemon and its internal wallet. At the very least a wallet
|
||||
//password must be provided. This will be used to encrypt sensitive material
|
||||
//on disk.
|
||||
// In the case of a recovery scenario, the user can also specify their aezeed
|
||||
// mnemonic and passphrase. If set, then the daemon will use this prior state
|
||||
// to initialize its internal wallet.
|
||||
//
|
||||
//In the case of a recovery scenario, the user can also specify their aezeed
|
||||
//mnemonic and passphrase. If set, then the daemon will use this prior state
|
||||
//to initialize its internal wallet.
|
||||
//
|
||||
//Alternatively, this can be used along with the GenSeed RPC to obtain a
|
||||
//seed, then present it to the user. Once it has been verified by the user,
|
||||
//the seed can be fed into this RPC in order to commit the new wallet.
|
||||
// Alternatively, this can be used along with the GenSeed RPC to obtain a
|
||||
// seed, then present it to the user. Once it has been verified by the user,
|
||||
// the seed can be fed into this RPC in order to commit the new wallet.
|
||||
InitWallet(ctx context.Context, in *InitWalletRequest, opts ...grpc.CallOption) (*InitWalletResponse, error)
|
||||
// lncli: `unlock`
|
||||
//UnlockWallet is used at startup of lnd to provide a password to unlock
|
||||
//the wallet database.
|
||||
// UnlockWallet is used at startup of lnd to provide a password to unlock
|
||||
// the wallet database.
|
||||
UnlockWallet(ctx context.Context, in *UnlockWalletRequest, opts ...grpc.CallOption) (*UnlockWalletResponse, error)
|
||||
// lncli: `changepassword`
|
||||
//ChangePassword changes the password of the encrypted wallet. This will
|
||||
//automatically unlock the wallet database if successful.
|
||||
// ChangePassword changes the password of the encrypted wallet. This will
|
||||
// automatically unlock the wallet database if successful.
|
||||
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
|
||||
}
|
||||
|
||||
@ -100,37 +98,35 @@ func (c *walletUnlockerClient) ChangePassword(ctx context.Context, in *ChangePas
|
||||
// All implementations must embed UnimplementedWalletUnlockerServer
|
||||
// for forward compatibility
|
||||
type WalletUnlockerServer interface {
|
||||
// GenSeed is the first method that should be used to instantiate a new lnd
|
||||
// instance. This method allows a caller to generate a new aezeed cipher seed
|
||||
// given an optional passphrase. If provided, the passphrase will be necessary
|
||||
// to decrypt the cipherseed to expose the internal wallet seed.
|
||||
//
|
||||
//GenSeed is the first method that should be used to instantiate a new lnd
|
||||
//instance. This method allows a caller to generate a new aezeed cipher seed
|
||||
//given an optional passphrase. If provided, the passphrase will be necessary
|
||||
//to decrypt the cipherseed to expose the internal wallet seed.
|
||||
//
|
||||
//Once the cipherseed is obtained and verified by the user, the InitWallet
|
||||
//method should be used to commit the newly generated seed, and create the
|
||||
//wallet.
|
||||
// Once the cipherseed is obtained and verified by the user, the InitWallet
|
||||
// method should be used to commit the newly generated seed, and create the
|
||||
// wallet.
|
||||
GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error)
|
||||
// InitWallet is used when lnd is starting up for the first time to fully
|
||||
// initialize the daemon and its internal wallet. At the very least a wallet
|
||||
// password must be provided. This will be used to encrypt sensitive material
|
||||
// on disk.
|
||||
//
|
||||
//InitWallet is used when lnd is starting up for the first time to fully
|
||||
//initialize the daemon and its internal wallet. At the very least a wallet
|
||||
//password must be provided. This will be used to encrypt sensitive material
|
||||
//on disk.
|
||||
// In the case of a recovery scenario, the user can also specify their aezeed
|
||||
// mnemonic and passphrase. If set, then the daemon will use this prior state
|
||||
// to initialize its internal wallet.
|
||||
//
|
||||
//In the case of a recovery scenario, the user can also specify their aezeed
|
||||
//mnemonic and passphrase. If set, then the daemon will use this prior state
|
||||
//to initialize its internal wallet.
|
||||
//
|
||||
//Alternatively, this can be used along with the GenSeed RPC to obtain a
|
||||
//seed, then present it to the user. Once it has been verified by the user,
|
||||
//the seed can be fed into this RPC in order to commit the new wallet.
|
||||
// Alternatively, this can be used along with the GenSeed RPC to obtain a
|
||||
// seed, then present it to the user. Once it has been verified by the user,
|
||||
// the seed can be fed into this RPC in order to commit the new wallet.
|
||||
InitWallet(context.Context, *InitWalletRequest) (*InitWalletResponse, error)
|
||||
// lncli: `unlock`
|
||||
//UnlockWallet is used at startup of lnd to provide a password to unlock
|
||||
//the wallet database.
|
||||
// UnlockWallet is used at startup of lnd to provide a password to unlock
|
||||
// the wallet database.
|
||||
UnlockWallet(context.Context, *UnlockWalletRequest) (*UnlockWalletResponse, error)
|
||||
// lncli: `changepassword`
|
||||
//ChangePassword changes the password of the encrypted wallet. This will
|
||||
//automatically unlock the wallet database if successful.
|
||||
// ChangePassword changes the password of the encrypted wallet. This will
|
||||
// automatically unlock the wallet database if successful.
|
||||
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
|
||||
mustEmbedUnimplementedWalletUnlockerServer()
|
||||
}
|
||||
|
@ -19,9 +19,9 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type WatchtowerClient interface {
|
||||
// lncli: tower info
|
||||
//GetInfo returns general information concerning the companion watchtower
|
||||
//including its public key and URIs where the server is currently
|
||||
//listening for clients.
|
||||
// GetInfo returns general information concerning the companion watchtower
|
||||
// including its public key and URIs where the server is currently
|
||||
// listening for clients.
|
||||
GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
|
||||
}
|
||||
|
||||
@ -47,9 +47,9 @@ func (c *watchtowerClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts
|
||||
// for forward compatibility
|
||||
type WatchtowerServer interface {
|
||||
// lncli: tower info
|
||||
//GetInfo returns general information concerning the companion watchtower
|
||||
//including its public key and URIs where the server is currently
|
||||
//listening for clients.
|
||||
// GetInfo returns general information concerning the companion watchtower
|
||||
// including its public key and URIs where the server is currently
|
||||
// listening for clients.
|
||||
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
|
||||
mustEmbedUnimplementedWatchtowerServer()
|
||||
}
|
||||
|
@ -170,10 +170,9 @@ type RemoveTowerRequest struct {
|
||||
|
||||
// The identifying public key of the watchtower to remove.
|
||||
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
//
|
||||
//If set, then the record for this address will be removed, indicating that is
|
||||
//is stale. Otherwise, the watchtower will no longer be used for future
|
||||
//session negotiations and backups.
|
||||
// If set, then the record for this address will be removed, indicating that is
|
||||
// is stale. Otherwise, the watchtower will no longer be used for future
|
||||
// session negotiations and backups.
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
@ -323,26 +322,22 @@ type TowerSession struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The total number of successful backups that have been made to the
|
||||
//watchtower session.
|
||||
// The total number of successful backups that have been made to the
|
||||
// watchtower session.
|
||||
NumBackups uint32 `protobuf:"varint,1,opt,name=num_backups,json=numBackups,proto3" json:"num_backups,omitempty"`
|
||||
//
|
||||
//The total number of backups in the session that are currently pending to be
|
||||
//acknowledged by the watchtower.
|
||||
// The total number of backups in the session that are currently pending to be
|
||||
// acknowledged by the watchtower.
|
||||
NumPendingBackups uint32 `protobuf:"varint,2,opt,name=num_pending_backups,json=numPendingBackups,proto3" json:"num_pending_backups,omitempty"`
|
||||
// The maximum number of backups allowed by the watchtower session.
|
||||
MaxBackups uint32 `protobuf:"varint,3,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups,omitempty"`
|
||||
//
|
||||
//Deprecated, use sweep_sat_per_vbyte.
|
||||
//The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
//the justice transaction in the event of a channel breach.
|
||||
// Deprecated, use sweep_sat_per_vbyte.
|
||||
// The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
// the justice transaction in the event of a channel breach.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
SweepSatPerByte uint32 `protobuf:"varint,4,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"`
|
||||
//
|
||||
//The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
//the justice transaction in the event of a channel breach.
|
||||
// The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
// the justice transaction in the event of a channel breach.
|
||||
SweepSatPerVbyte uint32 `protobuf:"varint,5,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"`
|
||||
}
|
||||
|
||||
@ -637,17 +632,14 @@ type StatsResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The total number of backups made to all active and exhausted watchtower
|
||||
//sessions.
|
||||
// The total number of backups made to all active and exhausted watchtower
|
||||
// sessions.
|
||||
NumBackups uint32 `protobuf:"varint,1,opt,name=num_backups,json=numBackups,proto3" json:"num_backups,omitempty"`
|
||||
//
|
||||
//The total number of backups that are pending to be acknowledged by all
|
||||
//active and exhausted watchtower sessions.
|
||||
// The total number of backups that are pending to be acknowledged by all
|
||||
// active and exhausted watchtower sessions.
|
||||
NumPendingBackups uint32 `protobuf:"varint,2,opt,name=num_pending_backups,json=numPendingBackups,proto3" json:"num_pending_backups,omitempty"`
|
||||
//
|
||||
//The total number of backups that all active and exhausted watchtower
|
||||
//sessions have failed to acknowledge.
|
||||
// The total number of backups that all active and exhausted watchtower
|
||||
// sessions have failed to acknowledge.
|
||||
NumFailedBackups uint32 `protobuf:"varint,3,opt,name=num_failed_backups,json=numFailedBackups,proto3" json:"num_failed_backups,omitempty"`
|
||||
// The total number of new sessions made to watchtowers.
|
||||
NumSessionsAcquired uint32 `protobuf:"varint,4,opt,name=num_sessions_acquired,json=numSessionsAcquired,proto3" json:"num_sessions_acquired,omitempty"`
|
||||
@ -727,8 +719,7 @@ type PolicyRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The client type from which to retrieve the active offering policy.
|
||||
// The client type from which to retrieve the active offering policy.
|
||||
PolicyType PolicyType `protobuf:"varint,1,opt,name=policy_type,json=policyType,proto3,enum=wtclientrpc.PolicyType" json:"policy_type,omitempty"`
|
||||
}
|
||||
|
||||
@ -776,20 +767,17 @@ type PolicyResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//
|
||||
//The maximum number of updates each session we negotiate with watchtowers
|
||||
//should allow.
|
||||
// The maximum number of updates each session we negotiate with watchtowers
|
||||
// should allow.
|
||||
MaxUpdates uint32 `protobuf:"varint,1,opt,name=max_updates,json=maxUpdates,proto3" json:"max_updates,omitempty"`
|
||||
//
|
||||
//Deprecated, use sweep_sat_per_vbyte.
|
||||
//The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
//justice transactions in response to channel breaches.
|
||||
// Deprecated, use sweep_sat_per_vbyte.
|
||||
// The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
// justice transactions in response to channel breaches.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
SweepSatPerByte uint32 `protobuf:"varint,2,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"`
|
||||
//
|
||||
//The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
//justice transactions in response to channel breaches.
|
||||
// The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
// justice transactions in response to channel breaches.
|
||||
SweepSatPerVbyte uint32 `protobuf:"varint,3,opt,name=sweep_sat_per_vbyte,json=sweepSatPerVbyte,proto3" json:"sweep_sat_per_vbyte,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -18,17 +18,15 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type WatchtowerClientClient interface {
|
||||
//
|
||||
//AddTower adds a new watchtower reachable at the given address and
|
||||
//considers it for new sessions. If the watchtower already exists, then
|
||||
//any new addresses included will be considered when dialing it for
|
||||
//session negotiations and backups.
|
||||
// AddTower adds a new watchtower reachable at the given address and
|
||||
// considers it for new sessions. If the watchtower already exists, then
|
||||
// any new addresses included will be considered when dialing it for
|
||||
// session negotiations and backups.
|
||||
AddTower(ctx context.Context, in *AddTowerRequest, opts ...grpc.CallOption) (*AddTowerResponse, error)
|
||||
//
|
||||
//RemoveTower removes a watchtower from being considered for future session
|
||||
//negotiations and from being used for any subsequent backups until it's added
|
||||
//again. If an address is provided, then this RPC only serves as a way of
|
||||
//removing the address from the watchtower instead.
|
||||
// RemoveTower removes a watchtower from being considered for future session
|
||||
// negotiations and from being used for any subsequent backups until it's added
|
||||
// again. If an address is provided, then this RPC only serves as a way of
|
||||
// removing the address from the watchtower instead.
|
||||
RemoveTower(ctx context.Context, in *RemoveTowerRequest, opts ...grpc.CallOption) (*RemoveTowerResponse, error)
|
||||
// ListTowers returns the list of watchtowers registered with the client.
|
||||
ListTowers(ctx context.Context, in *ListTowersRequest, opts ...grpc.CallOption) (*ListTowersResponse, error)
|
||||
@ -106,17 +104,15 @@ func (c *watchtowerClientClient) Policy(ctx context.Context, in *PolicyRequest,
|
||||
// All implementations must embed UnimplementedWatchtowerClientServer
|
||||
// for forward compatibility
|
||||
type WatchtowerClientServer interface {
|
||||
//
|
||||
//AddTower adds a new watchtower reachable at the given address and
|
||||
//considers it for new sessions. If the watchtower already exists, then
|
||||
//any new addresses included will be considered when dialing it for
|
||||
//session negotiations and backups.
|
||||
// AddTower adds a new watchtower reachable at the given address and
|
||||
// considers it for new sessions. If the watchtower already exists, then
|
||||
// any new addresses included will be considered when dialing it for
|
||||
// session negotiations and backups.
|
||||
AddTower(context.Context, *AddTowerRequest) (*AddTowerResponse, error)
|
||||
//
|
||||
//RemoveTower removes a watchtower from being considered for future session
|
||||
//negotiations and from being used for any subsequent backups until it's added
|
||||
//again. If an address is provided, then this RPC only serves as a way of
|
||||
//removing the address from the watchtower instead.
|
||||
// RemoveTower removes a watchtower from being considered for future session
|
||||
// negotiations and from being used for any subsequent backups until it's added
|
||||
// again. If an address is provided, then this RPC only serves as a way of
|
||||
// removing the address from the watchtower instead.
|
||||
RemoveTower(context.Context, *RemoveTowerRequest) (*RemoveTowerResponse, error)
|
||||
// ListTowers returns the list of watchtowers registered with the client.
|
||||
ListTowers(context.Context, *ListTowersRequest) (*ListTowersResponse, error)
|
||||
|
Loading…
Reference in New Issue
Block a user