proto

package
v0.0.0-...-d9725e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_lightning_proto protoreflect.FileDescriptor
View Source
var File_signer_proto protoreflect.FileDescriptor
View Source
var File_walletkit_proto protoreflect.FileDescriptor
View Source
var Lightning_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Lightning",
	HandlerType: (*LightningServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignMessage",
			Handler:    _Lightning_SignMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "lightning.proto",
}

Lightning_ServiceDesc is the grpc.ServiceDesc for Lightning service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Signer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Signer",
	HandlerType: (*SignerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignMessage",
			Handler:    _Signer_SignMessage_Handler,
		},
		{
			MethodName: "DeriveSharedKey",
			Handler:    _Signer_DeriveSharedKey_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "signer.proto",
}

Signer_ServiceDesc is the grpc.ServiceDesc for Signer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var WalletKit_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.WalletKit",
	HandlerType: (*WalletKitServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignPsbt",
			Handler:    _WalletKit_SignPsbt_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "walletkit.proto",
}

WalletKit_ServiceDesc is the grpc.ServiceDesc for WalletKit service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLightningServer

func RegisterLightningServer(s grpc.ServiceRegistrar, srv LightningServer)

func RegisterSignerServer

func RegisterSignerServer(s grpc.ServiceRegistrar, srv SignerServer)

func RegisterWalletKitServer

func RegisterWalletKitServer(s grpc.ServiceRegistrar, srv WalletKitServer)

Types

type KeyDescriptor

type KeyDescriptor struct {

	//
	//The raw bytes of the key being identified.
	RawKeyBytes []byte `protobuf:"bytes,1,opt,name=raw_key_bytes,json=rawKeyBytes,proto3" json:"raw_key_bytes,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"`
	// contains filtered or unexported fields
}

func (*KeyDescriptor) Descriptor deprecated

func (*KeyDescriptor) Descriptor() ([]byte, []int)

Deprecated: Use KeyDescriptor.ProtoReflect.Descriptor instead.

func (*KeyDescriptor) GetKeyLoc

func (x *KeyDescriptor) GetKeyLoc() *KeyLocator

func (*KeyDescriptor) GetRawKeyBytes

func (x *KeyDescriptor) GetRawKeyBytes() []byte

func (*KeyDescriptor) ProtoMessage

func (*KeyDescriptor) ProtoMessage()

func (*KeyDescriptor) ProtoReflect

func (x *KeyDescriptor) ProtoReflect() protoreflect.Message

func (*KeyDescriptor) Reset

func (x *KeyDescriptor) Reset()

func (*KeyDescriptor) String

func (x *KeyDescriptor) String() string

type KeyLocator

type KeyLocator struct {

	// The family of key being identified.
	KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
	// The precise index of the key being identified.
	KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyLocator) Descriptor deprecated

func (*KeyLocator) Descriptor() ([]byte, []int)

Deprecated: Use KeyLocator.ProtoReflect.Descriptor instead.

func (*KeyLocator) GetKeyFamily

func (x *KeyLocator) GetKeyFamily() int32

func (*KeyLocator) GetKeyIndex

func (x *KeyLocator) GetKeyIndex() int32

func (*KeyLocator) ProtoMessage

func (*KeyLocator) ProtoMessage()

func (*KeyLocator) ProtoReflect

func (x *KeyLocator) ProtoReflect() protoreflect.Message

func (*KeyLocator) Reset

func (x *KeyLocator) Reset()

func (*KeyLocator) String

func (x *KeyLocator) String() string

type LightningClient

type LightningClient interface {
	// lncli: `signmessage`
	//SignMessage signs a message with this node's private key. The returned
	//signature string is `zbase32` encoded and pubkey recoverable, meaning that
	//only the message digest and signature are needed for verification.
	SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error)
}

LightningClient is the client API for Lightning service.

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.

func NewLightningClient

func NewLightningClient(cc grpc.ClientConnInterface) LightningClient

type LightningServer

type LightningServer interface {
	// lncli: `signmessage`
	//SignMessage signs a message with this node's private key. The returned
	//signature string is `zbase32` encoded and pubkey recoverable, meaning that
	//only the message digest and signature are needed for verification.
	SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error)
	// contains filtered or unexported methods
}

LightningServer is the server API for Lightning service. All implementations must embed UnimplementedLightningServer for forward compatibility

type SharedKeyRequest

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: 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.
	KeyDesc *KeyDescriptor `protobuf:"bytes,3,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
	// contains filtered or unexported fields
}

func (*SharedKeyRequest) Descriptor deprecated

func (*SharedKeyRequest) Descriptor() ([]byte, []int)

Deprecated: Use SharedKeyRequest.ProtoReflect.Descriptor instead.

func (*SharedKeyRequest) GetEphemeralPubkey

func (x *SharedKeyRequest) GetEphemeralPubkey() []byte

func (*SharedKeyRequest) GetKeyDesc

func (x *SharedKeyRequest) GetKeyDesc() *KeyDescriptor

func (*SharedKeyRequest) GetKeyLoc deprecated

func (x *SharedKeyRequest) GetKeyLoc() *KeyLocator

Deprecated: Do not use.

func (*SharedKeyRequest) ProtoMessage

func (*SharedKeyRequest) ProtoMessage()

func (*SharedKeyRequest) ProtoReflect

func (x *SharedKeyRequest) ProtoReflect() protoreflect.Message

func (*SharedKeyRequest) Reset

func (x *SharedKeyRequest) Reset()

func (*SharedKeyRequest) String

func (x *SharedKeyRequest) String() string

type SharedKeyResponse

type SharedKeyResponse struct {

	// The shared public key, hashed with sha256.
	SharedKey []byte `protobuf:"bytes,1,opt,name=shared_key,json=sharedKey,proto3" json:"shared_key,omitempty"`
	// contains filtered or unexported fields
}

func (*SharedKeyResponse) Descriptor deprecated

func (*SharedKeyResponse) Descriptor() ([]byte, []int)

Deprecated: Use SharedKeyResponse.ProtoReflect.Descriptor instead.

func (*SharedKeyResponse) GetSharedKey

func (x *SharedKeyResponse) GetSharedKey() []byte

func (*SharedKeyResponse) ProtoMessage

func (*SharedKeyResponse) ProtoMessage()

func (*SharedKeyResponse) ProtoReflect

func (x *SharedKeyResponse) ProtoReflect() protoreflect.Message

func (*SharedKeyResponse) Reset

func (x *SharedKeyResponse) Reset()

func (*SharedKeyResponse) String

func (x *SharedKeyResponse) String() string

type SignMessageReq

type SignMessageReq struct {

	//
	//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.
	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.
	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)
	SchnorrSigTapTweak []byte `protobuf:"bytes,6,opt,name=schnorr_sig_tap_tweak,json=schnorrSigTapTweak,proto3" json:"schnorr_sig_tap_tweak,omitempty"`
	// contains filtered or unexported fields
}

func (*SignMessageReq) Descriptor deprecated

func (*SignMessageReq) Descriptor() ([]byte, []int)

Deprecated: Use SignMessageReq.ProtoReflect.Descriptor instead.

func (*SignMessageReq) GetCompactSig

func (x *SignMessageReq) GetCompactSig() bool

func (*SignMessageReq) GetDoubleHash

func (x *SignMessageReq) GetDoubleHash() bool

func (*SignMessageReq) GetKeyLoc

func (x *SignMessageReq) GetKeyLoc() *KeyLocator

func (*SignMessageReq) GetMsg

func (x *SignMessageReq) GetMsg() []byte

func (*SignMessageReq) GetSchnorrSig

func (x *SignMessageReq) GetSchnorrSig() bool

func (*SignMessageReq) GetSchnorrSigTapTweak

func (x *SignMessageReq) GetSchnorrSigTapTweak() []byte

func (*SignMessageReq) ProtoMessage

func (*SignMessageReq) ProtoMessage()

func (*SignMessageReq) ProtoReflect

func (x *SignMessageReq) ProtoReflect() protoreflect.Message

func (*SignMessageReq) Reset

func (x *SignMessageReq) Reset()

func (*SignMessageReq) String

func (x *SignMessageReq) String() string

type SignMessageRequest

type SignMessageRequest struct {

	//
	//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"`
	//
	//Instead of the default double-SHA256 hashing of the message before signing,
	//only use one round of hashing instead.
	SingleHash bool `protobuf:"varint,2,opt,name=single_hash,json=singleHash,proto3" json:"single_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*SignMessageRequest) Descriptor deprecated

func (*SignMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignMessageRequest.ProtoReflect.Descriptor instead.

func (*SignMessageRequest) GetMsg

func (x *SignMessageRequest) GetMsg() []byte

func (*SignMessageRequest) GetSingleHash

func (x *SignMessageRequest) GetSingleHash() bool

func (*SignMessageRequest) ProtoMessage

func (*SignMessageRequest) ProtoMessage()

func (*SignMessageRequest) ProtoReflect

func (x *SignMessageRequest) ProtoReflect() protoreflect.Message

func (*SignMessageRequest) Reset

func (x *SignMessageRequest) Reset()

func (*SignMessageRequest) String

func (x *SignMessageRequest) String() string

type SignMessageResp

type SignMessageResp struct {

	//
	//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"`
	// contains filtered or unexported fields
}

func (*SignMessageResp) Descriptor deprecated

func (*SignMessageResp) Descriptor() ([]byte, []int)

Deprecated: Use SignMessageResp.ProtoReflect.Descriptor instead.

func (*SignMessageResp) GetSignature

func (x *SignMessageResp) GetSignature() []byte

func (*SignMessageResp) ProtoMessage

func (*SignMessageResp) ProtoMessage()

func (*SignMessageResp) ProtoReflect

func (x *SignMessageResp) ProtoReflect() protoreflect.Message

func (*SignMessageResp) Reset

func (x *SignMessageResp) Reset()

func (*SignMessageResp) String

func (x *SignMessageResp) String() string

type SignMessageResponse

type SignMessageResponse struct {

	// The signature for the given message
	Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*SignMessageResponse) Descriptor deprecated

func (*SignMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignMessageResponse.ProtoReflect.Descriptor instead.

func (*SignMessageResponse) GetSignature

func (x *SignMessageResponse) GetSignature() string

func (*SignMessageResponse) ProtoMessage

func (*SignMessageResponse) ProtoMessage()

func (*SignMessageResponse) ProtoReflect

func (x *SignMessageResponse) ProtoReflect() protoreflect.Message

func (*SignMessageResponse) Reset

func (x *SignMessageResponse) Reset()

func (*SignMessageResponse) String

func (x *SignMessageResponse) String() string

type SignPsbtRequest

type SignPsbtRequest struct {

	//
	//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"`
	// contains filtered or unexported fields
}

func (*SignPsbtRequest) Descriptor deprecated

func (*SignPsbtRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignPsbtRequest.ProtoReflect.Descriptor instead.

func (*SignPsbtRequest) GetFundedPsbt

func (x *SignPsbtRequest) GetFundedPsbt() []byte

func (*SignPsbtRequest) ProtoMessage

func (*SignPsbtRequest) ProtoMessage()

func (*SignPsbtRequest) ProtoReflect

func (x *SignPsbtRequest) ProtoReflect() protoreflect.Message

func (*SignPsbtRequest) Reset

func (x *SignPsbtRequest) Reset()

func (*SignPsbtRequest) String

func (x *SignPsbtRequest) String() string

type SignPsbtResponse

type SignPsbtResponse struct {

	// The signed transaction in PSBT format.
	SignedPsbt []byte `protobuf:"bytes,1,opt,name=signed_psbt,json=signedPsbt,proto3" json:"signed_psbt,omitempty"`
	// The indices of signed inputs.
	SignedInputs []uint32 `protobuf:"varint,2,rep,packed,name=signed_inputs,json=signedInputs,proto3" json:"signed_inputs,omitempty"`
	// contains filtered or unexported fields
}

func (*SignPsbtResponse) Descriptor deprecated

func (*SignPsbtResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignPsbtResponse.ProtoReflect.Descriptor instead.

func (*SignPsbtResponse) GetSignedInputs

func (x *SignPsbtResponse) GetSignedInputs() []uint32

func (*SignPsbtResponse) GetSignedPsbt

func (x *SignPsbtResponse) GetSignedPsbt() []byte

func (*SignPsbtResponse) ProtoMessage

func (*SignPsbtResponse) ProtoMessage()

func (*SignPsbtResponse) ProtoReflect

func (x *SignPsbtResponse) ProtoReflect() protoreflect.Message

func (*SignPsbtResponse) Reset

func (x *SignPsbtResponse) Reset()

func (*SignPsbtResponse) String

func (x *SignPsbtResponse) String() string

type SignerClient

type SignerClient interface {
	//
	//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.
	SignMessage(ctx context.Context, in *SignMessageReq, opts ...grpc.CallOption) (*SignMessageResp, 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(ctx context.Context, in *SharedKeyRequest, opts ...grpc.CallOption) (*SharedKeyResponse, error)
}

SignerClient is the client API for Signer service.

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.

func NewSignerClient

func NewSignerClient(cc grpc.ClientConnInterface) SignerClient

type SignerServer

type SignerServer interface {
	//
	//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.
	SignMessage(context.Context, *SignMessageReq) (*SignMessageResp, 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(context.Context, *SharedKeyRequest) (*SharedKeyResponse, error)
	// contains filtered or unexported methods
}

SignerServer is the server API for Signer service. All implementations must embed UnimplementedSignerServer for forward compatibility

type UnimplementedLightningServer

type UnimplementedLightningServer struct {
}

UnimplementedLightningServer must be embedded to have forward compatible implementations.

func (UnimplementedLightningServer) SignMessage

type UnimplementedSignerServer

type UnimplementedSignerServer struct {
}

UnimplementedSignerServer must be embedded to have forward compatible implementations.

func (UnimplementedSignerServer) DeriveSharedKey

func (UnimplementedSignerServer) SignMessage

type UnimplementedWalletKitServer

type UnimplementedWalletKitServer struct {
}

UnimplementedWalletKitServer must be embedded to have forward compatible implementations.

func (UnimplementedWalletKitServer) SignPsbt

type UnsafeLightningServer

type UnsafeLightningServer interface {
	// contains filtered or unexported methods
}

UnsafeLightningServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LightningServer will result in compilation errors.

type UnsafeSignerServer

type UnsafeSignerServer interface {
	// contains filtered or unexported methods
}

UnsafeSignerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignerServer will result in compilation errors.

type UnsafeWalletKitServer

type UnsafeWalletKitServer interface {
	// contains filtered or unexported methods
}

UnsafeWalletKitServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WalletKitServer will result in compilation errors.

type WalletKitClient

type WalletKitClient interface {
	//
	//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.
	SignPsbt(ctx context.Context, in *SignPsbtRequest, opts ...grpc.CallOption) (*SignPsbtResponse, error)
}

WalletKitClient is the client API for WalletKit service.

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.

func NewWalletKitClient

func NewWalletKitClient(cc grpc.ClientConnInterface) WalletKitClient

type WalletKitServer

type WalletKitServer interface {
	//
	//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.
	SignPsbt(context.Context, *SignPsbtRequest) (*SignPsbtResponse, error)
	// contains filtered or unexported methods
}

WalletKitServer is the server API for WalletKit service. All implementations must embed UnimplementedWalletKitServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL