signrpc

package
v0.15.10001 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 18 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 (
	SignMethod_name = map[int32]string{
		0: "SIGN_METHOD_WITNESS_V0",
		1: "SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086",
		2: "SIGN_METHOD_TAPROOT_KEY_SPEND",
		3: "SIGN_METHOD_TAPROOT_SCRIPT_SPEND",
	}
	SignMethod_value = map[string]int32{
		"SIGN_METHOD_WITNESS_V0":                0,
		"SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086": 1,
		"SIGN_METHOD_TAPROOT_KEY_SPEND":         2,
		"SIGN_METHOD_TAPROOT_SCRIPT_SPEND":      3,
	}
)

Enum value maps for SignMethod.

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,
		},
		{
			MethodName: "MuSig2CombineKeys",
			Handler:    _Signer_MuSig2CombineKeys_Handler,
		},
		{
			MethodName: "MuSig2CreateSession",
			Handler:    _Signer_MuSig2CreateSession_Handler,
		},
		{
			MethodName: "MuSig2RegisterNonces",
			Handler:    _Signer_MuSig2RegisterNonces_Handler,
		},
		{
			MethodName: "MuSig2Sign",
			Handler:    _Signer_MuSig2Sign_Handler,
		},
		{
			MethodName: "MuSig2CombineSig",
			Handler:    _Signer_MuSig2CombineSig_Handler,
		},
		{
			MethodName: "MuSig2Cleanup",
			Handler:    _Signer_MuSig2Cleanup_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 RegisterSignerJSONCallbacks

func RegisterSignerJSONCallbacks(registry map[string]func(ctx context.Context,
	conn *grpc.ClientConn, reqJSON string, callback func(string, error)))

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 MuSig2CleanupRequest

type MuSig2CleanupRequest struct {

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

func (*MuSig2CleanupRequest) Descriptor deprecated

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

Deprecated: Use MuSig2CleanupRequest.ProtoReflect.Descriptor instead.

func (*MuSig2CleanupRequest) GetSessionId

func (x *MuSig2CleanupRequest) GetSessionId() []byte

func (*MuSig2CleanupRequest) ProtoMessage

func (*MuSig2CleanupRequest) ProtoMessage()

func (*MuSig2CleanupRequest) ProtoReflect

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

func (*MuSig2CleanupRequest) Reset

func (x *MuSig2CleanupRequest) Reset()

func (*MuSig2CleanupRequest) String

func (x *MuSig2CleanupRequest) String() string

type MuSig2CleanupResponse

type MuSig2CleanupResponse struct {
	// contains filtered or unexported fields
}

func (*MuSig2CleanupResponse) Descriptor deprecated

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

Deprecated: Use MuSig2CleanupResponse.ProtoReflect.Descriptor instead.

func (*MuSig2CleanupResponse) ProtoMessage

func (*MuSig2CleanupResponse) ProtoMessage()

func (*MuSig2CleanupResponse) ProtoReflect

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

func (*MuSig2CleanupResponse) Reset

func (x *MuSig2CleanupResponse) Reset()

func (*MuSig2CleanupResponse) String

func (x *MuSig2CleanupResponse) String() string

type MuSig2CombineKeysRequest

type MuSig2CombineKeysRequest struct {

	// 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.
	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.
	TaprootTweak *TaprootTweakDesc `protobuf:"bytes,3,opt,name=taproot_tweak,json=taprootTweak,proto3" json:"taproot_tweak,omitempty"`
	// contains filtered or unexported fields
}

func (*MuSig2CombineKeysRequest) Descriptor deprecated

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

Deprecated: Use MuSig2CombineKeysRequest.ProtoReflect.Descriptor instead.

func (*MuSig2CombineKeysRequest) GetAllSignerPubkeys

func (x *MuSig2CombineKeysRequest) GetAllSignerPubkeys() [][]byte

func (*MuSig2CombineKeysRequest) GetTaprootTweak

func (x *MuSig2CombineKeysRequest) GetTaprootTweak() *TaprootTweakDesc

func (*MuSig2CombineKeysRequest) GetTweaks

func (x *MuSig2CombineKeysRequest) GetTweaks() []*TweakDesc

func (*MuSig2CombineKeysRequest) ProtoMessage

func (*MuSig2CombineKeysRequest) ProtoMessage()

func (*MuSig2CombineKeysRequest) ProtoReflect

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

func (*MuSig2CombineKeysRequest) Reset

func (x *MuSig2CombineKeysRequest) Reset()

func (*MuSig2CombineKeysRequest) String

func (x *MuSig2CombineKeysRequest) String() string

type MuSig2CombineKeysResponse

type MuSig2CombineKeysResponse struct {

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

func (*MuSig2CombineKeysResponse) Descriptor deprecated

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

Deprecated: Use MuSig2CombineKeysResponse.ProtoReflect.Descriptor instead.

func (*MuSig2CombineKeysResponse) GetCombinedKey

func (x *MuSig2CombineKeysResponse) GetCombinedKey() []byte

func (*MuSig2CombineKeysResponse) GetTaprootInternalKey

func (x *MuSig2CombineKeysResponse) GetTaprootInternalKey() []byte

func (*MuSig2CombineKeysResponse) ProtoMessage

func (*MuSig2CombineKeysResponse) ProtoMessage()

func (*MuSig2CombineKeysResponse) ProtoReflect

func (*MuSig2CombineKeysResponse) Reset

func (x *MuSig2CombineKeysResponse) Reset()

func (*MuSig2CombineKeysResponse) String

func (x *MuSig2CombineKeysResponse) String() string

type MuSig2CombineSigRequest

type MuSig2CombineSigRequest struct {

	// 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.
	OtherPartialSignatures [][]byte `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MuSig2CombineSigRequest) Descriptor deprecated

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

Deprecated: Use MuSig2CombineSigRequest.ProtoReflect.Descriptor instead.

func (*MuSig2CombineSigRequest) GetOtherPartialSignatures

func (x *MuSig2CombineSigRequest) GetOtherPartialSignatures() [][]byte

func (*MuSig2CombineSigRequest) GetSessionId

func (x *MuSig2CombineSigRequest) GetSessionId() []byte

func (*MuSig2CombineSigRequest) ProtoMessage

func (*MuSig2CombineSigRequest) ProtoMessage()

func (*MuSig2CombineSigRequest) ProtoReflect

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

func (*MuSig2CombineSigRequest) Reset

func (x *MuSig2CombineSigRequest) Reset()

func (*MuSig2CombineSigRequest) String

func (x *MuSig2CombineSigRequest) String() string

type MuSig2CombineSigResponse

type MuSig2CombineSigResponse struct {

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

func (*MuSig2CombineSigResponse) Descriptor deprecated

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

Deprecated: Use MuSig2CombineSigResponse.ProtoReflect.Descriptor instead.

func (*MuSig2CombineSigResponse) GetFinalSignature

func (x *MuSig2CombineSigResponse) GetFinalSignature() []byte

func (*MuSig2CombineSigResponse) GetHaveAllSignatures

func (x *MuSig2CombineSigResponse) GetHaveAllSignatures() bool

func (*MuSig2CombineSigResponse) ProtoMessage

func (*MuSig2CombineSigResponse) ProtoMessage()

func (*MuSig2CombineSigResponse) ProtoReflect

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

func (*MuSig2CombineSigResponse) Reset

func (x *MuSig2CombineSigResponse) Reset()

func (*MuSig2CombineSigResponse) String

func (x *MuSig2CombineSigResponse) String() string

type MuSig2RegisterNoncesRequest

type MuSig2RegisterNoncesRequest struct {

	// 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.
	OtherSignerPublicNonces [][]byte `` /* 134-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MuSig2RegisterNoncesRequest) Descriptor deprecated

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

Deprecated: Use MuSig2RegisterNoncesRequest.ProtoReflect.Descriptor instead.

func (*MuSig2RegisterNoncesRequest) GetOtherSignerPublicNonces

func (x *MuSig2RegisterNoncesRequest) GetOtherSignerPublicNonces() [][]byte

func (*MuSig2RegisterNoncesRequest) GetSessionId

func (x *MuSig2RegisterNoncesRequest) GetSessionId() []byte

func (*MuSig2RegisterNoncesRequest) ProtoMessage

func (*MuSig2RegisterNoncesRequest) ProtoMessage()

func (*MuSig2RegisterNoncesRequest) ProtoReflect

func (*MuSig2RegisterNoncesRequest) Reset

func (x *MuSig2RegisterNoncesRequest) Reset()

func (*MuSig2RegisterNoncesRequest) String

func (x *MuSig2RegisterNoncesRequest) String() string

type MuSig2RegisterNoncesResponse

type MuSig2RegisterNoncesResponse struct {

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

func (*MuSig2RegisterNoncesResponse) Descriptor deprecated

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

Deprecated: Use MuSig2RegisterNoncesResponse.ProtoReflect.Descriptor instead.

func (*MuSig2RegisterNoncesResponse) GetHaveAllNonces

func (x *MuSig2RegisterNoncesResponse) GetHaveAllNonces() bool

func (*MuSig2RegisterNoncesResponse) ProtoMessage

func (*MuSig2RegisterNoncesResponse) ProtoMessage()

func (*MuSig2RegisterNoncesResponse) ProtoReflect

func (*MuSig2RegisterNoncesResponse) Reset

func (x *MuSig2RegisterNoncesResponse) Reset()

func (*MuSig2RegisterNoncesResponse) String

type MuSig2SessionRequest

type MuSig2SessionRequest struct {

	// 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.
	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.
	OtherSignerPublicNonces [][]byte `` /* 134-byte string literal not displayed */
	// 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.
	TaprootTweak *TaprootTweakDesc `protobuf:"bytes,5,opt,name=taproot_tweak,json=taprootTweak,proto3" json:"taproot_tweak,omitempty"`
	// contains filtered or unexported fields
}

func (*MuSig2SessionRequest) Descriptor deprecated

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

Deprecated: Use MuSig2SessionRequest.ProtoReflect.Descriptor instead.

func (*MuSig2SessionRequest) GetAllSignerPubkeys

func (x *MuSig2SessionRequest) GetAllSignerPubkeys() [][]byte

func (*MuSig2SessionRequest) GetKeyLoc

func (x *MuSig2SessionRequest) GetKeyLoc() *KeyLocator

func (*MuSig2SessionRequest) GetOtherSignerPublicNonces

func (x *MuSig2SessionRequest) GetOtherSignerPublicNonces() [][]byte

func (*MuSig2SessionRequest) GetTaprootTweak

func (x *MuSig2SessionRequest) GetTaprootTweak() *TaprootTweakDesc

func (*MuSig2SessionRequest) GetTweaks

func (x *MuSig2SessionRequest) GetTweaks() []*TweakDesc

func (*MuSig2SessionRequest) ProtoMessage

func (*MuSig2SessionRequest) ProtoMessage()

func (*MuSig2SessionRequest) ProtoReflect

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

func (*MuSig2SessionRequest) Reset

func (x *MuSig2SessionRequest) Reset()

func (*MuSig2SessionRequest) String

func (x *MuSig2SessionRequest) String() string

type MuSig2SessionResponse

type MuSig2SessionResponse struct {

	// 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.
	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.
	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.
	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.
	HaveAllNonces bool `protobuf:"varint,5,opt,name=have_all_nonces,json=haveAllNonces,proto3" json:"have_all_nonces,omitempty"`
	// contains filtered or unexported fields
}

func (*MuSig2SessionResponse) Descriptor deprecated

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

Deprecated: Use MuSig2SessionResponse.ProtoReflect.Descriptor instead.

func (*MuSig2SessionResponse) GetCombinedKey

func (x *MuSig2SessionResponse) GetCombinedKey() []byte

func (*MuSig2SessionResponse) GetHaveAllNonces

func (x *MuSig2SessionResponse) GetHaveAllNonces() bool

func (*MuSig2SessionResponse) GetLocalPublicNonces

func (x *MuSig2SessionResponse) GetLocalPublicNonces() []byte

func (*MuSig2SessionResponse) GetSessionId

func (x *MuSig2SessionResponse) GetSessionId() []byte

func (*MuSig2SessionResponse) GetTaprootInternalKey

func (x *MuSig2SessionResponse) GetTaprootInternalKey() []byte

func (*MuSig2SessionResponse) ProtoMessage

func (*MuSig2SessionResponse) ProtoMessage()

func (*MuSig2SessionResponse) ProtoReflect

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

func (*MuSig2SessionResponse) Reset

func (x *MuSig2SessionResponse) Reset()

func (*MuSig2SessionResponse) String

func (x *MuSig2SessionResponse) String() string

type MuSig2SignRequest

type MuSig2SignRequest struct {

	// 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.
	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 bool `protobuf:"varint,3,opt,name=cleanup,proto3" json:"cleanup,omitempty"`
	// contains filtered or unexported fields
}

func (*MuSig2SignRequest) Descriptor deprecated

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

Deprecated: Use MuSig2SignRequest.ProtoReflect.Descriptor instead.

func (*MuSig2SignRequest) GetCleanup

func (x *MuSig2SignRequest) GetCleanup() bool

func (*MuSig2SignRequest) GetMessageDigest

func (x *MuSig2SignRequest) GetMessageDigest() []byte

func (*MuSig2SignRequest) GetSessionId

func (x *MuSig2SignRequest) GetSessionId() []byte

func (*MuSig2SignRequest) ProtoMessage

func (*MuSig2SignRequest) ProtoMessage()

func (*MuSig2SignRequest) ProtoReflect

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

func (*MuSig2SignRequest) Reset

func (x *MuSig2SignRequest) Reset()

func (*MuSig2SignRequest) String

func (x *MuSig2SignRequest) String() string

type MuSig2SignResponse

type MuSig2SignResponse struct {

	// The partial signature created by the local signer.
	LocalPartialSignature []byte `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MuSig2SignResponse) Descriptor deprecated

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

Deprecated: Use MuSig2SignResponse.ProtoReflect.Descriptor instead.

func (*MuSig2SignResponse) GetLocalPartialSignature

func (x *MuSig2SignResponse) GetLocalPartialSignature() []byte

func (*MuSig2SignResponse) ProtoMessage

func (*MuSig2SignResponse) ProtoMessage()

func (*MuSig2SignResponse) ProtoReflect

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

func (*MuSig2SignResponse) Reset

func (x *MuSig2SignResponse) Reset()

func (*MuSig2SignResponse) String

func (x *MuSig2SignResponse) 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 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 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.
	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"`
	// 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"`
	// 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) GetSignMethod

func (x *SignDescriptor) GetSignMethod() SignMethod

func (*SignDescriptor) GetSingleTweak

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

func (*SignDescriptor) GetTapTweak

func (x *SignDescriptor) GetTapTweak() []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. 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 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 SignMethod

type SignMethod int32
const (
	// 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).
	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.
	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.
	SignMethod_SIGN_METHOD_TAPROOT_SCRIPT_SPEND SignMethod = 3
)

func (SignMethod) Descriptor

func (SignMethod) Descriptor() protoreflect.EnumDescriptor

func (SignMethod) Enum

func (x SignMethod) Enum() *SignMethod

func (SignMethod) EnumDescriptor deprecated

func (SignMethod) EnumDescriptor() ([]byte, []int)

Deprecated: Use SignMethod.Descriptor instead.

func (SignMethod) Number

func (x SignMethod) Number() protoreflect.EnumNumber

func (SignMethod) String

func (x SignMethod) String() string

func (SignMethod) Type

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

func (*SignReq) Descriptor deprecated

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

Deprecated: Use SignReq.ProtoReflect.Descriptor instead.

func (*SignReq) GetPrevOutputs

func (x *SignReq) GetPrevOutputs() []*TxOut

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/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.
	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)
	// 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!
	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.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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)
}

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/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.
	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)
	// 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!
	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.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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.
	//
	// 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)
	// contains filtered or unexported methods
}

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

type TaprootTweakDesc

type TaprootTweakDesc struct {

	// 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.
	KeySpendOnly bool `protobuf:"varint,2,opt,name=key_spend_only,json=keySpendOnly,proto3" json:"key_spend_only,omitempty"`
	// contains filtered or unexported fields
}

func (*TaprootTweakDesc) Descriptor deprecated

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

Deprecated: Use TaprootTweakDesc.ProtoReflect.Descriptor instead.

func (*TaprootTweakDesc) GetKeySpendOnly

func (x *TaprootTweakDesc) GetKeySpendOnly() bool

func (*TaprootTweakDesc) GetScriptRoot

func (x *TaprootTweakDesc) GetScriptRoot() []byte

func (*TaprootTweakDesc) ProtoMessage

func (*TaprootTweakDesc) ProtoMessage()

func (*TaprootTweakDesc) ProtoReflect

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

func (*TaprootTweakDesc) Reset

func (x *TaprootTweakDesc) Reset()

func (*TaprootTweakDesc) String

func (x *TaprootTweakDesc) String() string

type TweakDesc

type TweakDesc struct {

	// 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.
	IsXOnly bool `protobuf:"varint,2,opt,name=is_x_only,json=isXOnly,proto3" json:"is_x_only,omitempty"`
	// contains filtered or unexported fields
}

func (*TweakDesc) Descriptor deprecated

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

Deprecated: Use TweakDesc.ProtoReflect.Descriptor instead.

func (*TweakDesc) GetIsXOnly

func (x *TweakDesc) GetIsXOnly() bool

func (*TweakDesc) GetTweak

func (x *TweakDesc) GetTweak() []byte

func (*TweakDesc) ProtoMessage

func (*TweakDesc) ProtoMessage()

func (*TweakDesc) ProtoReflect

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

func (*TweakDesc) Reset

func (x *TweakDesc) Reset()

func (*TweakDesc) String

func (x *TweakDesc) String() string

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) MuSig2Cleanup

func (UnimplementedSignerServer) MuSig2CombineSig

func (UnimplementedSignerServer) MuSig2CreateSession

func (UnimplementedSignerServer) MuSig2Sign

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

func (*VerifyMessageReq) Descriptor deprecated

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

Deprecated: Use VerifyMessageReq.ProtoReflect.Descriptor instead.

func (*VerifyMessageReq) GetIsSchnorrSig

func (x *VerifyMessageReq) GetIsSchnorrSig() bool

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