2018-10-23 03:30:02 +03:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2018-10-31 07:14:48 +03:00
|
|
|
// source: signrpc/signer.proto
|
2018-10-23 03:30:02 +03:00
|
|
|
|
2019-05-15 16:07:30 +03:00
|
|
|
package signrpc
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
import (
|
2019-05-15 16:07:30 +03:00
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
2018-10-23 03:30:02 +03:00
|
|
|
grpc "google.golang.org/grpc"
|
2020-05-28 14:07:31 +03:00
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
2019-05-15 16:07:30 +03:00
|
|
|
math "math"
|
2018-10-23 03:30:02 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
2019-05-15 16:07:30 +03:00
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
type KeyLocator struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The family of key being identified.
|
2018-12-11 13:42:43 +03:00
|
|
|
KeyFamily int32 `protobuf:"varint,1,opt,name=key_family,json=keyFamily,proto3" json:"key_family,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
// The precise index of the key being identified.
|
2018-12-11 13:42:43 +03:00
|
|
|
KeyIndex int32 `protobuf:"varint,2,opt,name=key_index,json=keyIndex,proto3" json:"key_index,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *KeyLocator) Reset() { *m = KeyLocator{} }
|
|
|
|
func (m *KeyLocator) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*KeyLocator) ProtoMessage() {}
|
|
|
|
func (*KeyLocator) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{0}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *KeyLocator) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_KeyLocator.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *KeyLocator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_KeyLocator.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *KeyLocator) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_KeyLocator.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *KeyLocator) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_KeyLocator.Size(m)
|
|
|
|
}
|
|
|
|
func (m *KeyLocator) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_KeyLocator.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_KeyLocator proto.InternalMessageInfo
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
func (m *KeyLocator) GetKeyFamily() int32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.KeyFamily
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *KeyLocator) GetKeyIndex() int32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.KeyIndex
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
type KeyDescriptor struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//The raw bytes of the key being identified. Either this or the KeyLocator
|
|
|
|
//must be specified.
|
2018-12-04 08:26:35 +03:00
|
|
|
RawKeyBytes []byte `protobuf:"bytes,1,opt,name=raw_key_bytes,json=rawKeyBytes,proto3" json:"raw_key_bytes,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//The key locator that identifies which key to use for signing. Either this
|
|
|
|
//or the raw bytes of the target key must be specified.
|
2018-12-11 13:42:43 +03:00
|
|
|
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *KeyDescriptor) Reset() { *m = KeyDescriptor{} }
|
|
|
|
func (m *KeyDescriptor) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*KeyDescriptor) ProtoMessage() {}
|
|
|
|
func (*KeyDescriptor) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{1}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *KeyDescriptor) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_KeyDescriptor.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *KeyDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_KeyDescriptor.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *KeyDescriptor) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_KeyDescriptor.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *KeyDescriptor) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_KeyDescriptor.Size(m)
|
|
|
|
}
|
|
|
|
func (m *KeyDescriptor) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_KeyDescriptor.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_KeyDescriptor proto.InternalMessageInfo
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
func (m *KeyDescriptor) GetRawKeyBytes() []byte {
|
2018-12-04 08:26:35 +03:00
|
|
|
if m != nil {
|
|
|
|
return m.RawKeyBytes
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *KeyDescriptor) GetKeyLoc() *KeyLocator {
|
2018-12-04 08:26:35 +03:00
|
|
|
if m != nil {
|
|
|
|
return m.KeyLoc
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type TxOut struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The value of the output being spent.
|
2018-12-11 13:42:43 +03:00
|
|
|
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
// The script of the output being spent.
|
2018-12-11 13:42:43 +03:00
|
|
|
PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *TxOut) Reset() { *m = TxOut{} }
|
|
|
|
func (m *TxOut) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*TxOut) ProtoMessage() {}
|
|
|
|
func (*TxOut) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{2}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *TxOut) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_TxOut.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *TxOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_TxOut.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *TxOut) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_TxOut.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *TxOut) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_TxOut.Size(m)
|
|
|
|
}
|
|
|
|
func (m *TxOut) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_TxOut.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_TxOut proto.InternalMessageInfo
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
func (m *TxOut) GetValue() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Value
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TxOut) GetPkScript() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PkScript
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type SignDescriptor struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2020-06-05 03:44:25 +03:00
|
|
|
//
|
|
|
|
//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.
|
2018-12-11 13:42:43 +03:00
|
|
|
KeyDesc *KeyDescriptor `protobuf:"bytes,1,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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:
|
2018-10-23 03:30:02 +03:00
|
|
|
//
|
|
|
|
// derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N
|
|
|
|
SingleTweak []byte `protobuf:"bytes,2,opt,name=single_tweak,json=singleTweak,proto3" json:"single_tweak,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2018-10-23 03:30:02 +03:00
|
|
|
//
|
|
|
|
// k = (privKey*sha256(pubKey || tweakPub) +
|
2019-05-15 16:07:30 +03:00
|
|
|
//tweakPriv*sha256(tweakPub || pubKey)) mod N
|
2018-10-23 03:30:02 +03:00
|
|
|
DoubleTweak []byte `protobuf:"bytes,3,opt,name=double_tweak,json=doubleTweak,proto3" json:"double_tweak,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2018-10-23 03:30:02 +03:00
|
|
|
WitnessScript []byte `protobuf:"bytes,4,opt,name=witness_script,json=witnessScript,proto3" json:"witness_script,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-03-02 17:35:25 +03:00
|
|
|
//A description of the output being spent. The value and script MUST be
|
|
|
|
//provided.
|
2018-12-11 13:42:43 +03:00
|
|
|
Output *TxOut `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//The target sighash type that should be used when generating the final
|
|
|
|
//sighash, and signature.
|
2018-12-11 13:42:43 +03:00
|
|
|
Sighash uint32 `protobuf:"varint,7,opt,name=sighash,proto3" json:"sighash,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//The target input within the transaction that should be signed.
|
2018-12-11 13:42:43 +03:00
|
|
|
InputIndex int32 `protobuf:"varint,8,opt,name=input_index,json=inputIndex,proto3" json:"input_index,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) Reset() { *m = SignDescriptor{} }
|
|
|
|
func (m *SignDescriptor) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignDescriptor) ProtoMessage() {}
|
|
|
|
func (*SignDescriptor) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{3}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *SignDescriptor) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SignDescriptor.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SignDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SignDescriptor.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *SignDescriptor) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignDescriptor.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *SignDescriptor) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SignDescriptor.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SignDescriptor) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignDescriptor.DiscardUnknown(m)
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
var xxx_messageInfo_SignDescriptor proto.InternalMessageInfo
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
func (m *SignDescriptor) GetKeyDesc() *KeyDescriptor {
|
|
|
|
if m != nil {
|
|
|
|
return m.KeyDesc
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) GetSingleTweak() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SingleTweak
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) GetDoubleTweak() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.DoubleTweak
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) GetWitnessScript() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.WitnessScript
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) GetOutput() *TxOut {
|
|
|
|
if m != nil {
|
|
|
|
return m.Output
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) GetSighash() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Sighash
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignDescriptor) GetInputIndex() int32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.InputIndex
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
type SignReq struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The raw bytes of the transaction to be signed.
|
2018-10-23 03:30:02 +03:00
|
|
|
RawTxBytes []byte `protobuf:"bytes,1,opt,name=raw_tx_bytes,json=rawTxBytes,proto3" json:"raw_tx_bytes,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
// A set of sign descriptors, for each input to be signed.
|
2018-12-11 13:42:43 +03:00
|
|
|
SignDescs []*SignDescriptor `protobuf:"bytes,2,rep,name=sign_descs,json=signDescs,proto3" json:"sign_descs,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignReq) Reset() { *m = SignReq{} }
|
|
|
|
func (m *SignReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignReq) ProtoMessage() {}
|
|
|
|
func (*SignReq) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{4}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *SignReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SignReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SignReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SignReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *SignReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignReq.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *SignReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SignReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SignReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignReq.DiscardUnknown(m)
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
var xxx_messageInfo_SignReq proto.InternalMessageInfo
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
func (m *SignReq) GetRawTxBytes() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.RawTxBytes
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignReq) GetSignDescs() []*SignDescriptor {
|
|
|
|
if m != nil {
|
|
|
|
return m.SignDescs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type SignResp struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//A set of signatures realized in a fixed 64-byte format ordered in ascending
|
|
|
|
//input order.
|
2018-12-11 13:42:43 +03:00
|
|
|
RawSigs [][]byte `protobuf:"bytes,1,rep,name=raw_sigs,json=rawSigs,proto3" json:"raw_sigs,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *SignResp) Reset() { *m = SignResp{} }
|
|
|
|
func (m *SignResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignResp) ProtoMessage() {}
|
|
|
|
func (*SignResp) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{5}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *SignResp) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SignResp.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SignResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SignResp.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *SignResp) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignResp.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *SignResp) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SignResp.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SignResp) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignResp.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SignResp proto.InternalMessageInfo
|
2018-10-23 03:30:02 +03:00
|
|
|
|
|
|
|
func (m *SignResp) GetRawSigs() [][]byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.RawSigs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-11-29 07:08:00 +03:00
|
|
|
type InputScript struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The serializes witness stack for the specified input.
|
2018-11-29 07:08:00 +03:00
|
|
|
Witness [][]byte `protobuf:"bytes,1,rep,name=witness,proto3" json:"witness,omitempty"`
|
2020-05-13 10:19:27 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//The optional sig script for the specified witness that will only be set if
|
|
|
|
//the input specified is a nested p2sh witness program.
|
2018-12-11 13:42:43 +03:00
|
|
|
SigScript []byte `protobuf:"bytes,2,opt,name=sig_script,json=sigScript,proto3" json:"sig_script,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-11-29 07:08:00 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *InputScript) Reset() { *m = InputScript{} }
|
|
|
|
func (m *InputScript) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InputScript) ProtoMessage() {}
|
|
|
|
func (*InputScript) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{6}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *InputScript) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_InputScript.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *InputScript) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_InputScript.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *InputScript) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_InputScript.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *InputScript) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_InputScript.Size(m)
|
|
|
|
}
|
|
|
|
func (m *InputScript) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_InputScript.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_InputScript proto.InternalMessageInfo
|
2018-11-29 07:08:00 +03:00
|
|
|
|
|
|
|
func (m *InputScript) GetWitness() [][]byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Witness
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InputScript) GetSigScript() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SigScript
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type InputScriptResp struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The set of fully valid input scripts requested.
|
2018-12-11 13:42:43 +03:00
|
|
|
InputScripts []*InputScript `protobuf:"bytes,1,rep,name=input_scripts,json=inputScripts,proto3" json:"input_scripts,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InputScriptResp) Reset() { *m = InputScriptResp{} }
|
|
|
|
func (m *InputScriptResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InputScriptResp) ProtoMessage() {}
|
|
|
|
func (*InputScriptResp) Descriptor() ([]byte, []int) {
|
2019-05-15 16:07:30 +03:00
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{7}
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
func (m *InputScriptResp) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_InputScriptResp.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *InputScriptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_InputScriptResp.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-05-15 16:07:30 +03:00
|
|
|
func (m *InputScriptResp) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_InputScriptResp.Merge(m, src)
|
2018-12-11 13:42:43 +03:00
|
|
|
}
|
|
|
|
func (m *InputScriptResp) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_InputScriptResp.Size(m)
|
|
|
|
}
|
|
|
|
func (m *InputScriptResp) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_InputScriptResp.DiscardUnknown(m)
|
2018-11-29 07:08:00 +03:00
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
var xxx_messageInfo_InputScriptResp proto.InternalMessageInfo
|
2018-11-29 07:08:00 +03:00
|
|
|
|
|
|
|
func (m *InputScriptResp) GetInputScripts() []*InputScript {
|
|
|
|
if m != nil {
|
|
|
|
return m.InputScripts
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-12-10 11:48:49 +03:00
|
|
|
type SignMessageReq struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The message to be signed.
|
2019-12-10 11:48:49 +03:00
|
|
|
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
// The key locator that identifies which key to use for signing.
|
2019-12-10 11:48:49 +03:00
|
|
|
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignMessageReq) Reset() { *m = SignMessageReq{} }
|
|
|
|
func (m *SignMessageReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignMessageReq) ProtoMessage() {}
|
|
|
|
func (*SignMessageReq) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{8}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignMessageReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SignMessageReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SignMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SignMessageReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *SignMessageReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignMessageReq.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SignMessageReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SignMessageReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SignMessageReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignMessageReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SignMessageReq proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SignMessageReq) GetMsg() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Msg
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignMessageReq) GetKeyLoc() *KeyLocator {
|
|
|
|
if m != nil {
|
|
|
|
return m.KeyLoc
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type SignMessageResp struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-12-13 04:20:33 +03:00
|
|
|
//The signature for the given message in the fixed-size LN wire format.
|
2019-12-10 11:48:49 +03:00
|
|
|
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignMessageResp) Reset() { *m = SignMessageResp{} }
|
|
|
|
func (m *SignMessageResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignMessageResp) ProtoMessage() {}
|
|
|
|
func (*SignMessageResp) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{9}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignMessageResp) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SignMessageResp.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SignMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SignMessageResp.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *SignMessageResp) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignMessageResp.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SignMessageResp) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SignMessageResp.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SignMessageResp) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignMessageResp.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SignMessageResp proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SignMessageResp) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type VerifyMessageReq struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// The message over which the signature is to be verified.
|
2019-12-10 11:48:49 +03:00
|
|
|
Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-12-13 04:20:33 +03:00
|
|
|
//The fixed-size LN wire encoded signature to be verified over the given
|
|
|
|
//message.
|
2019-12-10 11:48:49 +03:00
|
|
|
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
// The public key the signature has to be valid for.
|
2019-12-10 11:48:49 +03:00
|
|
|
Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VerifyMessageReq) Reset() { *m = VerifyMessageReq{} }
|
|
|
|
func (m *VerifyMessageReq) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*VerifyMessageReq) ProtoMessage() {}
|
|
|
|
func (*VerifyMessageReq) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{10}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VerifyMessageReq) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_VerifyMessageReq.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_VerifyMessageReq.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageReq) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_VerifyMessageReq.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageReq) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_VerifyMessageReq.Size(m)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageReq) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_VerifyMessageReq.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_VerifyMessageReq proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *VerifyMessageReq) GetMsg() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Msg
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VerifyMessageReq) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VerifyMessageReq) GetPubkey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Pubkey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type VerifyMessageResp struct {
|
2020-05-06 17:51:14 +03:00
|
|
|
// Whether the signature was valid over the given message.
|
2019-12-10 11:48:49 +03:00
|
|
|
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VerifyMessageResp) Reset() { *m = VerifyMessageResp{} }
|
|
|
|
func (m *VerifyMessageResp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*VerifyMessageResp) ProtoMessage() {}
|
|
|
|
func (*VerifyMessageResp) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{11}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VerifyMessageResp) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_VerifyMessageResp.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_VerifyMessageResp.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageResp) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_VerifyMessageResp.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageResp) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_VerifyMessageResp.Size(m)
|
|
|
|
}
|
|
|
|
func (m *VerifyMessageResp) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_VerifyMessageResp.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_VerifyMessageResp proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *VerifyMessageResp) GetValid() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Valid
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-11-28 12:58:51 +03:00
|
|
|
type SharedKeyRequest struct {
|
|
|
|
// The ephemeral public key to use for the DH key derivation.
|
2020-01-06 16:53:24 +03:00
|
|
|
EphemeralPubkey []byte `protobuf:"bytes,1,opt,name=ephemeral_pubkey,json=ephemeralPubkey,proto3" json:"ephemeral_pubkey,omitempty"`
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2020-01-06 16:53:24 +03:00
|
|
|
//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.
|
|
|
|
KeyLoc *KeyLocator `protobuf:"bytes,2,opt,name=key_loc,json=keyLoc,proto3" json:"key_loc,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-11-28 12:58:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SharedKeyRequest) Reset() { *m = SharedKeyRequest{} }
|
|
|
|
func (m *SharedKeyRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SharedKeyRequest) ProtoMessage() {}
|
|
|
|
func (*SharedKeyRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{12}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SharedKeyRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SharedKeyRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SharedKeyRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SharedKeyRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SharedKeyRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SharedKeyRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SharedKeyRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SharedKeyRequest) GetEphemeralPubkey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.EphemeralPubkey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-01-06 16:53:24 +03:00
|
|
|
func (m *SharedKeyRequest) GetKeyLoc() *KeyLocator {
|
|
|
|
if m != nil {
|
|
|
|
return m.KeyLoc
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-11-28 12:58:51 +03:00
|
|
|
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"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SharedKeyResponse) Reset() { *m = SharedKeyResponse{} }
|
|
|
|
func (m *SharedKeyResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SharedKeyResponse) ProtoMessage() {}
|
|
|
|
func (*SharedKeyResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_4ecd772f6c7ffacf, []int{13}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SharedKeyResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SharedKeyResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SharedKeyResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SharedKeyResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SharedKeyResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SharedKeyResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SharedKeyResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SharedKeyResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SharedKeyResponse) GetSharedKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SharedKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-23 03:30:02 +03:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*KeyLocator)(nil), "signrpc.KeyLocator")
|
|
|
|
proto.RegisterType((*KeyDescriptor)(nil), "signrpc.KeyDescriptor")
|
|
|
|
proto.RegisterType((*TxOut)(nil), "signrpc.TxOut")
|
|
|
|
proto.RegisterType((*SignDescriptor)(nil), "signrpc.SignDescriptor")
|
|
|
|
proto.RegisterType((*SignReq)(nil), "signrpc.SignReq")
|
|
|
|
proto.RegisterType((*SignResp)(nil), "signrpc.SignResp")
|
2018-11-29 07:08:00 +03:00
|
|
|
proto.RegisterType((*InputScript)(nil), "signrpc.InputScript")
|
|
|
|
proto.RegisterType((*InputScriptResp)(nil), "signrpc.InputScriptResp")
|
2019-12-10 11:48:49 +03:00
|
|
|
proto.RegisterType((*SignMessageReq)(nil), "signrpc.SignMessageReq")
|
|
|
|
proto.RegisterType((*SignMessageResp)(nil), "signrpc.SignMessageResp")
|
|
|
|
proto.RegisterType((*VerifyMessageReq)(nil), "signrpc.VerifyMessageReq")
|
|
|
|
proto.RegisterType((*VerifyMessageResp)(nil), "signrpc.VerifyMessageResp")
|
2019-11-28 12:58:51 +03:00
|
|
|
proto.RegisterType((*SharedKeyRequest)(nil), "signrpc.SharedKeyRequest")
|
|
|
|
proto.RegisterType((*SharedKeyResponse)(nil), "signrpc.SharedKeyResponse")
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2019-05-15 16:07:30 +03:00
|
|
|
func init() { proto.RegisterFile("signrpc/signer.proto", fileDescriptor_4ecd772f6c7ffacf) }
|
|
|
|
|
|
|
|
var fileDescriptor_4ecd772f6c7ffacf = []byte{
|
2020-01-06 16:53:24 +03:00
|
|
|
// 756 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5d, 0x8f, 0xdb, 0x44,
|
2019-11-28 12:58:51 +03:00
|
|
|
0x14, 0xd5, 0x26, 0x6c, 0x92, 0xbd, 0x4e, 0x76, 0xb3, 0xc3, 0xaa, 0xb8, 0x0b, 0x88, 0x60, 0xa9,
|
2020-01-06 16:53:24 +03:00
|
|
|
0x28, 0x95, 0x20, 0x11, 0x01, 0x21, 0xc1, 0x13, 0x2a, 0xd5, 0xaa, 0x55, 0x8a, 0x5a, 0x39, 0x2b,
|
|
|
|
0x1e, 0xfa, 0x62, 0x39, 0xce, 0xad, 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0x2f, 0x0c, 0x67,
|
|
|
|
0xd1, 0xba, 0xa7, 0xbf, 0x31, 0x3f, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x73, 0xb0, 0xe9, 0x51,
|
|
|
|
0x7b, 0x06, 0x00, 0x00,
|
2019-05-15 16:07:30 +03:00
|
|
|
}
|
|
|
|
|
2018-10-23 03:30:02 +03:00
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
// SignerClient is the client API for Signer service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
2018-10-23 03:30:02 +03:00
|
|
|
type SignerClient interface {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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).
|
2018-10-23 03:30:02 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//If we are unable to sign using the specified keys, then an error will be
|
|
|
|
//returned.
|
2018-10-23 03:30:02 +03:00
|
|
|
SignOutputRaw(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*SignResp, error)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2018-11-29 07:08:00 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2018-11-29 07:08:00 +03:00
|
|
|
ComputeInputScript(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*InputScriptResp, error)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-12-10 11:48:49 +03:00
|
|
|
//SignMessage signs a message with the key specified in the key locator. The
|
2019-12-13 04:20:33 +03:00
|
|
|
//returned signature is fixed-size LN wire format encoded.
|
2019-12-10 11:48:49 +03:00
|
|
|
//
|
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-12-10 11:48:49 +03:00
|
|
|
//VerifyMessage verifies a signature over a message using the public key
|
2019-12-13 04:20:33 +03:00
|
|
|
//provided. The signature must be fixed-size LN wire format encoded.
|
2019-12-10 11:48:49 +03:00
|
|
|
//
|
|
|
|
//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)
|
2019-11-28 12:58:51 +03:00
|
|
|
//
|
|
|
|
//DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
|
|
|
//derivation between the ephemeral public key in the request and the node's
|
2020-01-06 16:53:24 +03:00
|
|
|
//key specified in the key_loc parameter (or the node's identity private key
|
|
|
|
//if no key locator is specified):
|
|
|
|
//P_shared = privKeyNode * ephemeralPubkey
|
2019-11-28 12:58:51 +03:00
|
|
|
//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)
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
type signerClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewSignerClient(cc *grpc.ClientConn) SignerClient {
|
|
|
|
return &signerClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *signerClient) SignOutputRaw(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*SignResp, error) {
|
|
|
|
out := new(SignResp)
|
2018-12-11 13:42:43 +03:00
|
|
|
err := c.cc.Invoke(ctx, "/signrpc.Signer/SignOutputRaw", in, out, opts...)
|
2018-10-23 03:30:02 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-11-29 07:08:00 +03:00
|
|
|
func (c *signerClient) ComputeInputScript(ctx context.Context, in *SignReq, opts ...grpc.CallOption) (*InputScriptResp, error) {
|
|
|
|
out := new(InputScriptResp)
|
2018-12-11 13:42:43 +03:00
|
|
|
err := c.cc.Invoke(ctx, "/signrpc.Signer/ComputeInputScript", in, out, opts...)
|
2018-11-29 07:08:00 +03:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-12-10 11:48:49 +03:00
|
|
|
func (c *signerClient) SignMessage(ctx context.Context, in *SignMessageReq, opts ...grpc.CallOption) (*SignMessageResp, error) {
|
|
|
|
out := new(SignMessageResp)
|
|
|
|
err := c.cc.Invoke(ctx, "/signrpc.Signer/SignMessage", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *signerClient) VerifyMessage(ctx context.Context, in *VerifyMessageReq, opts ...grpc.CallOption) (*VerifyMessageResp, error) {
|
|
|
|
out := new(VerifyMessageResp)
|
|
|
|
err := c.cc.Invoke(ctx, "/signrpc.Signer/VerifyMessage", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-11-28 12:58:51 +03:00
|
|
|
func (c *signerClient) DeriveSharedKey(ctx context.Context, in *SharedKeyRequest, opts ...grpc.CallOption) (*SharedKeyResponse, error) {
|
|
|
|
out := new(SharedKeyResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/signrpc.Signer/DeriveSharedKey", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-12-11 13:42:43 +03:00
|
|
|
// SignerServer is the server API for Signer service.
|
2018-10-23 03:30:02 +03:00
|
|
|
type SignerServer interface {
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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).
|
2018-10-23 03:30:02 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//If we are unable to sign using the specified keys, then an error will be
|
|
|
|
//returned.
|
2018-10-23 03:30:02 +03:00
|
|
|
SignOutputRaw(context.Context, *SignReq) (*SignResp, error)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2018-11-29 07:08:00 +03:00
|
|
|
//
|
2019-05-15 16:07:30 +03:00
|
|
|
//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.
|
2018-11-29 07:08:00 +03:00
|
|
|
ComputeInputScript(context.Context, *SignReq) (*InputScriptResp, error)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-12-10 11:48:49 +03:00
|
|
|
//SignMessage signs a message with the key specified in the key locator. The
|
2019-12-13 04:20:33 +03:00
|
|
|
//returned signature is fixed-size LN wire format encoded.
|
2019-12-10 11:48:49 +03:00
|
|
|
//
|
|
|
|
//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)
|
2020-05-06 17:51:14 +03:00
|
|
|
//
|
2019-12-10 11:48:49 +03:00
|
|
|
//VerifyMessage verifies a signature over a message using the public key
|
2019-12-13 04:20:33 +03:00
|
|
|
//provided. The signature must be fixed-size LN wire format encoded.
|
2019-12-10 11:48:49 +03:00
|
|
|
//
|
|
|
|
//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)
|
2019-11-28 12:58:51 +03:00
|
|
|
//
|
|
|
|
//DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key
|
|
|
|
//derivation between the ephemeral public key in the request and the node's
|
2020-01-06 16:53:24 +03:00
|
|
|
//key specified in the key_loc parameter (or the node's identity private key
|
|
|
|
//if no key locator is specified):
|
|
|
|
//P_shared = privKeyNode * ephemeralPubkey
|
2019-11-28 12:58:51 +03:00
|
|
|
//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)
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|
|
|
|
|
2020-05-28 14:07:31 +03:00
|
|
|
// UnimplementedSignerServer can be embedded to have forward compatible implementations.
|
|
|
|
type UnimplementedSignerServer struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnimplementedSignerServer) SignOutputRaw(ctx context.Context, req *SignReq) (*SignResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SignOutputRaw not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedSignerServer) ComputeInputScript(ctx context.Context, req *SignReq) (*InputScriptResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ComputeInputScript not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedSignerServer) SignMessage(ctx context.Context, req *SignMessageReq) (*SignMessageResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SignMessage not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedSignerServer) VerifyMessage(ctx context.Context, req *VerifyMessageReq) (*VerifyMessageResp, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method VerifyMessage not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedSignerServer) DeriveSharedKey(ctx context.Context, req *SharedKeyRequest) (*SharedKeyResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeriveSharedKey not implemented")
|
|
|
|
}
|
|
|
|
|
2018-10-23 03:30:02 +03:00
|
|
|
func RegisterSignerServer(s *grpc.Server, srv SignerServer) {
|
|
|
|
s.RegisterService(&_Signer_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Signer_SignOutputRaw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(SignReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(SignerServer).SignOutputRaw(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/signrpc.Signer/SignOutputRaw",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(SignerServer).SignOutputRaw(ctx, req.(*SignReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-11-29 07:08:00 +03:00
|
|
|
func _Signer_ComputeInputScript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(SignReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(SignerServer).ComputeInputScript(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/signrpc.Signer/ComputeInputScript",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(SignerServer).ComputeInputScript(ctx, req.(*SignReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2019-12-10 11:48:49 +03:00
|
|
|
func _Signer_SignMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(SignMessageReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(SignerServer).SignMessage(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/signrpc.Signer/SignMessage",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(SignerServer).SignMessage(ctx, req.(*SignMessageReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Signer_VerifyMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(VerifyMessageReq)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(SignerServer).VerifyMessage(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/signrpc.Signer/VerifyMessage",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(SignerServer).VerifyMessage(ctx, req.(*VerifyMessageReq))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2019-11-28 12:58:51 +03:00
|
|
|
func _Signer_DeriveSharedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(SharedKeyRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(SignerServer).DeriveSharedKey(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/signrpc.Signer/DeriveSharedKey",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(SignerServer).DeriveSharedKey(ctx, req.(*SharedKeyRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-10-23 03:30:02 +03:00
|
|
|
var _Signer_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "signrpc.Signer",
|
|
|
|
HandlerType: (*SignerServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "SignOutputRaw",
|
|
|
|
Handler: _Signer_SignOutputRaw_Handler,
|
|
|
|
},
|
2018-11-29 07:08:00 +03:00
|
|
|
{
|
|
|
|
MethodName: "ComputeInputScript",
|
|
|
|
Handler: _Signer_ComputeInputScript_Handler,
|
|
|
|
},
|
2019-12-10 11:48:49 +03:00
|
|
|
{
|
|
|
|
MethodName: "SignMessage",
|
|
|
|
Handler: _Signer_SignMessage_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "VerifyMessage",
|
|
|
|
Handler: _Signer_VerifyMessage_Handler,
|
|
|
|
},
|
2019-11-28 12:58:51 +03:00
|
|
|
{
|
|
|
|
MethodName: "DeriveSharedKey",
|
|
|
|
Handler: _Signer_DeriveSharedKey_Handler,
|
|
|
|
},
|
2018-10-23 03:30:02 +03:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
2018-10-31 07:14:48 +03:00
|
|
|
Metadata: "signrpc/signer.proto",
|
2018-10-23 03:30:02 +03:00
|
|
|
}
|