did

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

README

DID Module

This module implements the DID core spec. For more information please see the DID W3C core-spec.

Decentralized identifiers (DIDs) are a type of identifier that enables verifiable, decentralized digital identity. A DID identifies any subject (e.g., a person, organization, thing, data model, abstract entity, etc.) that the controller of the DID decides that it identifies.

A DID is a globally unique persistent identifier that does not require a centralized registration authority and is often generated and/or registered cryptographically.

The DID module provides the functionalities to create and manage the lifecycle of a DID document on chain.

Reference

  1. State
  2. Transitions
  3. Messages

Documentation

Overview

Package did 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 (
	// 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:"

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

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_capability_did"
)

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 (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
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 (
	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 (
	// DidDocumentKey prefix for each key to a DidDocument
	DidDocumentKey = []byte{0x61}
)
View Source
var (
	// ModuleCdc codec used by the module (protobuf)
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)

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 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) it uses the algorithm from https://github.com/xeipuuv/gojsonschema/blob/v1.2.0/format_checkers.go#L275 that is used in hyperledger aries go https://github.com/hyperledger/aries-framework-go/tree/v0.1.7

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

nolint

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateService

func ValidateService(s *Service) (err error)

ValidateService performs basic on a service struct

func ValidateVerification

func ValidateVerification(v *Verification) (err error)

ValidateVerification perform basic validation on a verification struct

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

AccountKeeper defines the expected account keeper (noalias)

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type Contexts

type Contexts []string

Contexts for json-ld contects

type DID

type DID string

DID as typed 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 ...DocumentOption) (did DidDocument, err error)

NewDidDocument constructs a new DidDocument

func ResolveAccountDID

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

ResolveAccountDID generates a DID document from an address

func (*DidDocument) AddControllers

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

AddControllers add a controller to a did document if not exists

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

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

DeleteControllers delete controllers from 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) HasController

func (didDoc *DidDocument) HasController(controller DID) bool

HasController returns true if the DID document has the input DID as a controller, false otherwise

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 *VerificationMethod_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) 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 DidDocumentCreatedEvent

type DidDocumentCreatedEvent struct {
	Did    string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
	Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
}

DidDocumentCreatedEvent is an event triggered on a DID document creation

func NewDidDocumentCreatedEvent

func NewDidDocumentCreatedEvent(did, owner string) *DidDocumentCreatedEvent

NewDidDocumentCreatedEvent constructs a new did_created sdk.Event

func (*DidDocumentCreatedEvent) Descriptor

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

func (*DidDocumentCreatedEvent) Equal

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

func (*DidDocumentCreatedEvent) Marshal

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

func (*DidDocumentCreatedEvent) MarshalTo

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

func (*DidDocumentCreatedEvent) MarshalToSizedBuffer

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

func (*DidDocumentCreatedEvent) ProtoMessage

func (*DidDocumentCreatedEvent) ProtoMessage()

func (*DidDocumentCreatedEvent) Reset

func (m *DidDocumentCreatedEvent) Reset()

func (*DidDocumentCreatedEvent) Size

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

func (*DidDocumentCreatedEvent) String

func (m *DidDocumentCreatedEvent) String() string

func (*DidDocumentCreatedEvent) Unmarshal

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

func (*DidDocumentCreatedEvent) XXX_DiscardUnknown

func (m *DidDocumentCreatedEvent) XXX_DiscardUnknown()

func (*DidDocumentCreatedEvent) XXX_Marshal

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

func (*DidDocumentCreatedEvent) XXX_Merge

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

func (*DidDocumentCreatedEvent) XXX_Size

func (m *DidDocumentCreatedEvent) XXX_Size() int

func (*DidDocumentCreatedEvent) XXX_Unmarshal

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

type DidDocumentUpdatedEvent

type DidDocumentUpdatedEvent struct {
	Did    string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
	Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
}

DidDocumentUpdatedEvent is an event triggered on a DID document update

func NewDidDocumentUpdatedEvent

func NewDidDocumentUpdatedEvent(did, signer string) *DidDocumentUpdatedEvent

NewDidDocumentUpdatedEvent constructs a new did_created sdk.Event

func (*DidDocumentUpdatedEvent) Descriptor

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

func (*DidDocumentUpdatedEvent) Equal

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

func (*DidDocumentUpdatedEvent) Marshal

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

func (*DidDocumentUpdatedEvent) MarshalTo

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

func (*DidDocumentUpdatedEvent) MarshalToSizedBuffer

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

func (*DidDocumentUpdatedEvent) ProtoMessage

func (*DidDocumentUpdatedEvent) ProtoMessage()

func (*DidDocumentUpdatedEvent) Reset

func (m *DidDocumentUpdatedEvent) Reset()

func (*DidDocumentUpdatedEvent) Size

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

func (*DidDocumentUpdatedEvent) String

func (m *DidDocumentUpdatedEvent) String() string

func (*DidDocumentUpdatedEvent) Unmarshal

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

func (*DidDocumentUpdatedEvent) XXX_DiscardUnknown

func (m *DidDocumentUpdatedEvent) XXX_DiscardUnknown()

func (*DidDocumentUpdatedEvent) XXX_Marshal

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

func (*DidDocumentUpdatedEvent) XXX_Merge

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

func (*DidDocumentUpdatedEvent) XXX_Size

func (m *DidDocumentUpdatedEvent) XXX_Size() int

func (*DidDocumentUpdatedEvent) XXX_Unmarshal

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

type DocumentOption

type DocumentOption func(*DidDocument) error

DocumentOption implements variadic pattern for optional did document fields

func WithControllers

func WithControllers(controllers ...string) DocumentOption

WithControllers add optional did controller

func WithServices

func WithServices(services ...*Service) DocumentOption

WithServices add optional services

func WithVerifications

func WithVerifications(verifications ...*Verification) DocumentOption

WithVerifications add optional verifications

type GenesisState

type GenesisState struct {
	// did documents present at genesis
	DidDocuments []*DidDocument `protobuf:"bytes,1,rep,name=didDocuments,proto3" json:"didDocuments,omitempty"`
}

GenesisState defines the did module's genesis state.

func NewGenesisState

func NewGenesisState() *GenesisState

NewGenesisState creates a new genesis state with default values.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetDidDocuments

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

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 (s GenesisState) Validate() error

Validate validates all the did documents in the genesi file

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 MsgAddController

type MsgAddController struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ControllerDid string `protobuf:"bytes,2,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"`
	Signer        string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgAddController

func NewMsgAddController(
	id string,
	controllerDID string,
	signerAccount string,
) *MsgAddController

NewMsgAddController creates a new MsgAddController instance

func (*MsgAddController) Descriptor

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

func (MsgAddController) GetSignBytes

func (msg MsgAddController) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

func (MsgAddController) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgAddController) Marshal

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

func (*MsgAddController) MarshalTo

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

func (*MsgAddController) MarshalToSizedBuffer

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

func (*MsgAddController) ProtoMessage

func (*MsgAddController) ProtoMessage()

func (*MsgAddController) Reset

func (m *MsgAddController) Reset()

func (MsgAddController) Route

func (MsgAddController) Route() string

Route implements sdk.Msg

func (*MsgAddController) Size

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

func (*MsgAddController) String

func (m *MsgAddController) String() string

func (MsgAddController) Type

func (msg MsgAddController) Type() string

Type implements sdk.Msg

func (*MsgAddController) Unmarshal

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

func (MsgAddController) ValidateBasic

func (msg MsgAddController) ValidateBasic() error

ValidateBasic performs a basic check of the MsgAddService fields.

func (*MsgAddController) XXX_DiscardUnknown

func (m *MsgAddController) XXX_DiscardUnknown()

func (*MsgAddController) XXX_Marshal

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

func (*MsgAddController) XXX_Merge

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

func (*MsgAddController) XXX_Size

func (m *MsgAddController) XXX_Size() int

func (*MsgAddController) XXX_Unmarshal

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

type MsgAddControllerResponse

type MsgAddControllerResponse struct {
}

func (*MsgAddControllerResponse) Descriptor

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

func (*MsgAddControllerResponse) Marshal

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

func (*MsgAddControllerResponse) MarshalTo

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

func (*MsgAddControllerResponse) MarshalToSizedBuffer

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

func (*MsgAddControllerResponse) ProtoMessage

func (*MsgAddControllerResponse) ProtoMessage()

func (*MsgAddControllerResponse) Reset

func (m *MsgAddControllerResponse) Reset()

func (*MsgAddControllerResponse) Size

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

func (*MsgAddControllerResponse) String

func (m *MsgAddControllerResponse) String() string

func (*MsgAddControllerResponse) Unmarshal

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

func (*MsgAddControllerResponse) XXX_DiscardUnknown

func (m *MsgAddControllerResponse) XXX_DiscardUnknown()

func (*MsgAddControllerResponse) XXX_Marshal

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

func (*MsgAddControllerResponse) XXX_Merge

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

func (*MsgAddControllerResponse) XXX_Size

func (m *MsgAddControllerResponse) XXX_Size() int

func (*MsgAddControllerResponse) XXX_Unmarshal

func (m *MsgAddControllerResponse) 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

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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 (msg 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

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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 (msg 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)
	// AddService add a new service
	AddController(ctx context.Context, in *MsgAddController, opts ...grpc.CallOption) (*MsgAddControllerResponse, error)
	// DeleteService delete an existing service
	DeleteController(ctx context.Context, in *MsgDeleteController, opts ...grpc.CallOption) (*MsgDeleteControllerResponse, 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"`
	Controllers   []string        `protobuf:"bytes,2,rep,name=controllers,proto3" json:"controllers,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

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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

func (msg MsgCreateDidDocument) Type() string

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 MsgDeleteController

type MsgDeleteController struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ControllerDid string `protobuf:"bytes,2,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"`
	Signer        string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"`
}

func NewMsgDeleteController

func NewMsgDeleteController(
	id string,
	controllerDID string,
	signerAccount string,
) *MsgDeleteController

NewMsgDeleteController creates a new MsgDeleteController instance

func (*MsgDeleteController) Descriptor

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

func (MsgDeleteController) GetSignBytes

func (msg MsgDeleteController) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

func (MsgDeleteController) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgDeleteController) Marshal

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

func (*MsgDeleteController) MarshalTo

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

func (*MsgDeleteController) MarshalToSizedBuffer

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

func (*MsgDeleteController) ProtoMessage

func (*MsgDeleteController) ProtoMessage()

func (*MsgDeleteController) Reset

func (m *MsgDeleteController) Reset()

func (MsgDeleteController) Route

func (MsgDeleteController) Route() string

Route implements sdk.Msg

func (*MsgDeleteController) Size

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

func (*MsgDeleteController) String

func (m *MsgDeleteController) String() string

func (MsgDeleteController) Type

func (msg MsgDeleteController) Type() string

Type implements sdk.Msg

func (*MsgDeleteController) Unmarshal

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

func (MsgDeleteController) ValidateBasic

func (msg MsgDeleteController) ValidateBasic() error

ValidateBasic performs a basic check of the MsgDeleteService fields.

func (*MsgDeleteController) XXX_DiscardUnknown

func (m *MsgDeleteController) XXX_DiscardUnknown()

func (*MsgDeleteController) XXX_Marshal

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

func (*MsgDeleteController) XXX_Merge

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

func (*MsgDeleteController) XXX_Size

func (m *MsgDeleteController) XXX_Size() int

func (*MsgDeleteController) XXX_Unmarshal

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

type MsgDeleteControllerResponse

type MsgDeleteControllerResponse struct {
}

func (*MsgDeleteControllerResponse) Descriptor

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

func (*MsgDeleteControllerResponse) Marshal

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

func (*MsgDeleteControllerResponse) MarshalTo

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

func (*MsgDeleteControllerResponse) MarshalToSizedBuffer

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

func (*MsgDeleteControllerResponse) ProtoMessage

func (*MsgDeleteControllerResponse) ProtoMessage()

func (*MsgDeleteControllerResponse) Reset

func (m *MsgDeleteControllerResponse) Reset()

func (*MsgDeleteControllerResponse) Size

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

func (*MsgDeleteControllerResponse) String

func (m *MsgDeleteControllerResponse) String() string

func (*MsgDeleteControllerResponse) Unmarshal

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

func (*MsgDeleteControllerResponse) XXX_DiscardUnknown

func (m *MsgDeleteControllerResponse) XXX_DiscardUnknown()

func (*MsgDeleteControllerResponse) XXX_Marshal

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

func (*MsgDeleteControllerResponse) XXX_Merge

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

func (*MsgDeleteControllerResponse) XXX_Size

func (m *MsgDeleteControllerResponse) XXX_Size() int

func (*MsgDeleteControllerResponse) XXX_Unmarshal

func (m *MsgDeleteControllerResponse) 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

NewMsgDeleteService creates a new MsgDeleteService instance

func (*MsgDeleteService) Descriptor

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

func (MsgDeleteService) GetSignBytes

func (msg MsgDeleteService) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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 (msg 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

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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

func (msg MsgRevokeVerification) Type() string

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)
	// AddService add a new service
	AddController(context.Context, *MsgAddController) (*MsgAddControllerResponse, error)
	// DeleteService delete an existing service
	DeleteController(context.Context, *MsgDeleteController) (*MsgDeleteControllerResponse, 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

NewMsgSetVerificationRelationships creates a new MsgSetVerificationRelationships instance

func (*MsgSetVerificationRelationships) Descriptor

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

func (MsgSetVerificationRelationships) GetSignBytes

func (msg MsgSetVerificationRelationships) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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 {
	Doc    *DidDocument `protobuf:"bytes,1,opt,name=doc,proto3" json:"doc,omitempty"`
	Signer string       `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"`
}

MsgUpdateDidDocument replace an existing did document with a new version

func NewMsgUpdateDidDocument

func NewMsgUpdateDidDocument(
	didDoc *DidDocument,
	signerAccount string,
) *MsgUpdateDidDocument

NewMsgUpdateDidDocument creates a new MsgUpdateDidDocument instance

func (*MsgUpdateDidDocument) Descriptor

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

func (MsgUpdateDidDocument) GetSignBytes

func (msg MsgUpdateDidDocument) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes method.

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

func (msg MsgUpdateDidDocument) Type() string

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 PublicKeyJwk

type PublicKeyJwk struct {
	Kid string `protobuf:"bytes,1,opt,name=Kid,proto3" json:"Kid,omitempty"`
	Crv string `protobuf:"bytes,2,opt,name=Crv,proto3" json:"Crv,omitempty"`
	X   string `protobuf:"bytes,3,opt,name=X,proto3" json:"X,omitempty"`
	Y   string `protobuf:"bytes,4,opt,name=Y,proto3" json:"Y,omitempty"`
	Kty string `protobuf:"bytes,5,opt,name=Kty,proto3" json:"Kty,omitempty"`
}

PublicKeyJwk is a type of verification material, the implementation support is limited to elliptic curve public keys see https://www.w3.org/TR/did-core/#dfn-publickeyjwk see https://datatracker.ietf.org/doc/html/rfc7517

func (*PublicKeyJwk) Descriptor

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

func (*PublicKeyJwk) Equal

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

func (*PublicKeyJwk) Marshal

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

func (*PublicKeyJwk) MarshalTo

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

func (*PublicKeyJwk) MarshalToSizedBuffer

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

func (*PublicKeyJwk) ProtoMessage

func (*PublicKeyJwk) ProtoMessage()

func (*PublicKeyJwk) Reset

func (m *PublicKeyJwk) Reset()

func (*PublicKeyJwk) Size

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

func (*PublicKeyJwk) String

func (m *PublicKeyJwk) String() string

func (*PublicKeyJwk) Unmarshal

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

func (*PublicKeyJwk) XXX_DiscardUnknown

func (m *PublicKeyJwk) XXX_DiscardUnknown()

func (*PublicKeyJwk) XXX_Marshal

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

func (*PublicKeyJwk) XXX_Merge

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

func (*PublicKeyJwk) XXX_Size

func (m *PublicKeyJwk) XXX_Size() int

func (*PublicKeyJwk) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// 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 {
	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 {
	// Returns a did document
	DidDocument DidDocument `protobuf:"bytes,1,opt,name=didDocument,proto3" json:"didDocument"`
}

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

type QueryServer interface {
	// 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"`
}

The service property is OPTIONAL. If present, the associated value MUST be a set of services, where each service is described by a map. Each service map MUST contain id, type, and serviceEndpoint properties. Each service extension MAY include additional properties and MAY further restrict the properties associated with the extension. https://www.w3.org/TR/did-core/#services

func NewService

func NewService(id, serviceType, 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) AddController

func (*UnimplementedMsgServer) AddService

func (*UnimplementedMsgServer) AddVerification

func (*UnimplementedMsgServer) CreateDidDocument

func (*UnimplementedMsgServer) DeleteController

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

type Validable

type Validable interface {
	Validate() error
	// contains filtered or unexported methods
}

Validable interface requires implementation of a validate function for a verification VerificationMaterial

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, verificationRelationships ...string) *Verification

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

func NewVerification

func NewVerification(
	method VerificationMethod,
	relationships VerificationRelationships,
	contexts Contexts,
) *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 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
	//	*VerificationMethod_PublicKeyJwk
	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 isVerificationMethod_VerificationMaterial,
	vmt VerificationMethodType,
) 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) GetPublicKeyJwk

func (m *VerificationMethod) GetPublicKeyJwk() *PublicKeyJwk

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 VerificationMethodType

type VerificationMethodType string

VerificationMethodType encode the verification material type

const (
	EcdsaSecp256k1VerificationKey2019 VerificationMethodType = "EcdsaSecp256k1VerificationKey2019"
	Ed25519VerificationKey2018        VerificationMethodType = "Ed25519VerificationKey2018"
	X25519KeyAgreementKey2019         VerificationMethodType = "X25519KeyAgreementKey2019"
	Bls12381G1Key2020                 VerificationMethodType = "Bls12381G1Key2020"
	Bls12381G2Key2020                 VerificationMethodType = "Bls12381G2Key2020"
	// CosmosAccountAddress is a custom implementation for ephemeral dids
	CosmosAccountAddress VerificationMethodType = "CosmosAccountAddress"
)

Verification methods supported types

func (VerificationMethodType) String

func (p VerificationMethodType) String() string

String return string name for the Verification Method type

type VerificationMethod_BlockchainAccountID

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

func NewBlockchainAccountID

func NewBlockchainAccountID(chainID, account string) *VerificationMethod_BlockchainAccountID

NewBlockchainAccountID build a new blockchain account ID struct

func NewBlockchainAccountIDFromString

func NewBlockchainAccountIDFromString(baID string) *VerificationMethod_BlockchainAccountID

NewBlockchainAccountIDFromString build a new blockchain account ID struct

func (*VerificationMethod_BlockchainAccountID) Equal

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

func (VerificationMethod_BlockchainAccountID) GetAddress

GetAddress get the address from a blockchain account id

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

func (baID VerificationMethod_BlockchainAccountID) MatchAddress(address string) bool

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

func (*VerificationMethod_BlockchainAccountID) Size

func (VerificationMethod_BlockchainAccountID) Validate

Validate verify that the BlockchainAccountID is not empty

type VerificationMethod_PublicKeyHex

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

func NewPublicKeyHex

func NewPublicKeyHex(pubKey []byte) *VerificationMethod_PublicKeyHex

NewPublicKeyHex build a new public key hex struct https://w3c.github.io/did-spec-registries/#publickeyhex

func NewPublicKeyHexFromString

func NewPublicKeyHexFromString(pubKeyHex string) (pkh *VerificationMethod_PublicKeyHex, err error)

NewPublicKeyHexFromString build a new public key hex struct from a string https://w3c.github.io/did-spec-registries/#publickeyhex

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)

func (VerificationMethod_PublicKeyHex) Validate

func (vm VerificationMethod_PublicKeyHex) Validate() error

Validate verify that the PublicKeyHex is not empty

type VerificationMethod_PublicKeyJwk

type VerificationMethod_PublicKeyJwk struct {
	PublicKeyJwk *PublicKeyJwk `protobuf:"bytes,7,opt,name=PublicKeyJwk,proto3,oneof" json:"PublicKeyJwk,omitempty"`
}

func NewPublicKeyJwk

func NewPublicKeyJwk(pubKey []byte) (vm *VerificationMethod_PublicKeyJwk, err error)

NewPublicKeyJwk build a PublicKeyJwk struct from a json string encoded as a byte sequence.

func NewPublicKeyJwkFromJSON

func NewPublicKeyJwkFromJSON(pubKeyJSON string) (vm *VerificationMethod_PublicKeyJwk, err error)

NewPublicKeyJwkFromJSON build a PublicKeyJwk struct from a json string

func (*VerificationMethod_PublicKeyJwk) Equal

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

func (*VerificationMethod_PublicKeyJwk) MarshalTo

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

func (*VerificationMethod_PublicKeyJwk) MarshalToSizedBuffer

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

func (*VerificationMethod_PublicKeyJwk) Size

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

func (VerificationMethod_PublicKeyJwk) Validate

func (vm VerificationMethod_PublicKeyJwk) Validate() (err error)

Validate verify that the PublicKeyJwk is not empty and contains mandatory fields

type VerificationMethod_PublicKeyMultibase

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

func NewPublicKeyMultibase

func NewPublicKeyMultibase(pubKey []byte) *VerificationMethod_PublicKeyMultibase

NewPublicKeyMultibase 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 NewPublicKeyMultibaseFromHex

func NewPublicKeyMultibaseFromHex(pubKeyHex string) (pkm *VerificationMethod_PublicKeyMultibase, err error)

NewPublicKeyMultibaseFromHex encode a hex string in a pub key multibase format

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

func (VerificationMethod_PublicKeyMultibase) Validate

Validate verify that the PublicKeyMultibase is not empty

type VerificationRelationship

type VerificationRelationship int

VerificationRelationship defines the enum that represents the VerificationRelationship

type VerificationRelationships

type VerificationRelationships []string

VerificationRelationships for did document manipulation

type Verifications

type Verifications []*Verification

Verifications is a list of verification

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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