Versions in this module Expand all Collapse all v0 v0.8.2 Jun 11, 2019 Changes in this version + var StatusCode_name = map[int32]string + var StatusCode_value = map[string]int32 + func CommandToMarshalledPacket(cmd Command) ([]byte, error) + type BlindSignRequest struct + EgPub *elgamal.ProtoPublicKey + Lambda *scheme.ProtoLambda + PubM [][]byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewBlindSignRequest(lambda *coconut.Lambda, egPub *elgamal.PublicKey, pubM []*Curve.BIG) (*BlindSignRequest, error) + func (*BlindSignRequest) Descriptor() ([]byte, []int) + func (*BlindSignRequest) ProtoMessage() + func (m *BlindSignRequest) GetEgPub() *elgamal.ProtoPublicKey + func (m *BlindSignRequest) GetLambda() *scheme.ProtoLambda + func (m *BlindSignRequest) GetPubM() [][]byte + func (m *BlindSignRequest) Reset() + func (m *BlindSignRequest) String() string + func (m *BlindSignRequest) XXX_DiscardUnknown() + func (m *BlindSignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BlindSignRequest) XXX_Merge(src proto.Message) + func (m *BlindSignRequest) XXX_Size() int + func (m *BlindSignRequest) XXX_Unmarshal(b []byte) error + type BlindSignResponse struct + IssuerID int64 + Sig *scheme.ProtoBlindedSignature + Status *Status + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*BlindSignResponse) Descriptor() ([]byte, []int) + func (*BlindSignResponse) ProtoMessage() + func (m *BlindSignResponse) GetIssuerID() int64 + func (m *BlindSignResponse) GetSig() *scheme.ProtoBlindedSignature + func (m *BlindSignResponse) GetStatus() *Status + func (m *BlindSignResponse) Reset() + func (m *BlindSignResponse) String() string + func (m *BlindSignResponse) XXX_DiscardUnknown() + func (m *BlindSignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BlindSignResponse) XXX_Merge(src proto.Message) + func (m *BlindSignResponse) XXX_Size() int + func (m *BlindSignResponse) XXX_Unmarshal(b []byte) error + type BlindVerifyRequest struct + PubM [][]byte + Sig *scheme.ProtoSignature + Theta *scheme.ProtoTheta + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewBlindVerifyRequest(theta *coconut.Theta, sig *coconut.Signature, pubM []*Curve.BIG) (*BlindVerifyRequest, error) + func (*BlindVerifyRequest) Descriptor() ([]byte, []int) + func (*BlindVerifyRequest) ProtoMessage() + func (m *BlindVerifyRequest) GetPubM() [][]byte + func (m *BlindVerifyRequest) GetSig() *scheme.ProtoSignature + func (m *BlindVerifyRequest) GetTheta() *scheme.ProtoTheta + func (m *BlindVerifyRequest) Reset() + func (m *BlindVerifyRequest) String() string + func (m *BlindVerifyRequest) XXX_DiscardUnknown() + func (m *BlindVerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BlindVerifyRequest) XXX_Merge(src proto.Message) + func (m *BlindVerifyRequest) XXX_Size() int + func (m *BlindVerifyRequest) XXX_Unmarshal(b []byte) error + type BlindVerifyResponse struct + IsValid bool + Status *Status + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*BlindVerifyResponse) Descriptor() ([]byte, []int) + func (*BlindVerifyResponse) ProtoMessage() + func (m *BlindVerifyResponse) GetIsValid() bool + func (m *BlindVerifyResponse) GetStatus() *Status + func (m *BlindVerifyResponse) Reset() + func (m *BlindVerifyResponse) String() string + func (m *BlindVerifyResponse) XXX_DiscardUnknown() + func (m *BlindVerifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BlindVerifyResponse) XXX_Merge(src proto.Message) + func (m *BlindVerifyResponse) XXX_Size() int + func (m *BlindVerifyResponse) XXX_Unmarshal(b []byte) error + type Command interface + ProtoMessage func() + Reset func() + String func() string + func FromBytes(b []byte) (Command, error) + type CommandID byte + const BlindSignID + const BlindVerifyID + const DefaultResponseErrorMessage + const DefaultResponseErrorStatusCode + const GetVerificationKeyID + const LookUpBlockCredentialsID + const LookUpCredentialID + const SignID + const SpendCredentialID + const VerifyID + type CommandRequest struct + func NewCommandRequest(cmd Command, ch chan *Response) *CommandRequest + func (cr *CommandRequest) Cmd() Command + func (cr *CommandRequest) Ctx() context.Context + func (cr *CommandRequest) RetCh() chan *Response + func (cr *CommandRequest) WithContext(ctx context.Context) + type CredentialPair struct + Credential *IssuedCredential + Gamma []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CredentialPair) Descriptor() ([]byte, []int) + func (*CredentialPair) ProtoMessage() + func (m *CredentialPair) GetCredential() *IssuedCredential + func (m *CredentialPair) GetGamma() []byte + func (m *CredentialPair) Reset() + func (m *CredentialPair) String() string + func (m *CredentialPair) XXX_DiscardUnknown() + func (m *CredentialPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CredentialPair) XXX_Merge(src proto.Message) + func (m *CredentialPair) XXX_Size() int + func (m *CredentialPair) XXX_Unmarshal(b []byte) error + type IssuedCredential struct + IssuerID int64 + Sig []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*IssuedCredential) Descriptor() ([]byte, []int) + func (*IssuedCredential) ProtoMessage() + func (m *IssuedCredential) GetIssuerID() int64 + func (m *IssuedCredential) GetSig() []byte + func (m *IssuedCredential) Reset() + func (m *IssuedCredential) String() string + func (m *IssuedCredential) XXX_DiscardUnknown() + func (m *IssuedCredential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *IssuedCredential) XXX_Merge(src proto.Message) + func (m *IssuedCredential) XXX_Size() int + func (m *IssuedCredential) XXX_Unmarshal(b []byte) error + type LookUpBlockCredentialsRequest struct + Height int64 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewLookUpBlockCredentialsRequest(height int64) (*LookUpBlockCredentialsRequest, error) + func (*LookUpBlockCredentialsRequest) Descriptor() ([]byte, []int) + func (*LookUpBlockCredentialsRequest) ProtoMessage() + func (m *LookUpBlockCredentialsRequest) GetHeight() int64 + func (m *LookUpBlockCredentialsRequest) Reset() + func (m *LookUpBlockCredentialsRequest) String() string + func (m *LookUpBlockCredentialsRequest) XXX_DiscardUnknown() + func (m *LookUpBlockCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LookUpBlockCredentialsRequest) XXX_Merge(src proto.Message) + func (m *LookUpBlockCredentialsRequest) XXX_Size() int + func (m *LookUpBlockCredentialsRequest) XXX_Unmarshal(b []byte) error + type LookUpBlockCredentialsResponse struct + Credentials []*CredentialPair + Status *Status + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*LookUpBlockCredentialsResponse) Descriptor() ([]byte, []int) + func (*LookUpBlockCredentialsResponse) ProtoMessage() + func (m *LookUpBlockCredentialsResponse) GetCredentials() []*CredentialPair + func (m *LookUpBlockCredentialsResponse) GetStatus() *Status + func (m *LookUpBlockCredentialsResponse) Reset() + func (m *LookUpBlockCredentialsResponse) String() string + func (m *LookUpBlockCredentialsResponse) XXX_DiscardUnknown() + func (m *LookUpBlockCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LookUpBlockCredentialsResponse) XXX_Merge(src proto.Message) + func (m *LookUpBlockCredentialsResponse) XXX_Size() int + func (m *LookUpBlockCredentialsResponse) XXX_Unmarshal(b []byte) error + type LookUpCredentialRequest struct + Gamma []byte + Height int64 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewLookUpCredentialRequest(height int64, egPub *elgamal.PublicKey) (*LookUpCredentialRequest, error) + func (*LookUpCredentialRequest) Descriptor() ([]byte, []int) + func (*LookUpCredentialRequest) ProtoMessage() + func (m *LookUpCredentialRequest) GetGamma() []byte + func (m *LookUpCredentialRequest) GetHeight() int64 + func (m *LookUpCredentialRequest) Reset() + func (m *LookUpCredentialRequest) String() string + func (m *LookUpCredentialRequest) XXX_DiscardUnknown() + func (m *LookUpCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LookUpCredentialRequest) XXX_Merge(src proto.Message) + func (m *LookUpCredentialRequest) XXX_Size() int + func (m *LookUpCredentialRequest) XXX_Unmarshal(b []byte) error + type LookUpCredentialResponse struct + CredentialPair *CredentialPair + Status *Status + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*LookUpCredentialResponse) Descriptor() ([]byte, []int) + func (*LookUpCredentialResponse) ProtoMessage() + func (m *LookUpCredentialResponse) GetCredentialPair() *CredentialPair + func (m *LookUpCredentialResponse) GetStatus() *Status + func (m *LookUpCredentialResponse) Reset() + func (m *LookUpCredentialResponse) String() string + func (m *LookUpCredentialResponse) XXX_DiscardUnknown() + func (m *LookUpCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LookUpCredentialResponse) XXX_Merge(src proto.Message) + func (m *LookUpCredentialResponse) XXX_Size() int + func (m *LookUpCredentialResponse) XXX_Unmarshal(b []byte) error + type ProtoResponse interface + GetStatus func() *Status + ProtoMessage func() + Reset func() + String func() string + type RawCommand struct + func NewRawCommand(id CommandID, payload []byte) *RawCommand + func (c *RawCommand) ID() CommandID + func (c *RawCommand) Payload() []byte + func (c *RawCommand) ToBytes() []byte + type Response struct + Data interface{} + ErrorMessage string + ErrorStatus StatusCode + type SignRequest struct + PubM [][]byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewSignRequest(pubM []*Curve.BIG) (*SignRequest, error) + func (*SignRequest) Descriptor() ([]byte, []int) + func (*SignRequest) ProtoMessage() + func (m *SignRequest) GetPubM() [][]byte + func (m *SignRequest) Reset() + func (m *SignRequest) String() string + func (m *SignRequest) XXX_DiscardUnknown() + func (m *SignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SignRequest) XXX_Merge(src proto.Message) + func (m *SignRequest) XXX_Size() int + func (m *SignRequest) XXX_Unmarshal(b []byte) error + type SignResponse struct + IssuerID int64 + Sig *scheme.ProtoSignature + Status *Status + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*SignResponse) Descriptor() ([]byte, []int) + func (*SignResponse) ProtoMessage() + func (m *SignResponse) GetIssuerID() int64 + func (m *SignResponse) GetSig() *scheme.ProtoSignature + func (m *SignResponse) GetStatus() *Status + func (m *SignResponse) Reset() + func (m *SignResponse) String() string + func (m *SignResponse) XXX_DiscardUnknown() + func (m *SignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SignResponse) XXX_Merge(src proto.Message) + func (m *SignResponse) XXX_Size() int + func (m *SignResponse) XXX_Unmarshal(b []byte) error + type SpendCredentialRequest struct + MerchantAddress []byte + PubM [][]byte + Sig *scheme.ProtoSignature + Theta *scheme.ProtoThetaTumbler + Value int64 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewSpendCredentialRequest(sig *coconut.Signature, pubM []*Curve.BIG, theta *coconut.ThetaTumbler, ...) (*SpendCredentialRequest, error) + func (*SpendCredentialRequest) Descriptor() ([]byte, []int) + func (*SpendCredentialRequest) ProtoMessage() + func (m *SpendCredentialRequest) GetMerchantAddress() []byte + func (m *SpendCredentialRequest) GetPubM() [][]byte + func (m *SpendCredentialRequest) GetSig() *scheme.ProtoSignature + func (m *SpendCredentialRequest) GetTheta() *scheme.ProtoThetaTumbler + func (m *SpendCredentialRequest) GetValue() int64 + func (m *SpendCredentialRequest) Reset() + func (m *SpendCredentialRequest) String() string + func (m *SpendCredentialRequest) XXX_DiscardUnknown() + func (m *SpendCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SpendCredentialRequest) XXX_Merge(src proto.Message) + func (m *SpendCredentialRequest) XXX_Size() int + func (m *SpendCredentialRequest) XXX_Unmarshal(b []byte) error + type SpendCredentialResponse struct + Status *Status + WasSuccessful bool + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*SpendCredentialResponse) Descriptor() ([]byte, []int) + func (*SpendCredentialResponse) ProtoMessage() + func (m *SpendCredentialResponse) GetStatus() *Status + func (m *SpendCredentialResponse) GetWasSuccessful() bool + func (m *SpendCredentialResponse) Reset() + func (m *SpendCredentialResponse) String() string + func (m *SpendCredentialResponse) XXX_DiscardUnknown() + func (m *SpendCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SpendCredentialResponse) XXX_Merge(src proto.Message) + func (m *SpendCredentialResponse) XXX_Size() int + func (m *SpendCredentialResponse) XXX_Unmarshal(b []byte) error + type Status struct + Code int32 + Message string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Status) Descriptor() ([]byte, []int) + func (*Status) ProtoMessage() + func (m *Status) GetCode() int32 + func (m *Status) GetMessage() string + func (m *Status) Reset() + func (m *Status) String() string + func (m *Status) XXX_DiscardUnknown() + func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Status) XXX_Merge(src proto.Message) + func (m *Status) XXX_Size() int + func (m *Status) XXX_Unmarshal(b []byte) error + type StatusCode int32 + const StatusCode_DOUBLE_SPENDING_ATTEMPT + const StatusCode_INVALID_ARGUMENTS + const StatusCode_INVALID_BINDING + const StatusCode_INVALID_COMMAND + const StatusCode_INVALID_SIGNATURE + const StatusCode_INVALID_TRANSACTION + const StatusCode_NOT_IMPLEMENTED + const StatusCode_NOT_PROCESSED_YET + const StatusCode_OK + const StatusCode_PROCESSING_ERROR + const StatusCode_REQUEST_TIMEOUT + const StatusCode_TX_NOT_ON_CHAIN + const StatusCode_UNAVAILABLE + const StatusCode_UNKNOWN + func (StatusCode) EnumDescriptor() ([]byte, []int) + func (x StatusCode) String() string + type VerificationKeyRequest struct + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewVerificationKeyRequest() (*VerificationKeyRequest, error) + func (*VerificationKeyRequest) Descriptor() ([]byte, []int) + func (*VerificationKeyRequest) ProtoMessage() + func (m *VerificationKeyRequest) Reset() + func (m *VerificationKeyRequest) String() string + func (m *VerificationKeyRequest) XXX_DiscardUnknown() + func (m *VerificationKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerificationKeyRequest) XXX_Merge(src proto.Message) + func (m *VerificationKeyRequest) XXX_Size() int + func (m *VerificationKeyRequest) XXX_Unmarshal(b []byte) error + type VerificationKeyResponse struct + IssuerID int64 + Status *Status + Vk *scheme.ProtoVerificationKey + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*VerificationKeyResponse) Descriptor() ([]byte, []int) + func (*VerificationKeyResponse) ProtoMessage() + func (m *VerificationKeyResponse) GetIssuerID() int64 + func (m *VerificationKeyResponse) GetStatus() *Status + func (m *VerificationKeyResponse) GetVk() *scheme.ProtoVerificationKey + func (m *VerificationKeyResponse) Reset() + func (m *VerificationKeyResponse) String() string + func (m *VerificationKeyResponse) XXX_DiscardUnknown() + func (m *VerificationKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerificationKeyResponse) XXX_Merge(src proto.Message) + func (m *VerificationKeyResponse) XXX_Size() int + func (m *VerificationKeyResponse) XXX_Unmarshal(b []byte) error + type VerifyRequest struct + PubM [][]byte + Sig *scheme.ProtoSignature + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewVerifyRequest(pubM []*Curve.BIG, sig *coconut.Signature) (*VerifyRequest, error) + func (*VerifyRequest) Descriptor() ([]byte, []int) + func (*VerifyRequest) ProtoMessage() + func (m *VerifyRequest) GetPubM() [][]byte + func (m *VerifyRequest) GetSig() *scheme.ProtoSignature + func (m *VerifyRequest) Reset() + func (m *VerifyRequest) String() string + func (m *VerifyRequest) XXX_DiscardUnknown() + func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerifyRequest) XXX_Merge(src proto.Message) + func (m *VerifyRequest) XXX_Size() int + func (m *VerifyRequest) XXX_Unmarshal(b []byte) error + type VerifyResponse struct + IsValid bool + Status *Status + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*VerifyResponse) Descriptor() ([]byte, []int) + func (*VerifyResponse) ProtoMessage() + func (m *VerifyResponse) GetIsValid() bool + func (m *VerifyResponse) GetStatus() *Status + func (m *VerifyResponse) Reset() + func (m *VerifyResponse) String() string + func (m *VerifyResponse) XXX_DiscardUnknown() + func (m *VerifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerifyResponse) XXX_Merge(src proto.Message) + func (m *VerifyResponse) XXX_Size() int + func (m *VerifyResponse) XXX_Unmarshal(b []byte) error