types

package
v0.0.0-...-cda3398 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

	// RouterKey is the message route
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_" + ModuleName
)
View Source
const (
	// PoliciesKey is the key for the policies store
	PoliciesKey = "Policies-value-"
	// AuthorizationListKey is the key for the authorization list store
	AuthorizationListKey = "AuthorizationList-value-"
	// ChainInfoKey is the key for the chain info store
	ChainInfoKey = "ChainInfo-value-"
)
View Source
const (
	// DefaultPolicyAddress is the default value for policy address
	DefaultPolicyAddress = "zeta1afk9zr2hn2jsac63h4hm60vl9z3e5u69gndzf7c99cqge3vzwjzsxn0x73"
)
View Source
const TypeMsgAddAuthorization = "AddAuthorization"
View Source
const TypeMsgRemoveChainInfo = "RemoveChainInfo"
View Source
const TypeMsgUpdateChainInfo = "UpdateChainInfo"
View Source
const TypeMsgUpdatePolicies = "UpdatePolicies"
View Source
const TypeRemoveAuthorization = "RemoveAuthorization"

Variables

View Source
var (
	ErrInvalidLengthAuthorization        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuthorization          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuthorization = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// OperationPolicyMessages keeps track of the message URLs that can, by default, only be executed by operational policy address
	OperationPolicyMessages = []string{
		"/zetachain.zetacore.crosschain.MsgRefundAbortedCCTX",
		"/zetachain.zetacore.crosschain.MsgAbortStuckCCTX",
		"/zetachain.zetacore.crosschain.MsgUpdateRateLimiterFlags",
		"/zetachain.zetacore.fungible.MsgDeploySystemContracts",
		"/zetachain.zetacore.fungible.MsgUpdateZRC20LiquidityCap",
		"/zetachain.zetacore.fungible.MsgUpdateZRC20WithdrawFee",
		"/zetachain.zetacore.fungible.MsgUnpauseZRC20",
		"/zetachain.zetacore.observer.MsgResetChainNonces",
		"/zetachain.zetacore.observer.MsgUpdateChainParams",
		"/zetachain.zetacore.observer.MsgEnableCCTX",
		"/zetachain.zetacore.observer.MsgUpdateGasPriceIncreaseFlags",
	}
	// AdminPolicyMessages keeps track of the message URLs that can, by default, only be executed by admin policy address
	AdminPolicyMessages = []string{
		"/zetachain.zetacore.crosschain.MsgUpdateERC20CustodyPauseStatus",
		"/zetachain.zetacore.crosschain.MsgMigrateERC20CustodyFunds",
		"/zetachain.zetacore.crosschain.MsgMigrateTssFunds",
		"/zetachain.zetacore.crosschain.MsgUpdateTssAddress",
		"/zetachain.zetacore.crosschain.MsgWhitelistERC20",
		"/zetachain.zetacore.fungible.MsgUpdateContractBytecode",
		"/zetachain.zetacore.fungible.MsgUpdateSystemContract",
		"/zetachain.zetacore.fungible.MsgUpdateGatewayContract",
		"/zetachain.zetacore.fungible.MsgRemoveForeignCoin",
		"/zetachain.zetacore.fungible.MsgDeployFungibleCoinZRC20",
		"/zetachain.zetacore.observer.MsgUpdateObserver",
		"/zetachain.zetacore.observer.MsgAddObserver",
		"/zetachain.zetacore.observer.MsgRemoveChainParams",
		"/zetachain.zetacore.authority.MsgAddAuthorization",
		"/zetachain.zetacore.authority.MsgRemoveAuthorization",
		"/zetachain.zetacore.authority.MsgUpdateChainInfo",
		"/zetachain.zetacore.authority.MsgRemoveChainInfo",
		"/zetachain.zetacore.lightclient.MsgEnableHeaderVerification",
	}
	// EmergencyPolicyMessages keeps track of the message URLs that can, by default, only be executed by emergency policy address
	EmergencyPolicyMessages = []string{
		"/zetachain.zetacore.crosschain.MsgAddInboundTracker",
		"/zetachain.zetacore.crosschain.MsgAddOutboundTracker",
		"/zetachain.zetacore.crosschain.MsgRemoveOutboundTracker",
		"/zetachain.zetacore.fungible.MsgPauseZRC20",
		"/zetachain.zetacore.observer.MsgUpdateKeygen",
		"/zetachain.zetacore.observer.MsgDisableCCTX",
		"/zetachain.zetacore.lightclient.MsgDisableHeaderVerification",
	}
)
View Source
var (
	ErrInvalidLengthChainInfo        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowChainInfo          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupChainInfo = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrUnauthorized              = errorsmod.Register(ModuleName, 1102, "sender not authorized")
	ErrInvalidAuthorizationList  = errorsmod.Register(ModuleName, 1103, "invalid authorization list")
	ErrAuthorizationNotFound     = errorsmod.Register(ModuleName, 1104, "authorization not found")
	ErrAuthorizationListNotFound = errorsmod.Register(ModuleName, 1105, "authorization list not found")
	ErrSigners                   = errorsmod.Register(ModuleName, 1106, "policy transactions must have only one signer")
	ErrMsgNotAuthorized          = errorsmod.Register(ModuleName, 1107, "msg type is not authorized")
	ErrPoliciesNotFound          = errorsmod.Register(ModuleName, 1108, "policies not found")
	ErrSignerDoesntMatch         = errorsmod.Register(ModuleName, 1109, "signer doesn't match required policy")
	ErrInvalidPolicyType         = errorsmod.Register(ModuleName, 1110, "invalid policy type")

	ErrChainInfoNotFound = errorsmod.Register(ModuleName, 1111, "chain info not found")
)
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 (
	ErrInvalidLengthPolicies        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPolicies          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPolicies = 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 PolicyType_name = map[int32]string{
	0: "groupEmergency",
	1: "groupOperational",
	2: "groupAdmin",
	3: "groupEmpty",
}
View Source
var PolicyType_value = map[string]int32{
	"groupEmergency":   0,
	"groupOperational": 1,
	"groupAdmin":       2,
	"groupEmpty":       3,
}

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

KeyPrefix returns the store key prefix for the policies store

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 ValidateMsgURL

func ValidateMsgURL(url string) error

Types

type Authorization

type Authorization struct {
	// The URL of the message that needs to be authorized
	MsgUrl string `protobuf:"bytes,1,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
	// The policy that is authorized to access the message
	AuthorizedPolicy PolicyType `` /* 155-byte string literal not displayed */
}

Authorization defines the authorization required to access use a message which needs special permissions

func (*Authorization) Descriptor

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

func (*Authorization) GetAuthorizedPolicy

func (m *Authorization) GetAuthorizedPolicy() PolicyType

func (*Authorization) GetMsgUrl

func (m *Authorization) GetMsgUrl() string

func (*Authorization) Marshal

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

func (*Authorization) MarshalTo

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

func (*Authorization) MarshalToSizedBuffer

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

func (*Authorization) ProtoMessage

func (*Authorization) ProtoMessage()

func (*Authorization) Reset

func (m *Authorization) Reset()

func (*Authorization) Size

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

func (*Authorization) String

func (m *Authorization) String() string

func (*Authorization) Unmarshal

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

func (*Authorization) XXX_DiscardUnknown

func (m *Authorization) XXX_DiscardUnknown()

func (*Authorization) XXX_Marshal

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

func (*Authorization) XXX_Merge

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

func (*Authorization) XXX_Size

func (m *Authorization) XXX_Size() int

func (*Authorization) XXX_Unmarshal

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

type AuthorizationList

type AuthorizationList struct {
	Authorizations []Authorization `protobuf:"bytes,1,rep,name=authorizations,proto3" json:"authorizations"`
}

AuthorizationList holds the list of authorizations on zetachain

func DefaultAuthorizationsList

func DefaultAuthorizationsList() AuthorizationList

DefaultAuthorizationsList list is the list of authorizations that presently exist in the system. This is the minimum set of authorizations that are required to be set when the authorization table is deployed

func (*AuthorizationList) Descriptor

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

func (*AuthorizationList) GetAuthorizations

func (m *AuthorizationList) GetAuthorizations() []Authorization

func (*AuthorizationList) GetAuthorizedPolicy

func (a *AuthorizationList) GetAuthorizedPolicy(msgURL string) (PolicyType, error)

GetAuthorizedPolicy returns the policy for the given message url. If the message url is not found, it returns an error.

func (*AuthorizationList) Marshal

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

func (*AuthorizationList) MarshalTo

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

func (*AuthorizationList) MarshalToSizedBuffer

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

func (*AuthorizationList) ProtoMessage

func (*AuthorizationList) ProtoMessage()

func (*AuthorizationList) RemoveAuthorization

func (a *AuthorizationList) RemoveAuthorization(msgURL string)

RemoveAuthorization removes the authorization from the list. It should be called by the admin policy account.

func (*AuthorizationList) Reset

func (m *AuthorizationList) Reset()

func (*AuthorizationList) SetAuthorization

func (a *AuthorizationList) SetAuthorization(authorization Authorization)

SetAuthorization adds the authorization to the list. If the authorization already exists, it updates the policy.

func (*AuthorizationList) Size

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

func (*AuthorizationList) String

func (m *AuthorizationList) String() string

func (*AuthorizationList) Unmarshal

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

func (*AuthorizationList) Validate

func (a *AuthorizationList) Validate() error

Validate checks if the authorization list is valid. It returns an error if the message url is duplicated with different policies. It does not check if the list is empty or not, as an empty list is also considered valid.

func (*AuthorizationList) XXX_DiscardUnknown

func (m *AuthorizationList) XXX_DiscardUnknown()

func (*AuthorizationList) XXX_Marshal

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

func (*AuthorizationList) XXX_Merge

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

func (*AuthorizationList) XXX_Size

func (m *AuthorizationList) XXX_Size() int

func (*AuthorizationList) XXX_Unmarshal

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

type ChainInfo

type ChainInfo struct {
	Chains []chains.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains"`
}

ChainInfo contains static information about the chains This structure is used to dynamically update these info on a live network before hardcoding the values in a upgrade

func DefaultChainInfo

func DefaultChainInfo() ChainInfo

DefaultChainInfo returns the structure with an empty list of chains

func (*ChainInfo) Descriptor

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

func (*ChainInfo) GetChains

func (m *ChainInfo) GetChains() []chains.Chain

func (*ChainInfo) Marshal

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

func (*ChainInfo) MarshalTo

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

func (*ChainInfo) MarshalToSizedBuffer

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

func (*ChainInfo) ProtoMessage

func (*ChainInfo) ProtoMessage()

func (*ChainInfo) Reset

func (m *ChainInfo) Reset()

func (*ChainInfo) Size

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

func (*ChainInfo) String

func (m *ChainInfo) String() string

func (*ChainInfo) Unmarshal

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

func (ChainInfo) Validate

func (ci ChainInfo) Validate() error

Validate performs basic validation of chain info It checks all chains are valid and they're all of external type The structure is used to store external chain information

func (*ChainInfo) XXX_DiscardUnknown

func (m *ChainInfo) XXX_DiscardUnknown()

func (*ChainInfo) XXX_Marshal

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

func (*ChainInfo) XXX_Merge

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

func (*ChainInfo) XXX_Size

func (m *ChainInfo) XXX_Size() int

func (*ChainInfo) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Policies          Policies          `protobuf:"bytes,1,opt,name=policies,proto3" json:"policies"`
	AuthorizationList AuthorizationList `protobuf:"bytes,2,opt,name=authorization_list,json=authorizationList,proto3" json:"authorization_list"`
	ChainInfo         ChainInfo         `protobuf:"bytes,3,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info"`
}

GenesisState defines the authority module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default authority genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAuthorizationList

func (m *GenesisState) GetAuthorizationList() AuthorizationList

func (*GenesisState) GetChainInfo

func (m *GenesisState) GetChainInfo() ChainInfo

func (*GenesisState) GetPolicies

func (m *GenesisState) GetPolicies() Policies

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 MsgAddAuthorization

type MsgAddAuthorization struct {
	Creator          string     `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	MsgUrl           string     `protobuf:"bytes,2,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
	AuthorizedPolicy PolicyType `` /* 155-byte string literal not displayed */
}

MsgAddAuthorization defines the MsgAddAuthorization service. Adds an authorization to the chain. If the authorization already exists, it will be updated.

func NewMsgAddAuthorization

func NewMsgAddAuthorization(creator string, msgURL string, authorizedPolicy PolicyType) *MsgAddAuthorization

func (*MsgAddAuthorization) Descriptor

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

func (*MsgAddAuthorization) GetAuthorizedPolicy

func (m *MsgAddAuthorization) GetAuthorizedPolicy() PolicyType

func (*MsgAddAuthorization) GetCreator

func (m *MsgAddAuthorization) GetCreator() string

func (*MsgAddAuthorization) GetMsgUrl

func (m *MsgAddAuthorization) GetMsgUrl() string

func (*MsgAddAuthorization) GetSignBytes

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

func (*MsgAddAuthorization) GetSigners

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

func (*MsgAddAuthorization) Marshal

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

func (*MsgAddAuthorization) MarshalTo

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

func (*MsgAddAuthorization) MarshalToSizedBuffer

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

func (*MsgAddAuthorization) ProtoMessage

func (*MsgAddAuthorization) ProtoMessage()

func (*MsgAddAuthorization) Reset

func (m *MsgAddAuthorization) Reset()

func (*MsgAddAuthorization) Route

func (msg *MsgAddAuthorization) Route() string

func (*MsgAddAuthorization) Size

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

func (*MsgAddAuthorization) String

func (m *MsgAddAuthorization) String() string

func (*MsgAddAuthorization) Type

func (msg *MsgAddAuthorization) Type() string

func (*MsgAddAuthorization) Unmarshal

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

func (*MsgAddAuthorization) ValidateBasic

func (msg *MsgAddAuthorization) ValidateBasic() error

func (*MsgAddAuthorization) XXX_DiscardUnknown

func (m *MsgAddAuthorization) XXX_DiscardUnknown()

func (*MsgAddAuthorization) XXX_Marshal

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

func (*MsgAddAuthorization) XXX_Merge

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

func (*MsgAddAuthorization) XXX_Size

func (m *MsgAddAuthorization) XXX_Size() int

func (*MsgAddAuthorization) XXX_Unmarshal

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

type MsgAddAuthorizationResponse

type MsgAddAuthorizationResponse struct {
}

MsgAddAuthorizationResponse defines the MsgAddAuthorizationResponse service.

func (*MsgAddAuthorizationResponse) Descriptor

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

func (*MsgAddAuthorizationResponse) Marshal

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

func (*MsgAddAuthorizationResponse) MarshalTo

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

func (*MsgAddAuthorizationResponse) MarshalToSizedBuffer

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

func (*MsgAddAuthorizationResponse) ProtoMessage

func (*MsgAddAuthorizationResponse) ProtoMessage()

func (*MsgAddAuthorizationResponse) Reset

func (m *MsgAddAuthorizationResponse) Reset()

func (*MsgAddAuthorizationResponse) Size

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

func (*MsgAddAuthorizationResponse) String

func (m *MsgAddAuthorizationResponse) String() string

func (*MsgAddAuthorizationResponse) Unmarshal

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

func (*MsgAddAuthorizationResponse) XXX_DiscardUnknown

func (m *MsgAddAuthorizationResponse) XXX_DiscardUnknown()

func (*MsgAddAuthorizationResponse) XXX_Marshal

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

func (*MsgAddAuthorizationResponse) XXX_Merge

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

func (*MsgAddAuthorizationResponse) XXX_Size

func (m *MsgAddAuthorizationResponse) XXX_Size() int

func (*MsgAddAuthorizationResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	UpdatePolicies(ctx context.Context, in *MsgUpdatePolicies, opts ...grpc.CallOption) (*MsgUpdatePoliciesResponse, error)
	UpdateChainInfo(ctx context.Context, in *MsgUpdateChainInfo, opts ...grpc.CallOption) (*MsgUpdateChainInfoResponse, error)
	RemoveChainInfo(ctx context.Context, in *MsgRemoveChainInfo, opts ...grpc.CallOption) (*MsgRemoveChainInfoResponse, error)
	AddAuthorization(ctx context.Context, in *MsgAddAuthorization, opts ...grpc.CallOption) (*MsgAddAuthorizationResponse, error)
	RemoveAuthorization(ctx context.Context, in *MsgRemoveAuthorization, opts ...grpc.CallOption) (*MsgRemoveAuthorizationResponse, 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 MsgRemoveAuthorization

type MsgRemoveAuthorization struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	MsgUrl  string `protobuf:"bytes,2,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
}

MsgRemoveAuthorization defines the MsgRemoveAuthorization service. Removes an authorization from the chain.

func NewMsgRemoveAuthorization

func NewMsgRemoveAuthorization(creator string, msgURL string) *MsgRemoveAuthorization

func (*MsgRemoveAuthorization) Descriptor

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

func (*MsgRemoveAuthorization) GetCreator

func (m *MsgRemoveAuthorization) GetCreator() string

func (*MsgRemoveAuthorization) GetMsgUrl

func (m *MsgRemoveAuthorization) GetMsgUrl() string

func (*MsgRemoveAuthorization) GetSignBytes

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

func (*MsgRemoveAuthorization) GetSigners

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

func (*MsgRemoveAuthorization) Marshal

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

func (*MsgRemoveAuthorization) MarshalTo

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

func (*MsgRemoveAuthorization) MarshalToSizedBuffer

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

func (*MsgRemoveAuthorization) ProtoMessage

func (*MsgRemoveAuthorization) ProtoMessage()

func (*MsgRemoveAuthorization) Reset

func (m *MsgRemoveAuthorization) Reset()

func (*MsgRemoveAuthorization) Route

func (msg *MsgRemoveAuthorization) Route() string

func (*MsgRemoveAuthorization) Size

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

func (*MsgRemoveAuthorization) String

func (m *MsgRemoveAuthorization) String() string

func (*MsgRemoveAuthorization) Type

func (msg *MsgRemoveAuthorization) Type() string

func (*MsgRemoveAuthorization) Unmarshal

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

func (*MsgRemoveAuthorization) ValidateBasic

func (msg *MsgRemoveAuthorization) ValidateBasic() error

func (*MsgRemoveAuthorization) XXX_DiscardUnknown

func (m *MsgRemoveAuthorization) XXX_DiscardUnknown()

func (*MsgRemoveAuthorization) XXX_Marshal

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

func (*MsgRemoveAuthorization) XXX_Merge

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

func (*MsgRemoveAuthorization) XXX_Size

func (m *MsgRemoveAuthorization) XXX_Size() int

func (*MsgRemoveAuthorization) XXX_Unmarshal

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

type MsgRemoveAuthorizationResponse

type MsgRemoveAuthorizationResponse struct {
}

MsgRemoveAuthorizationResponse defines the MsgRemoveAuthorizationResponse service.

func (*MsgRemoveAuthorizationResponse) Descriptor

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

func (*MsgRemoveAuthorizationResponse) Marshal

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

func (*MsgRemoveAuthorizationResponse) MarshalTo

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

func (*MsgRemoveAuthorizationResponse) MarshalToSizedBuffer

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

func (*MsgRemoveAuthorizationResponse) ProtoMessage

func (*MsgRemoveAuthorizationResponse) ProtoMessage()

func (*MsgRemoveAuthorizationResponse) Reset

func (m *MsgRemoveAuthorizationResponse) Reset()

func (*MsgRemoveAuthorizationResponse) Size

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

func (*MsgRemoveAuthorizationResponse) String

func (*MsgRemoveAuthorizationResponse) Unmarshal

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

func (*MsgRemoveAuthorizationResponse) XXX_DiscardUnknown

func (m *MsgRemoveAuthorizationResponse) XXX_DiscardUnknown()

func (*MsgRemoveAuthorizationResponse) XXX_Marshal

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

func (*MsgRemoveAuthorizationResponse) XXX_Merge

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

func (*MsgRemoveAuthorizationResponse) XXX_Size

func (m *MsgRemoveAuthorizationResponse) XXX_Size() int

func (*MsgRemoveAuthorizationResponse) XXX_Unmarshal

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

type MsgRemoveChainInfo

type MsgRemoveChainInfo struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	ChainId int64  `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
}

MsgRemoveChainInfo defines the MsgRemoveChainInfo service.

func NewMsgRemoveChainInfo

func NewMsgRemoveChainInfo(creator string, chainID int64) *MsgRemoveChainInfo

func (*MsgRemoveChainInfo) Descriptor

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

func (*MsgRemoveChainInfo) GetChainId

func (m *MsgRemoveChainInfo) GetChainId() int64

func (*MsgRemoveChainInfo) GetCreator

func (m *MsgRemoveChainInfo) GetCreator() string

func (*MsgRemoveChainInfo) GetSignBytes

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

func (*MsgRemoveChainInfo) GetSigners

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

func (*MsgRemoveChainInfo) Marshal

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

func (*MsgRemoveChainInfo) MarshalTo

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

func (*MsgRemoveChainInfo) MarshalToSizedBuffer

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

func (*MsgRemoveChainInfo) ProtoMessage

func (*MsgRemoveChainInfo) ProtoMessage()

func (*MsgRemoveChainInfo) Reset

func (m *MsgRemoveChainInfo) Reset()

func (*MsgRemoveChainInfo) Route

func (msg *MsgRemoveChainInfo) Route() string

func (*MsgRemoveChainInfo) Size

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

func (*MsgRemoveChainInfo) String

func (m *MsgRemoveChainInfo) String() string

func (*MsgRemoveChainInfo) Type

func (msg *MsgRemoveChainInfo) Type() string

func (*MsgRemoveChainInfo) Unmarshal

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

func (*MsgRemoveChainInfo) ValidateBasic

func (msg *MsgRemoveChainInfo) ValidateBasic() error

func (*MsgRemoveChainInfo) XXX_DiscardUnknown

func (m *MsgRemoveChainInfo) XXX_DiscardUnknown()

func (*MsgRemoveChainInfo) XXX_Marshal

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

func (*MsgRemoveChainInfo) XXX_Merge

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

func (*MsgRemoveChainInfo) XXX_Size

func (m *MsgRemoveChainInfo) XXX_Size() int

func (*MsgRemoveChainInfo) XXX_Unmarshal

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

type MsgRemoveChainInfoResponse

type MsgRemoveChainInfoResponse struct {
}

MsgRemoveChainInfoResponse defines the MsgRemoveChainInfoResponse service.

func (*MsgRemoveChainInfoResponse) Descriptor

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

func (*MsgRemoveChainInfoResponse) Marshal

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

func (*MsgRemoveChainInfoResponse) MarshalTo

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

func (*MsgRemoveChainInfoResponse) MarshalToSizedBuffer

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

func (*MsgRemoveChainInfoResponse) ProtoMessage

func (*MsgRemoveChainInfoResponse) ProtoMessage()

func (*MsgRemoveChainInfoResponse) Reset

func (m *MsgRemoveChainInfoResponse) Reset()

func (*MsgRemoveChainInfoResponse) Size

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

func (*MsgRemoveChainInfoResponse) String

func (m *MsgRemoveChainInfoResponse) String() string

func (*MsgRemoveChainInfoResponse) Unmarshal

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

func (*MsgRemoveChainInfoResponse) XXX_DiscardUnknown

func (m *MsgRemoveChainInfoResponse) XXX_DiscardUnknown()

func (*MsgRemoveChainInfoResponse) XXX_Marshal

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

func (*MsgRemoveChainInfoResponse) XXX_Merge

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

func (*MsgRemoveChainInfoResponse) XXX_Size

func (m *MsgRemoveChainInfoResponse) XXX_Size() int

func (*MsgRemoveChainInfoResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type MsgUpdateChainInfo

type MsgUpdateChainInfo struct {
	Creator string       `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Chain   chains.Chain `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain"`
}

MsgUpdateChainInfo defines the MsgUpdateChainInfo service.

func NewMsgUpdateChainInfo

func NewMsgUpdateChainInfo(creator string, chain chains.Chain) *MsgUpdateChainInfo

func (*MsgUpdateChainInfo) Descriptor

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

func (*MsgUpdateChainInfo) GetChain

func (m *MsgUpdateChainInfo) GetChain() chains.Chain

func (*MsgUpdateChainInfo) GetCreator

func (m *MsgUpdateChainInfo) GetCreator() string

func (*MsgUpdateChainInfo) GetSignBytes

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

func (*MsgUpdateChainInfo) GetSigners

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

func (*MsgUpdateChainInfo) Marshal

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

func (*MsgUpdateChainInfo) MarshalTo

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

func (*MsgUpdateChainInfo) MarshalToSizedBuffer

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

func (*MsgUpdateChainInfo) ProtoMessage

func (*MsgUpdateChainInfo) ProtoMessage()

func (*MsgUpdateChainInfo) Reset

func (m *MsgUpdateChainInfo) Reset()

func (*MsgUpdateChainInfo) Route

func (msg *MsgUpdateChainInfo) Route() string

func (*MsgUpdateChainInfo) Size

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

func (*MsgUpdateChainInfo) String

func (m *MsgUpdateChainInfo) String() string

func (*MsgUpdateChainInfo) Type

func (msg *MsgUpdateChainInfo) Type() string

func (*MsgUpdateChainInfo) Unmarshal

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

func (*MsgUpdateChainInfo) ValidateBasic

func (msg *MsgUpdateChainInfo) ValidateBasic() error

func (*MsgUpdateChainInfo) XXX_DiscardUnknown

func (m *MsgUpdateChainInfo) XXX_DiscardUnknown()

func (*MsgUpdateChainInfo) XXX_Marshal

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

func (*MsgUpdateChainInfo) XXX_Merge

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

func (*MsgUpdateChainInfo) XXX_Size

func (m *MsgUpdateChainInfo) XXX_Size() int

func (*MsgUpdateChainInfo) XXX_Unmarshal

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

type MsgUpdateChainInfoResponse

type MsgUpdateChainInfoResponse struct {
}

MsgUpdateChainInfoResponse defines the MsgUpdateChainInfoResponse service.

func (*MsgUpdateChainInfoResponse) Descriptor

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

func (*MsgUpdateChainInfoResponse) Marshal

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

func (*MsgUpdateChainInfoResponse) MarshalTo

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

func (*MsgUpdateChainInfoResponse) MarshalToSizedBuffer

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

func (*MsgUpdateChainInfoResponse) ProtoMessage

func (*MsgUpdateChainInfoResponse) ProtoMessage()

func (*MsgUpdateChainInfoResponse) Reset

func (m *MsgUpdateChainInfoResponse) Reset()

func (*MsgUpdateChainInfoResponse) Size

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

func (*MsgUpdateChainInfoResponse) String

func (m *MsgUpdateChainInfoResponse) String() string

func (*MsgUpdateChainInfoResponse) Unmarshal

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

func (*MsgUpdateChainInfoResponse) XXX_DiscardUnknown

func (m *MsgUpdateChainInfoResponse) XXX_DiscardUnknown()

func (*MsgUpdateChainInfoResponse) XXX_Marshal

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

func (*MsgUpdateChainInfoResponse) XXX_Merge

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

func (*MsgUpdateChainInfoResponse) XXX_Size

func (m *MsgUpdateChainInfoResponse) XXX_Size() int

func (*MsgUpdateChainInfoResponse) XXX_Unmarshal

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

type MsgUpdatePolicies

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

MsgUpdatePolicies defines the MsgUpdatePolicies service.

func NewMsgUpdatePolicies

func NewMsgUpdatePolicies(creator string, policies Policies) *MsgUpdatePolicies

func (*MsgUpdatePolicies) Descriptor

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

func (*MsgUpdatePolicies) GetCreator

func (m *MsgUpdatePolicies) GetCreator() string

func (*MsgUpdatePolicies) GetPolicies

func (m *MsgUpdatePolicies) GetPolicies() Policies

func (*MsgUpdatePolicies) GetSignBytes

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

func (*MsgUpdatePolicies) GetSigners

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

func (*MsgUpdatePolicies) Marshal

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

func (*MsgUpdatePolicies) MarshalTo

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

func (*MsgUpdatePolicies) MarshalToSizedBuffer

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

func (*MsgUpdatePolicies) ProtoMessage

func (*MsgUpdatePolicies) ProtoMessage()

func (*MsgUpdatePolicies) Reset

func (m *MsgUpdatePolicies) Reset()

func (*MsgUpdatePolicies) Route

func (msg *MsgUpdatePolicies) Route() string

func (*MsgUpdatePolicies) Size

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

func (*MsgUpdatePolicies) String

func (m *MsgUpdatePolicies) String() string

func (*MsgUpdatePolicies) Type

func (msg *MsgUpdatePolicies) Type() string

func (*MsgUpdatePolicies) Unmarshal

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

func (*MsgUpdatePolicies) ValidateBasic

func (msg *MsgUpdatePolicies) ValidateBasic() error

func (*MsgUpdatePolicies) XXX_DiscardUnknown

func (m *MsgUpdatePolicies) XXX_DiscardUnknown()

func (*MsgUpdatePolicies) XXX_Marshal

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

func (*MsgUpdatePolicies) XXX_Merge

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

func (*MsgUpdatePolicies) XXX_Size

func (m *MsgUpdatePolicies) XXX_Size() int

func (*MsgUpdatePolicies) XXX_Unmarshal

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

type MsgUpdatePoliciesResponse

type MsgUpdatePoliciesResponse struct {
}

MsgUpdatePoliciesResponse defines the MsgUpdatePoliciesResponse service.

func (*MsgUpdatePoliciesResponse) Descriptor

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

func (*MsgUpdatePoliciesResponse) Marshal

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

func (*MsgUpdatePoliciesResponse) MarshalTo

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

func (*MsgUpdatePoliciesResponse) MarshalToSizedBuffer

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

func (*MsgUpdatePoliciesResponse) ProtoMessage

func (*MsgUpdatePoliciesResponse) ProtoMessage()

func (*MsgUpdatePoliciesResponse) Reset

func (m *MsgUpdatePoliciesResponse) Reset()

func (*MsgUpdatePoliciesResponse) Size

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

func (*MsgUpdatePoliciesResponse) String

func (m *MsgUpdatePoliciesResponse) String() string

func (*MsgUpdatePoliciesResponse) Unmarshal

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

func (*MsgUpdatePoliciesResponse) XXX_DiscardUnknown

func (m *MsgUpdatePoliciesResponse) XXX_DiscardUnknown()

func (*MsgUpdatePoliciesResponse) XXX_Marshal

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

func (*MsgUpdatePoliciesResponse) XXX_Merge

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

func (*MsgUpdatePoliciesResponse) XXX_Size

func (m *MsgUpdatePoliciesResponse) XXX_Size() int

func (*MsgUpdatePoliciesResponse) XXX_Unmarshal

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

type Policies

type Policies struct {
	Items []*Policy `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}

Policy contains info about authority policies

func DefaultPolicies

func DefaultPolicies() Policies

DefaultPolicies returns the default value for policies

func (Policies) CheckSigner

func (p Policies) CheckSigner(signer string, policyRequired PolicyType) error

CheckSigner checks if the signer is authorized for the given policy type

func (*Policies) Descriptor

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

func (*Policies) GetItems

func (m *Policies) GetItems() []*Policy

func (*Policies) Marshal

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

func (*Policies) MarshalTo

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

func (*Policies) MarshalToSizedBuffer

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

func (*Policies) ProtoMessage

func (*Policies) ProtoMessage()

func (*Policies) Reset

func (m *Policies) Reset()

func (*Policies) Size

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

func (*Policies) String

func (m *Policies) String() string

func (*Policies) Unmarshal

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

func (Policies) Validate

func (p Policies) Validate() error

Validate performs basic validation of policies

func (*Policies) XXX_DiscardUnknown

func (m *Policies) XXX_DiscardUnknown()

func (*Policies) XXX_Marshal

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

func (*Policies) XXX_Merge

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

func (*Policies) XXX_Size

func (m *Policies) XXX_Size() int

func (*Policies) XXX_Unmarshal

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

type Policy

type Policy struct {
	PolicyType PolicyType `` /* 137-byte string literal not displayed */
	Address    string     `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
}

func (*Policy) Descriptor

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

func (*Policy) GetAddress

func (m *Policy) GetAddress() string

func (*Policy) GetPolicyType

func (m *Policy) GetPolicyType() PolicyType

func (*Policy) Marshal

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

func (*Policy) MarshalTo

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

func (*Policy) MarshalToSizedBuffer

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

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) Reset

func (m *Policy) Reset()

func (*Policy) Size

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

func (*Policy) String

func (m *Policy) String() string

func (*Policy) Unmarshal

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

func (*Policy) XXX_DiscardUnknown

func (m *Policy) XXX_DiscardUnknown()

func (*Policy) XXX_Marshal

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

func (*Policy) XXX_Merge

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

func (*Policy) XXX_Size

func (m *Policy) XXX_Size() int

func (*Policy) XXX_Unmarshal

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

type PolicyType

type PolicyType int32

PolicyType defines the type of policy

const (
	PolicyType_groupEmergency   PolicyType = 0
	PolicyType_groupOperational PolicyType = 1
	// non-sensitive protocol parameters
	PolicyType_groupAdmin PolicyType = 2
	// protocol parameters or moving funds
	PolicyType_groupEmpty PolicyType = 3
)

func (PolicyType) EnumDescriptor

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

func (PolicyType) String

func (x PolicyType) String() string

func (PolicyType) Validate

func (p PolicyType) Validate() error

Validate PolicyType validates the policy type. Valid policy types are groupEmergency, groupOperational, and groupAdmin.

type QueryAuthorizationListRequest

type QueryAuthorizationListRequest struct {
}

QueryAuthorizationListRequest is the request type for the Query/AuthorizationList RPC method.

func (*QueryAuthorizationListRequest) Descriptor

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

func (*QueryAuthorizationListRequest) Marshal

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

func (*QueryAuthorizationListRequest) MarshalTo

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

func (*QueryAuthorizationListRequest) MarshalToSizedBuffer

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

func (*QueryAuthorizationListRequest) ProtoMessage

func (*QueryAuthorizationListRequest) ProtoMessage()

func (*QueryAuthorizationListRequest) Reset

func (m *QueryAuthorizationListRequest) Reset()

func (*QueryAuthorizationListRequest) Size

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

func (*QueryAuthorizationListRequest) String

func (*QueryAuthorizationListRequest) Unmarshal

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

func (*QueryAuthorizationListRequest) XXX_DiscardUnknown

func (m *QueryAuthorizationListRequest) XXX_DiscardUnknown()

func (*QueryAuthorizationListRequest) XXX_Marshal

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

func (*QueryAuthorizationListRequest) XXX_Merge

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

func (*QueryAuthorizationListRequest) XXX_Size

func (m *QueryAuthorizationListRequest) XXX_Size() int

func (*QueryAuthorizationListRequest) XXX_Unmarshal

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

type QueryAuthorizationListResponse

type QueryAuthorizationListResponse struct {
	AuthorizationList AuthorizationList `protobuf:"bytes,1,opt,name=authorization_list,json=authorizationList,proto3" json:"authorization_list"`
}

QueryAuthorizationListResponse is the response type for the Query/AuthorizationList RPC

func (*QueryAuthorizationListResponse) Descriptor

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

func (*QueryAuthorizationListResponse) GetAuthorizationList

func (m *QueryAuthorizationListResponse) GetAuthorizationList() AuthorizationList

func (*QueryAuthorizationListResponse) Marshal

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

func (*QueryAuthorizationListResponse) MarshalTo

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

func (*QueryAuthorizationListResponse) MarshalToSizedBuffer

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

func (*QueryAuthorizationListResponse) ProtoMessage

func (*QueryAuthorizationListResponse) ProtoMessage()

func (*QueryAuthorizationListResponse) Reset

func (m *QueryAuthorizationListResponse) Reset()

func (*QueryAuthorizationListResponse) Size

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

func (*QueryAuthorizationListResponse) String

func (*QueryAuthorizationListResponse) Unmarshal

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

func (*QueryAuthorizationListResponse) XXX_DiscardUnknown

func (m *QueryAuthorizationListResponse) XXX_DiscardUnknown()

func (*QueryAuthorizationListResponse) XXX_Marshal

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

func (*QueryAuthorizationListResponse) XXX_Merge

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

func (*QueryAuthorizationListResponse) XXX_Size

func (m *QueryAuthorizationListResponse) XXX_Size() int

func (*QueryAuthorizationListResponse) XXX_Unmarshal

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

type QueryAuthorizationRequest

type QueryAuthorizationRequest struct {
	MsgUrl string `protobuf:"bytes,1,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
}

QueryAuthorizationRequest is the request type for the Query/Authorization RPC method.

func (*QueryAuthorizationRequest) Descriptor

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

func (*QueryAuthorizationRequest) GetMsgUrl

func (m *QueryAuthorizationRequest) GetMsgUrl() string

func (*QueryAuthorizationRequest) Marshal

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

func (*QueryAuthorizationRequest) MarshalTo

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

func (*QueryAuthorizationRequest) MarshalToSizedBuffer

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

func (*QueryAuthorizationRequest) ProtoMessage

func (*QueryAuthorizationRequest) ProtoMessage()

func (*QueryAuthorizationRequest) Reset

func (m *QueryAuthorizationRequest) Reset()

func (*QueryAuthorizationRequest) Size

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

func (*QueryAuthorizationRequest) String

func (m *QueryAuthorizationRequest) String() string

func (*QueryAuthorizationRequest) Unmarshal

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

func (*QueryAuthorizationRequest) XXX_DiscardUnknown

func (m *QueryAuthorizationRequest) XXX_DiscardUnknown()

func (*QueryAuthorizationRequest) XXX_Marshal

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

func (*QueryAuthorizationRequest) XXX_Merge

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

func (*QueryAuthorizationRequest) XXX_Size

func (m *QueryAuthorizationRequest) XXX_Size() int

func (*QueryAuthorizationRequest) XXX_Unmarshal

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

type QueryAuthorizationResponse

type QueryAuthorizationResponse struct {
	Authorization Authorization `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization"`
}

QueryAuthorizationResponse is the response type for the Query/Authorization RPC method.

func (*QueryAuthorizationResponse) Descriptor

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

func (*QueryAuthorizationResponse) GetAuthorization

func (m *QueryAuthorizationResponse) GetAuthorization() Authorization

func (*QueryAuthorizationResponse) Marshal

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

func (*QueryAuthorizationResponse) MarshalTo

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

func (*QueryAuthorizationResponse) MarshalToSizedBuffer

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

func (*QueryAuthorizationResponse) ProtoMessage

func (*QueryAuthorizationResponse) ProtoMessage()

func (*QueryAuthorizationResponse) Reset

func (m *QueryAuthorizationResponse) Reset()

func (*QueryAuthorizationResponse) Size

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

func (*QueryAuthorizationResponse) String

func (m *QueryAuthorizationResponse) String() string

func (*QueryAuthorizationResponse) Unmarshal

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

func (*QueryAuthorizationResponse) XXX_DiscardUnknown

func (m *QueryAuthorizationResponse) XXX_DiscardUnknown()

func (*QueryAuthorizationResponse) XXX_Marshal

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

func (*QueryAuthorizationResponse) XXX_Merge

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

func (*QueryAuthorizationResponse) XXX_Size

func (m *QueryAuthorizationResponse) XXX_Size() int

func (*QueryAuthorizationResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Queries Policies
	Policies(ctx context.Context, in *QueryGetPoliciesRequest, opts ...grpc.CallOption) (*QueryGetPoliciesResponse, error)
	// Queries ChainInfo
	ChainInfo(ctx context.Context, in *QueryGetChainInfoRequest, opts ...grpc.CallOption) (*QueryGetChainInfoResponse, error)
	AuthorizationList(ctx context.Context, in *QueryAuthorizationListRequest, opts ...grpc.CallOption) (*QueryAuthorizationListResponse, error)
	Authorization(ctx context.Context, in *QueryAuthorizationRequest, opts ...grpc.CallOption) (*QueryAuthorizationResponse, 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 QueryGetChainInfoRequest

type QueryGetChainInfoRequest struct {
}

QueryGetChainInfoRequest is the request type for the Query/ChainInfo RPC method.

func (*QueryGetChainInfoRequest) Descriptor

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

func (*QueryGetChainInfoRequest) Marshal

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

func (*QueryGetChainInfoRequest) MarshalTo

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

func (*QueryGetChainInfoRequest) MarshalToSizedBuffer

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

func (*QueryGetChainInfoRequest) ProtoMessage

func (*QueryGetChainInfoRequest) ProtoMessage()

func (*QueryGetChainInfoRequest) Reset

func (m *QueryGetChainInfoRequest) Reset()

func (*QueryGetChainInfoRequest) Size

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

func (*QueryGetChainInfoRequest) String

func (m *QueryGetChainInfoRequest) String() string

func (*QueryGetChainInfoRequest) Unmarshal

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

func (*QueryGetChainInfoRequest) XXX_DiscardUnknown

func (m *QueryGetChainInfoRequest) XXX_DiscardUnknown()

func (*QueryGetChainInfoRequest) XXX_Marshal

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

func (*QueryGetChainInfoRequest) XXX_Merge

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

func (*QueryGetChainInfoRequest) XXX_Size

func (m *QueryGetChainInfoRequest) XXX_Size() int

func (*QueryGetChainInfoRequest) XXX_Unmarshal

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

type QueryGetChainInfoResponse

type QueryGetChainInfoResponse struct {
	ChainInfo ChainInfo `protobuf:"bytes,1,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info"`
}

QueryGetChainInfoResponse is the response type for the Query/ChainInfo RPC method.

func (*QueryGetChainInfoResponse) Descriptor

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

func (*QueryGetChainInfoResponse) GetChainInfo

func (m *QueryGetChainInfoResponse) GetChainInfo() ChainInfo

func (*QueryGetChainInfoResponse) Marshal

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

func (*QueryGetChainInfoResponse) MarshalTo

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

func (*QueryGetChainInfoResponse) MarshalToSizedBuffer

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

func (*QueryGetChainInfoResponse) ProtoMessage

func (*QueryGetChainInfoResponse) ProtoMessage()

func (*QueryGetChainInfoResponse) Reset

func (m *QueryGetChainInfoResponse) Reset()

func (*QueryGetChainInfoResponse) Size

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

func (*QueryGetChainInfoResponse) String

func (m *QueryGetChainInfoResponse) String() string

func (*QueryGetChainInfoResponse) Unmarshal

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

func (*QueryGetChainInfoResponse) XXX_DiscardUnknown

func (m *QueryGetChainInfoResponse) XXX_DiscardUnknown()

func (*QueryGetChainInfoResponse) XXX_Marshal

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

func (*QueryGetChainInfoResponse) XXX_Merge

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

func (*QueryGetChainInfoResponse) XXX_Size

func (m *QueryGetChainInfoResponse) XXX_Size() int

func (*QueryGetChainInfoResponse) XXX_Unmarshal

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

type QueryGetPoliciesRequest

type QueryGetPoliciesRequest struct {
}

QueryGetPoliciesRequest is the request type for the Query/Policies RPC method.

func (*QueryGetPoliciesRequest) Descriptor

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

func (*QueryGetPoliciesRequest) Marshal

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

func (*QueryGetPoliciesRequest) MarshalTo

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

func (*QueryGetPoliciesRequest) MarshalToSizedBuffer

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

func (*QueryGetPoliciesRequest) ProtoMessage

func (*QueryGetPoliciesRequest) ProtoMessage()

func (*QueryGetPoliciesRequest) Reset

func (m *QueryGetPoliciesRequest) Reset()

func (*QueryGetPoliciesRequest) Size

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

func (*QueryGetPoliciesRequest) String

func (m *QueryGetPoliciesRequest) String() string

func (*QueryGetPoliciesRequest) Unmarshal

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

func (*QueryGetPoliciesRequest) XXX_DiscardUnknown

func (m *QueryGetPoliciesRequest) XXX_DiscardUnknown()

func (*QueryGetPoliciesRequest) XXX_Marshal

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

func (*QueryGetPoliciesRequest) XXX_Merge

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

func (*QueryGetPoliciesRequest) XXX_Size

func (m *QueryGetPoliciesRequest) XXX_Size() int

func (*QueryGetPoliciesRequest) XXX_Unmarshal

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

type QueryGetPoliciesResponse

type QueryGetPoliciesResponse struct {
	Policies Policies `protobuf:"bytes,1,opt,name=policies,proto3" json:"policies"`
}

QueryGetPoliciesResponse is the response type for the Query/Policies RPC method.

func (*QueryGetPoliciesResponse) Descriptor

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

func (*QueryGetPoliciesResponse) GetPolicies

func (m *QueryGetPoliciesResponse) GetPolicies() Policies

func (*QueryGetPoliciesResponse) Marshal

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

func (*QueryGetPoliciesResponse) MarshalTo

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

func (*QueryGetPoliciesResponse) MarshalToSizedBuffer

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

func (*QueryGetPoliciesResponse) ProtoMessage

func (*QueryGetPoliciesResponse) ProtoMessage()

func (*QueryGetPoliciesResponse) Reset

func (m *QueryGetPoliciesResponse) Reset()

func (*QueryGetPoliciesResponse) Size

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

func (*QueryGetPoliciesResponse) String

func (m *QueryGetPoliciesResponse) String() string

func (*QueryGetPoliciesResponse) Unmarshal

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

func (*QueryGetPoliciesResponse) XXX_DiscardUnknown

func (m *QueryGetPoliciesResponse) XXX_DiscardUnknown()

func (*QueryGetPoliciesResponse) XXX_Marshal

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

func (*QueryGetPoliciesResponse) XXX_Merge

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

func (*QueryGetPoliciesResponse) XXX_Size

func (m *QueryGetPoliciesResponse) XXX_Size() int

func (*QueryGetPoliciesResponse) XXX_Unmarshal

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

type QueryServer

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddAuthorization

func (*UnimplementedMsgServer) RemoveAuthorization

func (*UnimplementedMsgServer) RemoveChainInfo

func (*UnimplementedMsgServer) UpdateChainInfo

func (*UnimplementedMsgServer) UpdatePolicies

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Authorization

func (*UnimplementedQueryServer) AuthorizationList

func (*UnimplementedQueryServer) ChainInfo

func (*UnimplementedQueryServer) Policies

Jump to

Keyboard shortcuts

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