types

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

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"
	EventTypeCredentialDeleted = "credential_deleted"

	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_vc"
)
View Source
const (
	TypeMsgDeleteVerifiableCredential = "delete-verifiable-credential"
	TypeMsgIssueVerifiableCredential  = "issue-verifiable-credential"
)

Message types types

View Source
const (
	IdentityCredential     = "IdentityCredential"
	UserCredential         = "UserCredential"
	IssuerCredential       = "IssuerCredential"
	RegulatorCredential    = "RegulatorCredential"
	RegistrationCredential = "RegistrationCredential"
	LicenseCredential      = "LicenseCredential"
)

Defines the accepted credential types

Variables

View Source
var (
	ErrVerifiableCredentialNotFound = sdkerrors.Register(ModuleName, 1100, "vc not found")
	ErrVerifiableCredentialFound    = sdkerrors.Register(ModuleName, 1101, "vc found")
	ErrDidDocumentDoesNotExist      = sdkerrors.Register(ModuleName, 1102, "did does not exist in the store")
	ErrVerifiableCredentialIssuer   = sdkerrors.Register(ModuleName, 1103, "provided verifiable credential and did public key do not match")
	ErrMessageSigner                = sdkerrors.Register(ModuleName, 1104, "message signer does not match provided did")
)

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 codec used by the module (protobuf)
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
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 NewCredentialDeletedEvent

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

NewCredentialDeletedEvent constructs a new credential_deleted sdk.Event

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

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 AccountKeeper

type AccountKeeper interface {
	GetPubKey(ctx sdk.Context, addr sdk.AccAddress) (cryptotypes.PubKey, error)
}

AccountKeeper defines the functions from the account keeper

type Address

type Address struct {
	AddrType string `protobuf:"bytes,1,opt,name=addr_type,json=addrType,proto3" json:"addr_type,omitempty"`
	Thfare   string `protobuf:"bytes,2,opt,name=thfare,proto3" json:"thfare,omitempty"`
	Premise  string `protobuf:"bytes,3,opt,name=premise,proto3" json:"premise,omitempty"`
	Postcode string `protobuf:"bytes,4,opt,name=postcode,proto3" json:"postcode,omitempty"`
	Locality string `protobuf:"bytes,5,opt,name=locality,proto3" json:"locality,omitempty"`
	Country  string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
}

func (*Address) Descriptor

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

func (*Address) Marshal

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

func (*Address) MarshalTo

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

func (*Address) MarshalToSizedBuffer

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

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) Size

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

func (*Address) String

func (m *Address) String() string

func (*Address) Unmarshal

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

func (*Address) XXX_DiscardUnknown

func (m *Address) XXX_DiscardUnknown()

func (*Address) XXX_Marshal

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

func (*Address) XXX_Merge

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

func (*Address) XXX_Size

func (m *Address) XXX_Size() int

func (*Address) XXX_Unmarshal

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

type DidKeeper

type DidKeeper interface {
	GetDidDocument(ctx sdk.Context, key []byte) (types.DidDocument, bool)
	ResolveDid(ctx sdk.Context, did types.DID) (doc types.DidDocument, meta types.DidMetadata, err error)
}

DidKeeper defines the expected did keeper functions

type HmacSha256

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

HmacSha256 is the SHA256 HMAC hashing method

func New

func New(secret string) *HmacSha256

New creates a new SHA256 HMAC hashing method

func (*HmacSha256) Hash

func (h *HmacSha256) Hash(d []byte) []byte

Hash generates a SHA256 HMAC hash from a byte array

func (*HmacSha256) HashLength

func (h *HmacSha256) HashLength() int

HashLength returns the length of hashes generated by Hash() in bytes

type Id

type Id struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
}

func (*Id) Descriptor

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

func (*Id) GetId

func (m *Id) GetId() string

func (*Id) GetType

func (m *Id) GetType() string

func (*Id) Marshal

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

func (*Id) MarshalTo

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

func (*Id) MarshalToSizedBuffer

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

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) Reset

func (m *Id) Reset()

func (*Id) Size

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

func (*Id) String

func (m *Id) String() string

func (*Id) Unmarshal

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

func (*Id) XXX_DiscardUnknown

func (m *Id) XXX_DiscardUnknown()

func (*Id) XXX_Marshal

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

func (*Id) XXX_Merge

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

func (*Id) XXX_Size

func (m *Id) XXX_Size() int

func (*Id) XXX_Unmarshal

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

type LegalPerson

type LegalPerson struct {
	Names   []*Name `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	CtryReg string  `protobuf:"bytes,2,opt,name=ctry_reg,json=ctryReg,proto3" json:"ctry_reg,omitempty"`
}

func (*LegalPerson) Descriptor

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

func (*LegalPerson) Marshal

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

func (*LegalPerson) MarshalTo

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

func (*LegalPerson) MarshalToSizedBuffer

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

func (*LegalPerson) ProtoMessage

func (*LegalPerson) ProtoMessage()

func (*LegalPerson) Reset

func (m *LegalPerson) Reset()

func (*LegalPerson) Size

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

func (*LegalPerson) String

func (m *LegalPerson) String() string

func (*LegalPerson) Unmarshal

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

func (*LegalPerson) XXX_DiscardUnknown

func (m *LegalPerson) XXX_DiscardUnknown()

func (*LegalPerson) XXX_Marshal

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

func (*LegalPerson) XXX_Merge

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

func (*LegalPerson) XXX_Size

func (m *LegalPerson) XXX_Size() int

func (*LegalPerson) XXX_Unmarshal

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

type LicenseCredentialSubject

type LicenseCredentialSubject struct {
	// The value of id represents the ID of the credential_subject
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The license type is defined by the MICA regulation. This will
	// be used to identify different asset classes of tokens being issuedi
	// by the credential_subject.
	LicenseType string `protobuf:"bytes,2,opt,name=license_type,json=licenseType,proto3" json:"license_type,omitempty"`
	// The country field represents the country the credential was issued in.
	Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
	// The authority field represents a licensing authority that issued the LicenseCredential
	Authority string `protobuf:"bytes,4,opt,name=authority,proto3" json:"authority,omitempty"`
	// The circulation_limit represents the amount of a token
	// that can be minted by a credential_subject.
	CirculationLimit types.Coin `protobuf:"bytes,5,opt,name=circulation_limit,json=circulationLimit,proto3" json:"circulation_limit"`
}

The LicenseCredential message makes reference to the classes of crypto assets described in MiCA, but the license could easily be adopted as proof of authority to issue various types of crypto or virtual assets. The LicenseCredential is used a a credential_subject in a verifiable credential.

func (*LicenseCredentialSubject) Descriptor

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

func (*LicenseCredentialSubject) GetAuthority

func (m *LicenseCredentialSubject) GetAuthority() string

func (*LicenseCredentialSubject) GetCirculationLimit

func (m *LicenseCredentialSubject) GetCirculationLimit() types.Coin

func (*LicenseCredentialSubject) GetCountry

func (m *LicenseCredentialSubject) GetCountry() string

func (*LicenseCredentialSubject) GetId

func (m *LicenseCredentialSubject) GetId() string

func (*LicenseCredentialSubject) GetLicenseType

func (m *LicenseCredentialSubject) GetLicenseType() string

func (*LicenseCredentialSubject) Marshal

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

func (*LicenseCredentialSubject) MarshalTo

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

func (*LicenseCredentialSubject) MarshalToSizedBuffer

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

func (*LicenseCredentialSubject) ProtoMessage

func (*LicenseCredentialSubject) ProtoMessage()

func (*LicenseCredentialSubject) Reset

func (m *LicenseCredentialSubject) Reset()

func (*LicenseCredentialSubject) Size

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

func (*LicenseCredentialSubject) String

func (m *LicenseCredentialSubject) String() string

func (*LicenseCredentialSubject) Unmarshal

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

func (*LicenseCredentialSubject) XXX_DiscardUnknown

func (m *LicenseCredentialSubject) XXX_DiscardUnknown()

func (*LicenseCredentialSubject) XXX_Marshal

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

func (*LicenseCredentialSubject) XXX_Merge

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

func (*LicenseCredentialSubject) XXX_Size

func (m *LicenseCredentialSubject) XXX_Size() int

func (*LicenseCredentialSubject) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// RevokeCredential a credential
	RevokeCredential(ctx context.Context, in *MsgRevokeCredential, opts ...grpc.CallOption) (*MsgRevokeCredentialResponse, 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 MsgIssueCredential

type MsgIssueCredential struct {
	Credential *VerifiableCredential `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	Owner      string                `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
}

MsgIssueCredential is used to issue new registration credential this message is used by other modules

func NewMsgIssueCredential

func NewMsgIssueCredential(credential VerifiableCredential, signerAccount string) *MsgIssueCredential

NewMsgIssueCredential build a new message to issue credentials

func (*MsgIssueCredential) Descriptor

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

func (*MsgIssueCredential) GetSignBytes

func (m *MsgIssueCredential) GetSignBytes() []byte

GetSignBytes bytes of json serialization

func (*MsgIssueCredential) GetSigners

func (m *MsgIssueCredential) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgIssueCredential) Marshal

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

func (*MsgIssueCredential) MarshalTo

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

func (*MsgIssueCredential) MarshalToSizedBuffer

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

func (*MsgIssueCredential) ProtoMessage

func (*MsgIssueCredential) ProtoMessage()

func (*MsgIssueCredential) Reset

func (m *MsgIssueCredential) Reset()

func (*MsgIssueCredential) Route

func (m *MsgIssueCredential) Route() string

Route implements sdk.Msg

func (*MsgIssueCredential) Size

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

func (*MsgIssueCredential) String

func (m *MsgIssueCredential) String() string

func (*MsgIssueCredential) Type

func (m *MsgIssueCredential) Type() string

Type implements sdk.Msg

func (*MsgIssueCredential) Unmarshal

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

func (*MsgIssueCredential) ValidateBasic

func (m *MsgIssueCredential) ValidateBasic() error

ValidateBasic validate a credential

func (*MsgIssueCredential) XXX_DiscardUnknown

func (m *MsgIssueCredential) XXX_DiscardUnknown()

func (*MsgIssueCredential) XXX_Marshal

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

func (*MsgIssueCredential) XXX_Merge

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

func (*MsgIssueCredential) XXX_Size

func (m *MsgIssueCredential) XXX_Size() int

func (*MsgIssueCredential) XXX_Unmarshal

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

type MsgIssueCredentialResponse

type MsgIssueCredentialResponse struct {
}

MsgIssueCredentialResponse reply for the issue credential call

func (*MsgIssueCredentialResponse) Descriptor

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

func (*MsgIssueCredentialResponse) Marshal

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

func (*MsgIssueCredentialResponse) MarshalTo

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

func (*MsgIssueCredentialResponse) MarshalToSizedBuffer

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

func (*MsgIssueCredentialResponse) ProtoMessage

func (*MsgIssueCredentialResponse) ProtoMessage()

func (*MsgIssueCredentialResponse) Reset

func (m *MsgIssueCredentialResponse) Reset()

func (*MsgIssueCredentialResponse) Size

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

func (*MsgIssueCredentialResponse) String

func (m *MsgIssueCredentialResponse) String() string

func (*MsgIssueCredentialResponse) Unmarshal

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

func (*MsgIssueCredentialResponse) XXX_DiscardUnknown

func (m *MsgIssueCredentialResponse) XXX_DiscardUnknown()

func (*MsgIssueCredentialResponse) XXX_Marshal

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

func (*MsgIssueCredentialResponse) XXX_Merge

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

func (*MsgIssueCredentialResponse) XXX_Size

func (m *MsgIssueCredentialResponse) XXX_Size() int

func (*MsgIssueCredentialResponse) XXX_Unmarshal

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

type MsgRevokeCredential

type MsgRevokeCredential struct {
	CredentialId string `protobuf:"bytes,1,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"`
	Owner        string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
}

MsgRevokeCredential

func NewMsgRevokeVerifiableCredential

func NewMsgRevokeVerifiableCredential(
	id string,
	owner string,
) *MsgRevokeCredential

NewMsgRevokeVerifiableCredential creates a new MsgDeleteVerifiableCredential instance

func (*MsgRevokeCredential) Descriptor

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

func (MsgRevokeCredential) GetSignBytes

func (m MsgRevokeCredential) GetSignBytes() []byte

GetSignBytes legacy amino

func (MsgRevokeCredential) GetSigners

func (m MsgRevokeCredential) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgRevokeCredential) Marshal

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

func (*MsgRevokeCredential) MarshalTo

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

func (*MsgRevokeCredential) MarshalToSizedBuffer

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

func (*MsgRevokeCredential) ProtoMessage

func (*MsgRevokeCredential) ProtoMessage()

func (*MsgRevokeCredential) Reset

func (m *MsgRevokeCredential) Reset()

func (MsgRevokeCredential) Route

func (m MsgRevokeCredential) Route() string

Route implements sdk.Msg

func (*MsgRevokeCredential) Size

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

func (*MsgRevokeCredential) String

func (m *MsgRevokeCredential) String() string

func (MsgRevokeCredential) Type

func (m MsgRevokeCredential) Type() string

Type implements sdk.Msg

func (*MsgRevokeCredential) Unmarshal

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

func (MsgRevokeCredential) ValidateBasic

func (m MsgRevokeCredential) ValidateBasic() error

ValidateBasic performs a basic check of the MsgDeleteVerifiableCredential fields.

func (*MsgRevokeCredential) XXX_DiscardUnknown

func (m *MsgRevokeCredential) XXX_DiscardUnknown()

func (*MsgRevokeCredential) XXX_Marshal

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

func (*MsgRevokeCredential) XXX_Merge

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

func (*MsgRevokeCredential) XXX_Size

func (m *MsgRevokeCredential) XXX_Size() int

func (*MsgRevokeCredential) XXX_Unmarshal

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

type MsgRevokeCredentialResponse

type MsgRevokeCredentialResponse struct {
}

MsgRevokeCredentialResponse

func (*MsgRevokeCredentialResponse) Descriptor

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

func (*MsgRevokeCredentialResponse) Marshal

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

func (*MsgRevokeCredentialResponse) MarshalTo

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

func (*MsgRevokeCredentialResponse) MarshalToSizedBuffer

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

func (*MsgRevokeCredentialResponse) ProtoMessage

func (*MsgRevokeCredentialResponse) ProtoMessage()

func (*MsgRevokeCredentialResponse) Reset

func (m *MsgRevokeCredentialResponse) Reset()

func (*MsgRevokeCredentialResponse) Size

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

func (*MsgRevokeCredentialResponse) String

func (m *MsgRevokeCredentialResponse) String() string

func (*MsgRevokeCredentialResponse) Unmarshal

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

func (*MsgRevokeCredentialResponse) XXX_DiscardUnknown

func (m *MsgRevokeCredentialResponse) XXX_DiscardUnknown()

func (*MsgRevokeCredentialResponse) XXX_Marshal

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

func (*MsgRevokeCredentialResponse) XXX_Merge

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

func (*MsgRevokeCredentialResponse) XXX_Size

func (m *MsgRevokeCredentialResponse) XXX_Size() int

func (*MsgRevokeCredentialResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// RevokeCredential a credential
	RevokeCredential(context.Context, *MsgRevokeCredential) (*MsgRevokeCredentialResponse, error)
}

MsgServer is the server API for Msg service.

type Name

type Name struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
}

func (*Name) Descriptor

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

func (*Name) Marshal

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

func (*Name) MarshalTo

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

func (*Name) MarshalToSizedBuffer

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

func (*Name) ProtoMessage

func (*Name) ProtoMessage()

func (*Name) Reset

func (m *Name) Reset()

func (*Name) Size

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

func (*Name) String

func (m *Name) String() string

func (*Name) Unmarshal

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

func (*Name) XXX_DiscardUnknown

func (m *Name) XXX_DiscardUnknown()

func (*Name) XXX_Marshal

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

func (*Name) XXX_Merge

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

func (*Name) XXX_Size

func (m *Name) XXX_Size() int

func (*Name) XXX_Unmarshal

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

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"`
}

The Proof message represents a cryptographic proof that the credential has not been tampered with or changed without the issuersi knowledge. This can be used to verify the verifiable credential.

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

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

QueryServer is the server API for Query service.

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 RegistrationCredentialSubject

type RegistrationCredentialSubject struct {
	// The value of id represents the ID of the credential_subject
	Id           string         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Address      *Address       `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Ids          []*Id          `protobuf:"bytes,3,rep,name=ids,proto3" json:"ids,omitempty"`
	LegalPersons []*LegalPerson `protobuf:"bytes,4,rep,name=legal_persons,json=legalPersons,proto3" json:"legal_persons,omitempty"`
}

RegistrationCredentialSubject is used to identify a business entity https://github.com/allinbits/cosmos-cash/v3/blob/main/docs/Explanation/ADR/adr-005-registration-credential.md

func (*RegistrationCredentialSubject) Descriptor

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

func (*RegistrationCredentialSubject) GetAddress

func (m *RegistrationCredentialSubject) GetAddress() *Address

func (*RegistrationCredentialSubject) GetId

func (*RegistrationCredentialSubject) GetIds

func (m *RegistrationCredentialSubject) GetIds() []*Id

func (*RegistrationCredentialSubject) GetLegalPersons

func (m *RegistrationCredentialSubject) GetLegalPersons() []*LegalPerson

func (*RegistrationCredentialSubject) Marshal

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

func (*RegistrationCredentialSubject) MarshalTo

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

func (*RegistrationCredentialSubject) MarshalToSizedBuffer

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

func (*RegistrationCredentialSubject) ProtoMessage

func (*RegistrationCredentialSubject) ProtoMessage()

func (*RegistrationCredentialSubject) Reset

func (m *RegistrationCredentialSubject) Reset()

func (*RegistrationCredentialSubject) Size

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

func (*RegistrationCredentialSubject) String

func (*RegistrationCredentialSubject) Unmarshal

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

func (*RegistrationCredentialSubject) XXX_DiscardUnknown

func (m *RegistrationCredentialSubject) XXX_DiscardUnknown()

func (*RegistrationCredentialSubject) XXX_Marshal

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

func (*RegistrationCredentialSubject) XXX_Merge

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

func (*RegistrationCredentialSubject) XXX_Size

func (m *RegistrationCredentialSubject) XXX_Size() int

func (*RegistrationCredentialSubject) XXX_Unmarshal

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

type RegulatorCredentialSubject

type RegulatorCredentialSubject struct {
	// The value of id represents the ID of the credential_subject
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The value of id represents the name of the credential subject
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The country field represents the country the credential was issued in.
	Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
}

RegulatorCredentialSubject is used to identify regulators

func (*RegulatorCredentialSubject) Descriptor

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

func (*RegulatorCredentialSubject) GetCountry

func (m *RegulatorCredentialSubject) GetCountry() string

func (*RegulatorCredentialSubject) GetId

func (*RegulatorCredentialSubject) GetName

func (m *RegulatorCredentialSubject) GetName() string

func (*RegulatorCredentialSubject) Marshal

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

func (*RegulatorCredentialSubject) MarshalTo

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

func (*RegulatorCredentialSubject) MarshalToSizedBuffer

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

func (*RegulatorCredentialSubject) ProtoMessage

func (*RegulatorCredentialSubject) ProtoMessage()

func (*RegulatorCredentialSubject) Reset

func (m *RegulatorCredentialSubject) Reset()

func (*RegulatorCredentialSubject) Size

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

func (*RegulatorCredentialSubject) String

func (m *RegulatorCredentialSubject) String() string

func (*RegulatorCredentialSubject) Unmarshal

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

func (*RegulatorCredentialSubject) XXX_DiscardUnknown

func (m *RegulatorCredentialSubject) XXX_DiscardUnknown()

func (*RegulatorCredentialSubject) XXX_Marshal

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

func (*RegulatorCredentialSubject) XXX_Merge

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

func (*RegulatorCredentialSubject) XXX_Size

func (m *RegulatorCredentialSubject) XXX_Size() int

func (*RegulatorCredentialSubject) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) RevokeCredential

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"`
}

UserCredentialSubject represents a privacy respecting credential_subject of a verifiable credential. This is used as an on chain verifiable credential.

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 is spec for verifiable credential.
	Context []string `protobuf:"bytes,1,rep,name=context,proto3" json:"@context,omitempty"`
	// The value of the id property MUST be a single URI. It is RECOMMENDED
	// that the URI in the id be one which, if dereferenced, results in a
	// document containing machine-readable information about the id.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// The value of the type property MUST be, or map to (through interpretation
	// of the @context property), one or more URIs. If more than one URI is
	// provided, the URIs MUST be interpreted as an unordered set.
	Type []string `protobuf:"bytes,3,rep,name=type,proto3" json:"type,omitempty"`
	// The value of the issuer property MUST be either a URI or an object
	// containing an id property. It is RECOMMENDED that the URI in the issuer
	// or its id be one which, if dereferenced, results in a document containing
	// machine-readable information about the issuer that can be used to verify
	// the information expressed in the credential.
	Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// A credential MUST have an issuanceDate property. The value of the issuanceDate
	// property MUST be a string value of an [RFC3339] combined date and time string
	// representing the date and time the credential becomes valid, which could
	// be a date and time in the future. Note that this value represents the earliest
	// point in time at which the information associated with the credentialSubject
	// property becomes valid.
	IssuanceDate *time.Time `protobuf:"bytes,5,opt,name=issuance_date,json=issuanceDate,proto3,stdtime" json:"issuance_date,omitempty"`
	// The value of the credentialSubject property is defined as a set of
	// objects that contain one or more properties that are each related
	// to a subject of the verifiable credential.
	//
	// Types that are valid to be assigned to CredentialSubject:
	//	*VerifiableCredential_RegulatorCred
	//	*VerifiableCredential_RegistrationCred
	//	*VerifiableCredential_LicenseCred
	//	*VerifiableCredential_UserCred
	CredentialSubject isVerifiableCredential_CredentialSubject `protobuf_oneof:"credential_subject"`
	// One or more cryptographic proofs that can be used to detect tampering
	// and verify the authorship of a credential or presentation. The specific
	// method used for an embedded proof MUST be included using the type property.
	Proof *Proof `protobuf:"bytes,10,opt,name=proof,proto3" json:"proof,omitempty"`
}

VerifiableCredential represents a verifiable credential

func NewLicenseVerifiableCredential

func NewLicenseVerifiableCredential(
	id string,
	issuer string,
	issuanceDate time.Time,
	credentialSubject VerifiableCredential_LicenseCred,
) VerifiableCredential

NewLicenseVerifiableCredential constructs a new VerifiableCredential instance

func NewRegistrationVerifiableCredential

func NewRegistrationVerifiableCredential(
	id string,
	issuer string,
	issuanceDate time.Time,
	credentialSubject VerifiableCredential_RegistrationCred,
) VerifiableCredential

NewRegistrationVerifiableCredential constructs a new VerifiableCredential instance

func NewRegulatorVerifiableCredential

func NewRegulatorVerifiableCredential(
	id string,
	issuer string,
	issuanceDate time.Time,
	credentialSubject VerifiableCredential_RegulatorCred,
) VerifiableCredential

NewRegulatorVerifiableCredential constructs a new VerifiableCredential instance

func NewUserVerifiableCredential

func NewUserVerifiableCredential(
	id string,
	issuer string,
	issuanceDate time.Time,
	credentialSubject VerifiableCredential_UserCred,
) VerifiableCredential

NewUserVerifiableCredential constructs a new VerifiableCredential instance

func (*VerifiableCredential) Descriptor

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

func (VerifiableCredential) GetBytes

func (vc 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() *time.Time

func (*VerifiableCredential) GetIssuer

func (m *VerifiableCredential) GetIssuer() string

func (VerifiableCredential) GetIssuerDID

func (vc VerifiableCredential) GetIssuerDID() didtypes.DID

GetIssuerDID returns the did of the issuer

func (*VerifiableCredential) GetLicenseCred

func (m *VerifiableCredential) GetLicenseCred() *LicenseCredentialSubject

func (*VerifiableCredential) GetProof

func (m *VerifiableCredential) GetProof() *Proof

func (*VerifiableCredential) GetRegistrationCred

func (m *VerifiableCredential) GetRegistrationCred() *RegistrationCredentialSubject

func (*VerifiableCredential) GetRegulatorCred

func (m *VerifiableCredential) GetRegulatorCred() *RegulatorCredentialSubject

func (VerifiableCredential) GetSubjectDID

func (vc VerifiableCredential) GetSubjectDID() didtypes.DID

GetSubjectDID return the credential DID subject, that is the holder of the credentials

func (*VerifiableCredential) GetType

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

func (*VerifiableCredential) GetUserCred

func (m *VerifiableCredential) GetUserCred() *UserCredentialSubject

func (VerifiableCredential) HasType

func (vc VerifiableCredential) HasType(vcType string) bool

HasType tells whenever a credential has a specific type

func (VerifiableCredential) Hash

func (vc VerifiableCredential) Hash() string

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

func (vc VerifiableCredential) Sign(
	keyring keyring.Keyring,
	address sdk.Address,
	verificationMethodID string,
) (VerifiableCredential, error)

Sign signs a credential with a provided private key

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

func (vc VerifiableCredential) Validate(
	pk cryptotypes.PubKey,
) bool

Validate validates a verifiable credential against a provided public key

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_LicenseCred

type VerifiableCredential_LicenseCred struct {
	LicenseCred *LicenseCredentialSubject `protobuf:"bytes,8,opt,name=license_cred,json=licenseCred,proto3,oneof" json:"license_cred,omitempty"`
}

func NewLicenseCredentialSubject

func NewLicenseCredentialSubject(
	id string,
	licenseType string,
	country string,
	authority string,
	circulationLimit sdk.Coin,
) VerifiableCredential_LicenseCred

NewLicenseCredentialSubject create a new license credential subject

func (*VerifiableCredential_LicenseCred) MarshalTo

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

func (*VerifiableCredential_LicenseCred) MarshalToSizedBuffer

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

func (*VerifiableCredential_LicenseCred) Size

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

type VerifiableCredential_RegistrationCred

type VerifiableCredential_RegistrationCred struct {
	RegistrationCred *RegistrationCredentialSubject `protobuf:"bytes,7,opt,name=registration_cred,json=registrationCred,proto3,oneof" json:"registration_cred,omitempty"`
}

func NewRegistrationCredentialSubject

func NewRegistrationCredentialSubject(
	id string,
	country string,
	shortName string,
	longName string,
) VerifiableCredential_RegistrationCred

NewRegistrationCredentialSubject create a new license credential subject TODO: placeholder implementation, refactor it

func (*VerifiableCredential_RegistrationCred) MarshalTo

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

func (*VerifiableCredential_RegistrationCred) MarshalToSizedBuffer

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

func (*VerifiableCredential_RegistrationCred) Size

type VerifiableCredential_RegulatorCred

type VerifiableCredential_RegulatorCred struct {
	RegulatorCred *RegulatorCredentialSubject `protobuf:"bytes,6,opt,name=regulator_cred,json=regulatorCred,proto3,oneof" json:"regulator_cred,omitempty"`
}

func NewRegulatorCredentialSubject

func NewRegulatorCredentialSubject(
	subjectID string,
	name string,
	country string,
) VerifiableCredential_RegulatorCred

NewRegulatorCredentialSubject create a new regulator credential subject

func (*VerifiableCredential_RegulatorCred) MarshalTo

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

func (*VerifiableCredential_RegulatorCred) MarshalToSizedBuffer

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

func (*VerifiableCredential_RegulatorCred) Size

type VerifiableCredential_UserCred

type VerifiableCredential_UserCred struct {
	UserCred *UserCredentialSubject `protobuf:"bytes,9,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