types

package
v0.0.0-...-6e12e82 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// JWTHeaderIndex is the index of the header in the JWT ticket
	JWTHeaderIndex = 0

	// JWTPayloadIndex is the index of the payload in the JWT ticket
	JWTPayloadIndex = 1

	// JWTSeparator is the separator character between JWT ticket parts
	JWTSeparator = "."

	// DefaultTimeWeight is the default weight of the time for JWT ticket expiration
	DefaultTimeWeight = 1
)

JWT constants

View Source
const (

	// MaxValidProposalMinutes is the maximum elapsed time in minutes since
	// the start time of a proposal to be acceptable.
	MaxValidProposalMinutes = 30
	// MaxValidProposalSeconds is the maximum elapsed time in seconds since
	// the start time of a proposal to be acceptable.
	MaxValidProposalSeconds = MaxValidProposalMinutes * 60 // 30 minutes
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "dvm"

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

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

module constants

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const (
	// ErrTextInvalidRequest is the error message for an invalid request
	ErrTextInvalidRequest = "invalid signature"
)

Variables

View Source
var (
	// Amino is the legacy aminto codec
	Amino = codec.NewLegacyAmino()
	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var (
	ErrInvalidSignature       = sdkerrors.Register(ModuleName, 4101, "invalid signature")
	ErrInsufficientSignatures = sdkerrors.Register(ModuleName, 4102, "insufficient signatures for consensus")
	ErrInvalidTicketFormat    = sdkerrors.Register(ModuleName, 4103, "invalid ticket format")
	ErrExpirationRequired     = sdkerrors.Register(ModuleName, 4104, "ticket expiry must not be empty")
	ErrTicketExpired          = sdkerrors.Register(ModuleName, 4105, "ticket already expired")
	ErrMismatchKeyType        = sdkerrors.Register(ModuleName, 4106, "invalid public key")
	ErrShortKeyLength         = sdkerrors.Register(ModuleName, 4107, "insufficient key length")
	ErrNoPublicKeysFound      = sdkerrors.Register(ModuleName, 4108, "key not found")
	ErrKeyVaultNotFound       = sdkerrors.Register(ModuleName, 4109, "key vault not found")
)

x/dvm 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 (
	ErrInvalidLengthKeyVault        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKeyVault          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupKeyVault = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// KeyVaultKey is the key of the list of public keys in KV-Store which points to []string.
	KeyVaultKey = []byte{0x00}

	// ProposalStatsKey is the key for proposal statistics.
	ProposalStatsKey = []byte{0x01}

	// PubKeysChangeProposalListPrefix is the prefix of pubkeys change proposal.
	PubKeysChangeProposalListPrefix = []byte{0x02}
)

store prefixes and keys.

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 (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = 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 (
	ErrInvalidLengthStats        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStats          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStats = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTicket        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTicket          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTicket = 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 (
	ErrInvalidLengthVote        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVote          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVote = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ProposalResult_name = map[int32]string{
	0: "PROPOSAL_RESULT_UNSPECIFIED",
	1: "PROPOSAL_RESULT_APPROVED",
	2: "PROPOSAL_RESULT_REJECTED",
	3: "PROPOSAL_RESULT_EXPIRED",
}
View Source
var ProposalResult_value = map[string]int32{
	"PROPOSAL_RESULT_UNSPECIFIED": 0,
	"PROPOSAL_RESULT_APPROVED":    1,
	"PROPOSAL_RESULT_REJECTED":    2,
	"PROPOSAL_RESULT_EXPIRED":     3,
}
View Source
var ProposalStatus_name = map[int32]string{
	0: "PROPOSAL_STATUS_UNSPECIFIED",
	1: "PROPOSAL_STATUS_ACTIVE",
	2: "PROPOSAL_STATUS_FINISHED",
}
View Source
var ProposalStatus_value = map[string]int32{
	"PROPOSAL_STATUS_UNSPECIFIED": 0,
	"PROPOSAL_STATUS_ACTIVE":      1,
	"PROPOSAL_STATUS_FINISHED":    2,
}
View Source
var ProposalVote_name = map[int32]string{
	0: "PROPOSAL_VOTE_UNSPECIFIED",
	1: "PROPOSAL_VOTE_NO",
	2: "PROPOSAL_VOTE_YES",
}
View Source
var ProposalVote_value = map[string]int32{
	"PROPOSAL_VOTE_UNSPECIFIED": 0,
	"PROPOSAL_VOTE_NO":          1,
	"PROPOSAL_VOTE_YES":         2,
}

Functions

func IsValidJwtToken

func IsValidJwtToken(s string) error

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func PubkeysChangeProposalKey

func PubkeysChangeProposalKey(status ProposalStatus, id uint64) []byte

PubkeysChangeProposalKey returns key of the proposal list.

func PubkeysChangeProposalPrefix

func PubkeysChangeProposalPrefix(status ProposalStatus) []byte

PubkeysChangeProposalPrefix returns prefix of the proposal list.

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers module codec to the app codec

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the module interface types

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 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 contains parameters of dvm module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// key_vault trusted keys from genesis file.
	KeyVault KeyVault `protobuf:"bytes,2,opt,name=key_vault,json=keyVault,proto3" json:"key_vault"`
	// pubkeys_change_proposals is the finished proposal list for the
	// public keys change.
	PubkeysChangeProposals []PublicKeysChangeProposal `protobuf:"bytes,3,rep,name=pubkeys_change_proposals,json=pubkeysChangeProposals,proto3" json:"pubkeys_change_proposals"`
	// proposal_stats holds the proposal statistics.
	ProposalStats ProposalStats `protobuf:"bytes,4,opt,name=proposal_stats,json=proposalStats,proto3" json:"proposal_stats"`
}

GenesisState defines the dvm 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) GetKeyVault

func (m *GenesisState) GetKeyVault() KeyVault

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetProposalStats

func (m *GenesisState) GetProposalStats() ProposalStats

func (*GenesisState) GetPubkeysChangeProposals

func (m *GenesisState) GetPubkeysChangeProposals() []PublicKeysChangeProposal

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 KeyVault

type KeyVault struct {
	// public_keys contains allowed public keys.
	PublicKeys []string `protobuf:"bytes,1,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`
}

KeyVault is the information of important keys stored in dvm state.

func (*KeyVault) Descriptor

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

func (*KeyVault) GetLeader

func (k *KeyVault) GetLeader() string

GetLeader returns the current leader of public keys.

func (*KeyVault) GetPublicKeys

func (m *KeyVault) GetPublicKeys() []string

func (*KeyVault) Marshal

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

func (*KeyVault) MarshalTo

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

func (*KeyVault) MarshalToSizedBuffer

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

func (*KeyVault) ProtoMessage

func (*KeyVault) ProtoMessage()

func (*KeyVault) Reset

func (m *KeyVault) Reset()

func (*KeyVault) SetLeader

func (k *KeyVault) SetLeader(leaderIndex uint32)

GetLeader sets the current leader of public keys.

func (*KeyVault) Size

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

func (*KeyVault) String

func (m *KeyVault) String() string

func (*KeyVault) Unmarshal

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

func (*KeyVault) XXX_DiscardUnknown

func (m *KeyVault) XXX_DiscardUnknown()

func (*KeyVault) XXX_Marshal

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

func (*KeyVault) XXX_Merge

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

func (*KeyVault) XXX_Size

func (m *KeyVault) XXX_Size() int

func (*KeyVault) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// PubkeysChangeProposal defines a method to submit a proposal for changing
	// the allowed public keys.
	SubmitPubkeysChangeProposal(ctx context.Context, in *MsgSubmitPubkeysChangeProposalRequest, opts ...grpc.CallOption) (*MsgSubmitPubkeysChangeProposalResponse, error)
	// VotePubkeysChange defines a method to vote for a proposal for changing the
	// allowed public keys.
	VotePubkeysChange(ctx context.Context, in *MsgVotePubkeysChangeRequest, opts ...grpc.CallOption) (*MsgVotePubkeysChangeResponse, 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 {
	// PubkeysChangeProposal defines a method to submit a proposal for changing
	// the allowed public keys.
	SubmitPubkeysChangeProposal(context.Context, *MsgSubmitPubkeysChangeProposalRequest) (*MsgSubmitPubkeysChangeProposalResponse, error)
	// VotePubkeysChange defines a method to vote for a proposal for changing the
	// allowed public keys.
	VotePubkeysChange(context.Context, *MsgVotePubkeysChangeRequest) (*MsgVotePubkeysChangeResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitPubkeysChangeProposalRequest

type MsgSubmitPubkeysChangeProposalRequest struct {
	// creator is the account address of the creator.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// ticket is the jwt ticket data.
	Ticket string `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"`
}

MsgPubkeysChangeProposalRequest is the type of request for modification of public keys.

func NewMsgPubkeysChangeProposalRequest

func NewMsgPubkeysChangeProposalRequest(creator string, txs string) *MsgSubmitPubkeysChangeProposalRequest

MsgSubmitPubkeysChangeProposalRequest returns a MsgSubmitPubkeysChangeProposalRequest using given data

func (*MsgSubmitPubkeysChangeProposalRequest) Descriptor

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

func (*MsgSubmitPubkeysChangeProposalRequest) GetCreator

func (*MsgSubmitPubkeysChangeProposalRequest) GetSignBytes

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

GetSignBytes returns sortJson form of its message

func (*MsgSubmitPubkeysChangeProposalRequest) GetSigners

GetSigners returns the signers of its message

func (*MsgSubmitPubkeysChangeProposalRequest) GetTicket

func (*MsgSubmitPubkeysChangeProposalRequest) Marshal

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

func (*MsgSubmitPubkeysChangeProposalRequest) MarshalTo

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

func (*MsgSubmitPubkeysChangeProposalRequest) MarshalToSizedBuffer

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

func (*MsgSubmitPubkeysChangeProposalRequest) ProtoMessage

func (*MsgSubmitPubkeysChangeProposalRequest) ProtoMessage()

func (*MsgSubmitPubkeysChangeProposalRequest) Reset

func (*MsgSubmitPubkeysChangeProposalRequest) Route

Route returns the module's message router key.

func (*MsgSubmitPubkeysChangeProposalRequest) Size

func (*MsgSubmitPubkeysChangeProposalRequest) String

func (*MsgSubmitPubkeysChangeProposalRequest) Type

Type returns type of its message

func (*MsgSubmitPubkeysChangeProposalRequest) Unmarshal

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

func (*MsgSubmitPubkeysChangeProposalRequest) ValidateBasic

func (msg *MsgSubmitPubkeysChangeProposalRequest) ValidateBasic() error

ValidateBasic performs basic validations on its message

func (*MsgSubmitPubkeysChangeProposalRequest) XXX_DiscardUnknown

func (m *MsgSubmitPubkeysChangeProposalRequest) XXX_DiscardUnknown()

func (*MsgSubmitPubkeysChangeProposalRequest) XXX_Marshal

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

func (*MsgSubmitPubkeysChangeProposalRequest) XXX_Merge

func (*MsgSubmitPubkeysChangeProposalRequest) XXX_Size

func (*MsgSubmitPubkeysChangeProposalRequest) XXX_Unmarshal

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

type MsgSubmitPubkeysChangeProposalResponse

type MsgSubmitPubkeysChangeProposalResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

MsgPubkeysChangeProposalResponse is the type of response for modification of public keys.

func (*MsgSubmitPubkeysChangeProposalResponse) Descriptor

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

func (*MsgSubmitPubkeysChangeProposalResponse) GetSuccess

func (*MsgSubmitPubkeysChangeProposalResponse) Marshal

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

func (*MsgSubmitPubkeysChangeProposalResponse) MarshalTo

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

func (*MsgSubmitPubkeysChangeProposalResponse) MarshalToSizedBuffer

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

func (*MsgSubmitPubkeysChangeProposalResponse) ProtoMessage

func (*MsgSubmitPubkeysChangeProposalResponse) Reset

func (*MsgSubmitPubkeysChangeProposalResponse) Size

func (*MsgSubmitPubkeysChangeProposalResponse) String

func (*MsgSubmitPubkeysChangeProposalResponse) Unmarshal

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

func (*MsgSubmitPubkeysChangeProposalResponse) XXX_DiscardUnknown

func (m *MsgSubmitPubkeysChangeProposalResponse) XXX_DiscardUnknown()

func (*MsgSubmitPubkeysChangeProposalResponse) XXX_Marshal

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

func (*MsgSubmitPubkeysChangeProposalResponse) XXX_Merge

func (*MsgSubmitPubkeysChangeProposalResponse) XXX_Size

func (*MsgSubmitPubkeysChangeProposalResponse) XXX_Unmarshal

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

type MsgVotePubkeysChangeRequest

type MsgVotePubkeysChangeRequest struct {
	// creator is the account address of the creator.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// ticket is the jwt ticket data.
	Ticket string `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// voter_key_index is the public key index of the voter in the current list
	// of public keys in the vault.
	VoterKeyIndex uint32 `protobuf:"varint,3,opt,name=voter_key_index,json=voterKeyIndex,proto3" json:"voter_key_index,omitempty"`
}

MsgVotePubkeysChangeRequest is the type of request to vote on the modification of public keys proposal.

func NewMsgVotePubkeysChangeRequest

func NewMsgVotePubkeysChangeRequest(creator, ticket string, voterIndex uint32) *MsgVotePubkeysChangeRequest

MsgSubmitPubkeysChangeProposalRequest returns a MsgSubmitPubkeysChangeProposalRequest using given data

func (*MsgVotePubkeysChangeRequest) Descriptor

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

func (*MsgVotePubkeysChangeRequest) GetCreator

func (m *MsgVotePubkeysChangeRequest) GetCreator() string

func (*MsgVotePubkeysChangeRequest) GetSignBytes

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

GetSignBytes returns sortJson form of its message

func (*MsgVotePubkeysChangeRequest) GetSigners

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

GetSigners returns the signers of its message

func (*MsgVotePubkeysChangeRequest) GetTicket

func (m *MsgVotePubkeysChangeRequest) GetTicket() string

func (*MsgVotePubkeysChangeRequest) GetVoterKeyIndex

func (m *MsgVotePubkeysChangeRequest) GetVoterKeyIndex() uint32

func (*MsgVotePubkeysChangeRequest) Marshal

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

func (*MsgVotePubkeysChangeRequest) MarshalTo

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

func (*MsgVotePubkeysChangeRequest) MarshalToSizedBuffer

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

func (*MsgVotePubkeysChangeRequest) ProtoMessage

func (*MsgVotePubkeysChangeRequest) ProtoMessage()

func (*MsgVotePubkeysChangeRequest) Reset

func (m *MsgVotePubkeysChangeRequest) Reset()

func (*MsgVotePubkeysChangeRequest) Route

func (msg *MsgVotePubkeysChangeRequest) Route() string

Route returns the module's message router key.

func (*MsgVotePubkeysChangeRequest) Size

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

func (*MsgVotePubkeysChangeRequest) String

func (m *MsgVotePubkeysChangeRequest) String() string

func (*MsgVotePubkeysChangeRequest) Type

func (msg *MsgVotePubkeysChangeRequest) Type() string

Type returns type of its message

func (*MsgVotePubkeysChangeRequest) Unmarshal

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

func (*MsgVotePubkeysChangeRequest) ValidateBasic

func (msg *MsgVotePubkeysChangeRequest) ValidateBasic() error

ValidateBasic performs basic validations on its message

func (*MsgVotePubkeysChangeRequest) XXX_DiscardUnknown

func (m *MsgVotePubkeysChangeRequest) XXX_DiscardUnknown()

func (*MsgVotePubkeysChangeRequest) XXX_Marshal

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

func (*MsgVotePubkeysChangeRequest) XXX_Merge

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

func (*MsgVotePubkeysChangeRequest) XXX_Size

func (m *MsgVotePubkeysChangeRequest) XXX_Size() int

func (*MsgVotePubkeysChangeRequest) XXX_Unmarshal

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

type MsgVotePubkeysChangeResponse

type MsgVotePubkeysChangeResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

MsgVotePubkeysChangeResponse is the type of response vote for public keys modification.

func (*MsgVotePubkeysChangeResponse) Descriptor

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

func (*MsgVotePubkeysChangeResponse) GetSuccess

func (m *MsgVotePubkeysChangeResponse) GetSuccess() bool

func (*MsgVotePubkeysChangeResponse) Marshal

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

func (*MsgVotePubkeysChangeResponse) MarshalTo

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

func (*MsgVotePubkeysChangeResponse) MarshalToSizedBuffer

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

func (*MsgVotePubkeysChangeResponse) ProtoMessage

func (*MsgVotePubkeysChangeResponse) ProtoMessage()

func (*MsgVotePubkeysChangeResponse) Reset

func (m *MsgVotePubkeysChangeResponse) Reset()

func (*MsgVotePubkeysChangeResponse) Size

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

func (*MsgVotePubkeysChangeResponse) String

func (*MsgVotePubkeysChangeResponse) Unmarshal

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

func (*MsgVotePubkeysChangeResponse) XXX_DiscardUnknown

func (m *MsgVotePubkeysChangeResponse) XXX_DiscardUnknown()

func (*MsgVotePubkeysChangeResponse) XXX_Marshal

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

func (*MsgVotePubkeysChangeResponse) XXX_Merge

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

func (*MsgVotePubkeysChangeResponse) XXX_Size

func (m *MsgVotePubkeysChangeResponse) XXX_Size() int

func (*MsgVotePubkeysChangeResponse) XXX_Unmarshal

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

type ProposalResult int32

ProposalResult is the enum type for the proposal result.

const (
	// unchosen value
	ProposalResult_PROPOSAL_RESULT_UNSPECIFIED ProposalResult = 0
	// approved
	ProposalResult_PROPOSAL_RESULT_APPROVED ProposalResult = 1
	// rejected
	ProposalResult_PROPOSAL_RESULT_REJECTED ProposalResult = 2
	// expired
	ProposalResult_PROPOSAL_RESULT_EXPIRED ProposalResult = 3
)

func (ProposalResult) EnumDescriptor

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

func (ProposalResult) String

func (x ProposalResult) String() string

type ProposalStats

type ProposalStats struct {
	// pubkeys_change_count is the pubkeys change proposals count.
	PubkeysChangeCount uint64 `protobuf:"varint,1,opt,name=pubkeys_change_count,json=pubkeysChangeCount,proto3" json:"pubkeys_change_count,omitempty"`
}

ProposalStats is the type for the proposal statistics.

func (*ProposalStats) Descriptor

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

func (*ProposalStats) GetPubkeysChangeCount

func (m *ProposalStats) GetPubkeysChangeCount() uint64

func (*ProposalStats) Marshal

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

func (*ProposalStats) MarshalTo

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

func (*ProposalStats) MarshalToSizedBuffer

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

func (*ProposalStats) ProtoMessage

func (*ProposalStats) ProtoMessage()

func (*ProposalStats) Reset

func (m *ProposalStats) Reset()

func (*ProposalStats) Size

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

func (*ProposalStats) String

func (m *ProposalStats) String() string

func (*ProposalStats) Unmarshal

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

func (*ProposalStats) XXX_DiscardUnknown

func (m *ProposalStats) XXX_DiscardUnknown()

func (*ProposalStats) XXX_Marshal

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

func (*ProposalStats) XXX_Merge

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

func (*ProposalStats) XXX_Size

func (m *ProposalStats) XXX_Size() int

func (*ProposalStats) XXX_Unmarshal

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

type ProposalStatus

type ProposalStatus int32

ProposalStatus is the enum type for the proposal status.

const (
	// unchosen value
	ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0
	// active
	ProposalStatus_PROPOSAL_STATUS_ACTIVE ProposalStatus = 1
	// finished
	ProposalStatus_PROPOSAL_STATUS_FINISHED ProposalStatus = 2
)

func (ProposalStatus) EnumDescriptor

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

func (ProposalStatus) String

func (x ProposalStatus) String() string

type ProposalVote

type ProposalVote int32

ProposalVote is the enum type for the proposal vote.

const (
	// unchosen value
	ProposalVote_PROPOSAL_VOTE_UNSPECIFIED ProposalVote = 0
	// no
	ProposalVote_PROPOSAL_VOTE_NO ProposalVote = 1
	// yes
	ProposalVote_PROPOSAL_VOTE_YES ProposalVote = 2
)

func (ProposalVote) EnumDescriptor

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

func (ProposalVote) String

func (x ProposalVote) String() string

type ProposalVotePayload

type ProposalVotePayload struct {
	// proposal_id is the id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// vote is the chosen option for the vote.
	Vote ProposalVote `protobuf:"varint,2,opt,name=vote,proto3,enum=furynet.furynetwork.dvm.ProposalVote" json:"vote,omitempty"`
}

ProposalVotePayload indicates vote data ticket.

func (*ProposalVotePayload) Descriptor

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

func (*ProposalVotePayload) GetProposalId

func (m *ProposalVotePayload) GetProposalId() uint64

func (*ProposalVotePayload) GetVote

func (m *ProposalVotePayload) GetVote() ProposalVote

func (*ProposalVotePayload) Marshal

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

func (*ProposalVotePayload) MarshalTo

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

func (*ProposalVotePayload) MarshalToSizedBuffer

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

func (*ProposalVotePayload) ProtoMessage

func (*ProposalVotePayload) ProtoMessage()

func (*ProposalVotePayload) Reset

func (m *ProposalVotePayload) Reset()

func (*ProposalVotePayload) Size

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

func (*ProposalVotePayload) String

func (m *ProposalVotePayload) String() string

func (*ProposalVotePayload) Unmarshal

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

func (*ProposalVotePayload) Validate

func (payload *ProposalVotePayload) Validate() error

func (*ProposalVotePayload) XXX_DiscardUnknown

func (m *ProposalVotePayload) XXX_DiscardUnknown()

func (*ProposalVotePayload) XXX_Marshal

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

func (*ProposalVotePayload) XXX_Merge

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

func (*ProposalVotePayload) XXX_Size

func (m *ProposalVotePayload) XXX_Size() int

func (*ProposalVotePayload) XXX_Unmarshal

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

type PubkeysChangeProposalPayload

type PubkeysChangeProposalPayload struct {
	// public_keys contain new pub keys to be added to public keys.
	PublicKeys []string `protobuf:"bytes,1,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"`
	// leader_index is the universal unique identifier of the public key.
	LeaderIndex uint32 `protobuf:"varint,2,opt,name=leader_index,json=leaderIndex,proto3" json:"leader_index,omitempty"`
}

PubkeysChangeProposalPayload indicates data of public keys changes proposal ticket.

func (*PubkeysChangeProposalPayload) Descriptor

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

func (*PubkeysChangeProposalPayload) GetLeaderIndex

func (m *PubkeysChangeProposalPayload) GetLeaderIndex() uint32

func (*PubkeysChangeProposalPayload) GetPublicKeys

func (m *PubkeysChangeProposalPayload) GetPublicKeys() []string

func (*PubkeysChangeProposalPayload) Marshal

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

func (*PubkeysChangeProposalPayload) MarshalTo

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

func (*PubkeysChangeProposalPayload) MarshalToSizedBuffer

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

func (*PubkeysChangeProposalPayload) ProtoMessage

func (*PubkeysChangeProposalPayload) ProtoMessage()

func (*PubkeysChangeProposalPayload) Reset

func (m *PubkeysChangeProposalPayload) Reset()

func (*PubkeysChangeProposalPayload) Size

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

func (*PubkeysChangeProposalPayload) String

func (*PubkeysChangeProposalPayload) Unmarshal

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

func (*PubkeysChangeProposalPayload) Validate

func (payload *PubkeysChangeProposalPayload) Validate(leaderIndex uint32) error

func (*PubkeysChangeProposalPayload) XXX_DiscardUnknown

func (m *PubkeysChangeProposalPayload) XXX_DiscardUnknown()

func (*PubkeysChangeProposalPayload) XXX_Marshal

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

func (*PubkeysChangeProposalPayload) XXX_Merge

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

func (*PubkeysChangeProposalPayload) XXX_Size

func (m *PubkeysChangeProposalPayload) XXX_Size() int

func (*PubkeysChangeProposalPayload) XXX_Unmarshal

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

type PublicKeysChangeProposal

type PublicKeysChangeProposal struct {
	// id is the sequential id of the proposal generated by the blockchain.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// creator is the account address of the proposal creator.
	Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
	// modifications contain the ticket payload of the proposal.
	Modifications PubkeysChangeProposalPayload `protobuf:"bytes,3,opt,name=modifications,proto3" json:"modifications"`
	// votes contains the votes of the proposal.
	Votes []*Vote `protobuf:"bytes,4,rep,name=votes,proto3" json:"votes,omitempty"`
	// start_ts is the block time that the proposal is set.
	StartTS int64 `protobuf:"varint,5,opt,name=start_ts,proto3" json:"start_ts"`
	// result is the result of the finished proposal.
	Result ProposalResult `protobuf:"varint,6,opt,name=result,proto3,enum=furynet.furynetwork.dvm.ProposalResult" json:"result,omitempty"`
	// result_meta is the metadata related to the result of the finished proposal.
	ResultMeta string `protobuf:"bytes,7,opt,name=result_meta,json=resultMeta,proto3" json:"result_meta,omitempty"`
	// finish_ts is the block time that the proposal is set as finished.
	FinishTS int64 `protobuf:"varint,8,opt,name=finish_ts,proto3" json:"finish_ts"`
	// status is the status of a proposal.
	Status ProposalStatus `protobuf:"varint,9,opt,name=status,proto3,enum=furynet.furynetwork.dvm.ProposalStatus" json:"status,omitempty"`
}

PublicKeysChangeProposal is the type for the proposal for additions and removals of pub keys.

func NewPublicKeysChangeProposal

func NewPublicKeysChangeProposal(
	id uint64,
	creator string,
	modifications PubkeysChangeProposalPayload,
	startTS int64,
) PublicKeysChangeProposal

func (*PublicKeysChangeProposal) DecideResult

func (proposal *PublicKeysChangeProposal) DecideResult() ProposalResult

func (*PublicKeysChangeProposal) Descriptor

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

func (*PublicKeysChangeProposal) GetCreator

func (m *PublicKeysChangeProposal) GetCreator() string

func (*PublicKeysChangeProposal) GetFinishTS

func (m *PublicKeysChangeProposal) GetFinishTS() int64

func (*PublicKeysChangeProposal) GetId

func (m *PublicKeysChangeProposal) GetId() uint64

func (*PublicKeysChangeProposal) GetModifications

func (*PublicKeysChangeProposal) GetResult

func (*PublicKeysChangeProposal) GetResultMeta

func (m *PublicKeysChangeProposal) GetResultMeta() string

func (*PublicKeysChangeProposal) GetStartTS

func (m *PublicKeysChangeProposal) GetStartTS() int64

func (*PublicKeysChangeProposal) GetStatus

func (*PublicKeysChangeProposal) GetVotes

func (m *PublicKeysChangeProposal) GetVotes() []*Vote

func (*PublicKeysChangeProposal) IsExpired

func (proposal *PublicKeysChangeProposal) IsExpired(blockTime int64) bool

func (*PublicKeysChangeProposal) Marshal

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

func (*PublicKeysChangeProposal) MarshalTo

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

func (*PublicKeysChangeProposal) MarshalToSizedBuffer

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

func (*PublicKeysChangeProposal) ProtoMessage

func (*PublicKeysChangeProposal) ProtoMessage()

func (*PublicKeysChangeProposal) Reset

func (m *PublicKeysChangeProposal) Reset()

func (*PublicKeysChangeProposal) Size

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

func (*PublicKeysChangeProposal) String

func (m *PublicKeysChangeProposal) String() string

func (*PublicKeysChangeProposal) Unmarshal

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

func (*PublicKeysChangeProposal) XXX_DiscardUnknown

func (m *PublicKeysChangeProposal) XXX_DiscardUnknown()

func (*PublicKeysChangeProposal) XXX_Marshal

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

func (*PublicKeysChangeProposal) XXX_Merge

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

func (*PublicKeysChangeProposal) XXX_Size

func (m *PublicKeysChangeProposal) XXX_Size() int

func (*PublicKeysChangeProposal) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of PubKeys items.
	PubKeys(ctx context.Context, in *QueryPubKeysRequest, opts ...grpc.CallOption) (*QueryPubKeysResponse, error)
	// Queries an proposal by id and status.
	PublicKeysChangeProposal(ctx context.Context, in *QueryPublicKeysChangeProposalRequest, opts ...grpc.CallOption) (*QueryPublicKeysChangeProposalResponse, error)
	// Queries a list of proposal items by status.
	PublicKeysChangeProposals(ctx context.Context, in *QueryPublicKeysChangeProposalsRequest, opts ...grpc.CallOption) (*QueryPublicKeysChangeProposalsResponse, 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 QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method. 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 the response type for the Query/Params RPC method. 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 QueryPubKeysRequest

type QueryPubKeysRequest struct {
}

QueryPubKeysRequest is the request type for the public keys list query. Query/PubKeys RPC method.

func (*QueryPubKeysRequest) Descriptor

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

func (*QueryPubKeysRequest) Marshal

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

func (*QueryPubKeysRequest) MarshalTo

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

func (*QueryPubKeysRequest) MarshalToSizedBuffer

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

func (*QueryPubKeysRequest) ProtoMessage

func (*QueryPubKeysRequest) ProtoMessage()

func (*QueryPubKeysRequest) Reset

func (m *QueryPubKeysRequest) Reset()

func (*QueryPubKeysRequest) Size

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

func (*QueryPubKeysRequest) String

func (m *QueryPubKeysRequest) String() string

func (*QueryPubKeysRequest) Unmarshal

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

func (*QueryPubKeysRequest) XXX_DiscardUnknown

func (m *QueryPubKeysRequest) XXX_DiscardUnknown()

func (*QueryPubKeysRequest) XXX_Marshal

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

func (*QueryPubKeysRequest) XXX_Merge

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

func (*QueryPubKeysRequest) XXX_Size

func (m *QueryPubKeysRequest) XXX_Size() int

func (*QueryPubKeysRequest) XXX_Unmarshal

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

type QueryPubKeysResponse

type QueryPubKeysResponse struct {
	// list is the list of allowed public keys.
	List []string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
}

QueryPubKeysResponse is the response type for the public keys list query. Query/PubKeys RPC method.

func (*QueryPubKeysResponse) Descriptor

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

func (*QueryPubKeysResponse) GetList

func (m *QueryPubKeysResponse) GetList() []string

func (*QueryPubKeysResponse) Marshal

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

func (*QueryPubKeysResponse) MarshalTo

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

func (*QueryPubKeysResponse) MarshalToSizedBuffer

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

func (*QueryPubKeysResponse) ProtoMessage

func (*QueryPubKeysResponse) ProtoMessage()

func (*QueryPubKeysResponse) Reset

func (m *QueryPubKeysResponse) Reset()

func (*QueryPubKeysResponse) Size

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

func (*QueryPubKeysResponse) String

func (m *QueryPubKeysResponse) String() string

func (*QueryPubKeysResponse) Unmarshal

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

func (*QueryPubKeysResponse) XXX_DiscardUnknown

func (m *QueryPubKeysResponse) XXX_DiscardUnknown()

func (*QueryPubKeysResponse) XXX_Marshal

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

func (*QueryPubKeysResponse) XXX_Merge

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

func (*QueryPubKeysResponse) XXX_Size

func (m *QueryPubKeysResponse) XXX_Size() int

func (*QueryPubKeysResponse) XXX_Unmarshal

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

type QueryPublicKeysChangeProposalRequest

type QueryPublicKeysChangeProposalRequest struct {
	Id     uint64         `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Status ProposalStatus `protobuf:"varint,2,opt,name=status,proto3,enum=furynet.furynetwork.dvm.ProposalStatus" json:"status,omitempty"`
}

QueryPublicKeysChangeProposalRequest is the request type for the Query/PublicKeysChangeProposal RPC method.

func (*QueryPublicKeysChangeProposalRequest) Descriptor

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

func (*QueryPublicKeysChangeProposalRequest) GetId

func (*QueryPublicKeysChangeProposalRequest) GetStatus

func (*QueryPublicKeysChangeProposalRequest) Marshal

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

func (*QueryPublicKeysChangeProposalRequest) MarshalTo

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

func (*QueryPublicKeysChangeProposalRequest) MarshalToSizedBuffer

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

func (*QueryPublicKeysChangeProposalRequest) ProtoMessage

func (*QueryPublicKeysChangeProposalRequest) ProtoMessage()

func (*QueryPublicKeysChangeProposalRequest) Reset

func (*QueryPublicKeysChangeProposalRequest) Size

func (*QueryPublicKeysChangeProposalRequest) String

func (*QueryPublicKeysChangeProposalRequest) Unmarshal

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

func (*QueryPublicKeysChangeProposalRequest) XXX_DiscardUnknown

func (m *QueryPublicKeysChangeProposalRequest) XXX_DiscardUnknown()

func (*QueryPublicKeysChangeProposalRequest) XXX_Marshal

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

func (*QueryPublicKeysChangeProposalRequest) XXX_Merge

func (*QueryPublicKeysChangeProposalRequest) XXX_Size

func (*QueryPublicKeysChangeProposalRequest) XXX_Unmarshal

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

type QueryPublicKeysChangeProposalResponse

type QueryPublicKeysChangeProposalResponse struct {
	// proposal holds the proposal.
	Proposal PublicKeysChangeProposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"`
}

QueryPublicKeysChangeProposalResponse is the response type for the Query/PublicKeysChangeProposal RPC method.

func (*QueryPublicKeysChangeProposalResponse) Descriptor

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

func (*QueryPublicKeysChangeProposalResponse) GetProposal

func (*QueryPublicKeysChangeProposalResponse) Marshal

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

func (*QueryPublicKeysChangeProposalResponse) MarshalTo

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

func (*QueryPublicKeysChangeProposalResponse) MarshalToSizedBuffer

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

func (*QueryPublicKeysChangeProposalResponse) ProtoMessage

func (*QueryPublicKeysChangeProposalResponse) ProtoMessage()

func (*QueryPublicKeysChangeProposalResponse) Reset

func (*QueryPublicKeysChangeProposalResponse) Size

func (*QueryPublicKeysChangeProposalResponse) String

func (*QueryPublicKeysChangeProposalResponse) Unmarshal

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

func (*QueryPublicKeysChangeProposalResponse) XXX_DiscardUnknown

func (m *QueryPublicKeysChangeProposalResponse) XXX_DiscardUnknown()

func (*QueryPublicKeysChangeProposalResponse) XXX_Marshal

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

func (*QueryPublicKeysChangeProposalResponse) XXX_Merge

func (*QueryPublicKeysChangeProposalResponse) XXX_Size

func (*QueryPublicKeysChangeProposalResponse) XXX_Unmarshal

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

type QueryPublicKeysChangeProposalsRequest

type QueryPublicKeysChangeProposalsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	Status     ProposalStatus     `protobuf:"varint,2,opt,name=status,proto3,enum=furynet.furynetwork.dvm.ProposalStatus" json:"status,omitempty"`
}

QueryPublicKeysChangeProposalsRequest is the request type for the Query/PublicKeysChangeProposals RPC method.

func (*QueryPublicKeysChangeProposalsRequest) Descriptor

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

func (*QueryPublicKeysChangeProposalsRequest) GetPagination

func (*QueryPublicKeysChangeProposalsRequest) GetStatus

func (*QueryPublicKeysChangeProposalsRequest) Marshal

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

func (*QueryPublicKeysChangeProposalsRequest) MarshalTo

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

func (*QueryPublicKeysChangeProposalsRequest) MarshalToSizedBuffer

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

func (*QueryPublicKeysChangeProposalsRequest) ProtoMessage

func (*QueryPublicKeysChangeProposalsRequest) ProtoMessage()

func (*QueryPublicKeysChangeProposalsRequest) Reset

func (*QueryPublicKeysChangeProposalsRequest) Size

func (*QueryPublicKeysChangeProposalsRequest) String

func (*QueryPublicKeysChangeProposalsRequest) Unmarshal

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

func (*QueryPublicKeysChangeProposalsRequest) XXX_DiscardUnknown

func (m *QueryPublicKeysChangeProposalsRequest) XXX_DiscardUnknown()

func (*QueryPublicKeysChangeProposalsRequest) XXX_Marshal

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

func (*QueryPublicKeysChangeProposalsRequest) XXX_Merge

func (*QueryPublicKeysChangeProposalsRequest) XXX_Size

func (*QueryPublicKeysChangeProposalsRequest) XXX_Unmarshal

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

type QueryPublicKeysChangeProposalsResponse

type QueryPublicKeysChangeProposalsResponse struct {
	// proposals hold the proposals.
	Proposals  []PublicKeysChangeProposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"`
	Pagination *query.PageResponse        `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPublicKeysChangeProposalsResponse is the response type for the Query/PublicKeysChangeProposals RPC method.

func (*QueryPublicKeysChangeProposalsResponse) Descriptor

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

func (*QueryPublicKeysChangeProposalsResponse) GetPagination

func (*QueryPublicKeysChangeProposalsResponse) GetProposals

func (*QueryPublicKeysChangeProposalsResponse) Marshal

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

func (*QueryPublicKeysChangeProposalsResponse) MarshalTo

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

func (*QueryPublicKeysChangeProposalsResponse) MarshalToSizedBuffer

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

func (*QueryPublicKeysChangeProposalsResponse) ProtoMessage

func (*QueryPublicKeysChangeProposalsResponse) Reset

func (*QueryPublicKeysChangeProposalsResponse) Size

func (*QueryPublicKeysChangeProposalsResponse) String

func (*QueryPublicKeysChangeProposalsResponse) Unmarshal

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

func (*QueryPublicKeysChangeProposalsResponse) XXX_DiscardUnknown

func (m *QueryPublicKeysChangeProposalsResponse) XXX_DiscardUnknown()

func (*QueryPublicKeysChangeProposalsResponse) XXX_Marshal

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

func (*QueryPublicKeysChangeProposalsResponse) XXX_Merge

func (*QueryPublicKeysChangeProposalsResponse) XXX_Size

func (*QueryPublicKeysChangeProposalsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of PubKeys items.
	PubKeys(context.Context, *QueryPubKeysRequest) (*QueryPubKeysResponse, error)
	// Queries an proposal by id and status.
	PublicKeysChangeProposal(context.Context, *QueryPublicKeysChangeProposalRequest) (*QueryPublicKeysChangeProposalResponse, error)
	// Queries a list of proposal items by status.
	PublicKeysChangeProposals(context.Context, *QueryPublicKeysChangeProposalsRequest) (*QueryPublicKeysChangeProposalsResponse, error)
}

QueryServer is the server API for Query service.

type Ticket

type Ticket interface {
	// Unmarshal unmarshals the information of the ticket to the v. v must be a pointer.
	Unmarshal(v interface{}) error

	// Verify verifies the ticket signature with the leader public key. if the ticket is verified,
	// then return nil else return invalid signature error
	Verify(pubKey string) error

	// VerifyAny verifies the ticket signature with any of the public keys. if the ticket is verified,
	// then return nil else return invalid signature error
	VerifyAny(pubKeys []string) error

	// ValidateExpiry verifies that the ticket is not expired yet.
	ValidateExpiry(ctx sdk.Context) error
}

Ticket is the Interface of ticket.

func NewJwtTicket

func NewJwtTicket(ticketStr string) (Ticket, error)

NewJwtTicket create a new jwt ticket from the given ticket.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) VotePubkeysChange

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) PubKeys

type Vote

type Vote struct {
	// public_key is the public key of the voter.
	PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// vote is the vote enum value.
	Vote ProposalVote `protobuf:"varint,2,opt,name=vote,proto3,enum=furynet.furynetwork.dvm.ProposalVote" json:"vote,omitempty"`
}

Vote is the type for the proposal vote.

func NewVote

func NewVote(pubKey string, vote ProposalVote) *Vote

func (*Vote) Descriptor

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

func (*Vote) GetPublicKey

func (m *Vote) GetPublicKey() string

func (*Vote) GetVote

func (m *Vote) GetVote() ProposalVote

func (*Vote) Marshal

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

func (*Vote) MarshalTo

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

func (*Vote) MarshalToSizedBuffer

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

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) Reset

func (m *Vote) Reset()

func (*Vote) Size

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

func (*Vote) String

func (m *Vote) String() string

func (*Vote) Unmarshal

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

func (*Vote) XXX_DiscardUnknown

func (m *Vote) XXX_DiscardUnknown()

func (*Vote) XXX_Marshal

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

func (*Vote) XXX_Merge

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

func (*Vote) XXX_Size

func (m *Vote) XXX_Size() int

func (*Vote) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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