types

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	JsonWebKey2020             = "JsonWebKey2020"
	Ed25519VerificationKey2020 = "Ed25519VerificationKey2020"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "cheqd"

	// 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

	DidMethod = ModuleName
)
View Source
const (
	DidKey          = "did:"
	DidCountKey     = "did-count:"
	DidNamespaceKey = "did-namespace:"
)
View Source
const DefaultDidNamespace = "testnet"
View Source
const (
	QueryGetDid = "get-did"
)

Variables

View Source
var (
	ErrInvalidLengthCommon        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthDid        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDid          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDid = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrBadRequest                 = sdkerrors.Register(ModuleName, 1000, "bad request")
	ErrInvalidSignature           = sdkerrors.Register(ModuleName, 1100, "invalid signature detected")
	ErrSignatureNotFound          = sdkerrors.Register(ModuleName, 1101, "signature is required but not found")
	ErrDidDocExists               = sdkerrors.Register(ModuleName, 1200, "DID Doc exists")
	ErrDidDocNotFound             = sdkerrors.Register(ModuleName, 1201, "DID Doc not found")
	ErrVerificationMethodNotFound = sdkerrors.Register(ModuleName, 1202, "verification method not found")
	ErrUnexpectedDidVersion       = sdkerrors.Register(ModuleName, 1203, "unexpected DID version")
	ErrBasicValidation            = sdkerrors.Register(ModuleName, 1205, "basic validation failed")
	ErrNamespaceValidation        = sdkerrors.Register(ModuleName, 1206, "DID namespace validation failed")
	ErrUnpackStateValue           = sdkerrors.Register(ModuleName, 1300, "invalid did state value")
	ErrInternal                   = sdkerrors.Register(ModuleName, 1500, "internal error")
)

x/cheqd module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthStateValue        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStateValue          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStateValue = 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 JwkMethodTypes = []string{
	JsonWebKey2020,
}
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var MultibaseMethodTypes = []string{
	Ed25519VerificationKey2020,
}
View Source
var SupportedMethodTypes = []string{
	JsonWebKey2020,
	Ed25519VerificationKey2020,
}

Functions

func CompareVerificationMethodsWithoutIds

func CompareVerificationMethodsWithoutIds(vm1, vm2 VerificationMethod) bool

func GetServiceIds

func GetServiceIds(vms []*Service) []string

func GetSignInfoIds

func GetSignInfoIds(infos []*SignInfo) []string

func GetVerificationMethodIds

func GetVerificationMethodIds(vms []*VerificationMethod) []string

func IsUniqueKeyValuePairListByKey

func IsUniqueKeyValuePairListByKey(key PublicKeyJWK) bool

func IsUniqueSignInfoList

func IsUniqueSignInfoList(infos []*SignInfo) bool

func KeyPrefix

func KeyPrefix(p string) []byte

func PubKeyJWKToJson

func PubKeyJWKToJson(key PublicKeyJWK) (string, error)

func PubKeyJWKToMap

func PubKeyJWKToMap(key PublicKeyJWK) map[string]string

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)

func VerificationMethodListToMapByFragment

func VerificationMethodListToMapByFragment(vms []*VerificationMethod) map[string]VerificationMethod

func VerifySignature

func VerifySignature(vm VerificationMethod, message []byte, signature []byte) error

Types

type CustomErrorRule

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

func HasPrefix

func HasPrefix(prefix string) *CustomErrorRule

func IsDID

func IsDID(allowedNamespaces []string) *CustomErrorRule

func IsDIDUrl

func IsDIDUrl(allowedNamespaces []string, pathRule, queryRule, fragmentRule ValidationType) *CustomErrorRule

func IsID added in v0.6.0

func IsID() *CustomErrorRule

func IsJWK

func IsJWK() *CustomErrorRule

func IsMultibase

func IsMultibase() *CustomErrorRule

func IsMultibaseEncodedEd25519PubKey

func IsMultibaseEncodedEd25519PubKey() *CustomErrorRule

func IsURI

func IsURI() *CustomErrorRule

func IsUUID added in v0.6.0

func IsUUID() *CustomErrorRule

func IsUniqueKeyValuePairListByKeyRule

func IsUniqueKeyValuePairListByKeyRule() *CustomErrorRule

func IsUniqueServiceListByIdRule

func IsUniqueServiceListByIdRule() *CustomErrorRule

func IsUniqueSignInfoListByIdRule

func IsUniqueSignInfoListByIdRule() *CustomErrorRule

func IsUniqueSignInfoListRule

func IsUniqueSignInfoListRule() *CustomErrorRule

func IsUniqueStrList

func IsUniqueStrList() *CustomErrorRule

func IsUniqueVerificationMethodListByIdRule

func IsUniqueVerificationMethodListByIdRule() *CustomErrorRule

func NewCustomErrorRule

func NewCustomErrorRule(fn func(value interface{}) error) *CustomErrorRule

func ValidMsgCreateDidPayloadRule

func ValidMsgCreateDidPayloadRule(allowedNamespaces []string) *CustomErrorRule

func ValidMsgUpdateDidPayloadRule

func ValidMsgUpdateDidPayloadRule(allowedNamespaces []string) *CustomErrorRule

func ValidServiceRule

func ValidServiceRule(baseDid string, allowedNamespaces []string) *CustomErrorRule

func ValidSignInfoRule

func ValidSignInfoRule(allowedNamespaces []string) *CustomErrorRule

func ValidVerificationMethodRule

func ValidVerificationMethodRule(baseDid string, allowedNamespaces []string) *CustomErrorRule

func (CustomErrorRule) Validate

func (c CustomErrorRule) Validate(value interface{}) error

type Did

type Did 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"`
	Controller           []string              `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"`
	VerificationMethod   []*VerificationMethod `protobuf:"bytes,4,rep,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"`
	Authentication       []string              `protobuf:"bytes,5,rep,name=authentication,proto3" json:"authentication,omitempty"`
	AssertionMethod      []string              `protobuf:"bytes,6,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"`
	CapabilityInvocation []string              `protobuf:"bytes,7,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"`
	CapabilityDelegation []string              `protobuf:"bytes,8,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"`
	KeyAgreement         []string              `protobuf:"bytes,9,rep,name=key_agreement,json=keyAgreement,proto3" json:"key_agreement,omitempty"`
	Service              []*Service            `protobuf:"bytes,10,rep,name=service,proto3" json:"service,omitempty"`
	AlsoKnownAs          []string              `protobuf:"bytes,11,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"`
}

func NewDid

func NewDid(context []string, id string, controller []string, verificationMethod []*VerificationMethod,
	authentication []string, assertionMethod []string, capabilityInvocation []string, capabilityDelegation []string,
	keyAgreement []string, service []*Service, alsoKnownAs []string,
) *Did

func (*Did) AllControllerDids

func (did *Did) AllControllerDids() []string

AllControllerDids returns controller DIDs used in both did.controllers and did.verification_method.controller

func (*Did) Descriptor

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

func (*Did) GetAlsoKnownAs

func (m *Did) GetAlsoKnownAs() []string

func (*Did) GetAssertionMethod

func (m *Did) GetAssertionMethod() []string

func (*Did) GetAuthentication

func (m *Did) GetAuthentication() []string

func (*Did) GetCapabilityDelegation

func (m *Did) GetCapabilityDelegation() []string

func (*Did) GetCapabilityInvocation

func (m *Did) GetCapabilityInvocation() []string

func (*Did) GetContext

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

func (*Did) GetController

func (m *Did) GetController() []string

func (*Did) GetControllersOrSubject

func (did *Did) GetControllersOrSubject() []string

func (*Did) GetId

func (m *Did) GetId() string

func (*Did) GetKeyAgreement

func (m *Did) GetKeyAgreement() []string

func (*Did) GetService

func (m *Did) GetService() []*Service

func (*Did) GetVerificationMethod

func (m *Did) GetVerificationMethod() []*VerificationMethod

func (*Did) GetVerificationMethodControllers

func (did *Did) GetVerificationMethodControllers() []string

func (*Did) Marshal

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

func (*Did) MarshalTo

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

func (*Did) MarshalToSizedBuffer

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

func (*Did) ProtoMessage

func (*Did) ProtoMessage()

func (*Did) ReplaceIds

func (did *Did) ReplaceIds(old, new string)

ReplaceIds replaces ids in all controller and id fields

func (*Did) Reset

func (m *Did) Reset()

func (*Did) Size

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

func (*Did) String

func (m *Did) String() string

func (*Did) Unmarshal

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

func (Did) Validate

func (did Did) Validate(allowedNamespaces []string) error

func (*Did) XXX_DiscardUnknown

func (m *Did) XXX_DiscardUnknown()

func (*Did) XXX_Marshal

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

func (*Did) XXX_Merge

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

func (*Did) XXX_Size

func (m *Did) XXX_Size() int

func (*Did) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	DidNamespace string        `protobuf:"bytes,1,opt,name=did_namespace,json=didNamespace,proto3" json:"did_namespace,omitempty"`
	DidList      []*StateValue `protobuf:"bytes,2,rep,name=didList,proto3" json:"didList,omitempty"`
}

GenesisState defines the cheqd module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetDidList

func (m *GenesisState) GetDidList() []*StateValue

func (*GenesisState) GetDidNamespace

func (m *GenesisState) GetDidNamespace() string

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type IdentityMsg

type IdentityMsg interface {
	GetSignBytes() []byte
}

type KeyValuePair

type KeyValuePair struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*KeyValuePair) Descriptor

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

func (*KeyValuePair) GetKey

func (m *KeyValuePair) GetKey() string

func (*KeyValuePair) GetValue

func (m *KeyValuePair) GetValue() string

func (*KeyValuePair) Marshal

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

func (*KeyValuePair) MarshalTo

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

func (*KeyValuePair) MarshalToSizedBuffer

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

func (*KeyValuePair) ProtoMessage

func (*KeyValuePair) ProtoMessage()

func (*KeyValuePair) Reset

func (m *KeyValuePair) Reset()

func (*KeyValuePair) Size

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

func (*KeyValuePair) String

func (m *KeyValuePair) String() string

func (*KeyValuePair) Unmarshal

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

func (KeyValuePair) Validate

func (p KeyValuePair) Validate() error

func (*KeyValuePair) XXX_DiscardUnknown

func (m *KeyValuePair) XXX_DiscardUnknown()

func (*KeyValuePair) XXX_Marshal

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

func (*KeyValuePair) XXX_Merge

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

func (*KeyValuePair) XXX_Size

func (m *KeyValuePair) XXX_Size() int

func (*KeyValuePair) XXX_Unmarshal

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

type Metadata

type Metadata struct {
	Created     string   `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`
	Updated     string   `protobuf:"bytes,2,opt,name=updated,proto3" json:"updated,omitempty"`
	Deactivated bool     `protobuf:"varint,3,opt,name=deactivated,proto3" json:"deactivated,omitempty"`
	VersionId   string   `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"`
	Resources   []string `protobuf:"bytes,5,rep,name=resources,proto3" json:"resources,omitempty"`
}

metadata

func NewMetadataFromContext

func NewMetadataFromContext(ctx sdk.Context) Metadata

func (*Metadata) Descriptor

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

func (*Metadata) GetCreated

func (m *Metadata) GetCreated() string

func (*Metadata) GetDeactivated

func (m *Metadata) GetDeactivated() bool

func (*Metadata) GetResources added in v0.6.0

func (m *Metadata) GetResources() []string

func (*Metadata) GetUpdated

func (m *Metadata) GetUpdated() string

func (*Metadata) GetVersionId

func (m *Metadata) GetVersionId() string

func (*Metadata) Marshal

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

func (*Metadata) MarshalTo

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

func (*Metadata) MarshalToSizedBuffer

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

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) Size

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

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) Unmarshal

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

func (*Metadata) Update

func (m *Metadata) Update(ctx sdk.Context)

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

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

func (*Metadata) XXX_Merge

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

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	CreateDid(ctx context.Context, in *MsgCreateDid, opts ...grpc.CallOption) (*MsgCreateDidResponse, error)
	UpdateDid(ctx context.Context, in *MsgUpdateDid, opts ...grpc.CallOption) (*MsgUpdateDidResponse, 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 MsgCreateDid

type MsgCreateDid struct {
	Payload    *MsgCreateDidPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Signatures []*SignInfo          `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

this line is used by starport scaffolding # proto/tx/message

func NewMsgCreateDid

func NewMsgCreateDid(payload *MsgCreateDidPayload, signatures []*SignInfo) *MsgCreateDid

func (*MsgCreateDid) Descriptor

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

func (*MsgCreateDid) GetPayload

func (m *MsgCreateDid) GetPayload() *MsgCreateDidPayload

func (*MsgCreateDid) GetSignBytes

func (msg *MsgCreateDid) GetSignBytes() []byte

func (*MsgCreateDid) GetSignatures

func (m *MsgCreateDid) GetSignatures() []*SignInfo

func (*MsgCreateDid) GetSigners

func (msg *MsgCreateDid) GetSigners() []sdk.AccAddress

func (*MsgCreateDid) Marshal

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

func (*MsgCreateDid) MarshalTo

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

func (*MsgCreateDid) MarshalToSizedBuffer

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

func (*MsgCreateDid) ProtoMessage

func (*MsgCreateDid) ProtoMessage()

func (*MsgCreateDid) Reset

func (m *MsgCreateDid) Reset()

func (*MsgCreateDid) Route

func (msg *MsgCreateDid) Route() string

func (*MsgCreateDid) Size

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

func (*MsgCreateDid) String

func (m *MsgCreateDid) String() string

func (*MsgCreateDid) Type

func (msg *MsgCreateDid) Type() string

func (*MsgCreateDid) Unmarshal

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

func (MsgCreateDid) Validate

func (msg MsgCreateDid) Validate(allowedNamespaces []string) error

func (*MsgCreateDid) ValidateBasic

func (msg *MsgCreateDid) ValidateBasic() error

func (*MsgCreateDid) XXX_DiscardUnknown

func (m *MsgCreateDid) XXX_DiscardUnknown()

func (*MsgCreateDid) XXX_Marshal

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

func (*MsgCreateDid) XXX_Merge

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

func (*MsgCreateDid) XXX_Size

func (m *MsgCreateDid) XXX_Size() int

func (*MsgCreateDid) XXX_Unmarshal

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

type MsgCreateDidPayload

type MsgCreateDidPayload 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"`
	Controller           []string              `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"`
	VerificationMethod   []*VerificationMethod `protobuf:"bytes,4,rep,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"`
	Authentication       []string              `protobuf:"bytes,5,rep,name=authentication,proto3" json:"authentication,omitempty"`
	AssertionMethod      []string              `protobuf:"bytes,6,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"`
	CapabilityInvocation []string              `protobuf:"bytes,7,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"`
	CapabilityDelegation []string              `protobuf:"bytes,8,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"`
	KeyAgreement         []string              `protobuf:"bytes,9,rep,name=key_agreement,json=keyAgreement,proto3" json:"key_agreement,omitempty"`
	AlsoKnownAs          []string              `protobuf:"bytes,10,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"`
	Service              []*Service            `protobuf:"bytes,11,rep,name=service,proto3" json:"service,omitempty"`
}

func (*MsgCreateDidPayload) Descriptor

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

func (*MsgCreateDidPayload) GetAlsoKnownAs

func (m *MsgCreateDidPayload) GetAlsoKnownAs() []string

func (*MsgCreateDidPayload) GetAssertionMethod

func (m *MsgCreateDidPayload) GetAssertionMethod() []string

func (*MsgCreateDidPayload) GetAuthentication

func (m *MsgCreateDidPayload) GetAuthentication() []string

func (*MsgCreateDidPayload) GetCapabilityDelegation

func (m *MsgCreateDidPayload) GetCapabilityDelegation() []string

func (*MsgCreateDidPayload) GetCapabilityInvocation

func (m *MsgCreateDidPayload) GetCapabilityInvocation() []string

func (*MsgCreateDidPayload) GetContext

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

func (*MsgCreateDidPayload) GetController

func (m *MsgCreateDidPayload) GetController() []string

func (*MsgCreateDidPayload) GetId

func (m *MsgCreateDidPayload) GetId() string

func (*MsgCreateDidPayload) GetKeyAgreement

func (m *MsgCreateDidPayload) GetKeyAgreement() []string

func (*MsgCreateDidPayload) GetService

func (m *MsgCreateDidPayload) GetService() []*Service

func (*MsgCreateDidPayload) GetSignBytes

func (msg *MsgCreateDidPayload) GetSignBytes() []byte

func (*MsgCreateDidPayload) GetVerificationMethod

func (m *MsgCreateDidPayload) GetVerificationMethod() []*VerificationMethod

func (*MsgCreateDidPayload) Marshal

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

func (*MsgCreateDidPayload) MarshalTo

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

func (*MsgCreateDidPayload) MarshalToSizedBuffer

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

func (*MsgCreateDidPayload) ProtoMessage

func (*MsgCreateDidPayload) ProtoMessage()

func (*MsgCreateDidPayload) Reset

func (m *MsgCreateDidPayload) Reset()

func (*MsgCreateDidPayload) Size

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

func (*MsgCreateDidPayload) String

func (m *MsgCreateDidPayload) String() string

func (*MsgCreateDidPayload) ToDid

func (msg *MsgCreateDidPayload) ToDid() Did

func (*MsgCreateDidPayload) Unmarshal

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

func (MsgCreateDidPayload) Validate

func (msg MsgCreateDidPayload) Validate(allowedNamespaces []string) error

func (*MsgCreateDidPayload) XXX_DiscardUnknown

func (m *MsgCreateDidPayload) XXX_DiscardUnknown()

func (*MsgCreateDidPayload) XXX_Marshal

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

func (*MsgCreateDidPayload) XXX_Merge

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

func (*MsgCreateDidPayload) XXX_Size

func (m *MsgCreateDidPayload) XXX_Size() int

func (*MsgCreateDidPayload) XXX_Unmarshal

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

type MsgCreateDidResponse

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

func (*MsgCreateDidResponse) Descriptor

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

func (*MsgCreateDidResponse) GetId

func (m *MsgCreateDidResponse) GetId() string

func (*MsgCreateDidResponse) Marshal

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

func (*MsgCreateDidResponse) MarshalTo

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

func (*MsgCreateDidResponse) MarshalToSizedBuffer

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

func (*MsgCreateDidResponse) ProtoMessage

func (*MsgCreateDidResponse) ProtoMessage()

func (*MsgCreateDidResponse) Reset

func (m *MsgCreateDidResponse) Reset()

func (*MsgCreateDidResponse) Size

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

func (*MsgCreateDidResponse) String

func (m *MsgCreateDidResponse) String() string

func (*MsgCreateDidResponse) Unmarshal

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

func (*MsgCreateDidResponse) XXX_DiscardUnknown

func (m *MsgCreateDidResponse) XXX_DiscardUnknown()

func (*MsgCreateDidResponse) XXX_Marshal

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

func (*MsgCreateDidResponse) XXX_Merge

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

func (*MsgCreateDidResponse) XXX_Size

func (m *MsgCreateDidResponse) XXX_Size() int

func (*MsgCreateDidResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	CreateDid(context.Context, *MsgCreateDid) (*MsgCreateDidResponse, error)
	UpdateDid(context.Context, *MsgUpdateDid) (*MsgUpdateDidResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateDid

type MsgUpdateDid struct {
	Payload    *MsgUpdateDidPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Signatures []*SignInfo          `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

func NewMsgUpdateDid

func NewMsgUpdateDid(payload *MsgUpdateDidPayload, signatures []*SignInfo) *MsgUpdateDid

func (*MsgUpdateDid) Descriptor

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

func (*MsgUpdateDid) GetPayload

func (m *MsgUpdateDid) GetPayload() *MsgUpdateDidPayload

func (*MsgUpdateDid) GetSignBytes

func (msg *MsgUpdateDid) GetSignBytes() []byte

func (*MsgUpdateDid) GetSignatures

func (m *MsgUpdateDid) GetSignatures() []*SignInfo

func (*MsgUpdateDid) GetSigners

func (msg *MsgUpdateDid) GetSigners() []sdk.AccAddress

func (*MsgUpdateDid) Marshal

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

func (*MsgUpdateDid) MarshalTo

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

func (*MsgUpdateDid) MarshalToSizedBuffer

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

func (*MsgUpdateDid) ProtoMessage

func (*MsgUpdateDid) ProtoMessage()

func (*MsgUpdateDid) Reset

func (m *MsgUpdateDid) Reset()

func (*MsgUpdateDid) Route

func (msg *MsgUpdateDid) Route() string

func (*MsgUpdateDid) Size

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

func (*MsgUpdateDid) String

func (m *MsgUpdateDid) String() string

func (*MsgUpdateDid) Type

func (msg *MsgUpdateDid) Type() string

func (*MsgUpdateDid) Unmarshal

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

func (MsgUpdateDid) Validate

func (msg MsgUpdateDid) Validate(allowedNamespaces []string) error

func (*MsgUpdateDid) ValidateBasic

func (msg *MsgUpdateDid) ValidateBasic() error

func (*MsgUpdateDid) XXX_DiscardUnknown

func (m *MsgUpdateDid) XXX_DiscardUnknown()

func (*MsgUpdateDid) XXX_Marshal

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

func (*MsgUpdateDid) XXX_Merge

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

func (*MsgUpdateDid) XXX_Size

func (m *MsgUpdateDid) XXX_Size() int

func (*MsgUpdateDid) XXX_Unmarshal

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

type MsgUpdateDidPayload

type MsgUpdateDidPayload 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"`
	Controller           []string              `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"`
	VerificationMethod   []*VerificationMethod `protobuf:"bytes,4,rep,name=verification_method,json=verificationMethod,proto3" json:"verification_method,omitempty"`
	Authentication       []string              `protobuf:"bytes,5,rep,name=authentication,proto3" json:"authentication,omitempty"`
	AssertionMethod      []string              `protobuf:"bytes,6,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"`
	CapabilityInvocation []string              `protobuf:"bytes,7,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"`
	CapabilityDelegation []string              `protobuf:"bytes,8,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"`
	KeyAgreement         []string              `protobuf:"bytes,9,rep,name=key_agreement,json=keyAgreement,proto3" json:"key_agreement,omitempty"`
	AlsoKnownAs          []string              `protobuf:"bytes,10,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"`
	Service              []*Service            `protobuf:"bytes,11,rep,name=service,proto3" json:"service,omitempty"`
	VersionId            string                `protobuf:"bytes,12,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"`
}

func (*MsgUpdateDidPayload) Descriptor

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

func (*MsgUpdateDidPayload) GetAlsoKnownAs

func (m *MsgUpdateDidPayload) GetAlsoKnownAs() []string

func (*MsgUpdateDidPayload) GetAssertionMethod

func (m *MsgUpdateDidPayload) GetAssertionMethod() []string

func (*MsgUpdateDidPayload) GetAuthentication

func (m *MsgUpdateDidPayload) GetAuthentication() []string

func (*MsgUpdateDidPayload) GetCapabilityDelegation

func (m *MsgUpdateDidPayload) GetCapabilityDelegation() []string

func (*MsgUpdateDidPayload) GetCapabilityInvocation

func (m *MsgUpdateDidPayload) GetCapabilityInvocation() []string

func (*MsgUpdateDidPayload) GetContext

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

func (*MsgUpdateDidPayload) GetController

func (m *MsgUpdateDidPayload) GetController() []string

func (*MsgUpdateDidPayload) GetId

func (m *MsgUpdateDidPayload) GetId() string

func (*MsgUpdateDidPayload) GetKeyAgreement

func (m *MsgUpdateDidPayload) GetKeyAgreement() []string

func (*MsgUpdateDidPayload) GetService

func (m *MsgUpdateDidPayload) GetService() []*Service

func (*MsgUpdateDidPayload) GetSignBytes

func (msg *MsgUpdateDidPayload) GetSignBytes() []byte

func (*MsgUpdateDidPayload) GetVerificationMethod

func (m *MsgUpdateDidPayload) GetVerificationMethod() []*VerificationMethod

func (*MsgUpdateDidPayload) GetVersionId

func (m *MsgUpdateDidPayload) GetVersionId() string

func (*MsgUpdateDidPayload) Marshal

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

func (*MsgUpdateDidPayload) MarshalTo

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

func (*MsgUpdateDidPayload) MarshalToSizedBuffer

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

func (*MsgUpdateDidPayload) ProtoMessage

func (*MsgUpdateDidPayload) ProtoMessage()

func (*MsgUpdateDidPayload) Reset

func (m *MsgUpdateDidPayload) Reset()

func (*MsgUpdateDidPayload) Size

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

func (*MsgUpdateDidPayload) String

func (m *MsgUpdateDidPayload) String() string

func (*MsgUpdateDidPayload) ToDid

func (msg *MsgUpdateDidPayload) ToDid() Did

func (*MsgUpdateDidPayload) Unmarshal

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

func (MsgUpdateDidPayload) Validate

func (msg MsgUpdateDidPayload) Validate(allowedNamespaces []string) error

func (*MsgUpdateDidPayload) XXX_DiscardUnknown

func (m *MsgUpdateDidPayload) XXX_DiscardUnknown()

func (*MsgUpdateDidPayload) XXX_Marshal

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

func (*MsgUpdateDidPayload) XXX_Merge

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

func (*MsgUpdateDidPayload) XXX_Size

func (m *MsgUpdateDidPayload) XXX_Size() int

func (*MsgUpdateDidPayload) XXX_Unmarshal

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

type MsgUpdateDidResponse

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

func (*MsgUpdateDidResponse) Descriptor

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

func (*MsgUpdateDidResponse) GetId

func (m *MsgUpdateDidResponse) GetId() string

func (*MsgUpdateDidResponse) Marshal

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

func (*MsgUpdateDidResponse) MarshalTo

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

func (*MsgUpdateDidResponse) MarshalToSizedBuffer

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

func (*MsgUpdateDidResponse) ProtoMessage

func (*MsgUpdateDidResponse) ProtoMessage()

func (*MsgUpdateDidResponse) Reset

func (m *MsgUpdateDidResponse) Reset()

func (*MsgUpdateDidResponse) Size

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

func (*MsgUpdateDidResponse) String

func (m *MsgUpdateDidResponse) String() string

func (*MsgUpdateDidResponse) Unmarshal

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

func (*MsgUpdateDidResponse) XXX_DiscardUnknown

func (m *MsgUpdateDidResponse) XXX_DiscardUnknown()

func (*MsgUpdateDidResponse) XXX_Marshal

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

func (*MsgUpdateDidResponse) XXX_Merge

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

func (*MsgUpdateDidResponse) XXX_Size

func (m *MsgUpdateDidResponse) XXX_Size() int

func (*MsgUpdateDidResponse) XXX_Unmarshal

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

type PublicKeyJWK

type PublicKeyJWK []*KeyValuePair

func JSONToPubKeyJWK

func JSONToPubKeyJWK(jsonStr string) PublicKeyJWK

type QueryClient

type QueryClient interface {
	Did(ctx context.Context, in *QueryGetDidRequest, opts ...grpc.CallOption) (*QueryGetDidResponse, 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 QueryGetDidRequest

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

func (*QueryGetDidRequest) Descriptor

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

func (*QueryGetDidRequest) GetId

func (m *QueryGetDidRequest) GetId() string

func (*QueryGetDidRequest) Marshal

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

func (*QueryGetDidRequest) MarshalTo

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

func (*QueryGetDidRequest) MarshalToSizedBuffer

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

func (*QueryGetDidRequest) ProtoMessage

func (*QueryGetDidRequest) ProtoMessage()

func (*QueryGetDidRequest) Reset

func (m *QueryGetDidRequest) Reset()

func (*QueryGetDidRequest) Size

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

func (*QueryGetDidRequest) String

func (m *QueryGetDidRequest) String() string

func (*QueryGetDidRequest) Unmarshal

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

func (*QueryGetDidRequest) XXX_DiscardUnknown

func (m *QueryGetDidRequest) XXX_DiscardUnknown()

func (*QueryGetDidRequest) XXX_Marshal

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

func (*QueryGetDidRequest) XXX_Merge

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

func (*QueryGetDidRequest) XXX_Size

func (m *QueryGetDidRequest) XXX_Size() int

func (*QueryGetDidRequest) XXX_Unmarshal

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

type QueryGetDidResponse

type QueryGetDidResponse struct {
	Did      *Did      `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
	Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

func (*QueryGetDidResponse) Descriptor

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

func (*QueryGetDidResponse) GetDid

func (m *QueryGetDidResponse) GetDid() *Did

func (*QueryGetDidResponse) GetMetadata

func (m *QueryGetDidResponse) GetMetadata() *Metadata

func (*QueryGetDidResponse) Marshal

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

func (*QueryGetDidResponse) MarshalTo

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

func (*QueryGetDidResponse) MarshalToSizedBuffer

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

func (*QueryGetDidResponse) ProtoMessage

func (*QueryGetDidResponse) ProtoMessage()

func (*QueryGetDidResponse) Reset

func (m *QueryGetDidResponse) Reset()

func (*QueryGetDidResponse) Size

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

func (*QueryGetDidResponse) String

func (m *QueryGetDidResponse) String() string

func (*QueryGetDidResponse) Unmarshal

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

func (*QueryGetDidResponse) XXX_DiscardUnknown

func (m *QueryGetDidResponse) XXX_DiscardUnknown()

func (*QueryGetDidResponse) XXX_Marshal

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

func (*QueryGetDidResponse) XXX_Merge

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

func (*QueryGetDidResponse) XXX_Size

func (m *QueryGetDidResponse) XXX_Size() int

func (*QueryGetDidResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	Did(context.Context, *QueryGetDidRequest) (*QueryGetDidResponse, error)
}

QueryServer is the server API for Query service.

type Service

type Service 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"`
	ServiceEndpoint string `protobuf:"bytes,3,opt,name=service_endpoint,json=serviceEndpoint,proto3" json:"service_endpoint,omitempty"`
}

func NewService

func NewService(id string, type_ string, serviceEndpoint string) *Service

func (*Service) Descriptor

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

func (*Service) GetId

func (m *Service) GetId() string

func (*Service) GetServiceEndpoint

func (m *Service) GetServiceEndpoint() string

func (*Service) GetType

func (m *Service) GetType() string

func (*Service) Marshal

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

func (*Service) MarshalTo

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

func (*Service) MarshalToSizedBuffer

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

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) Size

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

func (*Service) String

func (m *Service) String() string

func (*Service) Unmarshal

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

func (Service) Validate

func (s Service) Validate(baseDid string, allowedNamespaces []string) error

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

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

func (*Service) XXX_Merge

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

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

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

type SignInfo

type SignInfo struct {
	VerificationMethodId string `protobuf:"bytes,1,opt,name=verification_method_id,json=verificationMethodId,proto3" json:"verification_method_id,omitempty"`
	Signature            string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}

func FindSignInfoBySigner

func FindSignInfoBySigner(infos []*SignInfo, signer string) (info SignInfo, found bool)

FindSignInfoBySigner returns the first sign info that corresponds to the provided signer's did

func FindSignInfosBySigner

func FindSignInfosBySigner(infos []*SignInfo, signer string) []SignInfo

FindSignInfosBySigner returns the sign infos that corresponds to the provided signer's did

func NewSignInfo

func NewSignInfo(verificationMethodId string, signature string) *SignInfo

func (*SignInfo) Descriptor

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

func (*SignInfo) GetSignature

func (m *SignInfo) GetSignature() string

func (*SignInfo) GetVerificationMethodId

func (m *SignInfo) GetVerificationMethodId() string

func (*SignInfo) Marshal

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

func (*SignInfo) MarshalTo

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

func (*SignInfo) MarshalToSizedBuffer

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

func (*SignInfo) ProtoMessage

func (*SignInfo) ProtoMessage()

func (*SignInfo) Reset

func (m *SignInfo) Reset()

func (*SignInfo) Size

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

func (*SignInfo) String

func (m *SignInfo) String() string

func (*SignInfo) Unmarshal

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

func (SignInfo) Validate

func (si SignInfo) Validate(allowedNamespaces []string) error

func (*SignInfo) XXX_DiscardUnknown

func (m *SignInfo) XXX_DiscardUnknown()

func (*SignInfo) XXX_Marshal

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

func (*SignInfo) XXX_Merge

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

func (*SignInfo) XXX_Size

func (m *SignInfo) XXX_Size() int

func (*SignInfo) XXX_Unmarshal

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

type StateValue

type StateValue struct {
	Data     *types.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Metadata *Metadata  `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

func NewStateValue

func NewStateValue(data StateValueData, metadata *Metadata) (StateValue, error)

func (*StateValue) Descriptor

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

func (*StateValue) GetData

func (m *StateValue) GetData() *types.Any

func (*StateValue) GetMetadata

func (m *StateValue) GetMetadata() *Metadata

func (*StateValue) Marshal

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

func (*StateValue) MarshalTo

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

func (*StateValue) MarshalToSizedBuffer

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

func (*StateValue) ProtoMessage

func (*StateValue) ProtoMessage()

func (*StateValue) Reset

func (m *StateValue) Reset()

func (*StateValue) Size

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

func (*StateValue) String

func (m *StateValue) String() string

func (*StateValue) Unmarshal

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

func (StateValue) UnpackData

func (m StateValue) UnpackData() (StateValueData, error)

func (StateValue) UnpackDataAsDid

func (m StateValue) UnpackDataAsDid() (*Did, error)

func (*StateValue) UnpackInterfaces

func (m *StateValue) UnpackInterfaces(unpacker types.AnyUnpacker) error

func (*StateValue) XXX_DiscardUnknown

func (m *StateValue) XXX_DiscardUnknown()

func (*StateValue) XXX_Marshal

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

func (*StateValue) XXX_Merge

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

func (*StateValue) XXX_Size

func (m *StateValue) XXX_Size() int

func (*StateValue) XXX_Unmarshal

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

type StateValueData

type StateValueData interface {
	proto.Message
}

StateValueData is interface uniting possible types to be used for stateValue.data field

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateDid

func (*UnimplementedMsgServer) UpdateDid

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Did

type ValidationType

type ValidationType int
const (
	Optional ValidationType = iota
	Required ValidationType = iota
	Empty    ValidationType = iota
)

type VerificationMethod

type VerificationMethod 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"`
	Controller         string          `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"`
	PublicKeyJwk       []*KeyValuePair `protobuf:"bytes,4,rep,name=public_key_jwk,json=publicKeyJwk,proto3" json:"public_key_jwk,omitempty"`
	PublicKeyMultibase string          `protobuf:"bytes,5,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"`
}

func FindVerificationMethod

func FindVerificationMethod(vms []VerificationMethod, id string) (VerificationMethod, bool)

func NewVerificationMethod

func NewVerificationMethod(id string, type_ string, controller string, publicKeyJwk []*KeyValuePair, publicKeyMultibase string) *VerificationMethod

func (*VerificationMethod) Descriptor

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

func (*VerificationMethod) GetController

func (m *VerificationMethod) GetController() string

func (*VerificationMethod) GetId

func (m *VerificationMethod) GetId() string

func (*VerificationMethod) GetPublicKeyJwk

func (m *VerificationMethod) GetPublicKeyJwk() []*KeyValuePair

func (*VerificationMethod) GetPublicKeyMultibase

func (m *VerificationMethod) GetPublicKeyMultibase() string

func (*VerificationMethod) GetType

func (m *VerificationMethod) GetType() string

func (*VerificationMethod) Marshal

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

func (*VerificationMethod) MarshalTo

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

func (*VerificationMethod) MarshalToSizedBuffer

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

func (*VerificationMethod) ProtoMessage

func (*VerificationMethod) ProtoMessage()

func (*VerificationMethod) Reset

func (m *VerificationMethod) Reset()

func (*VerificationMethod) Size

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

func (*VerificationMethod) String

func (m *VerificationMethod) String() string

func (*VerificationMethod) Unmarshal

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

func (VerificationMethod) Validate

func (vm VerificationMethod) Validate(baseDid string, allowedNamespaces []string) error

func (*VerificationMethod) XXX_DiscardUnknown

func (m *VerificationMethod) XXX_DiscardUnknown()

func (*VerificationMethod) XXX_Marshal

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

func (*VerificationMethod) XXX_Merge

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

func (*VerificationMethod) XXX_Size

func (m *VerificationMethod) XXX_Size() int

func (*VerificationMethod) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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