signrpc

package
v0.14.2-beta.rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package signrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_signrpc_signer_proto protoreflect.FileDescriptor
View Source
var Signer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "signrpc.Signer",
	HandlerType: (*SignerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignOutputRaw",
			Handler:    _Signer_SignOutputRaw_Handler,
		},
		{
			MethodName: "ComputeInputScript",
			Handler:    _Signer_ComputeInputScript_Handler,
		},
		{
			MethodName: "SignMessage",
			Handler:    _Signer_SignMessage_Handler,
		},
		{
			MethodName: "VerifyMessage",
			Handler:    _Signer_VerifyMessage_Handler,
		},
		{
			MethodName: "DeriveSharedKey",
			Handler:    _Signer_DeriveSharedKey_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "signrpc/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)

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func RegisterSignerHandler

func RegisterSignerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSignerHandler registers the http handlers for service Signer to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSignerHandlerClient

func RegisterSignerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignerClient) error

RegisterSignerHandlerClient registers the http handlers for service Signer to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SignerClient" to call the correct interceptors.

func RegisterSignerHandlerFromEndpoint

func RegisterSignerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSignerHandlerFromEndpoint is same as RegisterSignerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSignerHandlerServer

func RegisterSignerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignerServer) error

RegisterSignerHandlerServer registers the http handlers for service Signer to "mux". UnaryRPC :call SignerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSignerHandlerFromEndpoint instead.

func RegisterSignerServer

func RegisterSignerServer(s grpc.ServiceRegistrar, srv SignerServer)

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

type Config

type Config struct{}

Config is empty for non-signrpc builds.

type InputScript

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.
	SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"`
	// contains filtered or unexported fields
}

func (*InputScript) Descriptor deprecated

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

Deprecated: Use InputScript.ProtoReflect.Descriptor instead.

func (*InputScript) GetSigScript

func (x *InputScript) GetSigScript() []byte

func (*InputScript) GetWitness

func (x *InputScript) GetWitness() [][]byte

func (*InputScript) ProtoMessage

func (*InputScript) ProtoMessage()

func (*InputScript) ProtoReflect

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

func (*InputScript) Reset

func (x *InputScript) Reset()

func (*InputScript) String

func (x *InputScript) String() string

type InputScriptResp

type InputScriptResp struct {

	// The set of fully valid input scripts requested.
	InputScripts []*InputScript `protobuf:"bytes,1,rep,name=input_scripts,json=inputScripts,proto3" json:"input_scripts,omitempty"`
	// contains filtered or unexported fields
}

func (*InputScriptResp) Descriptor deprecated

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

Deprecated: Use InputScriptResp.ProtoReflect.Descriptor instead.

func (*InputScriptResp) GetInputScripts

func (x *InputScriptResp) GetInputScripts() []*InputScript

func (*InputScriptResp) ProtoMessage

func (*InputScriptResp) ProtoMessage()

func (*InputScriptResp) ProtoReflect

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

func (*InputScriptResp) Reset

func (x *InputScriptResp) Reset()

func (*InputScriptResp) String

func (x *InputScriptResp) String() string

type KeyDescriptor

type KeyDescriptor struct {

	//
	//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.
	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 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 SignDescriptor

type SignDescriptor struct {

	//
	//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.
	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:
	//
	// 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.
	//
	// k = (privKey*sha256(pubKey || tweakPub) +
	//tweakPriv*sha256(tweakPub || pubKey)) mod N
	DoubleTweak []byte `protobuf:"bytes,3,opt,name=double_tweak,json=doubleTweak,proto3" json:"double_tweak,omitempty"`
	//
	//The full script required to properly redeem the output.  This field will
	//only be populated if a p2wsh or a p2sh output is being signed.
	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.
	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.
	Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"`
	//
	//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"`
	// contains filtered or unexported fields
}

func (*SignDescriptor) Descriptor deprecated

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

Deprecated: Use SignDescriptor.ProtoReflect.Descriptor instead.

func (*SignDescriptor) GetDoubleTweak

func (x *SignDescriptor) GetDoubleTweak() []byte

func (*SignDescriptor) GetInputIndex

func (x *SignDescriptor) GetInputIndex() int32

func (*SignDescriptor) GetKeyDesc

func (x *SignDescriptor) GetKeyDesc() *KeyDescriptor

func (*SignDescriptor) GetOutput

func (x *SignDescriptor) GetOutput() *TxOut

func (*SignDescriptor) GetSighash

func (x *SignDescriptor) GetSighash() uint32

func (*SignDescriptor) GetSingleTweak

func (x *SignDescriptor) GetSingleTweak() []byte

func (*SignDescriptor) GetWitnessScript

func (x *SignDescriptor) GetWitnessScript() []byte

func (*SignDescriptor) ProtoMessage

func (*SignDescriptor) ProtoMessage()

func (*SignDescriptor) ProtoReflect

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

func (*SignDescriptor) Reset

func (x *SignDescriptor) Reset()

func (*SignDescriptor) String

func (x *SignDescriptor) String() string

type SignMessageReq

type SignMessageReq struct {

	// The message to be signed.
	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.
	CompactSig bool `protobuf:"varint,4,opt,name=compact_sig,json=compactSig,proto3" json:"compact_sig,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) 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 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 SignReq

type SignReq struct {

	// The raw bytes of the transaction to be signed.
	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"`
	// contains filtered or unexported fields
}

func (*SignReq) Descriptor deprecated

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

Deprecated: Use SignReq.ProtoReflect.Descriptor instead.

func (*SignReq) GetRawTxBytes

func (x *SignReq) GetRawTxBytes() []byte

func (*SignReq) GetSignDescs

func (x *SignReq) GetSignDescs() []*SignDescriptor

func (*SignReq) ProtoMessage

func (*SignReq) ProtoMessage()

func (*SignReq) ProtoReflect

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

func (*SignReq) Reset

func (x *SignReq) Reset()

func (*SignReq) String

func (x *SignReq) String() string

type SignResp

type SignResp struct {

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

func (*SignResp) Descriptor deprecated

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

Deprecated: Use SignResp.ProtoReflect.Descriptor instead.

func (*SignResp) GetRawSigs

func (x *SignResp) GetRawSigs() [][]byte

func (*SignResp) ProtoMessage

func (*SignResp) ProtoMessage()

func (*SignResp) ProtoReflect

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

func (*SignResp) Reset

func (x *SignResp) Reset()

func (*SignResp) String

func (x *SignResp) String() string

type SignerClient

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).
	//
	//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 output 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.
	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.
	//
	//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.
	//
	//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(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 {
	//
	//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.
	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 output 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.
	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.
	//
	//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.
	//
	//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(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 TxOut

type TxOut struct {

	// The value of the output being spent.
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// The script of the output being spent.
	PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
	// contains filtered or unexported fields
}

func (*TxOut) Descriptor deprecated

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

Deprecated: Use TxOut.ProtoReflect.Descriptor instead.

func (*TxOut) GetPkScript

func (x *TxOut) GetPkScript() []byte

func (*TxOut) GetValue

func (x *TxOut) GetValue() int64

func (*TxOut) ProtoMessage

func (*TxOut) ProtoMessage()

func (*TxOut) ProtoReflect

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

func (*TxOut) Reset

func (x *TxOut) Reset()

func (*TxOut) String

func (x *TxOut) String() string

type UnimplementedSignerServer

type UnimplementedSignerServer struct {
}

UnimplementedSignerServer must be embedded to have forward compatible implementations.

func (UnimplementedSignerServer) ComputeInputScript

func (UnimplementedSignerServer) DeriveSharedKey

func (UnimplementedSignerServer) SignMessage

func (UnimplementedSignerServer) SignOutputRaw

func (UnimplementedSignerServer) VerifyMessage

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 VerifyMessageReq

type VerifyMessageReq struct {

	// The message over which the signature is to be verified.
	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.
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// The public key the signature has to be valid for.
	Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyMessageReq) Descriptor deprecated

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

Deprecated: Use VerifyMessageReq.ProtoReflect.Descriptor instead.

func (*VerifyMessageReq) GetMsg

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

func (*VerifyMessageReq) GetPubkey

func (x *VerifyMessageReq) GetPubkey() []byte

func (*VerifyMessageReq) GetSignature

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

func (*VerifyMessageReq) ProtoMessage

func (*VerifyMessageReq) ProtoMessage()

func (*VerifyMessageReq) ProtoReflect

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

func (*VerifyMessageReq) Reset

func (x *VerifyMessageReq) Reset()

func (*VerifyMessageReq) String

func (x *VerifyMessageReq) String() string

type VerifyMessageResp

type VerifyMessageResp struct {

	// Whether the signature was valid over the given message.
	Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyMessageResp) Descriptor deprecated

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

Deprecated: Use VerifyMessageResp.ProtoReflect.Descriptor instead.

func (*VerifyMessageResp) GetValid

func (x *VerifyMessageResp) GetValid() bool

func (*VerifyMessageResp) ProtoMessage

func (*VerifyMessageResp) ProtoMessage()

func (*VerifyMessageResp) ProtoReflect

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

func (*VerifyMessageResp) Reset

func (x *VerifyMessageResp) Reset()

func (*VerifyMessageResp) String

func (x *VerifyMessageResp) String() string

Jump to

Keyboard shortcuts

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