types

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 35 Imported by: 2

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Authentication       = "authentication"       // https://www.w3.org/TR/did-core/#authentication
	AssertionMethod      = "assertionMethod"      // https://www.w3.org/TR/did-core/#assertion
	KeyAgreement         = "keyAgreement"         // https://www.w3.org/TR/did-core/#key-agreement
	CapabilityInvocation = "capabilityInvocation" // https://www.w3.org/TR/did-core/#capability-invocation
	CapabilityDelegation = "capabilityDelegation" // https://www.w3.org/TR/did-core/#capability-delegation
)

A verification relationship expresses the relationship between the DID subject and a verification method. This enum is used to cfr. https://www.w3.org/TR/did-core/#verification-relationships

View Source
const (
	AttributeValueCategory = ModuleName

	EventTypeDidDocumentCreated               = "did_document_created"
	EventTypeDidDocumentUpdated               = "did_document_updated"
	EventTypeVerificationMethodAdded          = "verification_method_added"
	EventTypeVerificationRevoked              = "verification_method_revoked"
	EventTypeVerificationRelationshipsUpdated = "verification_relationships_updated"
	EventTypeServiceAdded                     = "service_added"
	EventTypeServiceDeleted                   = "service_deleted"

	AttributeDID           = "did"
	AttributeKeyOwner      = "owner"
	AttributeKeyController = "verification_method_controller"
	AttributeKeyServiceID  = "service_id"
)

did module event types

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

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

	// DidChainPrefix defines the did prefix for this chain
	DidChainPrefix = "did:cosmos:net:"

	// DidKeyPrefix defines the did key prefix
	DidKeyPrefix = "did:cosmos:key:"

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_capability_did"
)
View Source
const (
	TypeMsgAddService = "add-service"
)

msg types

View Source
const (
	TypeMsgAddVerification = "add-verification"
)

-------------------------- ADD VERIFICATION -------------------------- msg types

View Source
const (
	TypeMsgCreateDidDocument = "create-did"
)

msg types

View Source
const (
	TypeMsgDeleteService = "delete-service"
)

msg types

View Source
const (
	TypeMsgRevokeVerification = "revoke-verification"
)

msg types

View Source
const (
	TypeMsgSetVerificationRelationships = "set-verification-relationships"
)

-------------------------- SET VERIFICATION RELATIONSHIPS -------------------------- msg types

View Source
const (
	TypeMsgUpdateDidDocument = "update-did"
)

msg types

Variables

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 (
	ErrDidDocumentNotFound        = sdkerrors.Register(ModuleName, 1100, "did document not found")
	ErrDidDocumentFound           = sdkerrors.Register(ModuleName, 1101, "did document found")
	ErrInvalidDIDFormat           = sdkerrors.Register(ModuleName, 1102, "input not compliant with the DID specifications (crf. https://www.w3.org/TR/did-core/#did-syntax)")
	ErrInvalidDIDURLFormat        = sdkerrors.Register(ModuleName, 1103, "input not compliant with the DID URL specifications (crf. https://www.w3.org/TR/did-core/#did-url-syntax)")
	ErrInvalidRFC3986UriFormat    = sdkerrors.Register(ModuleName, 1104, "input not compliant with the RFC3986 URI specifications (crf. https://datatracker.ietf.org/doc/html/rfc3986)")
	ErrEmptyRelationships         = sdkerrors.Register(ModuleName, 1105, "a verification method should have at least one verification relationship. (cfr. https://www.w3.org/TR/did-core/#verification-relationships)")
	ErrUnauthorized               = sdkerrors.Register(ModuleName, 1106, "the requester DID's verification method is not listed in the required relationship")
	ErrInvalidState               = sdkerrors.Register(ModuleName, 1107, "the requested action is not applicable on the resource")
	ErrInvalidInput               = sdkerrors.Register(ModuleName, 1108, "input is invalid")
	ErrVerificationMethodNotFound = sdkerrors.Register(ModuleName, 1109, "verification method not found")
	ErrInvalidDidMethodFormat     = sdkerrors.Register(ModuleName, 1110, "invalid did method format")
	ErrKeyFormatNotSupported      = sdkerrors.Register(ModuleName, 1111, "key format not supported")
)

x/did module sentinel errors

View Source
var (
	// DidDocumentKey prefix for each key to a DidDocument
	DidDocumentKey = []byte{0x61}
	// DidMetadataKey prefix for each key of a DidMetadata
	DidMetadataKey = []byte{0x62}
)
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 (
	// ModuleCdc codec used by the module (protobuf)
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var VerificationRelationships = map[string]VerificationRelationship{
	Authentication:       authentication,
	AssertionMethod:      assertionMethod,
	KeyAgreement:         keyAgreement,
	CapabilityInvocation: capabilityInvocation,
	CapabilityDelegation: capabilityDelegation,
}

VerificationRelationships are the supported list of verification relationships

Functions

func IsEmpty

func IsEmpty(input string) bool

IsEmpty tells if the trimmed input is empty

func IsValidDID

func IsValidDID(input string) bool

IsValidDID validate the input string according to the did specification (cfr. https://www.w3.org/TR/did-core/#did-syntax ).

func IsValidDIDDocument

func IsValidDIDDocument(didDoc *DidDocument) bool

IsValidDIDDocument tells if a DID document is valid, that is if it has the default context and a valid subject

func IsValidDIDKeyFormat

func IsValidDIDKeyFormat(did string) bool

IsValidDIDKeyFormat verify that a did is compliant with the did:cosmos:key format that is the ID must be a bech32 address no longer than 255 bytes

func IsValidDIDMetadata

func IsValidDIDMetadata(didMeta *DidMetadata) bool

IsValidDIDMetadata tells if a DID metadata is valid, that is if it has a non empty versionId and a non-zero create date

func IsValidDIDURL

func IsValidDIDURL(input string) bool

IsValidDIDURL validate the input string according to the did url specification (cfr. https://www.w3.org/TR/did-core/#did-url-syntax ).

func IsValidRFC3986Uri

func IsValidRFC3986Uri(input string) bool

IsValidRFC3986Uri checks if the input string is a valid RFC3986 URI (cfr https://datatracker.ietf.org/doc/html/rfc3986#page-50)

func NewDidDocumentCreatedEvent

func NewDidDocumentCreatedEvent(owner string) sdk.Event

NewDidDocumentCreatedEvent constructs a new did_created sdk.Event

func NewDidDocumentUpdatedEvent

func NewDidDocumentUpdatedEvent(did string, controllers ...string) sdk.Event

NewDidDocumentUpdatedEvent constructs a new did_created sdk.Event XXX: does it make sense ? cc @paddy

func NewServiceAddedEvent

func NewServiceAddedEvent(owner string, serviceID string) sdk.Event

NewServiceAddedEvent constructs a new service_added sdk.Event

func NewServiceDeletedEvent

func NewServiceDeletedEvent(owner string, serviceID string) sdk.Event

NewServiceDeletedEvent constructs a new service_deleted sdk.Event

func NewVerificationAddedEvent

func NewVerificationAddedEvent(owner string, controller string) sdk.Event

NewVerificationAddedEvent constructs a new authentication_added sdk.Event

func NewVerificationRelationshipsUpdatedEvent

func NewVerificationRelationshipsUpdatedEvent(owner string, methodID string) sdk.Event

NewVerificationRelationshipsUpdatedEvent constructs a new relationships updated sdk.Event

func NewVerificationRevokedEvent

func NewVerificationRevokedEvent(owner string, controller string) sdk.Event

NewVerificationRevokedEvent constructs a new authentication_deleted sdk.Event

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

nolint

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgHandler

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

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

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

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

func RegisterMsgHandlerFromEndpoint

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

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

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 RegisterMsgHandlerFromEndpoint instead.

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 ResolveAccountDID

func ResolveAccountDID(did, chainID string) (didDoc DidDocument, didMeta DidMetadata, err error)

ResolveAccountDID generates a DID document from an address

func UpdateDidMetadata

func UpdateDidMetadata(meta *DidMetadata, versionData []byte, updated time.Time)

UpdateDidMetadata updates a DID metadata time and version id

func ValidateService

func ValidateService(s *Service) (err error)

ValidateService performs basic on a service struct

func ValidateVerification

func ValidateVerification(v *Verification, allowedControllers ...string) (err error)

ValidateVerification perform basic validation on a verification struct optionally validating the validation method controller against a list of allowed controllers. in case of error returns an cosmos-sdk wrapped error XXX: this pattern creates a ambiguous semantic (but maybe is not too severe (use WithCredentials and array of credentials))

Types

type BlockchainAccountID

type BlockchainAccountID string

BlockchainAccountID formats an account address as per the CAIP-10 Account ID specification. https://w3c.github.io/did-spec-registries/#blockchainaccountid https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md

func NewBlockchainAccountID

func NewBlockchainAccountID(chainID, account string) BlockchainAccountID

NewBlockchainAccountID build a new blockchain account ID struct

func (BlockchainAccountID) EncodeToString

func (baID BlockchainAccountID) EncodeToString() string

EncodeToString returns the string representation of a blockchain account id

func (BlockchainAccountID) GetAddress

func (baID BlockchainAccountID) GetAddress() string

GetAddress get the address from a blockchain account id

func (BlockchainAccountID) MatchAddress

func (baID BlockchainAccountID) MatchAddress(address string) bool

MatchAddress check if a blockchain id address matches another address the match ignore the chain ID

func (BlockchainAccountID) Type

Type returns the string representation of a blockchain account id

type DID

type DID string

DID identifies ad did string

func NewChainDID

func NewChainDID(chainName, didID string) DID

NewChainDID format a DID from a method specific did cfr.https://www.w3.org/TR/did-core/#did

func NewKeyDID

func NewKeyDID(account string) DID

NewKeyDID format a DID of type key

func (DID) NewVerificationMethodID

func (did DID) NewVerificationMethodID(vmID string) string

NewVerificationMethodID compose a verification method id from an account address

func (DID) String

func (did DID) String() string

String return the string representation of the did

type DidDocument

type DidDocument struct {
	// @context is spec for did document.
	Context []string `protobuf:"bytes,1,rep,name=context,proto3" json:"@context,omitempty"`
	// id represents the id for the did document.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// A DID controller is an entity that is authorized to make changes to a DID document.
	// cfr. https://www.w3.org/TR/did-core/#did-controller
	Controller []string `protobuf:"bytes,3,rep,name=controller,proto3" json:"controller,omitempty"`
	// A DID document can express verification methods,
	// such as cryptographic public keys, which can be used
	// to authenticate or authorize interactions with the DID subject or associated parties.
	// https://www.w3.org/TR/did-core/#verification-methods
	VerificationMethod []*VerificationMethod `protobuf:"bytes,4,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"`
	// Services are used in DID documents to express ways of communicating
	// with the DID subject or associated entities.
	// https://www.w3.org/TR/did-core/#services
	Service []*Service `protobuf:"bytes,5,rep,name=service,proto3" json:"service,omitempty"`
	// Authentication represents public key associated with the did document.
	// cfr. https://www.w3.org/TR/did-core/#authentication
	Authentication []string `protobuf:"bytes,6,rep,name=authentication,proto3" json:"authentication,omitempty"`
	// Used to specify how the DID subject is expected to express claims,
	// such as for the purposes of issuing a Verifiable Credential.
	// cfr. https://www.w3.org/TR/did-core/#assertion
	AssertionMethod []string `protobuf:"bytes,7,rep,name=assertionMethod,proto3" json:"assertionMethod,omitempty"`
	// used to specify how an entity can generate encryption material
	// in order to transmit confidential information intended for the DID subject.
	// https://www.w3.org/TR/did-core/#key-agreement
	KeyAgreement []string `protobuf:"bytes,8,rep,name=keyAgreement,proto3" json:"keyAgreement,omitempty"`
	// Used to specify a verification method that might be used by the DID subject
	// to invoke a cryptographic capability, such as the authorization
	// to update the DID Document.
	// https://www.w3.org/TR/did-core/#capability-invocation
	CapabilityInvocation []string `protobuf:"bytes,9,rep,name=capabilityInvocation,proto3" json:"capabilityInvocation,omitempty"`
	// Used to specify a mechanism that might be used by the DID subject
	// to delegate a cryptographic capability to another party.
	// https://www.w3.org/TR/did-core/#capability-delegation
	CapabilityDelegation []string `protobuf:"bytes,10,rep,name=capabilityDelegation,proto3" json:"capabilityDelegation,omitempty"`
}

DidDocument represents a dencentralised identifer.

func NewDidDocument

func NewDidDocument(id string, options ...DidDocumentOption) (did DidDocument, err error)

NewDidDocument constructs a new DidDocument

func (*DidDocument) AddServices

func (didDoc *DidDocument) AddServices(services ...*Service) (err error)

AddServices add services to a did document

func (*DidDocument) AddVerifications

func (didDoc *DidDocument) AddVerifications(verifications ...*Verification) (err error)

AddVerifications add one or more verification method and relations to a did document

func (*DidDocument) DeleteService

func (didDoc *DidDocument) DeleteService(serviceID string)

DeleteService delete an existing service from a did document

func (*DidDocument) Descriptor

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

func (*DidDocument) Equal

func (this *DidDocument) Equal(that interface{}) bool

func (DidDocument) GetBytes

func (didDoc DidDocument) GetBytes() []byte

GetBytes is a helper for serializing

func (DidDocument) GetVerificationMethodBlockchainAddress

func (didDoc DidDocument) GetVerificationMethodBlockchainAddress(methodID string) (address string, err error)

GetVerificationMethodBlockchainAddress returns the verification method cosmos blockchain address of a verification method. it fails if the verification method is not supported or if the verification method is not found

func (DidDocument) GetVerificationRelationships

func (didDoc DidDocument) GetVerificationRelationships(methodID string) []string

GetVerificationRelationships returns the relationships associated with the verification method id.

func (DidDocument) HasPublicKey

func (didDoc DidDocument) HasPublicKey(pubkey cryptotypes.PubKey) bool

HasPublicKey validates if a public key is contained in a DidDocument

func (DidDocument) HasRelationship

func (didDoc DidDocument) HasRelationship(
	signer BlockchainAccountID,
	relationships ...string,
) bool

HasRelationship verifies if a controller did exist for at least one of the relationships in the did document

func (*DidDocument) Marshal

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

func (*DidDocument) MarshalTo

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

func (*DidDocument) MarshalToSizedBuffer

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

func (*DidDocument) ProtoMessage

func (*DidDocument) ProtoMessage()

func (*DidDocument) Reset

func (m *DidDocument) Reset()

func (*DidDocument) RevokeVerification

func (didDoc *DidDocument) RevokeVerification(methodID string) error

RevokeVerification revoke a verification method and all relationships associated with it

func (*DidDocument) SetControllers

func (didDoc *DidDocument) SetControllers(controllers ...string) error

SetControllers replace the controllers in the did document

func (*DidDocument) SetVerificationRelationships

func (didDoc *DidDocument) SetVerificationRelationships(methodID string, relationships ...string) error

SetVerificationRelationships for a did document

func (*DidDocument) Size

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

func (*DidDocument) String

func (m *DidDocument) String() string

func (*DidDocument) Unmarshal

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

func (*DidDocument) XXX_DiscardUnknown

func (m *DidDocument) XXX_DiscardUnknown()

func (*DidDocument) XXX_Marshal

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

func (*DidDocument) XXX_Merge

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

func (*DidDocument) XXX_Size

func (m *DidDocument) XXX_Size() int

func (*DidDocument) XXX_Unmarshal

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

type DidDocumentOption

type DidDocumentOption func(*DidDocument) error

DidDocumentOption implements variadic pattern for optional did document fields

func WithControllers

func WithControllers(controllers ...string) DidDocumentOption

WithControllers add optional did controller

func WithServices

func WithServices(services ...*Service) DidDocumentOption

WithServices add optional services

func WithVerifications

func WithVerifications(verifications ...*Verification) DidDocumentOption

WithVerifications add optional verifications

type DidMetadata

type DidMetadata struct {
	VersionId   string     `protobuf:"bytes,1,opt,name=versionId,proto3" json:"versionId,omitempty"`
	Created     *time.Time `protobuf:"bytes,2,opt,name=created,proto3,stdtime" json:"created,omitempty"`
	Updated     *time.Time `protobuf:"bytes,3,opt,name=updated,proto3,stdtime" json:"updated,omitempty"`
	Deactivated bool       `protobuf:"varint,4,opt,name=deactivated,proto3" json:"deactivated,omitempty"`
}

DidMetadata defines metadata associated to a did document such as the status of the DID document

func NewDidMetadata

func NewDidMetadata(versionData []byte, created time.Time) DidMetadata

NewDidMetadata returns a DidMetadata strcut that has equals created and updated date, and with deactivated field set to false

func (*DidMetadata) Descriptor

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

func (*DidMetadata) Equal

func (this *DidMetadata) Equal(that interface{}) bool

func (*DidMetadata) Marshal

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

func (*DidMetadata) MarshalTo

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

func (*DidMetadata) MarshalToSizedBuffer

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

func (*DidMetadata) ProtoMessage

func (*DidMetadata) ProtoMessage()

func (*DidMetadata) Reset

func (m *DidMetadata) Reset()

func (*DidMetadata) Size

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

func (*DidMetadata) String

func (m *DidMetadata) String() string

func (*DidMetadata) Unmarshal

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

func (*DidMetadata) XXX_DiscardUnknown

func (m *DidMetadata) XXX_DiscardUnknown()

func (*DidMetadata) XXX_Marshal

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

func (*DidMetadata) XXX_Merge

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

func (*DidMetadata) XXX_Size

func (m *DidMetadata) XXX_Size() int

func (*DidMetadata) XXX_Unmarshal

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

type MsgAddService

type MsgAddService struct {
	Id          string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ServiceData *Service `protobuf:"bytes,2,opt,name=service_data,json=serviceData,proto3" json:"service_data,omitempty"`
	Signer      string   `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgAddService

func NewMsgAddService(
	id string,
	service *Service,
	signerAccount string,
) *MsgAddService

NewMsgAddService creates a new MsgAddService instance

func (*MsgAddService) Descriptor

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

func (MsgAddService) GetSignBytes

func (msg MsgAddService) GetSignBytes() []byte

func (MsgAddService) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgAddService) Marshal

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

func (*MsgAddService) MarshalTo

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

func (*MsgAddService) MarshalToSizedBuffer

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

func (*MsgAddService) ProtoMessage

func (*MsgAddService) ProtoMessage()

func (*MsgAddService) Reset

func (m *MsgAddService) Reset()

func (MsgAddService) Route

func (MsgAddService) Route() string

Route implements sdk.Msg

func (*MsgAddService) Size

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

func (*MsgAddService) String

func (m *MsgAddService) String() string

func (MsgAddService) Type

func (MsgAddService) Type() string

Type implements sdk.Msg

func (*MsgAddService) Unmarshal

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

func (MsgAddService) ValidateBasic

func (msg MsgAddService) ValidateBasic() error

ValidateBasic performs a basic check of the MsgAddService fields.

func (*MsgAddService) XXX_DiscardUnknown

func (m *MsgAddService) XXX_DiscardUnknown()

func (*MsgAddService) XXX_Marshal

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

func (*MsgAddService) XXX_Merge

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

func (*MsgAddService) XXX_Size

func (m *MsgAddService) XXX_Size() int

func (*MsgAddService) XXX_Unmarshal

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

type MsgAddServiceResponse

type MsgAddServiceResponse struct {
}

func (*MsgAddServiceResponse) Descriptor

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

func (*MsgAddServiceResponse) Marshal

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

func (*MsgAddServiceResponse) MarshalTo

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

func (*MsgAddServiceResponse) MarshalToSizedBuffer

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

func (*MsgAddServiceResponse) ProtoMessage

func (*MsgAddServiceResponse) ProtoMessage()

func (*MsgAddServiceResponse) Reset

func (m *MsgAddServiceResponse) Reset()

func (*MsgAddServiceResponse) Size

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

func (*MsgAddServiceResponse) String

func (m *MsgAddServiceResponse) String() string

func (*MsgAddServiceResponse) Unmarshal

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

func (*MsgAddServiceResponse) XXX_DiscardUnknown

func (m *MsgAddServiceResponse) XXX_DiscardUnknown()

func (*MsgAddServiceResponse) XXX_Marshal

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

func (*MsgAddServiceResponse) XXX_Merge

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

func (*MsgAddServiceResponse) XXX_Size

func (m *MsgAddServiceResponse) XXX_Size() int

func (*MsgAddServiceResponse) XXX_Unmarshal

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

type MsgAddVerification

type MsgAddVerification struct {
	Id           string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Verification *Verification `protobuf:"bytes,2,opt,name=verification,proto3" json:"verification,omitempty"`
	Signer       string        `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgAddVerification

func NewMsgAddVerification(
	id string,
	verification *Verification,
	signerAccount string,
) *MsgAddVerification

NewMsgAddVerification creates a new MsgAddVerification instance

func (*MsgAddVerification) Descriptor

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

func (MsgAddVerification) GetSignBytes

func (msg MsgAddVerification) GetSignBytes() []byte

func (MsgAddVerification) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgAddVerification) Marshal

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

func (*MsgAddVerification) MarshalTo

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

func (*MsgAddVerification) MarshalToSizedBuffer

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

func (*MsgAddVerification) ProtoMessage

func (*MsgAddVerification) ProtoMessage()

func (*MsgAddVerification) Reset

func (m *MsgAddVerification) Reset()

func (MsgAddVerification) Route

func (MsgAddVerification) Route() string

Route implements sdk.Msg

func (*MsgAddVerification) Size

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

func (*MsgAddVerification) String

func (m *MsgAddVerification) String() string

func (MsgAddVerification) Type

func (MsgAddVerification) Type() string

Type implements sdk.Msg

func (*MsgAddVerification) Unmarshal

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

func (MsgAddVerification) ValidateBasic

func (msg MsgAddVerification) ValidateBasic() error

ValidateBasic performs a basic check of the MsgAddVerification fields.

func (*MsgAddVerification) XXX_DiscardUnknown

func (m *MsgAddVerification) XXX_DiscardUnknown()

func (*MsgAddVerification) XXX_Marshal

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

func (*MsgAddVerification) XXX_Merge

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

func (*MsgAddVerification) XXX_Size

func (m *MsgAddVerification) XXX_Size() int

func (*MsgAddVerification) XXX_Unmarshal

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

type MsgAddVerificationResponse

type MsgAddVerificationResponse struct {
}

func (*MsgAddVerificationResponse) Descriptor

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

func (*MsgAddVerificationResponse) Marshal

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

func (*MsgAddVerificationResponse) MarshalTo

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

func (*MsgAddVerificationResponse) MarshalToSizedBuffer

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

func (*MsgAddVerificationResponse) ProtoMessage

func (*MsgAddVerificationResponse) ProtoMessage()

func (*MsgAddVerificationResponse) Reset

func (m *MsgAddVerificationResponse) Reset()

func (*MsgAddVerificationResponse) Size

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

func (*MsgAddVerificationResponse) String

func (m *MsgAddVerificationResponse) String() string

func (*MsgAddVerificationResponse) Unmarshal

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

func (*MsgAddVerificationResponse) XXX_DiscardUnknown

func (m *MsgAddVerificationResponse) XXX_DiscardUnknown()

func (*MsgAddVerificationResponse) XXX_Marshal

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

func (*MsgAddVerificationResponse) XXX_Merge

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

func (*MsgAddVerificationResponse) XXX_Size

func (m *MsgAddVerificationResponse) XXX_Size() int

func (*MsgAddVerificationResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// CreateDidDocument defines a method for creating a new identity.
	CreateDidDocument(ctx context.Context, in *MsgCreateDidDocument, opts ...grpc.CallOption) (*MsgCreateDidDocumentResponse, error)
	// UpdateDidDocument defines a method for updating an identity.
	UpdateDidDocument(ctx context.Context, in *MsgUpdateDidDocument, opts ...grpc.CallOption) (*MsgUpdateDidDocumentResponse, error)
	// AddVerificationMethod adds a new verification method
	AddVerification(ctx context.Context, in *MsgAddVerification, opts ...grpc.CallOption) (*MsgAddVerificationResponse, error)
	// RevokeVerification remove the verification method and all associated verification Relations
	RevokeVerification(ctx context.Context, in *MsgRevokeVerification, opts ...grpc.CallOption) (*MsgRevokeVerificationResponse, error)
	// SetVerificationRelationships overwrite current verification relationships
	SetVerificationRelationships(ctx context.Context, in *MsgSetVerificationRelationships, opts ...grpc.CallOption) (*MsgSetVerificationRelationshipsResponse, error)
	// AddService add a new service
	AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error)
	// DeleteService delete an existing service
	DeleteService(ctx context.Context, in *MsgDeleteService, opts ...grpc.CallOption) (*MsgDeleteServiceResponse, 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 MsgCreateDidDocument

type MsgCreateDidDocument struct {
	Id            string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Controller    string          `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
	Verifications []*Verification `protobuf:"bytes,3,rep,name=verifications,proto3" json:"verifications,omitempty"`
	Services      []*Service      `protobuf:"bytes,4,rep,name=services,proto3" json:"services,omitempty"`
	Signer        string          `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"`
}

MsgCreateDidDocument defines a SDK message for creating a new did.

func NewMsgCreateDidDocument

func NewMsgCreateDidDocument(
	id string,
	verifications []*Verification,
	services []*Service,
	signerAccount string,
) *MsgCreateDidDocument

NewMsgCreateDidDocument creates a new MsgCreateDidDocument instance

func (*MsgCreateDidDocument) Descriptor

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

func (MsgCreateDidDocument) GetSignBytes

func (msg MsgCreateDidDocument) GetSignBytes() []byte

func (MsgCreateDidDocument) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgCreateDidDocument) Marshal

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

func (*MsgCreateDidDocument) MarshalTo

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

func (*MsgCreateDidDocument) MarshalToSizedBuffer

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

func (*MsgCreateDidDocument) ProtoMessage

func (*MsgCreateDidDocument) ProtoMessage()

func (*MsgCreateDidDocument) Reset

func (m *MsgCreateDidDocument) Reset()

func (MsgCreateDidDocument) Route

func (MsgCreateDidDocument) Route() string

Route implements sdk.Msg

func (*MsgCreateDidDocument) Size

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

func (*MsgCreateDidDocument) String

func (m *MsgCreateDidDocument) String() string

func (MsgCreateDidDocument) Type

Type implements sdk.Msg

func (*MsgCreateDidDocument) Unmarshal

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

func (MsgCreateDidDocument) ValidateBasic

func (msg MsgCreateDidDocument) ValidateBasic() error

ValidateBasic performs a basic check of the MsgCreateDidDocument fields.

func (*MsgCreateDidDocument) XXX_DiscardUnknown

func (m *MsgCreateDidDocument) XXX_DiscardUnknown()

func (*MsgCreateDidDocument) XXX_Marshal

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

func (*MsgCreateDidDocument) XXX_Merge

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

func (*MsgCreateDidDocument) XXX_Size

func (m *MsgCreateDidDocument) XXX_Size() int

func (*MsgCreateDidDocument) XXX_Unmarshal

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

type MsgCreateDidDocumentResponse

type MsgCreateDidDocumentResponse struct {
}

func (*MsgCreateDidDocumentResponse) Descriptor

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

func (*MsgCreateDidDocumentResponse) Marshal

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

func (*MsgCreateDidDocumentResponse) MarshalTo

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

func (*MsgCreateDidDocumentResponse) MarshalToSizedBuffer

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

func (*MsgCreateDidDocumentResponse) ProtoMessage

func (*MsgCreateDidDocumentResponse) ProtoMessage()

func (*MsgCreateDidDocumentResponse) Reset

func (m *MsgCreateDidDocumentResponse) Reset()

func (*MsgCreateDidDocumentResponse) Size

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

func (*MsgCreateDidDocumentResponse) String

func (*MsgCreateDidDocumentResponse) Unmarshal

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

func (*MsgCreateDidDocumentResponse) XXX_DiscardUnknown

func (m *MsgCreateDidDocumentResponse) XXX_DiscardUnknown()

func (*MsgCreateDidDocumentResponse) XXX_Marshal

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

func (*MsgCreateDidDocumentResponse) XXX_Merge

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

func (*MsgCreateDidDocumentResponse) XXX_Size

func (m *MsgCreateDidDocumentResponse) XXX_Size() int

func (*MsgCreateDidDocumentResponse) XXX_Unmarshal

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

type MsgDeleteService

type MsgDeleteService struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	Signer    string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgDeleteService

func NewMsgDeleteService(
	id string,
	serviceID string,
	signerAccount string,
) *MsgDeleteService

func (*MsgDeleteService) Descriptor

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

func (MsgDeleteService) GetSignBytes

func (msg MsgDeleteService) GetSignBytes() []byte

func (MsgDeleteService) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgDeleteService) Marshal

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

func (*MsgDeleteService) MarshalTo

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

func (*MsgDeleteService) MarshalToSizedBuffer

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

func (*MsgDeleteService) ProtoMessage

func (*MsgDeleteService) ProtoMessage()

func (*MsgDeleteService) Reset

func (m *MsgDeleteService) Reset()

func (MsgDeleteService) Route

func (MsgDeleteService) Route() string

Route implements sdk.Msg

func (*MsgDeleteService) Size

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

func (*MsgDeleteService) String

func (m *MsgDeleteService) String() string

func (MsgDeleteService) Type

func (MsgDeleteService) Type() string

Type implements sdk.Msg

func (*MsgDeleteService) Unmarshal

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

func (MsgDeleteService) ValidateBasic

func (msg MsgDeleteService) ValidateBasic() error

ValidateBasic performs a basic check of the MsgDeleteService fields.

func (*MsgDeleteService) XXX_DiscardUnknown

func (m *MsgDeleteService) XXX_DiscardUnknown()

func (*MsgDeleteService) XXX_Marshal

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

func (*MsgDeleteService) XXX_Merge

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

func (*MsgDeleteService) XXX_Size

func (m *MsgDeleteService) XXX_Size() int

func (*MsgDeleteService) XXX_Unmarshal

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

type MsgDeleteServiceResponse

type MsgDeleteServiceResponse struct {
}

func (*MsgDeleteServiceResponse) Descriptor

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

func (*MsgDeleteServiceResponse) Marshal

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

func (*MsgDeleteServiceResponse) MarshalTo

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

func (*MsgDeleteServiceResponse) MarshalToSizedBuffer

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

func (*MsgDeleteServiceResponse) ProtoMessage

func (*MsgDeleteServiceResponse) ProtoMessage()

func (*MsgDeleteServiceResponse) Reset

func (m *MsgDeleteServiceResponse) Reset()

func (*MsgDeleteServiceResponse) Size

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

func (*MsgDeleteServiceResponse) String

func (m *MsgDeleteServiceResponse) String() string

func (*MsgDeleteServiceResponse) Unmarshal

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

func (*MsgDeleteServiceResponse) XXX_DiscardUnknown

func (m *MsgDeleteServiceResponse) XXX_DiscardUnknown()

func (*MsgDeleteServiceResponse) XXX_Marshal

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

func (*MsgDeleteServiceResponse) XXX_Merge

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

func (*MsgDeleteServiceResponse) XXX_Size

func (m *MsgDeleteServiceResponse) XXX_Size() int

func (*MsgDeleteServiceResponse) XXX_Unmarshal

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

type MsgRevokeVerification

type MsgRevokeVerification struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	MethodId string `protobuf:"bytes,2,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"`
	Signer   string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgRevokeVerification

func NewMsgRevokeVerification(
	id string,
	methodID string,
	signerAccount string,
) *MsgRevokeVerification

NewMsgRevokeVerification creates a new MsgRevokeVerification instance

func (*MsgRevokeVerification) Descriptor

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

func (MsgRevokeVerification) GetSignBytes

func (msg MsgRevokeVerification) GetSignBytes() []byte

func (MsgRevokeVerification) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgRevokeVerification) Marshal

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

func (*MsgRevokeVerification) MarshalTo

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

func (*MsgRevokeVerification) MarshalToSizedBuffer

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

func (*MsgRevokeVerification) ProtoMessage

func (*MsgRevokeVerification) ProtoMessage()

func (*MsgRevokeVerification) Reset

func (m *MsgRevokeVerification) Reset()

func (MsgRevokeVerification) Route

func (MsgRevokeVerification) Route() string

Route implements sdk.Msg

func (*MsgRevokeVerification) Size

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

func (*MsgRevokeVerification) String

func (m *MsgRevokeVerification) String() string

func (MsgRevokeVerification) Type

Type implements sdk.Msg

func (*MsgRevokeVerification) Unmarshal

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

func (MsgRevokeVerification) ValidateBasic

func (msg MsgRevokeVerification) ValidateBasic() error

ValidateBasic performs a basic check of the MsgRevokeVerification fields.

func (*MsgRevokeVerification) XXX_DiscardUnknown

func (m *MsgRevokeVerification) XXX_DiscardUnknown()

func (*MsgRevokeVerification) XXX_Marshal

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

func (*MsgRevokeVerification) XXX_Merge

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

func (*MsgRevokeVerification) XXX_Size

func (m *MsgRevokeVerification) XXX_Size() int

func (*MsgRevokeVerification) XXX_Unmarshal

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

type MsgRevokeVerificationResponse

type MsgRevokeVerificationResponse struct {
}

func (*MsgRevokeVerificationResponse) Descriptor

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

func (*MsgRevokeVerificationResponse) Marshal

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

func (*MsgRevokeVerificationResponse) MarshalTo

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

func (*MsgRevokeVerificationResponse) MarshalToSizedBuffer

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

func (*MsgRevokeVerificationResponse) ProtoMessage

func (*MsgRevokeVerificationResponse) ProtoMessage()

func (*MsgRevokeVerificationResponse) Reset

func (m *MsgRevokeVerificationResponse) Reset()

func (*MsgRevokeVerificationResponse) Size

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

func (*MsgRevokeVerificationResponse) String

func (*MsgRevokeVerificationResponse) Unmarshal

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

func (*MsgRevokeVerificationResponse) XXX_DiscardUnknown

func (m *MsgRevokeVerificationResponse) XXX_DiscardUnknown()

func (*MsgRevokeVerificationResponse) XXX_Marshal

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

func (*MsgRevokeVerificationResponse) XXX_Merge

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

func (*MsgRevokeVerificationResponse) XXX_Size

func (m *MsgRevokeVerificationResponse) XXX_Size() int

func (*MsgRevokeVerificationResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// CreateDidDocument defines a method for creating a new identity.
	CreateDidDocument(context.Context, *MsgCreateDidDocument) (*MsgCreateDidDocumentResponse, error)
	// UpdateDidDocument defines a method for updating an identity.
	UpdateDidDocument(context.Context, *MsgUpdateDidDocument) (*MsgUpdateDidDocumentResponse, error)
	// AddVerificationMethod adds a new verification method
	AddVerification(context.Context, *MsgAddVerification) (*MsgAddVerificationResponse, error)
	// RevokeVerification remove the verification method and all associated verification Relations
	RevokeVerification(context.Context, *MsgRevokeVerification) (*MsgRevokeVerificationResponse, error)
	// SetVerificationRelationships overwrite current verification relationships
	SetVerificationRelationships(context.Context, *MsgSetVerificationRelationships) (*MsgSetVerificationRelationshipsResponse, error)
	// AddService add a new service
	AddService(context.Context, *MsgAddService) (*MsgAddServiceResponse, error)
	// DeleteService delete an existing service
	DeleteService(context.Context, *MsgDeleteService) (*MsgDeleteServiceResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetVerificationRelationships

type MsgSetVerificationRelationships struct {
	Id            string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	MethodId      string   `protobuf:"bytes,2,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"`
	Relationships []string `protobuf:"bytes,3,rep,name=relationships,proto3" json:"relationships,omitempty"`
	Signer        string   `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgSetVerificationRelationships

func NewMsgSetVerificationRelationships(
	id string,
	methodID string,
	relationships []string,
	signerAccount string,
) *MsgSetVerificationRelationships

func (*MsgSetVerificationRelationships) Descriptor

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

func (MsgSetVerificationRelationships) GetSignBytes

func (msg MsgSetVerificationRelationships) GetSignBytes() []byte

func (MsgSetVerificationRelationships) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgSetVerificationRelationships) Marshal

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

func (*MsgSetVerificationRelationships) MarshalTo

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

func (*MsgSetVerificationRelationships) MarshalToSizedBuffer

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

func (*MsgSetVerificationRelationships) ProtoMessage

func (*MsgSetVerificationRelationships) ProtoMessage()

func (*MsgSetVerificationRelationships) Reset

func (MsgSetVerificationRelationships) Route

Route implements sdk.Msg

func (*MsgSetVerificationRelationships) Size

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

func (*MsgSetVerificationRelationships) String

func (MsgSetVerificationRelationships) Type

Type implements sdk.Msg

func (*MsgSetVerificationRelationships) Unmarshal

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

func (MsgSetVerificationRelationships) ValidateBasic

func (msg MsgSetVerificationRelationships) ValidateBasic() error

ValidateBasic performs a basic check of the MsgSetVerificationRelationships fields.

func (*MsgSetVerificationRelationships) XXX_DiscardUnknown

func (m *MsgSetVerificationRelationships) XXX_DiscardUnknown()

func (*MsgSetVerificationRelationships) XXX_Marshal

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

func (*MsgSetVerificationRelationships) XXX_Merge

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

func (*MsgSetVerificationRelationships) XXX_Size

func (m *MsgSetVerificationRelationships) XXX_Size() int

func (*MsgSetVerificationRelationships) XXX_Unmarshal

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

type MsgSetVerificationRelationshipsResponse

type MsgSetVerificationRelationshipsResponse struct {
}

func (*MsgSetVerificationRelationshipsResponse) Descriptor

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

func (*MsgSetVerificationRelationshipsResponse) Marshal

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

func (*MsgSetVerificationRelationshipsResponse) MarshalTo

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

func (*MsgSetVerificationRelationshipsResponse) MarshalToSizedBuffer

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

func (*MsgSetVerificationRelationshipsResponse) ProtoMessage

func (*MsgSetVerificationRelationshipsResponse) Reset

func (*MsgSetVerificationRelationshipsResponse) Size

func (*MsgSetVerificationRelationshipsResponse) String

func (*MsgSetVerificationRelationshipsResponse) Unmarshal

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

func (*MsgSetVerificationRelationshipsResponse) XXX_DiscardUnknown

func (m *MsgSetVerificationRelationshipsResponse) XXX_DiscardUnknown()

func (*MsgSetVerificationRelationshipsResponse) XXX_Marshal

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

func (*MsgSetVerificationRelationshipsResponse) XXX_Merge

func (*MsgSetVerificationRelationshipsResponse) XXX_Size

func (*MsgSetVerificationRelationshipsResponse) XXX_Unmarshal

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

type MsgUpdateDidDocument

type MsgUpdateDidDocument struct {
	Id         string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Controller []string `protobuf:"bytes,2,rep,name=controller,proto3" json:"controller,omitempty"`
	Signer     string   `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgUpdateDidDocument

func NewMsgUpdateDidDocument(
	id string,
	controller []string,
	signerAccount string,
) *MsgUpdateDidDocument

func (*MsgUpdateDidDocument) Descriptor

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

func (MsgUpdateDidDocument) GetSignBytes

func (msg MsgUpdateDidDocument) GetSignBytes() []byte

func (MsgUpdateDidDocument) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgUpdateDidDocument) Marshal

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

func (*MsgUpdateDidDocument) MarshalTo

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

func (*MsgUpdateDidDocument) MarshalToSizedBuffer

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

func (*MsgUpdateDidDocument) ProtoMessage

func (*MsgUpdateDidDocument) ProtoMessage()

func (*MsgUpdateDidDocument) Reset

func (m *MsgUpdateDidDocument) Reset()

func (MsgUpdateDidDocument) Route

func (MsgUpdateDidDocument) Route() string

Route implements sdk.Msg

func (*MsgUpdateDidDocument) Size

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

func (*MsgUpdateDidDocument) String

func (m *MsgUpdateDidDocument) String() string

func (MsgUpdateDidDocument) Type

Type implements sdk.Msg

func (*MsgUpdateDidDocument) Unmarshal

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

func (MsgUpdateDidDocument) ValidateBasic

func (msg MsgUpdateDidDocument) ValidateBasic() error

ValidateBasic performs a basic check of the MsgUpdateDidDocument fields.

func (*MsgUpdateDidDocument) XXX_DiscardUnknown

func (m *MsgUpdateDidDocument) XXX_DiscardUnknown()

func (*MsgUpdateDidDocument) XXX_Marshal

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

func (*MsgUpdateDidDocument) XXX_Merge

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

func (*MsgUpdateDidDocument) XXX_Size

func (m *MsgUpdateDidDocument) XXX_Size() int

func (*MsgUpdateDidDocument) XXX_Unmarshal

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

type MsgUpdateDidDocumentResponse

type MsgUpdateDidDocumentResponse struct {
}

func (*MsgUpdateDidDocumentResponse) Descriptor

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

func (*MsgUpdateDidDocumentResponse) Marshal

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

func (*MsgUpdateDidDocumentResponse) MarshalTo

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

func (*MsgUpdateDidDocumentResponse) MarshalToSizedBuffer

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

func (*MsgUpdateDidDocumentResponse) ProtoMessage

func (*MsgUpdateDidDocumentResponse) ProtoMessage()

func (*MsgUpdateDidDocumentResponse) Reset

func (m *MsgUpdateDidDocumentResponse) Reset()

func (*MsgUpdateDidDocumentResponse) Size

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

func (*MsgUpdateDidDocumentResponse) String

func (*MsgUpdateDidDocumentResponse) Unmarshal

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

func (*MsgUpdateDidDocumentResponse) XXX_DiscardUnknown

func (m *MsgUpdateDidDocumentResponse) XXX_DiscardUnknown()

func (*MsgUpdateDidDocumentResponse) XXX_Marshal

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

func (*MsgUpdateDidDocumentResponse) XXX_Merge

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

func (*MsgUpdateDidDocumentResponse) XXX_Size

func (m *MsgUpdateDidDocumentResponse) XXX_Size() int

func (*MsgUpdateDidDocumentResponse) XXX_Unmarshal

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

type PublicKeyMultibase

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

PublicKeyMultibase formats an account address as per the CAIP-10 Account ID specification. https://w3c.github.io/did-spec-registries/#publickeymultibase https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03#appendix-B.1

func NewPublicKeyMultibase

func NewPublicKeyMultibase(pubKey []byte, vmType VerificationMaterialType) PublicKeyMultibase

NewPublicKeyMultibase build a new blockchain account ID struct

func (PublicKeyMultibase) EncodeToString

func (pkh PublicKeyMultibase) EncodeToString() string

EncodeToString returns the string representation of the key in hex format. F is the hex format prefix https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03#appendix-B.1

type QueryClient

type QueryClient interface {
	// DidDocuments queries all did documents that match the given status.
	DidDocuments(ctx context.Context, in *QueryDidDocumentsRequest, opts ...grpc.CallOption) (*QueryDidDocumentsResponse, error)
	// DidDocument queries a did documents with an id.
	DidDocument(ctx context.Context, in *QueryDidDocumentRequest, opts ...grpc.CallOption) (*QueryDidDocumentResponse, 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 QueryDidDocumentRequest

type QueryDidDocumentRequest struct {
	// status enables to query for validators matching a given status.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryDidDocumentsRequest is request type for Query/DidDocuments RPC method.

func (*QueryDidDocumentRequest) Descriptor

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

func (*QueryDidDocumentRequest) GetId

func (m *QueryDidDocumentRequest) GetId() string

func (*QueryDidDocumentRequest) Marshal

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

func (*QueryDidDocumentRequest) MarshalTo

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

func (*QueryDidDocumentRequest) MarshalToSizedBuffer

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

func (*QueryDidDocumentRequest) ProtoMessage

func (*QueryDidDocumentRequest) ProtoMessage()

func (*QueryDidDocumentRequest) Reset

func (m *QueryDidDocumentRequest) Reset()

func (*QueryDidDocumentRequest) Size

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

func (*QueryDidDocumentRequest) String

func (m *QueryDidDocumentRequest) String() string

func (*QueryDidDocumentRequest) Unmarshal

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

func (*QueryDidDocumentRequest) XXX_DiscardUnknown

func (m *QueryDidDocumentRequest) XXX_DiscardUnknown()

func (*QueryDidDocumentRequest) XXX_Marshal

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

func (*QueryDidDocumentRequest) XXX_Merge

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

func (*QueryDidDocumentRequest) XXX_Size

func (m *QueryDidDocumentRequest) XXX_Size() int

func (*QueryDidDocumentRequest) XXX_Unmarshal

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

type QueryDidDocumentResponse

type QueryDidDocumentResponse struct {
	// validators contains all the queried validators.
	DidDocument DidDocument `protobuf:"bytes,1,opt,name=didDocument,proto3" json:"didDocument"`
	DidMetadata DidMetadata `protobuf:"bytes,2,opt,name=didMetadata,proto3" json:"didMetadata"`
}

QueryDidDocumentsResponse is response type for the Query/DidDocuments RPC method

func (*QueryDidDocumentResponse) Descriptor

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

func (*QueryDidDocumentResponse) GetDidDocument

func (m *QueryDidDocumentResponse) GetDidDocument() DidDocument

func (*QueryDidDocumentResponse) GetDidMetadata

func (m *QueryDidDocumentResponse) GetDidMetadata() DidMetadata

func (*QueryDidDocumentResponse) Marshal

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

func (*QueryDidDocumentResponse) MarshalTo

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

func (*QueryDidDocumentResponse) MarshalToSizedBuffer

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

func (*QueryDidDocumentResponse) ProtoMessage

func (*QueryDidDocumentResponse) ProtoMessage()

func (*QueryDidDocumentResponse) Reset

func (m *QueryDidDocumentResponse) Reset()

func (*QueryDidDocumentResponse) Size

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

func (*QueryDidDocumentResponse) String

func (m *QueryDidDocumentResponse) String() string

func (*QueryDidDocumentResponse) Unmarshal

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

func (*QueryDidDocumentResponse) XXX_DiscardUnknown

func (m *QueryDidDocumentResponse) XXX_DiscardUnknown()

func (*QueryDidDocumentResponse) XXX_Marshal

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

func (*QueryDidDocumentResponse) XXX_Merge

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

func (*QueryDidDocumentResponse) XXX_Size

func (m *QueryDidDocumentResponse) XXX_Size() int

func (*QueryDidDocumentResponse) XXX_Unmarshal

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

type QueryDidDocumentsRequest

type QueryDidDocumentsRequest struct {
	// status enables to query for validators 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"`
}

QueryDidDocumentsRequest is request type for Query/DidDocuments RPC method.

func (*QueryDidDocumentsRequest) Descriptor

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

func (*QueryDidDocumentsRequest) GetPagination

func (m *QueryDidDocumentsRequest) GetPagination() *query.PageRequest

func (*QueryDidDocumentsRequest) GetStatus

func (m *QueryDidDocumentsRequest) GetStatus() string

func (*QueryDidDocumentsRequest) Marshal

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

func (*QueryDidDocumentsRequest) MarshalTo

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

func (*QueryDidDocumentsRequest) MarshalToSizedBuffer

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

func (*QueryDidDocumentsRequest) ProtoMessage

func (*QueryDidDocumentsRequest) ProtoMessage()

func (*QueryDidDocumentsRequest) Reset

func (m *QueryDidDocumentsRequest) Reset()

func (*QueryDidDocumentsRequest) Size

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

func (*QueryDidDocumentsRequest) String

func (m *QueryDidDocumentsRequest) String() string

func (*QueryDidDocumentsRequest) Unmarshal

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

func (*QueryDidDocumentsRequest) XXX_DiscardUnknown

func (m *QueryDidDocumentsRequest) XXX_DiscardUnknown()

func (*QueryDidDocumentsRequest) XXX_Marshal

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

func (*QueryDidDocumentsRequest) XXX_Merge

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

func (*QueryDidDocumentsRequest) XXX_Size

func (m *QueryDidDocumentsRequest) XXX_Size() int

func (*QueryDidDocumentsRequest) XXX_Unmarshal

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

type QueryDidDocumentsResponse

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

QueryDidDocumentsResponse is response type for the Query/DidDocuments RPC method

func (*QueryDidDocumentsResponse) Descriptor

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

func (*QueryDidDocumentsResponse) GetDidDocuments

func (m *QueryDidDocumentsResponse) GetDidDocuments() []DidDocument

func (*QueryDidDocumentsResponse) GetPagination

func (m *QueryDidDocumentsResponse) GetPagination() *query.PageResponse

func (*QueryDidDocumentsResponse) Marshal

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

func (*QueryDidDocumentsResponse) MarshalTo

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

func (*QueryDidDocumentsResponse) MarshalToSizedBuffer

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

func (*QueryDidDocumentsResponse) ProtoMessage

func (*QueryDidDocumentsResponse) ProtoMessage()

func (*QueryDidDocumentsResponse) Reset

func (m *QueryDidDocumentsResponse) Reset()

func (*QueryDidDocumentsResponse) Size

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

func (*QueryDidDocumentsResponse) String

func (m *QueryDidDocumentsResponse) String() string

func (*QueryDidDocumentsResponse) Unmarshal

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

func (*QueryDidDocumentsResponse) XXX_DiscardUnknown

func (m *QueryDidDocumentsResponse) XXX_DiscardUnknown()

func (*QueryDidDocumentsResponse) XXX_Marshal

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

func (*QueryDidDocumentsResponse) XXX_Merge

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

func (*QueryDidDocumentsResponse) XXX_Size

func (m *QueryDidDocumentsResponse) XXX_Size() int

func (*QueryDidDocumentsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// DidDocuments queries all did documents that match the given status.
	DidDocuments(context.Context, *QueryDidDocumentsRequest) (*QueryDidDocumentsResponse, error)
	// DidDocument queries a did documents with an id.
	DidDocument(context.Context, *QueryDidDocumentRequest) (*QueryDidDocumentResponse, 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=serviceEndpoint,proto3" json:"serviceEndpoint,omitempty"`
}

Service defines how to find data associated with a identifer

func NewService

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

NewService creates a new service

func (*Service) Descriptor

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

func (*Service) Equal

func (this *Service) Equal(that interface{}) bool

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

type Services []*Service

Services are a list of services

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddService

func (*UnimplementedMsgServer) AddVerification

func (*UnimplementedMsgServer) CreateDidDocument

func (*UnimplementedMsgServer) DeleteService

func (*UnimplementedMsgServer) RevokeVerification

func (*UnimplementedMsgServer) UpdateDidDocument

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) DidDocument

func (*UnimplementedQueryServer) DidDocuments

type Verification

type Verification struct {
	// verificationRelationships defines which relationships
	// are allowed to use the verification method
	Relationships []string            `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships,omitempty"`
	Method        *VerificationMethod `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Context       []string            `protobuf:"bytes,3,rep,name=context,proto3" json:"context,omitempty"`
}

Verification is a message that allows to assign a verification method to one or more verification relationships

func NewAccountVerification

func NewAccountVerification(did DID, chainID, accountAddress string, verificationMethods ...string) *Verification

NewAccountVerification is a shortcut to create a verification based on comsos address

func NewVerification

func NewVerification(
	method VerificationMethod,
	relationships []string,
	contexts []string,
) *Verification

NewVerification build a new verification to be attached to a did document

func (*Verification) Descriptor

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

func (Verification) GetBytes

func (did Verification) GetBytes() []byte

GetBytes is a helper for serializing

func (*Verification) GetContext

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

func (*Verification) GetMethod

func (m *Verification) GetMethod() *VerificationMethod

func (*Verification) GetRelationships

func (m *Verification) GetRelationships() []string

func (*Verification) Marshal

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

func (*Verification) MarshalTo

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

func (*Verification) MarshalToSizedBuffer

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

func (*Verification) ProtoMessage

func (*Verification) ProtoMessage()

func (*Verification) Reset

func (m *Verification) Reset()

func (*Verification) Size

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

func (*Verification) String

func (m *Verification) String() string

func (*Verification) Unmarshal

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

func (*Verification) XXX_DiscardUnknown

func (m *Verification) XXX_DiscardUnknown()

func (*Verification) XXX_Marshal

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

func (*Verification) XXX_Merge

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

func (*Verification) XXX_Size

func (m *Verification) XXX_Size() int

func (*Verification) XXX_Unmarshal

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

type VerificationMaterial

type VerificationMaterial interface {
	EncodeToString() string
	Type() VerificationMaterialType
}

type VerificationMaterialType

type VerificationMaterialType string

VerificationMaterialType encode the verification material type

const (
	DIDVMethodTypeEcdsaSecp256k1VerificationKey2019 VerificationMaterialType = "EcdsaSecp256k1VerificationKey2019"
	DIDVMethodTypeEd25519VerificationKey2018        VerificationMaterialType = "Ed25519VerificationKey2018"
	DIDVMethodTypeCosmosAccountAddress              VerificationMaterialType = "CosmosAccountAddress"
	DIDVMethodTypeX25519KeyAgreementKey2019         VerificationMaterialType = "X25519KeyAgreementKey2019"
)

Verification method material types

func (VerificationMaterialType) String

func (p VerificationMaterialType) String() string

String return string name for the Verification Method type

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"`
	// Types that are valid to be assigned to VerificationMaterial:
	//	*VerificationMethod_BlockchainAccountID
	//	*VerificationMethod_PublicKeyHex
	//	*VerificationMethod_PublicKeyMultibase
	VerificationMaterial isVerificationMethod_VerificationMaterial `protobuf_oneof:"verificationMaterial"`
}

A DID document can express verification methods, such as cryptographic public keys, which can be used to authenticate or authorize interactions with the DID subject or associated parties. https://www.w3.org/TR/did-core/#verification-methods

func NewVerificationMethod

func NewVerificationMethod(id string, controller DID, vmr VerificationMaterial) VerificationMethod

NewVerificationMethod build a new verification method

func (*VerificationMethod) Descriptor

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

func (*VerificationMethod) Equal

func (this *VerificationMethod) Equal(that interface{}) bool

func (*VerificationMethod) GetBlockchainAccountID

func (m *VerificationMethod) GetBlockchainAccountID() string

func (*VerificationMethod) GetPublicKeyHex

func (m *VerificationMethod) GetPublicKeyHex() string

func (*VerificationMethod) GetPublicKeyMultibase

func (m *VerificationMethod) GetPublicKeyMultibase() string

func (*VerificationMethod) GetVerificationMaterial

func (m *VerificationMethod) GetVerificationMaterial() isVerificationMethod_VerificationMaterial

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

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*VerificationMethod) XXX_Size

func (m *VerificationMethod) XXX_Size() int

func (*VerificationMethod) XXX_Unmarshal

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

type VerificationMethod_BlockchainAccountID

type VerificationMethod_BlockchainAccountID struct {
	BlockchainAccountID string `protobuf:"bytes,4,opt,name=blockchainAccountID,proto3,oneof" json:"blockchainAccountID,omitempty"`
}

func (*VerificationMethod_BlockchainAccountID) Equal

func (this *VerificationMethod_BlockchainAccountID) Equal(that interface{}) bool

func (*VerificationMethod_BlockchainAccountID) MarshalTo

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

func (*VerificationMethod_BlockchainAccountID) MarshalToSizedBuffer

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

func (*VerificationMethod_BlockchainAccountID) Size

type VerificationMethod_PublicKeyHex

type VerificationMethod_PublicKeyHex struct {
	PublicKeyHex string `protobuf:"bytes,5,opt,name=publicKeyHex,proto3,oneof" json:"publicKeyHex,omitempty"`
}

func (*VerificationMethod_PublicKeyHex) Equal

func (this *VerificationMethod_PublicKeyHex) Equal(that interface{}) bool

func (*VerificationMethod_PublicKeyHex) MarshalTo

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

func (*VerificationMethod_PublicKeyHex) MarshalToSizedBuffer

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

func (*VerificationMethod_PublicKeyHex) Size

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

type VerificationMethod_PublicKeyMultibase

type VerificationMethod_PublicKeyMultibase struct {
	PublicKeyMultibase string `protobuf:"bytes,6,opt,name=publicKeyMultibase,proto3,oneof" json:"publicKeyMultibase,omitempty"`
}

func (*VerificationMethod_PublicKeyMultibase) Equal

func (this *VerificationMethod_PublicKeyMultibase) Equal(that interface{}) bool

func (*VerificationMethod_PublicKeyMultibase) MarshalTo

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

func (*VerificationMethod_PublicKeyMultibase) MarshalToSizedBuffer

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

func (*VerificationMethod_PublicKeyMultibase) Size

type VerificationRelationship

type VerificationRelationship int

type Verifications

type Verifications []*Verification

Verifications is a list of verification

Jump to

Keyboard shortcuts

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