sanction

package
v0.0.0-...-ab54ecc Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package sanction is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "sanction"

	// StoreKey is the store key string for gov
	StoreKey = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// DefaultImmediateSanctionMinDeposit is the default to use for the MinDepositSanction.
	DefaultImmediateSanctionMinDeposit sdk.Coins

	// DefaultImmediateUnsanctionMinDeposit is the default to use for the MinDepositUnsanction.
	DefaultImmediateUnsanctionMinDeposit sdk.Coins
)

Define the defaults for each param field and allow consuming apps to set them.

View Source
var (
	ErrInvalidLengthSanction        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSanction          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSanction = 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 (

	// ModuleCdc references the global x/sanction module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/sanction and
	// defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var TempStatus_name = map[int32]string{
	0: "TEMP_STATUS_UNSPECIFIED",
	1: "TEMP_STATUS_SANCTIONED",
	2: "TEMP_STATUS_UNSANCTIONED",
}
View Source
var TempStatus_value = map[string]int32{
	"TEMP_STATUS_UNSPECIFIED":  0,
	"TEMP_STATUS_SANCTIONED":   1,
	"TEMP_STATUS_UNSANCTIONED": 2,
}

Functions

func HasBypass

func HasBypass(ctx sdk.Context) bool

HasBypass checks the context to see if the sanction bank send restriction should be skipped.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.

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 WithBypass

func WithBypass(ctx sdk.Context) sdk.Context

WithBypass returns a new context that will cause the sanction bank send restriction to be skipped.

func WithoutBypass

func WithoutBypass(ctx sdk.Context) sdk.Context

WithoutBypass returns a new context that will cause the sanction bank send restriction to not be skipped.

Types

type AccountKeeper

type AccountKeeper interface {
	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI
	SetAccount(sdk.Context, authtypes.AccountI)
}

AccountKeeper defines the account/auth functionality needed from within the sanction module.

type BankKeeper

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

BankKeeper defines the bank functionality needed from within the sanction module.

type EventAddressSanctioned

type EventAddressSanctioned struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

EventAddressSanctioned is an event emitted when an address is sanctioned.

func NewEventAddressSanctioned

func NewEventAddressSanctioned(addr sdk.AccAddress) *EventAddressSanctioned

func (*EventAddressSanctioned) Descriptor

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

func (*EventAddressSanctioned) GetAddress

func (m *EventAddressSanctioned) GetAddress() string

func (*EventAddressSanctioned) Marshal

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

func (*EventAddressSanctioned) MarshalTo

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

func (*EventAddressSanctioned) MarshalToSizedBuffer

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

func (*EventAddressSanctioned) ProtoMessage

func (*EventAddressSanctioned) ProtoMessage()

func (*EventAddressSanctioned) Reset

func (m *EventAddressSanctioned) Reset()

func (*EventAddressSanctioned) Size

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

func (*EventAddressSanctioned) String

func (m *EventAddressSanctioned) String() string

func (*EventAddressSanctioned) Unmarshal

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

func (*EventAddressSanctioned) XXX_DiscardUnknown

func (m *EventAddressSanctioned) XXX_DiscardUnknown()

func (*EventAddressSanctioned) XXX_Marshal

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

func (*EventAddressSanctioned) XXX_Merge

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

func (*EventAddressSanctioned) XXX_Size

func (m *EventAddressSanctioned) XXX_Size() int

func (*EventAddressSanctioned) XXX_Unmarshal

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

type EventAddressUnsanctioned

type EventAddressUnsanctioned struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

EventAddressUnsanctioned is an event emitted when an address is unsanctioned.

func NewEventAddressUnsanctioned

func NewEventAddressUnsanctioned(addr sdk.AccAddress) *EventAddressUnsanctioned

func (*EventAddressUnsanctioned) Descriptor

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

func (*EventAddressUnsanctioned) GetAddress

func (m *EventAddressUnsanctioned) GetAddress() string

func (*EventAddressUnsanctioned) Marshal

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

func (*EventAddressUnsanctioned) MarshalTo

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

func (*EventAddressUnsanctioned) MarshalToSizedBuffer

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

func (*EventAddressUnsanctioned) ProtoMessage

func (*EventAddressUnsanctioned) ProtoMessage()

func (*EventAddressUnsanctioned) Reset

func (m *EventAddressUnsanctioned) Reset()

func (*EventAddressUnsanctioned) Size

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

func (*EventAddressUnsanctioned) String

func (m *EventAddressUnsanctioned) String() string

func (*EventAddressUnsanctioned) Unmarshal

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

func (*EventAddressUnsanctioned) XXX_DiscardUnknown

func (m *EventAddressUnsanctioned) XXX_DiscardUnknown()

func (*EventAddressUnsanctioned) XXX_Marshal

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

func (*EventAddressUnsanctioned) XXX_Merge

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

func (*EventAddressUnsanctioned) XXX_Size

func (m *EventAddressUnsanctioned) XXX_Size() int

func (*EventAddressUnsanctioned) XXX_Unmarshal

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

type EventParamsUpdated

type EventParamsUpdated struct {
}

EventParamsUpdated is an event emitted when the sanction module params are updated.

func (*EventParamsUpdated) Descriptor

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

func (*EventParamsUpdated) Marshal

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

func (*EventParamsUpdated) MarshalTo

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

func (*EventParamsUpdated) MarshalToSizedBuffer

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

func (*EventParamsUpdated) ProtoMessage

func (*EventParamsUpdated) ProtoMessage()

func (*EventParamsUpdated) Reset

func (m *EventParamsUpdated) Reset()

func (*EventParamsUpdated) Size

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

func (*EventParamsUpdated) String

func (m *EventParamsUpdated) String() string

func (*EventParamsUpdated) Unmarshal

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

func (*EventParamsUpdated) XXX_DiscardUnknown

func (m *EventParamsUpdated) XXX_DiscardUnknown()

func (*EventParamsUpdated) XXX_Marshal

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

func (*EventParamsUpdated) XXX_Merge

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

func (*EventParamsUpdated) XXX_Size

func (m *EventParamsUpdated) XXX_Size() int

func (*EventParamsUpdated) XXX_Unmarshal

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

type EventTempAddressSanctioned

type EventTempAddressSanctioned struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

EventTempAddressSanctioned is an event emitted when an address is temporarily sanctioned.

func NewEventTempAddressSanctioned

func NewEventTempAddressSanctioned(addr sdk.AccAddress) *EventTempAddressSanctioned

func (*EventTempAddressSanctioned) Descriptor

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

func (*EventTempAddressSanctioned) GetAddress

func (m *EventTempAddressSanctioned) GetAddress() string

func (*EventTempAddressSanctioned) Marshal

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

func (*EventTempAddressSanctioned) MarshalTo

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

func (*EventTempAddressSanctioned) MarshalToSizedBuffer

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

func (*EventTempAddressSanctioned) ProtoMessage

func (*EventTempAddressSanctioned) ProtoMessage()

func (*EventTempAddressSanctioned) Reset

func (m *EventTempAddressSanctioned) Reset()

func (*EventTempAddressSanctioned) Size

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

func (*EventTempAddressSanctioned) String

func (m *EventTempAddressSanctioned) String() string

func (*EventTempAddressSanctioned) Unmarshal

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

func (*EventTempAddressSanctioned) XXX_DiscardUnknown

func (m *EventTempAddressSanctioned) XXX_DiscardUnknown()

func (*EventTempAddressSanctioned) XXX_Marshal

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

func (*EventTempAddressSanctioned) XXX_Merge

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

func (*EventTempAddressSanctioned) XXX_Size

func (m *EventTempAddressSanctioned) XXX_Size() int

func (*EventTempAddressSanctioned) XXX_Unmarshal

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

type EventTempAddressUnsanctioned

type EventTempAddressUnsanctioned struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

EventTempAddressUnsanctioned is an event emitted when an address is temporarily unsanctioned.

func NewEventTempAddressUnsanctioned

func NewEventTempAddressUnsanctioned(addr sdk.AccAddress) *EventTempAddressUnsanctioned

func (*EventTempAddressUnsanctioned) Descriptor

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

func (*EventTempAddressUnsanctioned) GetAddress

func (m *EventTempAddressUnsanctioned) GetAddress() string

func (*EventTempAddressUnsanctioned) Marshal

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

func (*EventTempAddressUnsanctioned) MarshalTo

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

func (*EventTempAddressUnsanctioned) MarshalToSizedBuffer

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

func (*EventTempAddressUnsanctioned) ProtoMessage

func (*EventTempAddressUnsanctioned) ProtoMessage()

func (*EventTempAddressUnsanctioned) Reset

func (m *EventTempAddressUnsanctioned) Reset()

func (*EventTempAddressUnsanctioned) Size

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

func (*EventTempAddressUnsanctioned) String

func (*EventTempAddressUnsanctioned) Unmarshal

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

func (*EventTempAddressUnsanctioned) XXX_DiscardUnknown

func (m *EventTempAddressUnsanctioned) XXX_DiscardUnknown()

func (*EventTempAddressUnsanctioned) XXX_Marshal

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

func (*EventTempAddressUnsanctioned) XXX_Merge

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

func (*EventTempAddressUnsanctioned) XXX_Size

func (m *EventTempAddressUnsanctioned) XXX_Size() int

func (*EventTempAddressUnsanctioned) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params are the sanction module parameters.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// sanctioned_addresses defines account addresses that are sanctioned.
	SanctionedAddresses []string `protobuf:"bytes,2,rep,name=sanctioned_addresses,json=sanctionedAddresses,proto3" json:"sanctioned_addresses,omitempty"`
	// temporary_entries defines the temporary entries associated with on-going governance proposals.
	TemporaryEntries []*TemporaryEntry `protobuf:"bytes,3,rep,name=temporary_entries,json=temporaryEntries,proto3" json:"temporary_entries,omitempty"`
}

GenesisState defines the sanction module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

func NewGenesisState

func NewGenesisState(params *Params, addrs []string, tempEntries []*TemporaryEntry) *GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() *Params

func (*GenesisState) GetSanctionedAddresses

func (m *GenesisState) GetSanctionedAddresses() []string

func (*GenesisState) GetTemporaryEntries

func (m *GenesisState) GetTemporaryEntries() []*TemporaryEntry

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

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 GovKeeper

type GovKeeper interface {
	GetProposal(ctx sdk.Context, proposalID uint64) (govv1.Proposal, bool)
	GetDepositParams(ctx sdk.Context) govv1.DepositParams
	GetVotingParams(ctx sdk.Context) govv1.VotingParams
	GetProposalID(ctx sdk.Context) (uint64, error)
}

GovKeeper defines the gov functionality needed from within the sanction module.

type MsgClient

type MsgClient interface {
	// Sanction is a governance operation for sanctioning addresses.
	Sanction(ctx context.Context, in *MsgSanction, opts ...grpc.CallOption) (*MsgSanctionResponse, error)
	// Unsanction is a governance operation for unsanctioning addresses.
	Unsanction(ctx context.Context, in *MsgUnsanction, opts ...grpc.CallOption) (*MsgUnsanctionResponse, error)
	// UpdateParams is a governance operation for updating the sanction module params.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgSanction

type MsgSanction struct {
	// addresses are the addresses to sanction.
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// authority is the address of the account with the authority to enact sanctions (most likely the governance module
	// account).
	Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
}

MsgSanction represents a message for the governance operation of sanctioning addresses.

func NewMsgSanction

func NewMsgSanction(authority string, addrs ...sdk.AccAddress) *MsgSanction

func (*MsgSanction) Descriptor

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

func (*MsgSanction) GetAddresses

func (m *MsgSanction) GetAddresses() []string

func (*MsgSanction) GetAuthority

func (m *MsgSanction) GetAuthority() string

func (MsgSanction) GetSigners

func (m MsgSanction) GetSigners() []sdk.AccAddress

func (*MsgSanction) Marshal

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

func (*MsgSanction) MarshalTo

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

func (*MsgSanction) MarshalToSizedBuffer

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

func (*MsgSanction) ProtoMessage

func (*MsgSanction) ProtoMessage()

func (*MsgSanction) Reset

func (m *MsgSanction) Reset()

func (*MsgSanction) Size

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

func (*MsgSanction) String

func (m *MsgSanction) String() string

func (*MsgSanction) Unmarshal

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

func (MsgSanction) ValidateBasic

func (m MsgSanction) ValidateBasic() error

func (*MsgSanction) XXX_DiscardUnknown

func (m *MsgSanction) XXX_DiscardUnknown()

func (*MsgSanction) XXX_Marshal

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

func (*MsgSanction) XXX_Merge

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

func (*MsgSanction) XXX_Size

func (m *MsgSanction) XXX_Size() int

func (*MsgSanction) XXX_Unmarshal

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

type MsgSanctionResponse

type MsgSanctionResponse struct {
}

MsgOptInResponse defines the Msg/Sanction response type.

func (*MsgSanctionResponse) Descriptor

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

func (*MsgSanctionResponse) Marshal

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

func (*MsgSanctionResponse) MarshalTo

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

func (*MsgSanctionResponse) MarshalToSizedBuffer

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

func (*MsgSanctionResponse) ProtoMessage

func (*MsgSanctionResponse) ProtoMessage()

func (*MsgSanctionResponse) Reset

func (m *MsgSanctionResponse) Reset()

func (*MsgSanctionResponse) Size

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

func (*MsgSanctionResponse) String

func (m *MsgSanctionResponse) String() string

func (*MsgSanctionResponse) Unmarshal

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

func (*MsgSanctionResponse) XXX_DiscardUnknown

func (m *MsgSanctionResponse) XXX_DiscardUnknown()

func (*MsgSanctionResponse) XXX_Marshal

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

func (*MsgSanctionResponse) XXX_Merge

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

func (*MsgSanctionResponse) XXX_Size

func (m *MsgSanctionResponse) XXX_Size() int

func (*MsgSanctionResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Sanction is a governance operation for sanctioning addresses.
	Sanction(context.Context, *MsgSanction) (*MsgSanctionResponse, error)
	// Unsanction is a governance operation for unsanctioning addresses.
	Unsanction(context.Context, *MsgUnsanction) (*MsgUnsanctionResponse, error)
	// UpdateParams is a governance operation for updating the sanction module params.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUnsanction

type MsgUnsanction struct {
	// addresses are the addresses to unsanction.
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// authority is the address of the account with the authority to retract sanctions (most likely the governance module
	// account).
	Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
}

MsgSanction represents a message for the governance operation of unsanctioning addresses.

func NewMsgUnsanction

func NewMsgUnsanction(authority string, addrs ...sdk.AccAddress) *MsgUnsanction

func (*MsgUnsanction) Descriptor

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

func (*MsgUnsanction) GetAddresses

func (m *MsgUnsanction) GetAddresses() []string

func (*MsgUnsanction) GetAuthority

func (m *MsgUnsanction) GetAuthority() string

func (MsgUnsanction) GetSigners

func (m MsgUnsanction) GetSigners() []sdk.AccAddress

func (*MsgUnsanction) Marshal

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

func (*MsgUnsanction) MarshalTo

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

func (*MsgUnsanction) MarshalToSizedBuffer

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

func (*MsgUnsanction) ProtoMessage

func (*MsgUnsanction) ProtoMessage()

func (*MsgUnsanction) Reset

func (m *MsgUnsanction) Reset()

func (*MsgUnsanction) Size

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

func (*MsgUnsanction) String

func (m *MsgUnsanction) String() string

func (*MsgUnsanction) Unmarshal

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

func (MsgUnsanction) ValidateBasic

func (m MsgUnsanction) ValidateBasic() error

func (*MsgUnsanction) XXX_DiscardUnknown

func (m *MsgUnsanction) XXX_DiscardUnknown()

func (*MsgUnsanction) XXX_Marshal

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

func (*MsgUnsanction) XXX_Merge

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

func (*MsgUnsanction) XXX_Size

func (m *MsgUnsanction) XXX_Size() int

func (*MsgUnsanction) XXX_Unmarshal

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

type MsgUnsanctionResponse

type MsgUnsanctionResponse struct {
}

MsgOptInResponse defines the Msg/Unsanction response type.

func (*MsgUnsanctionResponse) Descriptor

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

func (*MsgUnsanctionResponse) Marshal

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

func (*MsgUnsanctionResponse) MarshalTo

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

func (*MsgUnsanctionResponse) MarshalToSizedBuffer

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

func (*MsgUnsanctionResponse) ProtoMessage

func (*MsgUnsanctionResponse) ProtoMessage()

func (*MsgUnsanctionResponse) Reset

func (m *MsgUnsanctionResponse) Reset()

func (*MsgUnsanctionResponse) Size

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

func (*MsgUnsanctionResponse) String

func (m *MsgUnsanctionResponse) String() string

func (*MsgUnsanctionResponse) Unmarshal

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

func (*MsgUnsanctionResponse) XXX_DiscardUnknown

func (m *MsgUnsanctionResponse) XXX_DiscardUnknown()

func (*MsgUnsanctionResponse) XXX_Marshal

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

func (*MsgUnsanctionResponse) XXX_Merge

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

func (*MsgUnsanctionResponse) XXX_Size

func (m *MsgUnsanctionResponse) XXX_Size() int

func (*MsgUnsanctionResponse) XXX_Unmarshal

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

type MsgUpdateParams

type MsgUpdateParams struct {
	// params are the sanction module parameters.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// authority is the address of the account with the authority to update params (most likely the governance module
	// account).
	Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
}

MsgUpdateParams represents a message for the governance operation of updating the sanction module params.

func NewMsgUpdateParams

func NewMsgUpdateParams(authority string, minDepSanction, minDepUnsanction sdk.Coins) *MsgUpdateParams

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() *Params

func (MsgUpdateParams) GetSigners

func (m MsgUpdateParams) GetSigners() []sdk.AccAddress

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (MsgUpdateParams) ValidateBasic

func (m MsgUpdateParams) ValidateBasic() error

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defined the Msg/UpdateParams response type.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// immediate_sanction_min_deposit is the minimum deposit for a sanction to happen immediately.
	// If this is zero, immediate sanctioning is not available.
	// Otherwise, if a sanction governance proposal is issued with a deposit at least this large, a temporary sanction
	// will be immediately issued that will expire when voting ends on the governance proposal.
	ImmediateSanctionMinDeposit github_com_cosmos_cosmos_sdk_types.Coins `` /* 190-byte string literal not displayed */
	// immediate_unsanction_min_deposit is the minimum deposit for an unsanction to happen immediately.
	// If this is zero, immediate unsanctioning is not available.
	// Otherwise, if an unsanction governance proposal is issued with a deposit at least this large, a temporary
	// unsanction will be immediately issued that will expire when voting ends on the governance proposal.
	ImmediateUnsanctionMinDeposit github_com_cosmos_cosmos_sdk_types.Coins `` /* 196-byte string literal not displayed */
}

Params defines the configurable parameters of the sanction module.

func DefaultParams

func DefaultParams() *Params

func (*Params) Descriptor

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

func (*Params) GetImmediateSanctionMinDeposit

func (m *Params) GetImmediateSanctionMinDeposit() github_com_cosmos_cosmos_sdk_types.Coins

func (*Params) GetImmediateUnsanctionMinDeposit

func (m *Params) GetImmediateUnsanctionMinDeposit() github_com_cosmos_cosmos_sdk_types.Coins

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

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) ValidateBasic

func (p Params) ValidateBasic() error

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 QueryClient

type QueryClient interface {
	// IsSanctioned checks if an account has been sanctioned.
	IsSanctioned(ctx context.Context, in *QueryIsSanctionedRequest, opts ...grpc.CallOption) (*QueryIsSanctionedResponse, error)
	// SanctionedAddresses returns a list of sanctioned addresses.
	SanctionedAddresses(ctx context.Context, in *QuerySanctionedAddressesRequest, opts ...grpc.CallOption) (*QuerySanctionedAddressesResponse, error)
	// TemporaryEntries returns temporary sanction/unsanction info.
	TemporaryEntries(ctx context.Context, in *QueryTemporaryEntriesRequest, opts ...grpc.CallOption) (*QueryTemporaryEntriesResponse, error)
	// Params returns the sanction module's params.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryIsSanctionedRequest

type QueryIsSanctionedRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryIsSanctionedRequest defines the RPC request for checking if an account is sanctioned.

func (*QueryIsSanctionedRequest) Descriptor

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

func (*QueryIsSanctionedRequest) GetAddress

func (m *QueryIsSanctionedRequest) GetAddress() string

func (*QueryIsSanctionedRequest) Marshal

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

func (*QueryIsSanctionedRequest) MarshalTo

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

func (*QueryIsSanctionedRequest) MarshalToSizedBuffer

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

func (*QueryIsSanctionedRequest) ProtoMessage

func (*QueryIsSanctionedRequest) ProtoMessage()

func (*QueryIsSanctionedRequest) Reset

func (m *QueryIsSanctionedRequest) Reset()

func (*QueryIsSanctionedRequest) Size

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

func (*QueryIsSanctionedRequest) String

func (m *QueryIsSanctionedRequest) String() string

func (*QueryIsSanctionedRequest) Unmarshal

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

func (*QueryIsSanctionedRequest) XXX_DiscardUnknown

func (m *QueryIsSanctionedRequest) XXX_DiscardUnknown()

func (*QueryIsSanctionedRequest) XXX_Marshal

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

func (*QueryIsSanctionedRequest) XXX_Merge

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

func (*QueryIsSanctionedRequest) XXX_Size

func (m *QueryIsSanctionedRequest) XXX_Size() int

func (*QueryIsSanctionedRequest) XXX_Unmarshal

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

type QueryIsSanctionedResponse

type QueryIsSanctionedResponse struct {
	// is_sanctioned is true if the address is sanctioned.
	IsSanctioned bool `protobuf:"varint,1,opt,name=is_sanctioned,json=isSanctioned,proto3" json:"is_sanctioned,omitempty"`
}

QueryIsSanctionedResponse defines the RPC response of an IsSanctioned query.

func (*QueryIsSanctionedResponse) Descriptor

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

func (*QueryIsSanctionedResponse) GetIsSanctioned

func (m *QueryIsSanctionedResponse) GetIsSanctioned() bool

func (*QueryIsSanctionedResponse) Marshal

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

func (*QueryIsSanctionedResponse) MarshalTo

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

func (*QueryIsSanctionedResponse) MarshalToSizedBuffer

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

func (*QueryIsSanctionedResponse) ProtoMessage

func (*QueryIsSanctionedResponse) ProtoMessage()

func (*QueryIsSanctionedResponse) Reset

func (m *QueryIsSanctionedResponse) Reset()

func (*QueryIsSanctionedResponse) Size

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

func (*QueryIsSanctionedResponse) String

func (m *QueryIsSanctionedResponse) String() string

func (*QueryIsSanctionedResponse) Unmarshal

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

func (*QueryIsSanctionedResponse) XXX_DiscardUnknown

func (m *QueryIsSanctionedResponse) XXX_DiscardUnknown()

func (*QueryIsSanctionedResponse) XXX_Marshal

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

func (*QueryIsSanctionedResponse) XXX_Merge

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

func (*QueryIsSanctionedResponse) XXX_Size

func (m *QueryIsSanctionedResponse) XXX_Size() int

func (*QueryIsSanctionedResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest defines the RPC request for getting the sanction module params.

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 are the sanction module parameters.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

QueryParamsResponse defines the RPC response of a Params query.

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 QuerySanctionedAddressesRequest

type QuerySanctionedAddressesRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QuerySanctionedAddressesRequest defines the RPC request for listing sanctioned accounts.

func (*QuerySanctionedAddressesRequest) Descriptor

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

func (*QuerySanctionedAddressesRequest) GetPagination

func (*QuerySanctionedAddressesRequest) Marshal

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

func (*QuerySanctionedAddressesRequest) MarshalTo

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

func (*QuerySanctionedAddressesRequest) MarshalToSizedBuffer

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

func (*QuerySanctionedAddressesRequest) ProtoMessage

func (*QuerySanctionedAddressesRequest) ProtoMessage()

func (*QuerySanctionedAddressesRequest) Reset

func (*QuerySanctionedAddressesRequest) Size

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

func (*QuerySanctionedAddressesRequest) String

func (*QuerySanctionedAddressesRequest) Unmarshal

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

func (*QuerySanctionedAddressesRequest) XXX_DiscardUnknown

func (m *QuerySanctionedAddressesRequest) XXX_DiscardUnknown()

func (*QuerySanctionedAddressesRequest) XXX_Marshal

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

func (*QuerySanctionedAddressesRequest) XXX_Merge

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

func (*QuerySanctionedAddressesRequest) XXX_Size

func (m *QuerySanctionedAddressesRequest) XXX_Size() int

func (*QuerySanctionedAddressesRequest) XXX_Unmarshal

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

type QuerySanctionedAddressesResponse

type QuerySanctionedAddressesResponse struct {
	// addresses is the list of sanctioned account addresses.
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QuerySanctionedAddressesResponse defines the RPC response of a SanctionedAddresses query.

func (*QuerySanctionedAddressesResponse) Descriptor

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

func (*QuerySanctionedAddressesResponse) GetAddresses

func (m *QuerySanctionedAddressesResponse) GetAddresses() []string

func (*QuerySanctionedAddressesResponse) GetPagination

func (*QuerySanctionedAddressesResponse) Marshal

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

func (*QuerySanctionedAddressesResponse) MarshalTo

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

func (*QuerySanctionedAddressesResponse) MarshalToSizedBuffer

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

func (*QuerySanctionedAddressesResponse) ProtoMessage

func (*QuerySanctionedAddressesResponse) ProtoMessage()

func (*QuerySanctionedAddressesResponse) Reset

func (*QuerySanctionedAddressesResponse) Size

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

func (*QuerySanctionedAddressesResponse) String

func (*QuerySanctionedAddressesResponse) Unmarshal

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

func (*QuerySanctionedAddressesResponse) XXX_DiscardUnknown

func (m *QuerySanctionedAddressesResponse) XXX_DiscardUnknown()

func (*QuerySanctionedAddressesResponse) XXX_Marshal

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

func (*QuerySanctionedAddressesResponse) XXX_Merge

func (*QuerySanctionedAddressesResponse) XXX_Size

func (m *QuerySanctionedAddressesResponse) XXX_Size() int

func (*QuerySanctionedAddressesResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// IsSanctioned checks if an account has been sanctioned.
	IsSanctioned(context.Context, *QueryIsSanctionedRequest) (*QueryIsSanctionedResponse, error)
	// SanctionedAddresses returns a list of sanctioned addresses.
	SanctionedAddresses(context.Context, *QuerySanctionedAddressesRequest) (*QuerySanctionedAddressesResponse, error)
	// TemporaryEntries returns temporary sanction/unsanction info.
	TemporaryEntries(context.Context, *QueryTemporaryEntriesRequest) (*QueryTemporaryEntriesResponse, error)
	// Params returns the sanction module's params.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type QueryTemporaryEntriesRequest

type QueryTemporaryEntriesRequest struct {
	// address is an optional address to restrict results to.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryTemporaryEntriesRequest defines the RPC request for listing temporary sanction/unsanction entries.

func (*QueryTemporaryEntriesRequest) Descriptor

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

func (*QueryTemporaryEntriesRequest) GetAddress

func (m *QueryTemporaryEntriesRequest) GetAddress() string

func (*QueryTemporaryEntriesRequest) GetPagination

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

func (*QueryTemporaryEntriesRequest) Marshal

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

func (*QueryTemporaryEntriesRequest) MarshalTo

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

func (*QueryTemporaryEntriesRequest) MarshalToSizedBuffer

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

func (*QueryTemporaryEntriesRequest) ProtoMessage

func (*QueryTemporaryEntriesRequest) ProtoMessage()

func (*QueryTemporaryEntriesRequest) Reset

func (m *QueryTemporaryEntriesRequest) Reset()

func (*QueryTemporaryEntriesRequest) Size

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

func (*QueryTemporaryEntriesRequest) String

func (*QueryTemporaryEntriesRequest) Unmarshal

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

func (*QueryTemporaryEntriesRequest) XXX_DiscardUnknown

func (m *QueryTemporaryEntriesRequest) XXX_DiscardUnknown()

func (*QueryTemporaryEntriesRequest) XXX_Marshal

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

func (*QueryTemporaryEntriesRequest) XXX_Merge

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

func (*QueryTemporaryEntriesRequest) XXX_Size

func (m *QueryTemporaryEntriesRequest) XXX_Size() int

func (*QueryTemporaryEntriesRequest) XXX_Unmarshal

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

type QueryTemporaryEntriesResponse

type QueryTemporaryEntriesResponse struct {
	Entries []*TemporaryEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryTemporaryEntriesResponse defines the RPC response of a TemporaryEntries query.

func (*QueryTemporaryEntriesResponse) Descriptor

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

func (*QueryTemporaryEntriesResponse) GetEntries

func (m *QueryTemporaryEntriesResponse) GetEntries() []*TemporaryEntry

func (*QueryTemporaryEntriesResponse) GetPagination

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

func (*QueryTemporaryEntriesResponse) Marshal

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

func (*QueryTemporaryEntriesResponse) MarshalTo

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

func (*QueryTemporaryEntriesResponse) MarshalToSizedBuffer

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

func (*QueryTemporaryEntriesResponse) ProtoMessage

func (*QueryTemporaryEntriesResponse) ProtoMessage()

func (*QueryTemporaryEntriesResponse) Reset

func (m *QueryTemporaryEntriesResponse) Reset()

func (*QueryTemporaryEntriesResponse) Size

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

func (*QueryTemporaryEntriesResponse) String

func (*QueryTemporaryEntriesResponse) Unmarshal

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

func (*QueryTemporaryEntriesResponse) XXX_DiscardUnknown

func (m *QueryTemporaryEntriesResponse) XXX_DiscardUnknown()

func (*QueryTemporaryEntriesResponse) XXX_Marshal

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

func (*QueryTemporaryEntriesResponse) XXX_Merge

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

func (*QueryTemporaryEntriesResponse) XXX_Size

func (m *QueryTemporaryEntriesResponse) XXX_Size() int

func (*QueryTemporaryEntriesResponse) XXX_Unmarshal

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

type TempStatus

type TempStatus int32

TempStatus is whether a temporary entry is a sanction or unsanction.

const (
	// TEMP_STATUS_UNSPECIFIED represents and unspecified status value.
	TEMP_STATUS_UNSPECIFIED TempStatus = 0
	// TEMP_STATUS_SANCTIONED indicates a sanction is in place.
	TEMP_STATUS_SANCTIONED TempStatus = 1
	// TEMP_STATUS_UNSANCTIONED indicates an unsanctioned is in place.
	TEMP_STATUS_UNSANCTIONED TempStatus = 2
)

func (TempStatus) EnumDescriptor

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

func (TempStatus) String

func (x TempStatus) String() string

type TemporaryEntry

type TemporaryEntry struct {
	// address is the address of this temporary entry.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// proposal_id is the governance proposal id associated with this temporary entry.
	ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// status is whether the entry is a sanction or unsanction.
	Status TempStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.sanction.v1beta1.TempStatus" json:"status,omitempty"`
}

TemporaryEntry defines the information involved in a temporary sanction or unsanction.

func (*TemporaryEntry) Descriptor

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

func (*TemporaryEntry) GetAddress

func (m *TemporaryEntry) GetAddress() string

func (*TemporaryEntry) GetProposalId

func (m *TemporaryEntry) GetProposalId() uint64

func (*TemporaryEntry) GetStatus

func (m *TemporaryEntry) GetStatus() TempStatus

func (*TemporaryEntry) Marshal

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

func (*TemporaryEntry) MarshalTo

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

func (*TemporaryEntry) MarshalToSizedBuffer

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

func (*TemporaryEntry) ProtoMessage

func (*TemporaryEntry) ProtoMessage()

func (*TemporaryEntry) Reset

func (m *TemporaryEntry) Reset()

func (*TemporaryEntry) Size

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

func (*TemporaryEntry) String

func (m *TemporaryEntry) String() string

func (*TemporaryEntry) Unmarshal

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

func (*TemporaryEntry) XXX_DiscardUnknown

func (m *TemporaryEntry) XXX_DiscardUnknown()

func (*TemporaryEntry) XXX_Marshal

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

func (*TemporaryEntry) XXX_Merge

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

func (*TemporaryEntry) XXX_Size

func (m *TemporaryEntry) XXX_Size() int

func (*TemporaryEntry) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Sanction

func (*UnimplementedMsgServer) Unsanction

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) IsSanctioned

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) SanctionedAddresses

func (*UnimplementedQueryServer) TemporaryEntries

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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