types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 25 Imported by: 11

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeValueCategory = ModuleName

	EventTypeCredentialCreated = "credential_created"

	AttributeKeyOwner        = "owner"
	AttributeKeyCredentialID = "credential_id"
)

credential module event types

View Source
const (
	// ModuleName defines the module name
	ModuleName = "verifiablecredential"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_capability"
)
View Source
const (
	IdentityCredential  = "IdentityCredential"
	KYCCredential       = "KYCCredential"
	IssuerCredential    = "IssuerCredential"
	RegulatorCredential = "RegulatorCredential"
)

Defines the accepted credential types

View Source
const (
	TypeMsgCreateVerifiableCredential = "create-verifiable-credential"
)

msg types

Variables

View Source
var (
	ErrVerifiableCredentialNotFound = sdkerrors.Register(ModuleName, 1100, "vc not found")
	ErrVerifiableCredentialFound    = sdkerrors.Register(ModuleName, 1101, "vc found")
)

x/verifiable-credential module sentinel errors

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthVerifiableCredential        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVerifiableCredential          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVerifiableCredential = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc the Amino codec
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	// VerifiableCredentialKey prefix for each key to a DidDocument
	VerifiableCredentialKey = []byte{0x62}
)

Functions

func IsValidCredentialType

func IsValidCredentialType(credential string) bool

IsValidCredentialType tells if a credential type is valid (accepted)

func KeyPrefix

func KeyPrefix(p string) []byte

func NewCredentialCreatedEvent

func NewCredentialCreatedEvent(owner string, credentialID string) sdk.Event

NewCredentialCreatedEvent constructs a new credential_created sdk.Event

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

nolint

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type MsgClient

type MsgClient interface {
	CreateVerifiableCredential(ctx context.Context, in *MsgCreateVerifiableCredential, opts ...grpc.CallOption) (*MsgCreateVerifiableCredentialResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateVerifiableCredential

type MsgCreateVerifiableCredential struct {
	VerifiableCredential *VerifiableCredential `protobuf:"bytes,1,opt,name=verifiable_credential,json=verifiableCredential,proto3" json:"verifiable_credential,omitempty"`
	// owner represents the user creating the message
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
}

MsgCreateVerifiableCredential defines a SDK message for creating a new identifer.

func NewMsgCreateVerifiableCredential

func NewMsgCreateVerifiableCredential(
	vc VerifiableCredential,
	owner string,
) *MsgCreateVerifiableCredential

NewMsgCreateVerifiableCredential creates a new MsgCreateVerifiableCredential instance

func (*MsgCreateVerifiableCredential) Descriptor

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

func (MsgCreateVerifiableCredential) GetSignBytes

func (msg MsgCreateVerifiableCredential) GetSignBytes() []byte

func (MsgCreateVerifiableCredential) GetSigners

func (msg MsgCreateVerifiableCredential) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgCreateVerifiableCredential) Marshal

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

func (*MsgCreateVerifiableCredential) MarshalTo

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

func (*MsgCreateVerifiableCredential) MarshalToSizedBuffer

func (m *MsgCreateVerifiableCredential) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateVerifiableCredential) ProtoMessage

func (*MsgCreateVerifiableCredential) ProtoMessage()

func (*MsgCreateVerifiableCredential) Reset

func (m *MsgCreateVerifiableCredential) Reset()

func (MsgCreateVerifiableCredential) Route

Route implements sdk.Msg

func (*MsgCreateVerifiableCredential) Size

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

func (*MsgCreateVerifiableCredential) String

func (MsgCreateVerifiableCredential) Type

Type implements sdk.Msg

func (*MsgCreateVerifiableCredential) Unmarshal

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

func (MsgCreateVerifiableCredential) ValidateBasic

func (msg MsgCreateVerifiableCredential) ValidateBasic() error

ValidateBasic performs a basic check of the MsgCreateVerifiableCredential fields.

func (*MsgCreateVerifiableCredential) XXX_DiscardUnknown

func (m *MsgCreateVerifiableCredential) XXX_DiscardUnknown()

func (*MsgCreateVerifiableCredential) XXX_Marshal

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

func (*MsgCreateVerifiableCredential) XXX_Merge

func (m *MsgCreateVerifiableCredential) XXX_Merge(src proto.Message)

func (*MsgCreateVerifiableCredential) XXX_Size

func (m *MsgCreateVerifiableCredential) XXX_Size() int

func (*MsgCreateVerifiableCredential) XXX_Unmarshal

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

type MsgCreateVerifiableCredentialResponse

type MsgCreateVerifiableCredentialResponse struct {
}

func (*MsgCreateVerifiableCredentialResponse) Descriptor

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

func (*MsgCreateVerifiableCredentialResponse) Marshal

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

func (*MsgCreateVerifiableCredentialResponse) MarshalTo

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

func (*MsgCreateVerifiableCredentialResponse) MarshalToSizedBuffer

func (m *MsgCreateVerifiableCredentialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateVerifiableCredentialResponse) ProtoMessage

func (*MsgCreateVerifiableCredentialResponse) ProtoMessage()

func (*MsgCreateVerifiableCredentialResponse) Reset

func (*MsgCreateVerifiableCredentialResponse) Size

func (*MsgCreateVerifiableCredentialResponse) String

func (*MsgCreateVerifiableCredentialResponse) Unmarshal

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

func (*MsgCreateVerifiableCredentialResponse) XXX_DiscardUnknown

func (m *MsgCreateVerifiableCredentialResponse) XXX_DiscardUnknown()

func (*MsgCreateVerifiableCredentialResponse) XXX_Marshal

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

func (*MsgCreateVerifiableCredentialResponse) XXX_Merge

func (*MsgCreateVerifiableCredentialResponse) XXX_Size

func (*MsgCreateVerifiableCredentialResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	CreateVerifiableCredential(context.Context, *MsgCreateVerifiableCredential) (*MsgCreateVerifiableCredentialResponse, error)
}

MsgServer is the server API for Msg service.

type Proof

type Proof struct {
	Type               string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Created            string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	ProofPurpose       string `protobuf:"bytes,3,opt,name=proof_purpose,json=proofPurpose,proto3" json:"proof_purpose,omitempty"`
	VerificationMethod string `protobuf:"bytes,4,opt,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"`
	Signature          string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
}

func NewProof

func NewProof(
	proofType string,
	created string,
	proofPurpose string,
	verificationMethod string,
	signature string,
) Proof

NewProof create a new proof for a verifiable credential

func (*Proof) Descriptor

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

func (*Proof) GetCreated

func (m *Proof) GetCreated() string

func (*Proof) GetProofPurpose

func (m *Proof) GetProofPurpose() string

func (*Proof) GetSignature

func (m *Proof) GetSignature() string

func (*Proof) GetType

func (m *Proof) GetType() string

func (*Proof) GetVerificationMethod

func (m *Proof) GetVerificationMethod() string

func (*Proof) Marshal

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

func (*Proof) MarshalTo

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

func (*Proof) MarshalToSizedBuffer

func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Proof) ProtoMessage

func (*Proof) ProtoMessage()

func (*Proof) Reset

func (m *Proof) Reset()

func (*Proof) Size

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

func (*Proof) String

func (m *Proof) String() string

func (*Proof) Unmarshal

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

func (*Proof) XXX_DiscardUnknown

func (m *Proof) XXX_DiscardUnknown()

func (*Proof) XXX_Marshal

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

func (*Proof) XXX_Merge

func (m *Proof) XXX_Merge(src proto.Message)

func (*Proof) XXX_Size

func (m *Proof) XXX_Size() int

func (*Proof) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Identifers queries all validators that match the given status.
	VerifiableCredentials(ctx context.Context, in *QueryVerifiableCredentialsRequest, opts ...grpc.CallOption) (*QueryVerifiableCredentialsResponse, error)
	// VerifiableCredential queries validator info for given validator address.
	VerifiableCredential(ctx context.Context, in *QueryVerifiableCredentialRequest, opts ...grpc.CallOption) (*QueryVerifiableCredentialResponse, error)
	// ValidateVerifiableCredential queries validator info for given validator address.
	ValidateVerifiableCredential(ctx context.Context, in *QueryValidateVerifiableCredentialRequest, opts ...grpc.CallOption) (*QueryValidateVerifiableCredentialResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryServer

type QueryServer interface {
	// Identifers queries all validators that match the given status.
	VerifiableCredentials(context.Context, *QueryVerifiableCredentialsRequest) (*QueryVerifiableCredentialsResponse, error)
	// VerifiableCredential queries validator info for given validator address.
	VerifiableCredential(context.Context, *QueryVerifiableCredentialRequest) (*QueryVerifiableCredentialResponse, error)
	// ValidateVerifiableCredential queries validator info for given validator address.
	ValidateVerifiableCredential(context.Context, *QueryValidateVerifiableCredentialRequest) (*QueryValidateVerifiableCredentialResponse, error)
}

QueryServer is the server API for Query service.

type QueryValidateVerifiableCredentialRequest

type QueryValidateVerifiableCredentialRequest struct {
	// verifiable_credential_id defines the credential id to query for.
	VerifiableCredentialId string `` /* 129-byte string literal not displayed */
	// issuer_pubkey is used to validate to verifiable_credential
	IssuerPubkey string `protobuf:"bytes,2,opt,name=issuer_pubkey,json=issuerPubkey,proto3" json:"issuer_pubkey,omitempty"`
}

QueryValidateVerifiableCredentialRequest is response type for the Query/VerifiableCredential RPC method

func (*QueryValidateVerifiableCredentialRequest) Descriptor

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

func (*QueryValidateVerifiableCredentialRequest) GetIssuerPubkey

func (m *QueryValidateVerifiableCredentialRequest) GetIssuerPubkey() string

func (*QueryValidateVerifiableCredentialRequest) GetVerifiableCredentialId

func (m *QueryValidateVerifiableCredentialRequest) GetVerifiableCredentialId() string

func (*QueryValidateVerifiableCredentialRequest) Marshal

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

func (*QueryValidateVerifiableCredentialRequest) MarshalTo

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

func (*QueryValidateVerifiableCredentialRequest) MarshalToSizedBuffer

func (m *QueryValidateVerifiableCredentialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryValidateVerifiableCredentialRequest) ProtoMessage

func (*QueryValidateVerifiableCredentialRequest) Reset

func (*QueryValidateVerifiableCredentialRequest) Size

func (*QueryValidateVerifiableCredentialRequest) String

func (*QueryValidateVerifiableCredentialRequest) Unmarshal

func (*QueryValidateVerifiableCredentialRequest) XXX_DiscardUnknown

func (m *QueryValidateVerifiableCredentialRequest) XXX_DiscardUnknown()

func (*QueryValidateVerifiableCredentialRequest) XXX_Marshal

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

func (*QueryValidateVerifiableCredentialRequest) XXX_Merge

func (*QueryValidateVerifiableCredentialRequest) XXX_Size

func (*QueryValidateVerifiableCredentialRequest) XXX_Unmarshal

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

type QueryValidateVerifiableCredentialResponse

type QueryValidateVerifiableCredentialResponse struct {
	// is_valid defines if the credential is signed by the correct public key.
	IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
}

QueryVerifiableCredentialResponse is response type for the Query/VerifiableCredential RPC method

func (*QueryValidateVerifiableCredentialResponse) Descriptor

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

func (*QueryValidateVerifiableCredentialResponse) GetIsValid

func (*QueryValidateVerifiableCredentialResponse) Marshal

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

func (*QueryValidateVerifiableCredentialResponse) MarshalTo

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

func (*QueryValidateVerifiableCredentialResponse) MarshalToSizedBuffer

func (m *QueryValidateVerifiableCredentialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryValidateVerifiableCredentialResponse) ProtoMessage

func (*QueryValidateVerifiableCredentialResponse) Reset

func (*QueryValidateVerifiableCredentialResponse) Size

func (*QueryValidateVerifiableCredentialResponse) String

func (*QueryValidateVerifiableCredentialResponse) Unmarshal

func (*QueryValidateVerifiableCredentialResponse) XXX_DiscardUnknown

func (m *QueryValidateVerifiableCredentialResponse) XXX_DiscardUnknown()

func (*QueryValidateVerifiableCredentialResponse) XXX_Marshal

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

func (*QueryValidateVerifiableCredentialResponse) XXX_Merge

func (*QueryValidateVerifiableCredentialResponse) XXX_Size

func (*QueryValidateVerifiableCredentialResponse) XXX_Unmarshal

type QueryVerifiableCredentialRequest

type QueryVerifiableCredentialRequest struct {
	// verifiable_credential_id defines the credential id to query for.
	VerifiableCredentialId string `` /* 129-byte string literal not displayed */
}

QueryVerifiableCredentialRequest is response type for the Query/VerifiableCredential RPC method

func (*QueryVerifiableCredentialRequest) Descriptor

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

func (*QueryVerifiableCredentialRequest) GetVerifiableCredentialId

func (m *QueryVerifiableCredentialRequest) GetVerifiableCredentialId() string

func (*QueryVerifiableCredentialRequest) Marshal

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

func (*QueryVerifiableCredentialRequest) MarshalTo

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

func (*QueryVerifiableCredentialRequest) MarshalToSizedBuffer

func (m *QueryVerifiableCredentialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVerifiableCredentialRequest) ProtoMessage

func (*QueryVerifiableCredentialRequest) ProtoMessage()

func (*QueryVerifiableCredentialRequest) Reset

func (*QueryVerifiableCredentialRequest) Size

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

func (*QueryVerifiableCredentialRequest) String

func (*QueryVerifiableCredentialRequest) Unmarshal

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

func (*QueryVerifiableCredentialRequest) XXX_DiscardUnknown

func (m *QueryVerifiableCredentialRequest) XXX_DiscardUnknown()

func (*QueryVerifiableCredentialRequest) XXX_Marshal

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

func (*QueryVerifiableCredentialRequest) XXX_Merge

func (*QueryVerifiableCredentialRequest) XXX_Size

func (m *QueryVerifiableCredentialRequest) XXX_Size() int

func (*QueryVerifiableCredentialRequest) XXX_Unmarshal

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

type QueryVerifiableCredentialResponse

type QueryVerifiableCredentialResponse struct {
	// verifiable_credential defines the the credential info.
	VerifiableCredential VerifiableCredential `protobuf:"bytes,1,opt,name=verifiable_credential,json=verifiableCredential,proto3" json:"verifiable_credential"`
}

QueryVerifiableCredentialResponse is response type for the Query/VerifiableCredential RPC method

func (*QueryVerifiableCredentialResponse) Descriptor

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

func (*QueryVerifiableCredentialResponse) GetVerifiableCredential

func (m *QueryVerifiableCredentialResponse) GetVerifiableCredential() VerifiableCredential

func (*QueryVerifiableCredentialResponse) Marshal

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

func (*QueryVerifiableCredentialResponse) MarshalTo

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

func (*QueryVerifiableCredentialResponse) MarshalToSizedBuffer

func (m *QueryVerifiableCredentialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVerifiableCredentialResponse) ProtoMessage

func (*QueryVerifiableCredentialResponse) ProtoMessage()

func (*QueryVerifiableCredentialResponse) Reset

func (*QueryVerifiableCredentialResponse) Size

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

func (*QueryVerifiableCredentialResponse) String

func (*QueryVerifiableCredentialResponse) Unmarshal

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

func (*QueryVerifiableCredentialResponse) XXX_DiscardUnknown

func (m *QueryVerifiableCredentialResponse) XXX_DiscardUnknown()

func (*QueryVerifiableCredentialResponse) XXX_Marshal

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

func (*QueryVerifiableCredentialResponse) XXX_Merge

func (*QueryVerifiableCredentialResponse) XXX_Size

func (m *QueryVerifiableCredentialResponse) XXX_Size() int

func (*QueryVerifiableCredentialResponse) XXX_Unmarshal

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

type QueryVerifiableCredentialsRequest

type QueryVerifiableCredentialsRequest struct {
	// status enables to query for credentials matching a given status.
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVerifiableCredentialsRequest is request type for Query/VerifiableCredentials RPC method.

func (*QueryVerifiableCredentialsRequest) Descriptor

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

func (*QueryVerifiableCredentialsRequest) GetPagination

func (*QueryVerifiableCredentialsRequest) GetStatus

func (*QueryVerifiableCredentialsRequest) Marshal

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

func (*QueryVerifiableCredentialsRequest) MarshalTo

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

func (*QueryVerifiableCredentialsRequest) MarshalToSizedBuffer

func (m *QueryVerifiableCredentialsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVerifiableCredentialsRequest) ProtoMessage

func (*QueryVerifiableCredentialsRequest) ProtoMessage()

func (*QueryVerifiableCredentialsRequest) Reset

func (*QueryVerifiableCredentialsRequest) Size

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

func (*QueryVerifiableCredentialsRequest) String

func (*QueryVerifiableCredentialsRequest) Unmarshal

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

func (*QueryVerifiableCredentialsRequest) XXX_DiscardUnknown

func (m *QueryVerifiableCredentialsRequest) XXX_DiscardUnknown()

func (*QueryVerifiableCredentialsRequest) XXX_Marshal

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

func (*QueryVerifiableCredentialsRequest) XXX_Merge

func (*QueryVerifiableCredentialsRequest) XXX_Size

func (m *QueryVerifiableCredentialsRequest) XXX_Size() int

func (*QueryVerifiableCredentialsRequest) XXX_Unmarshal

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

type QueryVerifiableCredentialsResponse

type QueryVerifiableCredentialsResponse struct {
	// validators contains all the queried validators.
	Vcs []VerifiableCredential `protobuf:"bytes,1,rep,name=vcs,proto3" json:"vcs"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVerifiableCredentialsResponse is response type for the Query/Identifers RPC method

func (*QueryVerifiableCredentialsResponse) Descriptor

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

func (*QueryVerifiableCredentialsResponse) GetPagination

func (*QueryVerifiableCredentialsResponse) GetVcs

func (*QueryVerifiableCredentialsResponse) Marshal

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

func (*QueryVerifiableCredentialsResponse) MarshalTo

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

func (*QueryVerifiableCredentialsResponse) MarshalToSizedBuffer

func (m *QueryVerifiableCredentialsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVerifiableCredentialsResponse) ProtoMessage

func (*QueryVerifiableCredentialsResponse) ProtoMessage()

func (*QueryVerifiableCredentialsResponse) Reset

func (*QueryVerifiableCredentialsResponse) Size

func (*QueryVerifiableCredentialsResponse) String

func (*QueryVerifiableCredentialsResponse) Unmarshal

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

func (*QueryVerifiableCredentialsResponse) XXX_DiscardUnknown

func (m *QueryVerifiableCredentialsResponse) XXX_DiscardUnknown()

func (*QueryVerifiableCredentialsResponse) XXX_Marshal

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

func (*QueryVerifiableCredentialsResponse) XXX_Merge

func (*QueryVerifiableCredentialsResponse) XXX_Size

func (*QueryVerifiableCredentialsResponse) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateVerifiableCredential

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

type UserCredentialSubject

type UserCredentialSubject struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Root       string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
	IsVerified bool   `protobuf:"varint,3,opt,name=is_verified,json=isVerified,proto3" json:"is_verified,omitempty"`
}

func (*UserCredentialSubject) Descriptor

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

func (*UserCredentialSubject) GetId

func (m *UserCredentialSubject) GetId() string

func (*UserCredentialSubject) GetIsVerified

func (m *UserCredentialSubject) GetIsVerified() bool

func (*UserCredentialSubject) GetRoot

func (m *UserCredentialSubject) GetRoot() string

func (*UserCredentialSubject) Marshal

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

func (*UserCredentialSubject) MarshalTo

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

func (*UserCredentialSubject) MarshalToSizedBuffer

func (m *UserCredentialSubject) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserCredentialSubject) ProtoMessage

func (*UserCredentialSubject) ProtoMessage()

func (*UserCredentialSubject) Reset

func (m *UserCredentialSubject) Reset()

func (*UserCredentialSubject) Size

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

func (*UserCredentialSubject) String

func (m *UserCredentialSubject) String() string

func (*UserCredentialSubject) Unmarshal

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

func (*UserCredentialSubject) XXX_DiscardUnknown

func (m *UserCredentialSubject) XXX_DiscardUnknown()

func (*UserCredentialSubject) XXX_Marshal

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

func (*UserCredentialSubject) XXX_Merge

func (m *UserCredentialSubject) XXX_Merge(src proto.Message)

func (*UserCredentialSubject) XXX_Size

func (m *UserCredentialSubject) XXX_Size() int

func (*UserCredentialSubject) XXX_Unmarshal

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

type VerifiableCredential

type VerifiableCredential struct {
	Context      []string `protobuf:"bytes,1,rep,name=context,proto3" json:"context,omitempty"`
	Id           string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Type         []string `protobuf:"bytes,3,rep,name=type,proto3" json:"type,omitempty"`
	Issuer       string   `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"`
	IssuanceDate string   `protobuf:"bytes,5,opt,name=issuance_date,json=issuanceDate,proto3" json:"issuance_date,omitempty"`
	// Types that are valid to be assigned to CredentialSubject:
	//	*VerifiableCredential_UserCred
	CredentialSubject isVerifiableCredential_CredentialSubject `protobuf_oneof:"credential_subject"`
	Proof             *Proof                                   `protobuf:"bytes,7,opt,name=proof,proto3" json:"proof,omitempty"`
}

func NewUserVerifiableCredential

func NewUserVerifiableCredential(
	id string,
	vctype []string,
	issuer string,
	issuanceDate string,
	credentialSubject VerifiableCredential_UserCred,
	proof Proof,
) VerifiableCredential

NewUserVerifiableCredential constructs a new VerifiableCredential instance

func (*VerifiableCredential) Descriptor

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

func (VerifiableCredential) GetBytes

func (m VerifiableCredential) GetBytes() []byte

GetBytes is a helper for serializing

func (*VerifiableCredential) GetContext

func (m *VerifiableCredential) GetContext() []string

func (*VerifiableCredential) GetCredentialSubject

func (m *VerifiableCredential) GetCredentialSubject() isVerifiableCredential_CredentialSubject

func (*VerifiableCredential) GetId

func (m *VerifiableCredential) GetId() string

func (*VerifiableCredential) GetIssuanceDate

func (m *VerifiableCredential) GetIssuanceDate() string

func (*VerifiableCredential) GetIssuer

func (m *VerifiableCredential) GetIssuer() string

func (*VerifiableCredential) GetProof

func (m *VerifiableCredential) GetProof() *Proof

func (*VerifiableCredential) GetType

func (m *VerifiableCredential) GetType() []string

func (*VerifiableCredential) GetUserCred

func (m *VerifiableCredential) GetUserCred() *UserCredentialSubject

func (*VerifiableCredential) Marshal

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

func (*VerifiableCredential) MarshalTo

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

func (*VerifiableCredential) MarshalToSizedBuffer

func (m *VerifiableCredential) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VerifiableCredential) ProtoMessage

func (*VerifiableCredential) ProtoMessage()

func (*VerifiableCredential) Reset

func (m *VerifiableCredential) Reset()

func (*VerifiableCredential) Size

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

func (*VerifiableCredential) String

func (m *VerifiableCredential) String() string

func (*VerifiableCredential) Unmarshal

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

func (*VerifiableCredential) XXX_DiscardUnknown

func (m *VerifiableCredential) XXX_DiscardUnknown()

func (*VerifiableCredential) XXX_Marshal

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

func (*VerifiableCredential) XXX_Merge

func (m *VerifiableCredential) XXX_Merge(src proto.Message)

func (*VerifiableCredential) XXX_OneofWrappers

func (*VerifiableCredential) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*VerifiableCredential) XXX_Size

func (m *VerifiableCredential) XXX_Size() int

func (*VerifiableCredential) XXX_Unmarshal

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

type VerifiableCredential_UserCred

type VerifiableCredential_UserCred struct {
	UserCred *UserCredentialSubject `protobuf:"bytes,6,opt,name=user_cred,json=userCred,proto3,oneof" json:"user_cred,omitempty"`
}

func NewUserCredentialSubject

func NewUserCredentialSubject(
	id string,
	root string,
	isVerified bool,
) VerifiableCredential_UserCred

NewUserCredentialSubject create a new credential subject

func (*VerifiableCredential_UserCred) MarshalTo

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

func (*VerifiableCredential_UserCred) MarshalToSizedBuffer

func (m *VerifiableCredential_UserCred) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VerifiableCredential_UserCred) Size

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

Jump to

Keyboard shortcuts

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