keys

package
v0.0.0-...-25a45d7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost     = "localhost"
	DefaultPort     = "10997"
	DefaultHashType = "sha256"
	DefaultKeysDir  = ".keys"
	TestPort        = "7674"
)
View Source
const (
	CryptoNone    = "none"
	CryptoAESGCM  = "scrypt-aes-gcm"
	HashEd25519   = "go-crypto-0.5.0"
	HashSecp256k1 = "btc"
)

Variables

View Source
var (
	ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKeys   = fmt.Errorf("proto: integer overflow")
)

Functions

func GetAllAddresses

func GetAllAddresses(dataDirPath string) (addresses []string, err error)

func IsValidKeyJson

func IsValidKeyJson(j []byte) []byte

returns the address if valid, nil otherwise

func RegisterKeysServer

func RegisterKeysServer(s *grpc.Server, srv KeysServer)

func StartStandAloneServer

func StartStandAloneServer(keysDir, host, port string, AllowBadFilePermissions bool, logger *logging.Logger) (err error)

func WriteKeyFile

func WriteKeyFile(addr []byte, dataDirPath string, content []byte) (err error)

Types

type AddNameRequest

type AddNameRequest struct {
	Keyname              string   `protobuf:"bytes,1,opt,name=Keyname,proto3" json:"Keyname,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddNameRequest) Descriptor

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

func (*AddNameRequest) GetAddress

func (m *AddNameRequest) GetAddress() string

func (*AddNameRequest) GetKeyname

func (m *AddNameRequest) GetKeyname() string

func (*AddNameRequest) Marshal

func (m *AddNameRequest) Marshal() (dAtA []byte, err error)

func (*AddNameRequest) MarshalTo

func (m *AddNameRequest) MarshalTo(dAtA []byte) (int, error)

func (*AddNameRequest) ProtoMessage

func (*AddNameRequest) ProtoMessage()

func (*AddNameRequest) Reset

func (m *AddNameRequest) Reset()

func (*AddNameRequest) Size

func (m *AddNameRequest) Size() (n int)

func (*AddNameRequest) String

func (m *AddNameRequest) String() string

func (*AddNameRequest) Unmarshal

func (m *AddNameRequest) Unmarshal(dAtA []byte) error

func (*AddNameRequest) XXX_DiscardUnknown

func (m *AddNameRequest) XXX_DiscardUnknown()

func (*AddNameRequest) XXX_Marshal

func (m *AddNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddNameRequest) XXX_Merge

func (dst *AddNameRequest) XXX_Merge(src proto.Message)

func (*AddNameRequest) XXX_MessageName

func (*AddNameRequest) XXX_MessageName() string

func (*AddNameRequest) XXX_Size

func (m *AddNameRequest) XXX_Size() int

func (*AddNameRequest) XXX_Unmarshal

func (m *AddNameRequest) XXX_Unmarshal(b []byte) error

type AddNameResponse

type AddNameResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddNameResponse) Descriptor

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

func (*AddNameResponse) Marshal

func (m *AddNameResponse) Marshal() (dAtA []byte, err error)

func (*AddNameResponse) MarshalTo

func (m *AddNameResponse) MarshalTo(dAtA []byte) (int, error)

func (*AddNameResponse) ProtoMessage

func (*AddNameResponse) ProtoMessage()

func (*AddNameResponse) Reset

func (m *AddNameResponse) Reset()

func (*AddNameResponse) Size

func (m *AddNameResponse) Size() (n int)

func (*AddNameResponse) String

func (m *AddNameResponse) String() string

func (*AddNameResponse) Unmarshal

func (m *AddNameResponse) Unmarshal(dAtA []byte) error

func (*AddNameResponse) XXX_DiscardUnknown

func (m *AddNameResponse) XXX_DiscardUnknown()

func (*AddNameResponse) XXX_Marshal

func (m *AddNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddNameResponse) XXX_Merge

func (dst *AddNameResponse) XXX_Merge(src proto.Message)

func (*AddNameResponse) XXX_MessageName

func (*AddNameResponse) XXX_MessageName() string

func (*AddNameResponse) XXX_Size

func (m *AddNameResponse) XXX_Size() int

func (*AddNameResponse) XXX_Unmarshal

func (m *AddNameResponse) XXX_Unmarshal(b []byte) error

type ExportRequest

type ExportRequest struct {
	Passphrase           string   `protobuf:"bytes,1,opt,name=Passphrase,proto3" json:"Passphrase,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Address              string   `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExportRequest) Descriptor

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

func (*ExportRequest) GetAddress

func (m *ExportRequest) GetAddress() string

func (*ExportRequest) GetName

func (m *ExportRequest) GetName() string

func (*ExportRequest) GetPassphrase

func (m *ExportRequest) GetPassphrase() string

func (*ExportRequest) Marshal

func (m *ExportRequest) Marshal() (dAtA []byte, err error)

func (*ExportRequest) MarshalTo

func (m *ExportRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExportRequest) ProtoMessage

func (*ExportRequest) ProtoMessage()

func (*ExportRequest) Reset

func (m *ExportRequest) Reset()

func (*ExportRequest) Size

func (m *ExportRequest) Size() (n int)

func (*ExportRequest) String

func (m *ExportRequest) String() string

func (*ExportRequest) Unmarshal

func (m *ExportRequest) Unmarshal(dAtA []byte) error

func (*ExportRequest) XXX_DiscardUnknown

func (m *ExportRequest) XXX_DiscardUnknown()

func (*ExportRequest) XXX_Marshal

func (m *ExportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExportRequest) XXX_Merge

func (dst *ExportRequest) XXX_Merge(src proto.Message)

func (*ExportRequest) XXX_MessageName

func (*ExportRequest) XXX_MessageName() string

func (*ExportRequest) XXX_Size

func (m *ExportRequest) XXX_Size() int

func (*ExportRequest) XXX_Unmarshal

func (m *ExportRequest) XXX_Unmarshal(b []byte) error

type ExportResponse

type ExportResponse struct {
	Publickey            []byte   `protobuf:"bytes,1,opt,name=Publickey,proto3" json:"Publickey,omitempty"`
	Privatekey           []byte   `protobuf:"bytes,2,opt,name=Privatekey,proto3" json:"Privatekey,omitempty"`
	Address              []byte   `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
	CurveType            string   `protobuf:"bytes,4,opt,name=CurveType,proto3" json:"CurveType,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExportResponse) Descriptor

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

func (*ExportResponse) GetAddress

func (m *ExportResponse) GetAddress() []byte

func (*ExportResponse) GetCurveType

func (m *ExportResponse) GetCurveType() string

func (*ExportResponse) GetPrivatekey

func (m *ExportResponse) GetPrivatekey() []byte

func (*ExportResponse) GetPublickey

func (m *ExportResponse) GetPublickey() []byte

func (*ExportResponse) Marshal

func (m *ExportResponse) Marshal() (dAtA []byte, err error)

func (*ExportResponse) MarshalTo

func (m *ExportResponse) MarshalTo(dAtA []byte) (int, error)

func (*ExportResponse) ProtoMessage

func (*ExportResponse) ProtoMessage()

func (*ExportResponse) Reset

func (m *ExportResponse) Reset()

func (*ExportResponse) Size

func (m *ExportResponse) Size() (n int)

func (*ExportResponse) String

func (m *ExportResponse) String() string

func (*ExportResponse) Unmarshal

func (m *ExportResponse) Unmarshal(dAtA []byte) error

func (*ExportResponse) XXX_DiscardUnknown

func (m *ExportResponse) XXX_DiscardUnknown()

func (*ExportResponse) XXX_Marshal

func (m *ExportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExportResponse) XXX_Merge

func (dst *ExportResponse) XXX_Merge(src proto.Message)

func (*ExportResponse) XXX_MessageName

func (*ExportResponse) XXX_MessageName() string

func (*ExportResponse) XXX_Size

func (m *ExportResponse) XXX_Size() int

func (*ExportResponse) XXX_Unmarshal

func (m *ExportResponse) XXX_Unmarshal(b []byte) error

type GenRequest

type GenRequest struct {
	Passphrase           string   `protobuf:"bytes,1,opt,name=Passphrase,proto3" json:"Passphrase,omitempty"`
	CurveType            string   `protobuf:"bytes,2,opt,name=CurveType,proto3" json:"CurveType,omitempty"`
	KeyName              string   `protobuf:"bytes,3,opt,name=KeyName,proto3" json:"KeyName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenRequest) Descriptor

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

func (*GenRequest) GetCurveType

func (m *GenRequest) GetCurveType() string

func (*GenRequest) GetKeyName

func (m *GenRequest) GetKeyName() string

func (*GenRequest) GetPassphrase

func (m *GenRequest) GetPassphrase() string

func (*GenRequest) Marshal

func (m *GenRequest) Marshal() (dAtA []byte, err error)

func (*GenRequest) MarshalTo

func (m *GenRequest) MarshalTo(dAtA []byte) (int, error)

func (*GenRequest) ProtoMessage

func (*GenRequest) ProtoMessage()

func (*GenRequest) Reset

func (m *GenRequest) Reset()

func (*GenRequest) Size

func (m *GenRequest) Size() (n int)

func (*GenRequest) String

func (m *GenRequest) String() string

func (*GenRequest) Unmarshal

func (m *GenRequest) Unmarshal(dAtA []byte) error

func (*GenRequest) XXX_DiscardUnknown

func (m *GenRequest) XXX_DiscardUnknown()

func (*GenRequest) XXX_Marshal

func (m *GenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenRequest) XXX_Merge

func (dst *GenRequest) XXX_Merge(src proto.Message)

func (*GenRequest) XXX_MessageName

func (*GenRequest) XXX_MessageName() string

func (*GenRequest) XXX_Size

func (m *GenRequest) XXX_Size() int

func (*GenRequest) XXX_Unmarshal

func (m *GenRequest) XXX_Unmarshal(b []byte) error

type GenResponse

type GenResponse struct {
	Address              string   `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenResponse) Descriptor

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

func (*GenResponse) GetAddress

func (m *GenResponse) GetAddress() string

func (*GenResponse) Marshal

func (m *GenResponse) Marshal() (dAtA []byte, err error)

func (*GenResponse) MarshalTo

func (m *GenResponse) MarshalTo(dAtA []byte) (int, error)

func (*GenResponse) ProtoMessage

func (*GenResponse) ProtoMessage()

func (*GenResponse) Reset

func (m *GenResponse) Reset()

func (*GenResponse) Size

func (m *GenResponse) Size() (n int)

func (*GenResponse) String

func (m *GenResponse) String() string

func (*GenResponse) Unmarshal

func (m *GenResponse) Unmarshal(dAtA []byte) error

func (*GenResponse) XXX_DiscardUnknown

func (m *GenResponse) XXX_DiscardUnknown()

func (*GenResponse) XXX_Marshal

func (m *GenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenResponse) XXX_Merge

func (dst *GenResponse) XXX_Merge(src proto.Message)

func (*GenResponse) XXX_MessageName

func (*GenResponse) XXX_MessageName() string

func (*GenResponse) XXX_Size

func (m *GenResponse) XXX_Size() int

func (*GenResponse) XXX_Unmarshal

func (m *GenResponse) XXX_Unmarshal(b []byte) error

type HashRequest

type HashRequest struct {
	Hashtype             string   `protobuf:"bytes,1,opt,name=Hashtype,proto3" json:"Hashtype,omitempty"`
	Message              []byte   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HashRequest) Descriptor

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

func (*HashRequest) GetHashtype

func (m *HashRequest) GetHashtype() string

func (*HashRequest) GetMessage

func (m *HashRequest) GetMessage() []byte

func (*HashRequest) Marshal

func (m *HashRequest) Marshal() (dAtA []byte, err error)

func (*HashRequest) MarshalTo

func (m *HashRequest) MarshalTo(dAtA []byte) (int, error)

func (*HashRequest) ProtoMessage

func (*HashRequest) ProtoMessage()

func (*HashRequest) Reset

func (m *HashRequest) Reset()

func (*HashRequest) Size

func (m *HashRequest) Size() (n int)

func (*HashRequest) String

func (m *HashRequest) String() string

func (*HashRequest) Unmarshal

func (m *HashRequest) Unmarshal(dAtA []byte) error

func (*HashRequest) XXX_DiscardUnknown

func (m *HashRequest) XXX_DiscardUnknown()

func (*HashRequest) XXX_Marshal

func (m *HashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HashRequest) XXX_Merge

func (dst *HashRequest) XXX_Merge(src proto.Message)

func (*HashRequest) XXX_MessageName

func (*HashRequest) XXX_MessageName() string

func (*HashRequest) XXX_Size

func (m *HashRequest) XXX_Size() int

func (*HashRequest) XXX_Unmarshal

func (m *HashRequest) XXX_Unmarshal(b []byte) error

type HashResponse

type HashResponse struct {
	Hash                 string   `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HashResponse) Descriptor

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

func (*HashResponse) GetHash

func (m *HashResponse) GetHash() string

func (*HashResponse) Marshal

func (m *HashResponse) Marshal() (dAtA []byte, err error)

func (*HashResponse) MarshalTo

func (m *HashResponse) MarshalTo(dAtA []byte) (int, error)

func (*HashResponse) ProtoMessage

func (*HashResponse) ProtoMessage()

func (*HashResponse) Reset

func (m *HashResponse) Reset()

func (*HashResponse) Size

func (m *HashResponse) Size() (n int)

func (*HashResponse) String

func (m *HashResponse) String() string

func (*HashResponse) Unmarshal

func (m *HashResponse) Unmarshal(dAtA []byte) error

func (*HashResponse) XXX_DiscardUnknown

func (m *HashResponse) XXX_DiscardUnknown()

func (*HashResponse) XXX_Marshal

func (m *HashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HashResponse) XXX_Merge

func (dst *HashResponse) XXX_Merge(src proto.Message)

func (*HashResponse) XXX_MessageName

func (*HashResponse) XXX_MessageName() string

func (*HashResponse) XXX_Size

func (m *HashResponse) XXX_Size() int

func (*HashResponse) XXX_Unmarshal

func (m *HashResponse) XXX_Unmarshal(b []byte) error

type ImportJSONRequest

type ImportJSONRequest struct {
	Passphrase           string   `protobuf:"bytes,1,opt,name=Passphrase,proto3" json:"Passphrase,omitempty"`
	JSON                 string   `protobuf:"bytes,2,opt,name=JSON,proto3" json:"JSON,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ImportJSONRequest) Descriptor

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

func (*ImportJSONRequest) GetJSON

func (m *ImportJSONRequest) GetJSON() string

func (*ImportJSONRequest) GetPassphrase

func (m *ImportJSONRequest) GetPassphrase() string

func (*ImportJSONRequest) Marshal

func (m *ImportJSONRequest) Marshal() (dAtA []byte, err error)

func (*ImportJSONRequest) MarshalTo

func (m *ImportJSONRequest) MarshalTo(dAtA []byte) (int, error)

func (*ImportJSONRequest) ProtoMessage

func (*ImportJSONRequest) ProtoMessage()

func (*ImportJSONRequest) Reset

func (m *ImportJSONRequest) Reset()

func (*ImportJSONRequest) Size

func (m *ImportJSONRequest) Size() (n int)

func (*ImportJSONRequest) String

func (m *ImportJSONRequest) String() string

func (*ImportJSONRequest) Unmarshal

func (m *ImportJSONRequest) Unmarshal(dAtA []byte) error

func (*ImportJSONRequest) XXX_DiscardUnknown

func (m *ImportJSONRequest) XXX_DiscardUnknown()

func (*ImportJSONRequest) XXX_Marshal

func (m *ImportJSONRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ImportJSONRequest) XXX_Merge

func (dst *ImportJSONRequest) XXX_Merge(src proto.Message)

func (*ImportJSONRequest) XXX_MessageName

func (*ImportJSONRequest) XXX_MessageName() string

func (*ImportJSONRequest) XXX_Size

func (m *ImportJSONRequest) XXX_Size() int

func (*ImportJSONRequest) XXX_Unmarshal

func (m *ImportJSONRequest) XXX_Unmarshal(b []byte) error

type ImportRequest

type ImportRequest struct {
	Passphrase           string   `protobuf:"bytes,1,opt,name=Passphrase,proto3" json:"Passphrase,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	CurveType            string   `protobuf:"bytes,3,opt,name=CurveType,proto3" json:"CurveType,omitempty"`
	KeyBytes             []byte   `protobuf:"bytes,4,opt,name=KeyBytes,proto3" json:"KeyBytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ImportRequest) Descriptor

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

func (*ImportRequest) GetCurveType

func (m *ImportRequest) GetCurveType() string

func (*ImportRequest) GetKeyBytes

func (m *ImportRequest) GetKeyBytes() []byte

func (*ImportRequest) GetName

func (m *ImportRequest) GetName() string

func (*ImportRequest) GetPassphrase

func (m *ImportRequest) GetPassphrase() string

func (*ImportRequest) Marshal

func (m *ImportRequest) Marshal() (dAtA []byte, err error)

func (*ImportRequest) MarshalTo

func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error)

func (*ImportRequest) ProtoMessage

func (*ImportRequest) ProtoMessage()

func (*ImportRequest) Reset

func (m *ImportRequest) Reset()

func (*ImportRequest) Size

func (m *ImportRequest) Size() (n int)

func (*ImportRequest) String

func (m *ImportRequest) String() string

func (*ImportRequest) Unmarshal

func (m *ImportRequest) Unmarshal(dAtA []byte) error

func (*ImportRequest) XXX_DiscardUnknown

func (m *ImportRequest) XXX_DiscardUnknown()

func (*ImportRequest) XXX_Marshal

func (m *ImportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ImportRequest) XXX_Merge

func (dst *ImportRequest) XXX_Merge(src proto.Message)

func (*ImportRequest) XXX_MessageName

func (*ImportRequest) XXX_MessageName() string

func (*ImportRequest) XXX_Size

func (m *ImportRequest) XXX_Size() int

func (*ImportRequest) XXX_Unmarshal

func (m *ImportRequest) XXX_Unmarshal(b []byte) error

type ImportResponse

type ImportResponse struct {
	Address              string   `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ImportResponse) Descriptor

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

func (*ImportResponse) GetAddress

func (m *ImportResponse) GetAddress() string

func (*ImportResponse) Marshal

func (m *ImportResponse) Marshal() (dAtA []byte, err error)

func (*ImportResponse) MarshalTo

func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error)

func (*ImportResponse) ProtoMessage

func (*ImportResponse) ProtoMessage()

func (*ImportResponse) Reset

func (m *ImportResponse) Reset()

func (*ImportResponse) Size

func (m *ImportResponse) Size() (n int)

func (*ImportResponse) String

func (m *ImportResponse) String() string

func (*ImportResponse) Unmarshal

func (m *ImportResponse) Unmarshal(dAtA []byte) error

func (*ImportResponse) XXX_DiscardUnknown

func (m *ImportResponse) XXX_DiscardUnknown()

func (*ImportResponse) XXX_Marshal

func (m *ImportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ImportResponse) XXX_Merge

func (dst *ImportResponse) XXX_Merge(src proto.Message)

func (*ImportResponse) XXX_MessageName

func (*ImportResponse) XXX_MessageName() string

func (*ImportResponse) XXX_Size

func (m *ImportResponse) XXX_Size() int

func (*ImportResponse) XXX_Unmarshal

func (m *ImportResponse) XXX_Unmarshal(b []byte) error

type Key

type Key struct {
	CurveType  crypto.CurveType
	Address    crypto.Address
	PublicKey  crypto.PublicKey
	PrivateKey crypto.PrivateKey
}

func DecryptKey

func DecryptKey(passphrase string, keyProtected *keyJSON) (*Key, error)

func NewKey

func NewKey(typ crypto.CurveType) (*Key, error)

func NewKeyFromPriv

func NewKeyFromPriv(curveType crypto.CurveType, PrivKeyBytes []byte) (*Key, error)

func NewKeyFromPub

func NewKeyFromPub(curveType crypto.CurveType, PubKeyBytes []byte) (*Key, error)

func (*Key) MarshalJSON

func (k *Key) MarshalJSON() (j []byte, err error)

func (*Key) Pubkey

func (k *Key) Pubkey() []byte

func (*Key) Sign

func (k *Key) Sign(hash []byte) ([]byte, error)

func (*Key) UnmarshalJSON

func (k *Key) UnmarshalJSON(j []byte) (err error)

type KeyClient

type KeyClient interface {
	// Sign returns the signature bytes for given message signed with the key associated with signAddress
	Sign(signAddress crypto.Address, message []byte) (signature crypto.Signature, err error)

	// PublicKey returns the public key associated with a given address
	PublicKey(address crypto.Address) (publicKey crypto.PublicKey, err error)

	// Generate requests that a key be generate within the keys instance and returns the address
	Generate(keyName string, keyType crypto.CurveType) (keyAddress crypto.Address, err error)

	// Get the address for a keyname or the adress itself
	GetAddressForKeyName(keyName string) (keyAddress crypto.Address, err error)

	// Returns nil if the keys instance is healthy, error otherwise
	HealthCheck() error
}

func NewLocalKeyClient

func NewLocalKeyClient(ks *KeyStore, logger *logging.Logger) KeyClient

func NewRemoteKeyClient

func NewRemoteKeyClient(rpcAddress string, logger *logging.Logger) (KeyClient, error)

keyClient.New returns a new monax-keys client for provided rpc location Monax-keys connects over http request-responses

type KeyID

type KeyID struct {
	Address              string   `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	KeyName              []string `protobuf:"bytes,2,rep,name=KeyName" json:"KeyName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KeyID) Descriptor

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

func (*KeyID) GetAddress

func (m *KeyID) GetAddress() string

func (*KeyID) GetKeyName

func (m *KeyID) GetKeyName() []string

func (*KeyID) Marshal

func (m *KeyID) Marshal() (dAtA []byte, err error)

func (*KeyID) MarshalTo

func (m *KeyID) MarshalTo(dAtA []byte) (int, error)

func (*KeyID) ProtoMessage

func (*KeyID) ProtoMessage()

func (*KeyID) Reset

func (m *KeyID) Reset()

func (*KeyID) Size

func (m *KeyID) Size() (n int)

func (*KeyID) String

func (m *KeyID) String() string

func (*KeyID) Unmarshal

func (m *KeyID) Unmarshal(dAtA []byte) error

func (*KeyID) XXX_DiscardUnknown

func (m *KeyID) XXX_DiscardUnknown()

func (*KeyID) XXX_Marshal

func (m *KeyID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyID) XXX_Merge

func (dst *KeyID) XXX_Merge(src proto.Message)

func (*KeyID) XXX_MessageName

func (*KeyID) XXX_MessageName() string

func (*KeyID) XXX_Size

func (m *KeyID) XXX_Size() int

func (*KeyID) XXX_Unmarshal

func (m *KeyID) XXX_Unmarshal(b []byte) error

type KeyStore

type KeyStore struct {
	sync.Mutex
	AllowBadFilePermissions bool
	// contains filtered or unexported fields
}

func NewKeyStore

func NewKeyStore(dir string, AllowBadFilePermissions bool, logger *logging.Logger) *KeyStore

func (*KeyStore) AddName

func (k *KeyStore) AddName(ctx context.Context, in *AddNameRequest) (*AddNameResponse, error)

func (*KeyStore) AllKeys

func (ks *KeyStore) AllKeys() ([]*Key, error)

func (*KeyStore) DeleteKey

func (ks *KeyStore) DeleteKey(passphrase string, keyAddr []byte) (err error)

func (*KeyStore) Export

func (k *KeyStore) Export(ctx context.Context, in *ExportRequest) (*ExportResponse, error)

func (*KeyStore) Gen

func (ks *KeyStore) Gen(passphrase string, curveType crypto.CurveType) (key *Key, err error)

func (*KeyStore) GenerateKey

func (k *KeyStore) GenerateKey(ctx context.Context, in *GenRequest) (*GenResponse, error)

func (*KeyStore) GetAllAddresses

func (ks *KeyStore) GetAllAddresses() (addresses []string, err error)

func (*KeyStore) GetAllNames

func (ks *KeyStore) GetAllNames() (map[string]string, error)

func (*KeyStore) GetKey

func (ks *KeyStore) GetKey(passphrase string, keyAddr []byte) (*Key, error)

func (*KeyStore) GetKeyFile

func (ks *KeyStore) GetKeyFile(dataDirPath string, keyAddr []byte) (fileContent []byte, err error)

func (*KeyStore) Hash

func (k *KeyStore) Hash(ctx context.Context, in *HashRequest) (*HashResponse, error)

func (*KeyStore) Import

func (k *KeyStore) Import(ctx context.Context, in *ImportRequest) (*ImportResponse, error)

func (*KeyStore) ImportJSON

func (k *KeyStore) ImportJSON(ctx context.Context, in *ImportJSONRequest) (*ImportResponse, error)

func (*KeyStore) List

func (k *KeyStore) List(ctx context.Context, in *ListRequest) (*ListResponse, error)

func (*KeyStore) PublicKey

func (k *KeyStore) PublicKey(ctx context.Context, in *PubRequest) (*PubResponse, error)

func (*KeyStore) RemoveName

func (k *KeyStore) RemoveName(ctx context.Context, in *RemoveNameRequest) (*RemoveNameResponse, error)

func (*KeyStore) Sign

func (k *KeyStore) Sign(ctx context.Context, in *SignRequest) (*SignResponse, error)

func (*KeyStore) StoreKey

func (ks *KeyStore) StoreKey(passphrase string, key *Key) error

func (*KeyStore) StoreKeyEncrypted

func (ks *KeyStore) StoreKeyEncrypted(passphrase string, key *Key) error

func (*KeyStore) StoreKeyPlain

func (ks *KeyStore) StoreKeyPlain(key *Key) (err error)

func (*KeyStore) Verify

func (k *KeyStore) Verify(ctx context.Context, in *VerifyRequest) (*VerifyResponse, error)

type KeysClient

type KeysClient interface {
	GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error)
	PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error)
	Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error)
	Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error)
	Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error)
	ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error)
	Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error)
	Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error)
	RemoveName(ctx context.Context, in *RemoveNameRequest, opts ...grpc.CallOption) (*RemoveNameResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*AddNameResponse, error)
}

KeysClient is the client API for Keys service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewKeysClient

func NewKeysClient(cc *grpc.ClientConn) KeysClient

type KeysConfig

type KeysConfig struct {
	GRPCServiceEnabled      bool
	AllowBadFilePermissions bool
	RemoteAddress           string
	KeysDirectory           string
}

func DefaultKeysConfig

func DefaultKeysConfig() *KeysConfig

type ListRequest

type ListRequest struct {
	KeyName              string   `protobuf:"bytes,1,opt,name=KeyName,proto3" json:"KeyName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListRequest) Descriptor

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

func (*ListRequest) GetKeyName

func (m *ListRequest) GetKeyName() string

func (*ListRequest) Marshal

func (m *ListRequest) Marshal() (dAtA []byte, err error)

func (*ListRequest) MarshalTo

func (m *ListRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) Size

func (m *ListRequest) Size() (n int)

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) Unmarshal

func (m *ListRequest) Unmarshal(dAtA []byte) error

func (*ListRequest) XXX_DiscardUnknown

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal

func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRequest) XXX_Merge

func (dst *ListRequest) XXX_Merge(src proto.Message)

func (*ListRequest) XXX_MessageName

func (*ListRequest) XXX_MessageName() string

func (*ListRequest) XXX_Size

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal

func (m *ListRequest) XXX_Unmarshal(b []byte) error

type ListResponse

type ListResponse struct {
	Key                  []*KeyID `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListResponse) Descriptor

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

func (*ListResponse) GetKey

func (m *ListResponse) GetKey() []*KeyID

func (*ListResponse) Marshal

func (m *ListResponse) Marshal() (dAtA []byte, err error)

func (*ListResponse) MarshalTo

func (m *ListResponse) MarshalTo(dAtA []byte) (int, error)

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) Size

func (m *ListResponse) Size() (n int)

func (*ListResponse) String

func (m *ListResponse) String() string

func (*ListResponse) Unmarshal

func (m *ListResponse) Unmarshal(dAtA []byte) error

func (*ListResponse) XXX_DiscardUnknown

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal

func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListResponse) XXX_Merge

func (dst *ListResponse) XXX_Merge(src proto.Message)

func (*ListResponse) XXX_MessageName

func (*ListResponse) XXX_MessageName() string

func (*ListResponse) XXX_Size

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal

func (m *ListResponse) XXX_Unmarshal(b []byte) error

type PubRequest

type PubRequest struct {
	Address              string   `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PubRequest) Descriptor

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

func (*PubRequest) GetAddress

func (m *PubRequest) GetAddress() string

func (*PubRequest) GetName

func (m *PubRequest) GetName() string

func (*PubRequest) Marshal

func (m *PubRequest) Marshal() (dAtA []byte, err error)

func (*PubRequest) MarshalTo

func (m *PubRequest) MarshalTo(dAtA []byte) (int, error)

func (*PubRequest) ProtoMessage

func (*PubRequest) ProtoMessage()

func (*PubRequest) Reset

func (m *PubRequest) Reset()

func (*PubRequest) Size

func (m *PubRequest) Size() (n int)

func (*PubRequest) String

func (m *PubRequest) String() string

func (*PubRequest) Unmarshal

func (m *PubRequest) Unmarshal(dAtA []byte) error

func (*PubRequest) XXX_DiscardUnknown

func (m *PubRequest) XXX_DiscardUnknown()

func (*PubRequest) XXX_Marshal

func (m *PubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubRequest) XXX_Merge

func (dst *PubRequest) XXX_Merge(src proto.Message)

func (*PubRequest) XXX_MessageName

func (*PubRequest) XXX_MessageName() string

func (*PubRequest) XXX_Size

func (m *PubRequest) XXX_Size() int

func (*PubRequest) XXX_Unmarshal

func (m *PubRequest) XXX_Unmarshal(b []byte) error

type PubResponse

type PubResponse struct {
	PublicKey            []byte   `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	CurveType            string   `protobuf:"bytes,2,opt,name=CurveType,proto3" json:"CurveType,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PubResponse) Descriptor

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

func (*PubResponse) GetCurveType

func (m *PubResponse) GetCurveType() string

func (*PubResponse) GetPublicKey

func (m *PubResponse) GetPublicKey() []byte

func (*PubResponse) Marshal

func (m *PubResponse) Marshal() (dAtA []byte, err error)

func (*PubResponse) MarshalTo

func (m *PubResponse) MarshalTo(dAtA []byte) (int, error)

func (*PubResponse) ProtoMessage

func (*PubResponse) ProtoMessage()

func (*PubResponse) Reset

func (m *PubResponse) Reset()

func (*PubResponse) Size

func (m *PubResponse) Size() (n int)

func (*PubResponse) String

func (m *PubResponse) String() string

func (*PubResponse) Unmarshal

func (m *PubResponse) Unmarshal(dAtA []byte) error

func (*PubResponse) XXX_DiscardUnknown

func (m *PubResponse) XXX_DiscardUnknown()

func (*PubResponse) XXX_Marshal

func (m *PubResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubResponse) XXX_Merge

func (dst *PubResponse) XXX_Merge(src proto.Message)

func (*PubResponse) XXX_MessageName

func (*PubResponse) XXX_MessageName() string

func (*PubResponse) XXX_Size

func (m *PubResponse) XXX_Size() int

func (*PubResponse) XXX_Unmarshal

func (m *PubResponse) XXX_Unmarshal(b []byte) error

type RemoveNameRequest

type RemoveNameRequest struct {
	KeyName              string   `protobuf:"bytes,1,opt,name=KeyName,proto3" json:"KeyName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoveNameRequest) Descriptor

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

func (*RemoveNameRequest) GetKeyName

func (m *RemoveNameRequest) GetKeyName() string

func (*RemoveNameRequest) Marshal

func (m *RemoveNameRequest) Marshal() (dAtA []byte, err error)

func (*RemoveNameRequest) MarshalTo

func (m *RemoveNameRequest) MarshalTo(dAtA []byte) (int, error)

func (*RemoveNameRequest) ProtoMessage

func (*RemoveNameRequest) ProtoMessage()

func (*RemoveNameRequest) Reset

func (m *RemoveNameRequest) Reset()

func (*RemoveNameRequest) Size

func (m *RemoveNameRequest) Size() (n int)

func (*RemoveNameRequest) String

func (m *RemoveNameRequest) String() string

func (*RemoveNameRequest) Unmarshal

func (m *RemoveNameRequest) Unmarshal(dAtA []byte) error

func (*RemoveNameRequest) XXX_DiscardUnknown

func (m *RemoveNameRequest) XXX_DiscardUnknown()

func (*RemoveNameRequest) XXX_Marshal

func (m *RemoveNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveNameRequest) XXX_Merge

func (dst *RemoveNameRequest) XXX_Merge(src proto.Message)

func (*RemoveNameRequest) XXX_MessageName

func (*RemoveNameRequest) XXX_MessageName() string

func (*RemoveNameRequest) XXX_Size

func (m *RemoveNameRequest) XXX_Size() int

func (*RemoveNameRequest) XXX_Unmarshal

func (m *RemoveNameRequest) XXX_Unmarshal(b []byte) error

type RemoveNameResponse

type RemoveNameResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoveNameResponse) Descriptor

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

func (*RemoveNameResponse) Marshal

func (m *RemoveNameResponse) Marshal() (dAtA []byte, err error)

func (*RemoveNameResponse) MarshalTo

func (m *RemoveNameResponse) MarshalTo(dAtA []byte) (int, error)

func (*RemoveNameResponse) ProtoMessage

func (*RemoveNameResponse) ProtoMessage()

func (*RemoveNameResponse) Reset

func (m *RemoveNameResponse) Reset()

func (*RemoveNameResponse) Size

func (m *RemoveNameResponse) Size() (n int)

func (*RemoveNameResponse) String

func (m *RemoveNameResponse) String() string

func (*RemoveNameResponse) Unmarshal

func (m *RemoveNameResponse) Unmarshal(dAtA []byte) error

func (*RemoveNameResponse) XXX_DiscardUnknown

func (m *RemoveNameResponse) XXX_DiscardUnknown()

func (*RemoveNameResponse) XXX_Marshal

func (m *RemoveNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveNameResponse) XXX_Merge

func (dst *RemoveNameResponse) XXX_Merge(src proto.Message)

func (*RemoveNameResponse) XXX_MessageName

func (*RemoveNameResponse) XXX_MessageName() string

func (*RemoveNameResponse) XXX_Size

func (m *RemoveNameResponse) XXX_Size() int

func (*RemoveNameResponse) XXX_Unmarshal

func (m *RemoveNameResponse) XXX_Unmarshal(b []byte) error

type SignRequest

type SignRequest struct {
	Passphrase           string   `protobuf:"bytes,1,opt,name=Passphrase,proto3" json:"Passphrase,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	Message              []byte   `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignRequest) Descriptor

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

func (*SignRequest) GetAddress

func (m *SignRequest) GetAddress() string

func (*SignRequest) GetMessage

func (m *SignRequest) GetMessage() []byte

func (*SignRequest) GetName

func (m *SignRequest) GetName() string

func (*SignRequest) GetPassphrase

func (m *SignRequest) GetPassphrase() string

func (*SignRequest) Marshal

func (m *SignRequest) Marshal() (dAtA []byte, err error)

func (*SignRequest) MarshalTo

func (m *SignRequest) MarshalTo(dAtA []byte) (int, error)

func (*SignRequest) ProtoMessage

func (*SignRequest) ProtoMessage()

func (*SignRequest) Reset

func (m *SignRequest) Reset()

func (*SignRequest) Size

func (m *SignRequest) Size() (n int)

func (*SignRequest) String

func (m *SignRequest) String() string

func (*SignRequest) Unmarshal

func (m *SignRequest) Unmarshal(dAtA []byte) error

func (*SignRequest) XXX_DiscardUnknown

func (m *SignRequest) XXX_DiscardUnknown()

func (*SignRequest) XXX_Marshal

func (m *SignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignRequest) XXX_Merge

func (dst *SignRequest) XXX_Merge(src proto.Message)

func (*SignRequest) XXX_MessageName

func (*SignRequest) XXX_MessageName() string

func (*SignRequest) XXX_Size

func (m *SignRequest) XXX_Size() int

func (*SignRequest) XXX_Unmarshal

func (m *SignRequest) XXX_Unmarshal(b []byte) error

type SignResponse

type SignResponse struct {
	Signature            []byte   `protobuf:"bytes,1,opt,name=Signature,proto3" json:"Signature,omitempty"`
	CurveType            string   `protobuf:"bytes,2,opt,name=CurveType,proto3" json:"CurveType,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SignResponse) Descriptor

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

func (*SignResponse) GetCurveType

func (m *SignResponse) GetCurveType() string

func (*SignResponse) GetSignature

func (m *SignResponse) GetSignature() []byte

func (*SignResponse) Marshal

func (m *SignResponse) Marshal() (dAtA []byte, err error)

func (*SignResponse) MarshalTo

func (m *SignResponse) MarshalTo(dAtA []byte) (int, error)

func (*SignResponse) ProtoMessage

func (*SignResponse) ProtoMessage()

func (*SignResponse) Reset

func (m *SignResponse) Reset()

func (*SignResponse) Size

func (m *SignResponse) Size() (n int)

func (*SignResponse) String

func (m *SignResponse) String() string

func (*SignResponse) Unmarshal

func (m *SignResponse) Unmarshal(dAtA []byte) error

func (*SignResponse) XXX_DiscardUnknown

func (m *SignResponse) XXX_DiscardUnknown()

func (*SignResponse) XXX_Marshal

func (m *SignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignResponse) XXX_Merge

func (dst *SignResponse) XXX_Merge(src proto.Message)

func (*SignResponse) XXX_MessageName

func (*SignResponse) XXX_MessageName() string

func (*SignResponse) XXX_Size

func (m *SignResponse) XXX_Size() int

func (*SignResponse) XXX_Unmarshal

func (m *SignResponse) XXX_Unmarshal(b []byte) error

type Signer

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

func AddressableSigner

func AddressableSigner(keyClient KeyClient, address crypto.Address) (*Signer, error)

Creates a AddressableSigner that assumes the address holds an Ed25519 key

func (*Signer) GetAddress

func (ms *Signer) GetAddress() crypto.Address

func (*Signer) GetPublicKey

func (ms *Signer) GetPublicKey() crypto.PublicKey

func (*Signer) Sign

func (ms *Signer) Sign(messsage []byte) (crypto.Signature, error)

type VerifyRequest

type VerifyRequest struct {
	CurveType            string   `protobuf:"bytes,1,opt,name=CurveType,proto3" json:"CurveType,omitempty"`
	PublicKey            []byte   `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	Message              []byte   `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"`
	Signature            []byte   `protobuf:"bytes,4,opt,name=Signature,proto3" json:"Signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VerifyRequest) Descriptor

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

func (*VerifyRequest) GetCurveType

func (m *VerifyRequest) GetCurveType() string

func (*VerifyRequest) GetMessage

func (m *VerifyRequest) GetMessage() []byte

func (*VerifyRequest) GetPublicKey

func (m *VerifyRequest) GetPublicKey() []byte

func (*VerifyRequest) GetSignature

func (m *VerifyRequest) GetSignature() []byte

func (*VerifyRequest) Marshal

func (m *VerifyRequest) Marshal() (dAtA []byte, err error)

func (*VerifyRequest) MarshalTo

func (m *VerifyRequest) MarshalTo(dAtA []byte) (int, error)

func (*VerifyRequest) ProtoMessage

func (*VerifyRequest) ProtoMessage()

func (*VerifyRequest) Reset

func (m *VerifyRequest) Reset()

func (*VerifyRequest) Size

func (m *VerifyRequest) Size() (n int)

func (*VerifyRequest) String

func (m *VerifyRequest) String() string

func (*VerifyRequest) Unmarshal

func (m *VerifyRequest) Unmarshal(dAtA []byte) error

func (*VerifyRequest) XXX_DiscardUnknown

func (m *VerifyRequest) XXX_DiscardUnknown()

func (*VerifyRequest) XXX_Marshal

func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VerifyRequest) XXX_Merge

func (dst *VerifyRequest) XXX_Merge(src proto.Message)

func (*VerifyRequest) XXX_MessageName

func (*VerifyRequest) XXX_MessageName() string

func (*VerifyRequest) XXX_Size

func (m *VerifyRequest) XXX_Size() int

func (*VerifyRequest) XXX_Unmarshal

func (m *VerifyRequest) XXX_Unmarshal(b []byte) error

type VerifyResponse

type VerifyResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VerifyResponse) Descriptor

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

func (*VerifyResponse) Marshal

func (m *VerifyResponse) Marshal() (dAtA []byte, err error)

func (*VerifyResponse) MarshalTo

func (m *VerifyResponse) MarshalTo(dAtA []byte) (int, error)

func (*VerifyResponse) ProtoMessage

func (*VerifyResponse) ProtoMessage()

func (*VerifyResponse) Reset

func (m *VerifyResponse) Reset()

func (*VerifyResponse) Size

func (m *VerifyResponse) Size() (n int)

func (*VerifyResponse) String

func (m *VerifyResponse) String() string

func (*VerifyResponse) Unmarshal

func (m *VerifyResponse) Unmarshal(dAtA []byte) error

func (*VerifyResponse) XXX_DiscardUnknown

func (m *VerifyResponse) XXX_DiscardUnknown()

func (*VerifyResponse) XXX_Marshal

func (m *VerifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VerifyResponse) XXX_Merge

func (dst *VerifyResponse) XXX_Merge(src proto.Message)

func (*VerifyResponse) XXX_MessageName

func (*VerifyResponse) XXX_MessageName() string

func (*VerifyResponse) XXX_Size

func (m *VerifyResponse) XXX_Size() int

func (*VerifyResponse) XXX_Unmarshal

func (m *VerifyResponse) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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