types

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: LGPL-3.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName
)
View Source
const MessageToSign = ModuleName

MessageToSign is the message for user to sign on to prove account is EOA

View Source
const TypeMsgSubmitProofExternalOwnedAccount = "submit_proof_external_owned_account"

TypeMsgSubmitProofExternalOwnedAccount is type for MsgSubmitProofExternalOwnedAccount.

Variables

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 (
	ErrInvalidLengthVauth        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVauth          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVauth = fmt.Errorf("proto: unexpected end of group")
)
View Source
var KeyPrefixProofExternalOwnedAccount = []byte{prefixProofExternalOwnedAccount}

Functions

func KeyProofExternalOwnedAccountByAddress

func KeyProofExternalOwnedAccountByAddress(accAddr sdk.AccAddress) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers the necessary types and interfaces for the module

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers implementations by its interface, for the module

func RegisterMsgHandler

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

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

func RegisterMsgHandlerClient

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

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

func RegisterMsgHandlerFromEndpoint

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

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

func RegisterMsgHandlerServer

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

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

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type GenesisState

type GenesisState struct {
}

GenesisState defines the 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) 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 (m 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 MsgClient

type MsgClient interface {
	// SubmitProofExternalOwnedAccount submit proof that an account is external owned account (EOA)
	SubmitProofExternalOwnedAccount(ctx context.Context, in *MsgSubmitProofExternalOwnedAccount, opts ...grpc.CallOption) (*MsgSubmitProofExternalOwnedAccountResponse, 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 MsgServer

type MsgServer interface {
	// SubmitProofExternalOwnedAccount submit proof that an account is external owned account (EOA)
	SubmitProofExternalOwnedAccount(context.Context, *MsgSubmitProofExternalOwnedAccount) (*MsgSubmitProofExternalOwnedAccountResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitProofExternalOwnedAccount

type MsgSubmitProofExternalOwnedAccount struct {
	// submitter is the cosmos bech32 address of the account who submitted the proof
	Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"`
	// account is the cosmos bech32 address that submit proof for
	Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	// signature is the Ethereum signed message, used to proof that the account is EOA
	Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
}

MsgSubmitProofExternalOwnedAccount defines a Msg to submit EOA proof

func (*MsgSubmitProofExternalOwnedAccount) Descriptor

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

func (*MsgSubmitProofExternalOwnedAccount) GetAccount

func (*MsgSubmitProofExternalOwnedAccount) GetSignBytes

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

GetSignBytes returns the raw bytes for the MsgSubmitProofExternalOwnedAccount.

func (*MsgSubmitProofExternalOwnedAccount) GetSignature

func (m *MsgSubmitProofExternalOwnedAccount) GetSignature() string

func (*MsgSubmitProofExternalOwnedAccount) GetSigners

GetSigners returns the required signers for the MsgSubmitProofExternalOwnedAccount.

func (*MsgSubmitProofExternalOwnedAccount) GetSubmitter

func (m *MsgSubmitProofExternalOwnedAccount) GetSubmitter() string

func (*MsgSubmitProofExternalOwnedAccount) Marshal

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

func (*MsgSubmitProofExternalOwnedAccount) MarshalTo

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

func (*MsgSubmitProofExternalOwnedAccount) MarshalToSizedBuffer

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

func (*MsgSubmitProofExternalOwnedAccount) ProtoMessage

func (*MsgSubmitProofExternalOwnedAccount) ProtoMessage()

func (*MsgSubmitProofExternalOwnedAccount) Reset

func (*MsgSubmitProofExternalOwnedAccount) Route

Route returns the message router key for the MsgSubmitProofExternalOwnedAccount.

func (*MsgSubmitProofExternalOwnedAccount) Size

func (*MsgSubmitProofExternalOwnedAccount) String

func (*MsgSubmitProofExternalOwnedAccount) Type

Type returns the message type for the MsgSubmitProofExternalOwnedAccount.

func (*MsgSubmitProofExternalOwnedAccount) Unmarshal

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

func (*MsgSubmitProofExternalOwnedAccount) ValidateBasic

func (m *MsgSubmitProofExternalOwnedAccount) ValidateBasic() error

ValidateBasic performs basic validation for the MsgSubmitProofExternalOwnedAccount.

func (*MsgSubmitProofExternalOwnedAccount) XXX_DiscardUnknown

func (m *MsgSubmitProofExternalOwnedAccount) XXX_DiscardUnknown()

func (*MsgSubmitProofExternalOwnedAccount) XXX_Marshal

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

func (*MsgSubmitProofExternalOwnedAccount) XXX_Merge

func (*MsgSubmitProofExternalOwnedAccount) XXX_Size

func (*MsgSubmitProofExternalOwnedAccount) XXX_Unmarshal

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

type MsgSubmitProofExternalOwnedAccountResponse

type MsgSubmitProofExternalOwnedAccountResponse struct {
}

MsgSubmitProofExternalOwnedAccountResponse returns no fields

func (*MsgSubmitProofExternalOwnedAccountResponse) Descriptor

func (*MsgSubmitProofExternalOwnedAccountResponse) Marshal

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

func (*MsgSubmitProofExternalOwnedAccountResponse) MarshalTo

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

func (*MsgSubmitProofExternalOwnedAccountResponse) MarshalToSizedBuffer

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

func (*MsgSubmitProofExternalOwnedAccountResponse) ProtoMessage

func (*MsgSubmitProofExternalOwnedAccountResponse) Reset

func (*MsgSubmitProofExternalOwnedAccountResponse) Size

func (*MsgSubmitProofExternalOwnedAccountResponse) String

func (*MsgSubmitProofExternalOwnedAccountResponse) Unmarshal

func (*MsgSubmitProofExternalOwnedAccountResponse) XXX_DiscardUnknown

func (m *MsgSubmitProofExternalOwnedAccountResponse) XXX_DiscardUnknown()

func (*MsgSubmitProofExternalOwnedAccountResponse) XXX_Marshal

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

func (*MsgSubmitProofExternalOwnedAccountResponse) XXX_Merge

func (*MsgSubmitProofExternalOwnedAccountResponse) XXX_Size

func (*MsgSubmitProofExternalOwnedAccountResponse) XXX_Unmarshal

type ProofExternalOwnedAccount

type ProofExternalOwnedAccount struct {
	// account is the cosmos bech32 address of the account that has proof
	Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// hash is the keccak256 of the message that was signed on
	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// signature is the signed message using private key
	Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
}

ProofExternalOwnedAccount store the proof that account is external owned account (EOA)

func (*ProofExternalOwnedAccount) Descriptor

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

func (*ProofExternalOwnedAccount) GetAccount

func (m *ProofExternalOwnedAccount) GetAccount() string

func (*ProofExternalOwnedAccount) GetHash

func (m *ProofExternalOwnedAccount) GetHash() string

func (*ProofExternalOwnedAccount) GetSignature

func (m *ProofExternalOwnedAccount) GetSignature() string

func (*ProofExternalOwnedAccount) Marshal

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

func (*ProofExternalOwnedAccount) MarshalTo

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

func (*ProofExternalOwnedAccount) MarshalToSizedBuffer

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

func (*ProofExternalOwnedAccount) ProtoMessage

func (*ProofExternalOwnedAccount) ProtoMessage()

func (*ProofExternalOwnedAccount) Reset

func (m *ProofExternalOwnedAccount) Reset()

func (*ProofExternalOwnedAccount) Size

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

func (*ProofExternalOwnedAccount) String

func (m *ProofExternalOwnedAccount) String() string

func (*ProofExternalOwnedAccount) Unmarshal

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

func (*ProofExternalOwnedAccount) ValidateBasic

func (m *ProofExternalOwnedAccount) ValidateBasic() error

func (*ProofExternalOwnedAccount) XXX_DiscardUnknown

func (m *ProofExternalOwnedAccount) XXX_DiscardUnknown()

func (*ProofExternalOwnedAccount) XXX_Marshal

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

func (*ProofExternalOwnedAccount) XXX_Merge

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

func (*ProofExternalOwnedAccount) XXX_Size

func (m *ProofExternalOwnedAccount) XXX_Size() int

func (*ProofExternalOwnedAccount) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// ProofExternalOwnedAccount returns proof of external owned account (EOA)
	ProofExternalOwnedAccount(ctx context.Context, in *QueryProofExternalOwnedAccountRequest, opts ...grpc.CallOption) (*QueryProofExternalOwnedAccountResponse, 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 QueryProofExternalOwnedAccountRequest

type QueryProofExternalOwnedAccountRequest struct {
	// account to query for
	Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
}

QueryProofExternalOwnedAccountRequest is the request type for the Query/ProofExternalOwnedAccount RPC method.

func (*QueryProofExternalOwnedAccountRequest) Descriptor

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

func (*QueryProofExternalOwnedAccountRequest) GetAccount

func (*QueryProofExternalOwnedAccountRequest) Marshal

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

func (*QueryProofExternalOwnedAccountRequest) MarshalTo

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

func (*QueryProofExternalOwnedAccountRequest) MarshalToSizedBuffer

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

func (*QueryProofExternalOwnedAccountRequest) ProtoMessage

func (*QueryProofExternalOwnedAccountRequest) ProtoMessage()

func (*QueryProofExternalOwnedAccountRequest) Reset

func (*QueryProofExternalOwnedAccountRequest) Size

func (*QueryProofExternalOwnedAccountRequest) String

func (*QueryProofExternalOwnedAccountRequest) Unmarshal

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

func (*QueryProofExternalOwnedAccountRequest) XXX_DiscardUnknown

func (m *QueryProofExternalOwnedAccountRequest) XXX_DiscardUnknown()

func (*QueryProofExternalOwnedAccountRequest) XXX_Marshal

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

func (*QueryProofExternalOwnedAccountRequest) XXX_Merge

func (*QueryProofExternalOwnedAccountRequest) XXX_Size

func (*QueryProofExternalOwnedAccountRequest) XXX_Unmarshal

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

type QueryProofExternalOwnedAccountResponse

type QueryProofExternalOwnedAccountResponse struct {
	// proof is the proof account is EOA
	Proof ProofExternalOwnedAccount `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"`
}

QueryProofExternalOwnedAccountResponse is the response type for the Query/ProofExternalOwnedAccount RPC method.

func (*QueryProofExternalOwnedAccountResponse) Descriptor

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

func (*QueryProofExternalOwnedAccountResponse) GetProof

func (*QueryProofExternalOwnedAccountResponse) Marshal

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

func (*QueryProofExternalOwnedAccountResponse) MarshalTo

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

func (*QueryProofExternalOwnedAccountResponse) MarshalToSizedBuffer

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

func (*QueryProofExternalOwnedAccountResponse) ProtoMessage

func (*QueryProofExternalOwnedAccountResponse) Reset

func (*QueryProofExternalOwnedAccountResponse) Size

func (*QueryProofExternalOwnedAccountResponse) String

func (*QueryProofExternalOwnedAccountResponse) Unmarshal

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

func (*QueryProofExternalOwnedAccountResponse) XXX_DiscardUnknown

func (m *QueryProofExternalOwnedAccountResponse) XXX_DiscardUnknown()

func (*QueryProofExternalOwnedAccountResponse) XXX_Marshal

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

func (*QueryProofExternalOwnedAccountResponse) XXX_Merge

func (*QueryProofExternalOwnedAccountResponse) XXX_Size

func (*QueryProofExternalOwnedAccountResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// ProofExternalOwnedAccount returns proof of external owned account (EOA)
	ProofExternalOwnedAccount(context.Context, *QueryProofExternalOwnedAccountRequest) (*QueryProofExternalOwnedAccountResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

Jump to

Keyboard shortcuts

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