types

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: GPL-3.0 Imports: 56 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Utility functions for DID Service - https://w3c.github.io/did-core/#services I.e. Service Endpoints for IPFS Cluster

Index

Constants

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

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_service"
)
View Source
const (
	ServiceRecordKey      = "ServiceRecord/value/"
	ServiceRecordCountKey = "ServiceRecord/count/"
)
View Source
const (
	TypeMsgCreateServiceRecord = "create_service_record"
	TypeMsgUpdateServiceRecord = "update_service_record"
	TypeMsgDeleteServiceRecord = "delete_service_record"
)
View Source
const (
	VaultServiceType            = "EncryptedVault"
	LinkedDomainServiceType     = "LinkedDomains"
	DIDCommMessagingServiceType = "DIDCommMessaging"
)
View Source
const (
	// Minimum length of base colon separated DID
	MIN_BASE_PART_LENGTH = 3

	// Maximum length of base colon separated DID
	MAX_BASE_PART_LENGTH = 4
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

Variables

View Source
var (
	ErrInvalidLengthCredential        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCredential          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCredential = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrSample                = sdkerrors.Register(ModuleName, 1100, "sample error")
	ErrServiceRecordNotFound = sdkerrors.Register(ModuleName, 2, "service record not found")
)

x/service module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthOrg        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOrg          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOrg = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = 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 (
	ErrInvalidLengthRecord        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRecord          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRecord = 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 (
	ErrBaseNotFound              = errors.New("Unable to determine base did of provided string.")
	ErrFragmentAndQuery          = errors.New("Unable to create new DID. Fragment and Query are mutually exclusive")
	ErrParseInvalid              = errors.New("Unable to parse string into DID, invalid format.")
	DidForbiddenSymbolsRegexp, _ = regexp.Compile(`^[^&\\]+$`)
)
View Source
var Permissions_name = map[int32]string{
	0: "SR_BASE",
	1: "SR_SIGN",
	2: "SR_WRITE",
	3: "SR_CREATE",
	4: "SR_NOTIFY",
}
View Source
var Permissions_value = map[string]int32{
	"SR_BASE":   0,
	"SR_SIGN":   1,
	"SR_WRITE":  2,
	"SR_CREATE": 3,
	"SR_NOTIFY": 4,
}

Functions

func Complement

func Complement(vs []string, ts []string) []string

Complement returns a new slice containing all strings from the slice that do not satisfy the predicate

func Contains

func Contains(vs []string, t string) bool

Contains returns true if the string is in the slice

func ContainsFragment

func ContainsFragment(didUrl string) bool

ContainsFragment checks if a DID has a fragment in the full string

func ContainsModule

func ContainsModule(didUrl string) bool

ContainsModule checks if a core service module is present in the DID

func ContainsPath

func ContainsPath(didUrl string) bool

ContainsPath returns true if a DID has a path in the full string

func ContainsQuery

func ContainsQuery(didUrl string) bool

ContainsQuery checks if a DID has a query in the full string

func ContainsString

func ContainsString(s string, t string) bool

ContainsString returns true if this string contains target string

func ConvertAccAddressToDid

func ConvertAccAddressToDid(address interface{}) string

WARNING: This method is used only for module simulation tests. Do not implement this method across different types in the package. ConvertAccAddressToDid converts an AccAddress to a DID

func ConvertDidToAccAddress

func ConvertDidToAccAddress(did string) (sdk.AccAddress, error)

WARNING: This method is used only for module simulation tests. Do not implement this method across different types in the package. ConvertDidToAccAddress converts a DID to an AccAddress

func ExtractBase

func ExtractBase(did string) (bool, string)

ExtractBase extracts the did base (did:snr:<network>:<address>) or (did:snr:address)

func ExtractFragment

func ExtractFragment(didUrl string) (bool, string)

ExtractFragment splits a DID URL and pulls the fragment

func ExtractIdentifier

func ExtractIdentifier(did string) (bool, string)

ExtractIdentifier extracts the identifier from a DID

func ExtractPath

func ExtractPath(didUrl string) (bool, string)

ExtractPath splits a DID URL and pulls the path

func ExtractQuery

func ExtractQuery(didUrl string) (bool, string)

ExtractQuery splits a DID URL and pulls the query

func Filter

func Filter(vs []string, f func(string) bool) []string

Filter returns a new slice containing all strings from the slice that satisfy the predicate

func GetCredentialDescriptorsForDIDDocument added in v0.7.0

func GetCredentialDescriptorsForDIDDocument(didDoc *idtypes.DIDDocument) ([]protocol.CredentialDescriptor, error)

GetCredentialDescriptorsForDIDDocument returns a list of credential descriptors for a DID document

func IndexOf

func IndexOf(vs []string, t string) int

IndexOf returns the index of the first instance of a value in a slice

func IsFragment

func IsFragment(didUrl string) bool

IsFragment checks if a DID fragment is valid

func IsPath

func IsPath(didUrl string) bool

IsPath returns true if a DID has a path in the full string

func IsQuery

func IsQuery(didUrl string) bool

IsQuery checks if a DID query is valid

func IsValidDid

func IsValidDid(did string) bool

IsValidDid checks if a DID is valid

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ToFragment

func ToFragment(str string) string

func ToIdentifier

func ToIdentifier(str string) string

func ToNetwork

func ToNetwork(str string) string

func ToQuery

func ToQuery(str string) string

Types

type AccountKeeper

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

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

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

BankKeeper defines the expected interface needed to retrieve account balances.

type GenesisState

type GenesisState struct {
	Params             Params          `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	ServiceRecordList  []ServiceRecord `protobuf:"bytes,2,rep,name=serviceRecordList,proto3" json:"serviceRecordList"`
	ServiceRecordCount uint64          `protobuf:"varint,3,opt,name=serviceRecordCount,proto3" json:"serviceRecordCount,omitempty"`
}

GenesisState defines the service module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetServiceRecordCount added in v0.6.28

func (m *GenesisState) GetServiceRecordCount() uint64

func (*GenesisState) GetServiceRecordList

func (m *GenesisState) GetServiceRecordList() []ServiceRecord

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type GroupKeeper

type GroupKeeper interface {
	CreateGroup(goCtx context.Context, req *group.MsgCreateGroup) (*group.MsgCreateGroupResponse, error)
	CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGroupPolicy) (*group.MsgCreateGroupPolicyResponse, error)
	CreateGroupWithPolicy(goCtx context.Context, req *group.MsgCreateGroupWithPolicy) (*group.MsgCreateGroupWithPolicyResponse, error)
	GroupMembers(goCtx context.Context, request *group.QueryGroupMembersRequest) (*group.QueryGroupMembersResponse, error)
	GroupPolicyInfo(goCtx context.Context, request *group.QueryGroupPolicyInfoRequest) (*group.QueryGroupPolicyInfoResponse, error)
	GroupsByAdmin(goCtx context.Context, request *group.QueryGroupsByAdminRequest) (*group.QueryGroupsByAdminResponse, error)
	GroupsByMember(goCtx context.Context, request *group.QueryGroupsByMemberRequest) (*group.QueryGroupsByMemberResponse, error)
	LeaveGroup(goCtx context.Context, req *group.MsgLeaveGroup) (*group.MsgLeaveGroupResponse, error)
	Proposal(goCtx context.Context, request *group.QueryProposalRequest) (*group.QueryProposalResponse, error)
	PruneProposals(ctx sdk.Context) error
	SubmitProposal(goCtx context.Context, req *group.MsgSubmitProposal) (*group.MsgSubmitProposalResponse, error)
	UpdateGroupMembers(goCtx context.Context, req *group.MsgUpdateGroupMembers) (*group.MsgUpdateGroupMembersResponse, error)
	UpdateGroupMetadata(goCtx context.Context, req *group.MsgUpdateGroupMetadata) (*group.MsgUpdateGroupMetadataResponse, error)
	Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteResponse, error)
	VotesByProposal(goCtx context.Context, request *group.QueryVotesByProposalRequest) (*group.QueryVotesByProposalResponse, error)
	WithdrawProposal(goCtx context.Context, req *group.MsgWithdrawProposal) (*group.MsgWithdrawProposalResponse, error)
}

type IdentityKeeper

type IdentityKeeper interface {
	CheckAlsoKnownAs(ctx sdk.Context, alias string) error
	GetIdentityByPrimaryAlias(ctx sdk.Context, alias string) (val identitytypes.DIDDocument, found bool)
	GetDIDDocument(ctx sdk.Context, did string) (val identitytypes.DIDDocument, found bool)
}

IdentityKeeper defines the expected interface needed to retrieve account balances.

type MsgClient

type MsgClient interface {
	CreateServiceRecord(ctx context.Context, in *MsgCreateServiceRecord, opts ...grpc.CallOption) (*MsgCreateServiceRecordResponse, error)
	UpdateServiceRecord(ctx context.Context, in *MsgUpdateServiceRecord, opts ...grpc.CallOption) (*MsgUpdateServiceRecordResponse, error)
	DeleteServiceRecord(ctx context.Context, in *MsgDeleteServiceRecord, opts ...grpc.CallOption) (*MsgDeleteServiceRecordResponse, 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 MsgCreateServiceRecord

type MsgCreateServiceRecord struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
}

func NewMsgCreateServiceRecord

func NewMsgCreateServiceRecord(creator string) *MsgCreateServiceRecord

func (*MsgCreateServiceRecord) Descriptor

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

func (*MsgCreateServiceRecord) GetCreator added in v0.6.28

func (m *MsgCreateServiceRecord) GetCreator() string

func (*MsgCreateServiceRecord) GetSignBytes

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

func (*MsgCreateServiceRecord) GetSigners

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

func (*MsgCreateServiceRecord) Marshal

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

func (*MsgCreateServiceRecord) MarshalTo

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

func (*MsgCreateServiceRecord) MarshalToSizedBuffer

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

func (*MsgCreateServiceRecord) ProtoMessage

func (*MsgCreateServiceRecord) ProtoMessage()

func (*MsgCreateServiceRecord) Reset

func (m *MsgCreateServiceRecord) Reset()

func (*MsgCreateServiceRecord) Route

func (msg *MsgCreateServiceRecord) Route() string

func (*MsgCreateServiceRecord) Size

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

func (*MsgCreateServiceRecord) String

func (m *MsgCreateServiceRecord) String() string

func (*MsgCreateServiceRecord) Type

func (msg *MsgCreateServiceRecord) Type() string

func (*MsgCreateServiceRecord) Unmarshal

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

func (*MsgCreateServiceRecord) ValidateBasic

func (msg *MsgCreateServiceRecord) ValidateBasic() error

func (*MsgCreateServiceRecord) XXX_DiscardUnknown

func (m *MsgCreateServiceRecord) XXX_DiscardUnknown()

func (*MsgCreateServiceRecord) XXX_Marshal

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

func (*MsgCreateServiceRecord) XXX_Merge

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

func (*MsgCreateServiceRecord) XXX_Size

func (m *MsgCreateServiceRecord) XXX_Size() int

func (*MsgCreateServiceRecord) XXX_Unmarshal

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

type MsgCreateServiceRecordResponse

type MsgCreateServiceRecordResponse struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*MsgCreateServiceRecordResponse) Descriptor

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

func (*MsgCreateServiceRecordResponse) GetId added in v0.6.28

func (*MsgCreateServiceRecordResponse) Marshal

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

func (*MsgCreateServiceRecordResponse) MarshalTo

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

func (*MsgCreateServiceRecordResponse) MarshalToSizedBuffer

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

func (*MsgCreateServiceRecordResponse) ProtoMessage

func (*MsgCreateServiceRecordResponse) ProtoMessage()

func (*MsgCreateServiceRecordResponse) Reset

func (m *MsgCreateServiceRecordResponse) Reset()

func (*MsgCreateServiceRecordResponse) Size

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

func (*MsgCreateServiceRecordResponse) String

func (*MsgCreateServiceRecordResponse) Unmarshal

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

func (*MsgCreateServiceRecordResponse) XXX_DiscardUnknown

func (m *MsgCreateServiceRecordResponse) XXX_DiscardUnknown()

func (*MsgCreateServiceRecordResponse) XXX_Marshal

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

func (*MsgCreateServiceRecordResponse) XXX_Merge

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

func (*MsgCreateServiceRecordResponse) XXX_Size

func (m *MsgCreateServiceRecordResponse) XXX_Size() int

func (*MsgCreateServiceRecordResponse) XXX_Unmarshal

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

type MsgDeleteServiceRecord

type MsgDeleteServiceRecord struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Id      uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func NewMsgDeleteServiceRecord

func NewMsgDeleteServiceRecord(creator string, id uint64) *MsgDeleteServiceRecord

func (*MsgDeleteServiceRecord) Descriptor

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

func (*MsgDeleteServiceRecord) GetCreator added in v0.6.28

func (m *MsgDeleteServiceRecord) GetCreator() string

func (*MsgDeleteServiceRecord) GetId

func (m *MsgDeleteServiceRecord) GetId() uint64

func (*MsgDeleteServiceRecord) GetSignBytes

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

func (*MsgDeleteServiceRecord) GetSigners

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

func (*MsgDeleteServiceRecord) Marshal

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

func (*MsgDeleteServiceRecord) MarshalTo

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

func (*MsgDeleteServiceRecord) MarshalToSizedBuffer

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

func (*MsgDeleteServiceRecord) ProtoMessage

func (*MsgDeleteServiceRecord) ProtoMessage()

func (*MsgDeleteServiceRecord) Reset

func (m *MsgDeleteServiceRecord) Reset()

func (*MsgDeleteServiceRecord) Route

func (msg *MsgDeleteServiceRecord) Route() string

func (*MsgDeleteServiceRecord) Size

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

func (*MsgDeleteServiceRecord) String

func (m *MsgDeleteServiceRecord) String() string

func (*MsgDeleteServiceRecord) Type

func (msg *MsgDeleteServiceRecord) Type() string

func (*MsgDeleteServiceRecord) Unmarshal

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

func (*MsgDeleteServiceRecord) ValidateBasic

func (msg *MsgDeleteServiceRecord) ValidateBasic() error

func (*MsgDeleteServiceRecord) XXX_DiscardUnknown

func (m *MsgDeleteServiceRecord) XXX_DiscardUnknown()

func (*MsgDeleteServiceRecord) XXX_Marshal

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

func (*MsgDeleteServiceRecord) XXX_Merge

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

func (*MsgDeleteServiceRecord) XXX_Size

func (m *MsgDeleteServiceRecord) XXX_Size() int

func (*MsgDeleteServiceRecord) XXX_Unmarshal

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

type MsgDeleteServiceRecordResponse

type MsgDeleteServiceRecordResponse struct {
}

func (*MsgDeleteServiceRecordResponse) Descriptor

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

func (*MsgDeleteServiceRecordResponse) Marshal

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

func (*MsgDeleteServiceRecordResponse) MarshalTo

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

func (*MsgDeleteServiceRecordResponse) MarshalToSizedBuffer

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

func (*MsgDeleteServiceRecordResponse) ProtoMessage

func (*MsgDeleteServiceRecordResponse) ProtoMessage()

func (*MsgDeleteServiceRecordResponse) Reset

func (m *MsgDeleteServiceRecordResponse) Reset()

func (*MsgDeleteServiceRecordResponse) Size

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

func (*MsgDeleteServiceRecordResponse) String

func (*MsgDeleteServiceRecordResponse) Unmarshal

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

func (*MsgDeleteServiceRecordResponse) XXX_DiscardUnknown

func (m *MsgDeleteServiceRecordResponse) XXX_DiscardUnknown()

func (*MsgDeleteServiceRecordResponse) XXX_Marshal

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

func (*MsgDeleteServiceRecordResponse) XXX_Merge

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

func (*MsgDeleteServiceRecordResponse) XXX_Size

func (m *MsgDeleteServiceRecordResponse) XXX_Size() int

func (*MsgDeleteServiceRecordResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type MsgUpdateServiceRecord

type MsgUpdateServiceRecord struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Id      uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func NewMsgUpdateServiceRecord

func NewMsgUpdateServiceRecord(creator string, id uint64) *MsgUpdateServiceRecord

func (*MsgUpdateServiceRecord) Descriptor

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

func (*MsgUpdateServiceRecord) GetCreator added in v0.6.28

func (m *MsgUpdateServiceRecord) GetCreator() string

func (*MsgUpdateServiceRecord) GetId

func (m *MsgUpdateServiceRecord) GetId() uint64

func (*MsgUpdateServiceRecord) GetSignBytes

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

func (*MsgUpdateServiceRecord) GetSigners

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

func (*MsgUpdateServiceRecord) Marshal

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

func (*MsgUpdateServiceRecord) MarshalTo

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

func (*MsgUpdateServiceRecord) MarshalToSizedBuffer

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

func (*MsgUpdateServiceRecord) ProtoMessage

func (*MsgUpdateServiceRecord) ProtoMessage()

func (*MsgUpdateServiceRecord) Reset

func (m *MsgUpdateServiceRecord) Reset()

func (*MsgUpdateServiceRecord) Route

func (msg *MsgUpdateServiceRecord) Route() string

func (*MsgUpdateServiceRecord) Size

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

func (*MsgUpdateServiceRecord) String

func (m *MsgUpdateServiceRecord) String() string

func (*MsgUpdateServiceRecord) Type

func (msg *MsgUpdateServiceRecord) Type() string

func (*MsgUpdateServiceRecord) Unmarshal

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

func (*MsgUpdateServiceRecord) ValidateBasic

func (msg *MsgUpdateServiceRecord) ValidateBasic() error

func (*MsgUpdateServiceRecord) XXX_DiscardUnknown

func (m *MsgUpdateServiceRecord) XXX_DiscardUnknown()

func (*MsgUpdateServiceRecord) XXX_Marshal

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

func (*MsgUpdateServiceRecord) XXX_Merge

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

func (*MsgUpdateServiceRecord) XXX_Size

func (m *MsgUpdateServiceRecord) XXX_Size() int

func (*MsgUpdateServiceRecord) XXX_Unmarshal

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

type MsgUpdateServiceRecordResponse

type MsgUpdateServiceRecordResponse struct {
}

func (*MsgUpdateServiceRecordResponse) Descriptor

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

func (*MsgUpdateServiceRecordResponse) Marshal

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

func (*MsgUpdateServiceRecordResponse) MarshalTo

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

func (*MsgUpdateServiceRecordResponse) MarshalToSizedBuffer

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

func (*MsgUpdateServiceRecordResponse) ProtoMessage

func (*MsgUpdateServiceRecordResponse) ProtoMessage()

func (*MsgUpdateServiceRecordResponse) Reset

func (m *MsgUpdateServiceRecordResponse) Reset()

func (*MsgUpdateServiceRecordResponse) Size

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

func (*MsgUpdateServiceRecordResponse) String

func (*MsgUpdateServiceRecordResponse) Unmarshal

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

func (*MsgUpdateServiceRecordResponse) XXX_DiscardUnknown

func (m *MsgUpdateServiceRecordResponse) XXX_DiscardUnknown()

func (*MsgUpdateServiceRecordResponse) XXX_Marshal

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

func (*MsgUpdateServiceRecordResponse) XXX_Merge

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

func (*MsgUpdateServiceRecordResponse) XXX_Size

func (m *MsgUpdateServiceRecordResponse) XXX_Size() int

func (*MsgUpdateServiceRecordResponse) XXX_Unmarshal

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

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (Params) NewWebauthnAssertionOptions

func (p Params) NewWebauthnAssertionOptions(s *ServiceRecord, challenge protocol.URLEncodedBase64, allowedCredentials []protocol.CredentialDescriptor) (protocol.CredentialAssertion, error)

NewWebauthnAssertionOptions returns the webauthn assertion options.

func (Params) NewWebauthnCreationOptions

func (p Params) NewWebauthnCreationOptions(rp protocol.RelyingPartyEntity, alias string, challenge protocol.URLEncodedBase64) (protocol.CredentialCreation, error)

NewWebauthnCreationOptions returns the webauthn creation options.

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Permissions added in v0.6.26

type Permissions int32

Permissions are a bitfield of permissions that a user has for a given service in order to perform certain actions.

const (
	// Authenticated user with basic public info and read access to public
	// resources
	Permissions_SR_BASE Permissions = 0
	// Authenticated user with service-side access to signing privelages
	Permissions_SR_SIGN Permissions = 1
	// Authenticated user with service-side access to writing to ipfs
	Permissions_SR_WRITE Permissions = 2
	// Authenticated user with service-side access to updating user DID documents
	// and creating new ones
	Permissions_SR_CREATE Permissions = 3
	// Authenticated user with service-side access to receiving notifications
	Permissions_SR_NOTIFY Permissions = 4
)

func (Permissions) EnumDescriptor added in v0.6.26

func (Permissions) EnumDescriptor() ([]byte, []int)

func (Permissions) String added in v0.6.26

func (x Permissions) String() string

type PublicKeyCredentialRequestOptions added in v0.6.24

type PublicKeyCredentialRequestOptions struct {
	Challenge          protocol.URLEncodedBase64            `json:"challenge"`
	Timeout            int                                  `json:"timeout,omitempty"`
	RelyingPartyID     string                               `json:"rpId,omitempty"`
	AllowedCredentials []protocol.CredentialDescriptor      `json:"allowCredentials,omitempty"`
	UserVerification   protocol.UserVerificationRequirement `json:"userVerification,omitempty"`
	Extensions         protocol.AuthenticationExtensions    `json:"extensions,omitempty"`
	Attestion          string                               `json:"attestation,omitempty"`
	AttestionFormats   []string                             `json:"attestationFormats,omitempty"`
}

PublicKeyCredentialRequestOptions is a struct that contains the options for a PublicKeyCredentialRequest This is a modified version of the struct from the webauthn package to allow for the Attestation field

type QueryAllServiceRecordRequest

type QueryAllServiceRecordRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllServiceRecordRequest) Descriptor

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

func (*QueryAllServiceRecordRequest) GetPagination

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

func (*QueryAllServiceRecordRequest) Marshal

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

func (*QueryAllServiceRecordRequest) MarshalTo

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

func (*QueryAllServiceRecordRequest) MarshalToSizedBuffer

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

func (*QueryAllServiceRecordRequest) ProtoMessage

func (*QueryAllServiceRecordRequest) ProtoMessage()

func (*QueryAllServiceRecordRequest) Reset

func (m *QueryAllServiceRecordRequest) Reset()

func (*QueryAllServiceRecordRequest) Size

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

func (*QueryAllServiceRecordRequest) String

func (*QueryAllServiceRecordRequest) Unmarshal

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

func (*QueryAllServiceRecordRequest) XXX_DiscardUnknown

func (m *QueryAllServiceRecordRequest) XXX_DiscardUnknown()

func (*QueryAllServiceRecordRequest) XXX_Marshal

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

func (*QueryAllServiceRecordRequest) XXX_Merge

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

func (*QueryAllServiceRecordRequest) XXX_Size

func (m *QueryAllServiceRecordRequest) XXX_Size() int

func (*QueryAllServiceRecordRequest) XXX_Unmarshal

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

type QueryAllServiceRecordResponse

type QueryAllServiceRecordResponse struct {
	ServiceRecord []ServiceRecord     `protobuf:"bytes,1,rep,name=ServiceRecord,proto3" json:"ServiceRecord"`
	Pagination    *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllServiceRecordResponse) Descriptor

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

func (*QueryAllServiceRecordResponse) GetPagination

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

func (*QueryAllServiceRecordResponse) GetServiceRecord

func (m *QueryAllServiceRecordResponse) GetServiceRecord() []ServiceRecord

func (*QueryAllServiceRecordResponse) Marshal

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

func (*QueryAllServiceRecordResponse) MarshalTo

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

func (*QueryAllServiceRecordResponse) MarshalToSizedBuffer

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

func (*QueryAllServiceRecordResponse) ProtoMessage

func (*QueryAllServiceRecordResponse) ProtoMessage()

func (*QueryAllServiceRecordResponse) Reset

func (m *QueryAllServiceRecordResponse) Reset()

func (*QueryAllServiceRecordResponse) Size

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

func (*QueryAllServiceRecordResponse) String

func (*QueryAllServiceRecordResponse) Unmarshal

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

func (*QueryAllServiceRecordResponse) XXX_DiscardUnknown

func (m *QueryAllServiceRecordResponse) XXX_DiscardUnknown()

func (*QueryAllServiceRecordResponse) XXX_Marshal

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

func (*QueryAllServiceRecordResponse) XXX_Merge

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

func (*QueryAllServiceRecordResponse) XXX_Size

func (m *QueryAllServiceRecordResponse) XXX_Size() int

func (*QueryAllServiceRecordResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of ServiceRecord items.
	ServiceRecord(ctx context.Context, in *QueryGetServiceRecordRequest, opts ...grpc.CallOption) (*QueryGetServiceRecordResponse, error)
	ServiceRecordAll(ctx context.Context, in *QueryAllServiceRecordRequest, opts ...grpc.CallOption) (*QueryAllServiceRecordResponse, 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 QueryGetServiceRecordRequest

type QueryGetServiceRecordRequest struct {
	Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
}

func (*QueryGetServiceRecordRequest) Descriptor

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

func (*QueryGetServiceRecordRequest) GetOrigin added in v0.6.28

func (m *QueryGetServiceRecordRequest) GetOrigin() string

func (*QueryGetServiceRecordRequest) Marshal

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

func (*QueryGetServiceRecordRequest) MarshalTo

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

func (*QueryGetServiceRecordRequest) MarshalToSizedBuffer

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

func (*QueryGetServiceRecordRequest) ProtoMessage

func (*QueryGetServiceRecordRequest) ProtoMessage()

func (*QueryGetServiceRecordRequest) Reset

func (m *QueryGetServiceRecordRequest) Reset()

func (*QueryGetServiceRecordRequest) Size

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

func (*QueryGetServiceRecordRequest) String

func (*QueryGetServiceRecordRequest) Unmarshal

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

func (*QueryGetServiceRecordRequest) XXX_DiscardUnknown

func (m *QueryGetServiceRecordRequest) XXX_DiscardUnknown()

func (*QueryGetServiceRecordRequest) XXX_Marshal

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

func (*QueryGetServiceRecordRequest) XXX_Merge

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

func (*QueryGetServiceRecordRequest) XXX_Size

func (m *QueryGetServiceRecordRequest) XXX_Size() int

func (*QueryGetServiceRecordRequest) XXX_Unmarshal

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

type QueryGetServiceRecordResponse

type QueryGetServiceRecordResponse struct {
	ServiceRecord ServiceRecord `protobuf:"bytes,1,opt,name=ServiceRecord,proto3" json:"ServiceRecord"`
}

func (*QueryGetServiceRecordResponse) Descriptor

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

func (*QueryGetServiceRecordResponse) GetServiceRecord

func (m *QueryGetServiceRecordResponse) GetServiceRecord() ServiceRecord

func (*QueryGetServiceRecordResponse) Marshal

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

func (*QueryGetServiceRecordResponse) MarshalTo

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

func (*QueryGetServiceRecordResponse) MarshalToSizedBuffer

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

func (*QueryGetServiceRecordResponse) ProtoMessage

func (*QueryGetServiceRecordResponse) ProtoMessage()

func (*QueryGetServiceRecordResponse) Reset

func (m *QueryGetServiceRecordResponse) Reset()

func (*QueryGetServiceRecordResponse) Size

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

func (*QueryGetServiceRecordResponse) String

func (*QueryGetServiceRecordResponse) Unmarshal

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

func (*QueryGetServiceRecordResponse) XXX_DiscardUnknown

func (m *QueryGetServiceRecordResponse) XXX_DiscardUnknown()

func (*QueryGetServiceRecordResponse) XXX_Marshal

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

func (*QueryGetServiceRecordResponse) XXX_Merge

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

func (*QueryGetServiceRecordResponse) XXX_Size

func (m *QueryGetServiceRecordResponse) XXX_Size() int

func (*QueryGetServiceRecordResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of ServiceRecord items.
	ServiceRecord(context.Context, *QueryGetServiceRecordRequest) (*QueryGetServiceRecordResponse, error)
	ServiceRecordAll(context.Context, *QueryAllServiceRecordRequest) (*QueryAllServiceRecordResponse, error)
}

QueryServer is the server API for Query service.

type ServiceOrganization added in v0.6.28

type ServiceOrganization struct {
	Id             string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Admin          string   `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"`
	ServiceRecords []string `protobuf:"bytes,3,rep,name=service_records,json=serviceRecords,proto3" json:"service_records,omitempty"`
	Name           string   `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Description    string   `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	Tlds           []string `protobuf:"bytes,6,rep,name=tlds,proto3" json:"tlds,omitempty"`
}

func (*ServiceOrganization) Descriptor added in v0.6.28

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

func (*ServiceOrganization) GetAdmin added in v0.6.28

func (m *ServiceOrganization) GetAdmin() string

func (*ServiceOrganization) GetDescription added in v0.6.28

func (m *ServiceOrganization) GetDescription() string

func (*ServiceOrganization) GetId added in v0.6.28

func (m *ServiceOrganization) GetId() string

func (*ServiceOrganization) GetName added in v0.6.28

func (m *ServiceOrganization) GetName() string

func (*ServiceOrganization) GetServiceRecords added in v0.6.28

func (m *ServiceOrganization) GetServiceRecords() []string

func (*ServiceOrganization) GetTlds added in v0.6.28

func (m *ServiceOrganization) GetTlds() []string

func (*ServiceOrganization) Marshal added in v0.6.28

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

func (*ServiceOrganization) MarshalTo added in v0.6.28

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

func (*ServiceOrganization) MarshalToSizedBuffer added in v0.6.28

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

func (*ServiceOrganization) ProtoMessage added in v0.6.28

func (*ServiceOrganization) ProtoMessage()

func (*ServiceOrganization) Reset added in v0.6.28

func (m *ServiceOrganization) Reset()

func (*ServiceOrganization) Size added in v0.6.28

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

func (*ServiceOrganization) String added in v0.6.28

func (m *ServiceOrganization) String() string

func (*ServiceOrganization) Unmarshal added in v0.6.28

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

func (*ServiceOrganization) XXX_DiscardUnknown added in v0.6.28

func (m *ServiceOrganization) XXX_DiscardUnknown()

func (*ServiceOrganization) XXX_Marshal added in v0.6.28

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

func (*ServiceOrganization) XXX_Merge added in v0.6.28

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

func (*ServiceOrganization) XXX_Size added in v0.6.28

func (m *ServiceOrganization) XXX_Size() int

func (*ServiceOrganization) XXX_Unmarshal added in v0.6.28

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

type ServiceRecord

type ServiceRecord 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"`
	Origins     []string `protobuf:"bytes,3,rep,name=origins,proto3" json:"origins,omitempty"`
	Name        string   `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Description string   `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
}

func (*ServiceRecord) Descriptor

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

func (*ServiceRecord) GetBaseOrigin added in v0.6.28

func (vm *ServiceRecord) GetBaseOrigin() string

GetBaseOrigin returns the origin url without a subdomain

func (*ServiceRecord) GetController

func (m *ServiceRecord) GetController() string

func (*ServiceRecord) GetCredentialAssertionOptions added in v0.6.9

func (vm *ServiceRecord) GetCredentialAssertionOptions(allowedCredentials []protocol.CredentialDescriptor, chal protocol.URLEncodedBase64) (string, error)

GetCredentialCreationOptions issues a challenge for the VerificationMethod to sign and return

func (*ServiceRecord) GetCredentialCreationOptions

func (vm *ServiceRecord) GetCredentialCreationOptions(username string, chal protocol.URLEncodedBase64) (string, error)

GetCredentialCreationOptions issues a challenge for the VerificationMethod to sign and return

func (*ServiceRecord) GetDescription added in v0.6.28

func (m *ServiceRecord) GetDescription() string

func (*ServiceRecord) GetId

func (m *ServiceRecord) GetId() string

func (*ServiceRecord) GetName

func (m *ServiceRecord) GetName() string

func (*ServiceRecord) GetOrigins added in v0.6.28

func (m *ServiceRecord) GetOrigins() []string

func (*ServiceRecord) GetUserEntity

func (s *ServiceRecord) GetUserEntity(id string) protocol.UserEntity

func (*ServiceRecord) Marshal

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

func (*ServiceRecord) MarshalTo

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

func (*ServiceRecord) MarshalToSizedBuffer

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

func (*ServiceRecord) NewServiceRelationship added in v0.6.27

func (s *ServiceRecord) NewServiceRelationship(id string) *ServiceRelationship

NewServiceRelationship creates a new service relationship for an Identification authenticated by a ServiceRecord

func (*ServiceRecord) ProtoMessage

func (*ServiceRecord) ProtoMessage()

func (*ServiceRecord) RelyingPartyEntity

func (s *ServiceRecord) RelyingPartyEntity() protocol.RelyingPartyEntity

RelyingPartyEntity is a struct that represents a Relying Party entity.

func (*ServiceRecord) Reset

func (m *ServiceRecord) Reset()

func (*ServiceRecord) Size

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

func (*ServiceRecord) String

func (m *ServiceRecord) String() string

func (*ServiceRecord) Unmarshal

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

func (*ServiceRecord) VerifyAssertionChallenge added in v0.6.16

func (vm *ServiceRecord) VerifyAssertionChallenge(resp string) (*WebauthnCredential, error)

VeriifyAssertionChallenge verifies the challenge and an assertion signature and returns an error if it fails to verify

func (*ServiceRecord) VerifyCreationChallenge

func (vm *ServiceRecord) VerifyCreationChallenge(resp string, chal string) (*WebauthnCredential, error)

VerifyCreationChallenge verifies the challenge and a creation signature and returns an error if it fails to verify

func (*ServiceRecord) XXX_DiscardUnknown

func (m *ServiceRecord) XXX_DiscardUnknown()

func (*ServiceRecord) XXX_Marshal

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

func (*ServiceRecord) XXX_Merge

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

func (*ServiceRecord) XXX_Size

func (m *ServiceRecord) XXX_Size() int

func (*ServiceRecord) XXX_Unmarshal

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

type ServiceRelationship added in v0.6.26

type ServiceRelationship struct {
	// Reference is the reference to the service record
	Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
	// Did is the user's DID
	Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"`
	// Count is the number of times the user has interacted with the service
	Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
}

ServiceRelationship is a relationship between a service and a User entity. This relation is used to track the number of times a user has interacted with a service, utilizing a verifiable random function (VRF) to generate a random number that is used to determine whether or not a user has access to a service.

func (*ServiceRelationship) Descriptor added in v0.6.26

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

func (*ServiceRelationship) GetCount added in v0.6.26

func (m *ServiceRelationship) GetCount() uint32

func (*ServiceRelationship) GetDid added in v0.6.26

func (m *ServiceRelationship) GetDid() string

func (*ServiceRelationship) GetReference added in v0.6.26

func (m *ServiceRelationship) GetReference() string

func (*ServiceRelationship) Marshal added in v0.6.26

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

func (*ServiceRelationship) MarshalTo added in v0.6.26

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

func (*ServiceRelationship) MarshalToSizedBuffer added in v0.6.26

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

func (*ServiceRelationship) ProtoMessage added in v0.6.26

func (*ServiceRelationship) ProtoMessage()

func (*ServiceRelationship) Reset added in v0.6.26

func (m *ServiceRelationship) Reset()

func (*ServiceRelationship) Size added in v0.6.26

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

func (*ServiceRelationship) String added in v0.6.26

func (m *ServiceRelationship) String() string

func (*ServiceRelationship) Unmarshal added in v0.6.26

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

func (*ServiceRelationship) XXX_DiscardUnknown added in v0.6.26

func (m *ServiceRelationship) XXX_DiscardUnknown()

func (*ServiceRelationship) XXX_Marshal added in v0.6.26

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

func (*ServiceRelationship) XXX_Merge added in v0.6.26

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

func (*ServiceRelationship) XXX_Size added in v0.6.26

func (m *ServiceRelationship) XXX_Size() int

func (*ServiceRelationship) XXX_Unmarshal added in v0.6.26

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateServiceRecord

func (*UnimplementedMsgServer) DeleteServiceRecord

func (*UnimplementedMsgServer) UpdateServiceRecord

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) ServiceRecord

func (*UnimplementedQueryServer) ServiceRecordAll

type VaultKeeper added in v0.6.26

type VaultKeeper interface {
}

VaultKeeper defines the expected interface for managing Keys on IPFS Vaults

type WebauthnAuthenticator added in v0.6.19

type WebauthnAuthenticator struct {
	// The AAGUID of the authenticator. An AAGUID is defined as an array
	// containing the globally unique identifier of the authenticator model being
	// sought.
	Aaguid []byte `protobuf:"bytes,1,opt,name=aaguid,proto3" json:"aaguid,omitempty"`
	// SignCount -Upon a new login operation, the Relying Party compares the
	// stored signature counter value with the new signCount value returned in the
	// assertion’s authenticator data. If this new signCount value is less than or
	// equal to the stored value, a cloned authenticator may exist, or the
	// authenticator may be malfunctioning.
	SignCount uint32 `protobuf:"varint,2,opt,name=sign_count,json=signCount,proto3" json:"sign_count,omitempty"`
	// Attachment - This is a signal that the authenticator may be cloned, i.e. at
	// least two copies of the credential private key may exist and are being used
	// in parallel. Relying Parties should incorporate this information into their
	// risk scoring. Whether the Relying Party updates the stored signature
	// counter value in this case, or not, or fails the authentication ceremony or
	// not, is Relying Party-specific.
	Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
}

WebauthnAuthenticator contains certificate information about a WebAuthn authenticator

func (*WebauthnAuthenticator) Descriptor added in v0.6.19

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

func (*WebauthnAuthenticator) GetAaguid added in v0.6.19

func (m *WebauthnAuthenticator) GetAaguid() []byte

func (*WebauthnAuthenticator) GetAttachment added in v0.6.23

func (m *WebauthnAuthenticator) GetAttachment() string

func (*WebauthnAuthenticator) GetSignCount added in v0.6.19

func (m *WebauthnAuthenticator) GetSignCount() uint32

func (*WebauthnAuthenticator) Marshal added in v0.6.19

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

func (*WebauthnAuthenticator) MarshalTo added in v0.6.19

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

func (*WebauthnAuthenticator) MarshalToSizedBuffer added in v0.6.19

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

func (*WebauthnAuthenticator) ProtoMessage added in v0.6.19

func (*WebauthnAuthenticator) ProtoMessage()

func (*WebauthnAuthenticator) Reset added in v0.6.19

func (m *WebauthnAuthenticator) Reset()

func (*WebauthnAuthenticator) Size added in v0.6.19

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

func (*WebauthnAuthenticator) String added in v0.6.19

func (m *WebauthnAuthenticator) String() string

func (*WebauthnAuthenticator) Unmarshal added in v0.6.19

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

func (*WebauthnAuthenticator) XXX_DiscardUnknown added in v0.6.19

func (m *WebauthnAuthenticator) XXX_DiscardUnknown()

func (*WebauthnAuthenticator) XXX_Marshal added in v0.6.19

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

func (*WebauthnAuthenticator) XXX_Merge added in v0.6.19

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

func (*WebauthnAuthenticator) XXX_Size added in v0.6.19

func (m *WebauthnAuthenticator) XXX_Size() int

func (*WebauthnAuthenticator) XXX_Unmarshal added in v0.6.19

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

type WebauthnCredential added in v0.6.19

type WebauthnCredential struct {
	// A probabilistically-unique byte sequence identifying a public key
	// credential source and its authentication assertions.
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The public key portion of a Relying Party-specific credential key pair,
	// generated by an authenticator and returned to a Relying Party at
	// registration time (see also public key credential). The private key portion
	// of the credential key pair is known as the credential private key. Note
	// that in the case of self attestation, the credential key pair is also used
	// as the attestation key pair, see self attestation for details.
	PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// The attestation format used (if any) by the authenticator when creating the
	// credential.
	AttestationType string `protobuf:"bytes,3,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"`
	// The transports used by the authenticator when creating the credential.
	Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"`
	// The Authenticator information for a given certificate
	Authenticator *WebauthnAuthenticator `protobuf:"bytes,5,opt,name=authenticator,proto3" json:"authenticator,omitempty"`
	// The DID Controller of the credential
	Controller string `protobuf:"bytes,6,opt,name=controller,proto3" json:"controller,omitempty"`
}

WebauthnCredential contains all needed information about a WebAuthn credential for storage

func CredentialFromDIDString added in v0.6.19

func CredentialFromDIDString(did string) (*WebauthnCredential, error)

CredentialFromDIDString converts a DID string into a WebauthnCredential

func (*WebauthnCredential) DID added in v0.6.19

func (c *WebauthnCredential) DID() string

func (*WebauthnCredential) Decrypt added in v0.6.23

func (c *WebauthnCredential) Decrypt(data []byte) ([]byte, error)

Decrypt is used to decrypt a message for the credential

func (*WebauthnCredential) Descriptor added in v0.6.19

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

func (*WebauthnCredential) Deserialize added in v0.7.0

func (c *WebauthnCredential) Deserialize(data []byte) error

Deserialize the credential from JSON

func (*WebauthnCredential) Encrypt added in v0.6.23

func (c *WebauthnCredential) Encrypt(data []byte) ([]byte, error)

Encrypt is used to encrypt a message for the credential

func (*WebauthnCredential) GetAttestationType added in v0.6.19

func (m *WebauthnCredential) GetAttestationType() string

func (*WebauthnCredential) GetAuthenticator added in v0.6.19

func (m *WebauthnCredential) GetAuthenticator() *WebauthnAuthenticator

func (*WebauthnCredential) GetController added in v0.6.20

func (m *WebauthnCredential) GetController() string

func (*WebauthnCredential) GetDescriptor added in v0.7.1

func (vm *WebauthnCredential) GetDescriptor() protocol.CredentialDescriptor

ToCredentialDescriptor converts a VerificationMethod to a CredentialDescriptor if the VerificationMethod uses the `did:webauthn` method

func (*WebauthnCredential) GetId added in v0.6.19

func (m *WebauthnCredential) GetId() []byte

func (*WebauthnCredential) GetPublicKey added in v0.6.19

func (m *WebauthnCredential) GetPublicKey() []byte

func (*WebauthnCredential) GetTransport added in v0.6.19

func (m *WebauthnCredential) GetTransport() []string

func (*WebauthnCredential) Marshal added in v0.6.19

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

func (*WebauthnCredential) MarshalTo added in v0.6.19

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

func (*WebauthnCredential) MarshalToSizedBuffer added in v0.6.19

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

func (*WebauthnCredential) ProtoMessage added in v0.6.19

func (*WebauthnCredential) ProtoMessage()

func (*WebauthnCredential) PubKey added in v0.6.19

func (c *WebauthnCredential) PubKey() *crypto.PubKey

PublicKeyMultibase returns the public key in multibase format

func (*WebauthnCredential) Reset added in v0.6.19

func (m *WebauthnCredential) Reset()

func (*WebauthnCredential) Serialize added in v0.6.23

func (c *WebauthnCredential) Serialize() ([]byte, error)

Serialize the credential to JSON

func (*WebauthnCredential) ShortID added in v0.6.28

func (c *WebauthnCredential) ShortID() string

ShortID returns the first 8 characters of the base58 encoded credential id

func (*WebauthnCredential) Size added in v0.6.19

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

func (*WebauthnCredential) String added in v0.6.19

func (m *WebauthnCredential) String() string

func (*WebauthnCredential) ToVerificationMethod added in v0.6.23

func (c *WebauthnCredential) ToVerificationMethod() *idtypes.VerificationMethod

ToVerificationMethod converts the credential to a DID VerificationMethod

func (*WebauthnCredential) Unmarshal added in v0.6.19

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

func (*WebauthnCredential) XXX_DiscardUnknown added in v0.6.19

func (m *WebauthnCredential) XXX_DiscardUnknown()

func (*WebauthnCredential) XXX_Marshal added in v0.6.19

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

func (*WebauthnCredential) XXX_Merge added in v0.6.19

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

func (*WebauthnCredential) XXX_Size added in v0.6.19

func (m *WebauthnCredential) XXX_Size() int

func (*WebauthnCredential) XXX_Unmarshal added in v0.6.19

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

Jump to

Keyboard shortcuts

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