types

package
v8.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 29 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 = "harpoon"

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

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

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthHooks        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHooks          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHooks = 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 (
	ErrInvalidSigner = sdkerrors.Register(ModuleName, 2, "expected gov account as only signer for proposal message")
)

x/harpoon module sentinel errors

View Source
var HookSubscriptionKey = []byte("subscriptions")
View Source
var HookType_name = map[int32]string{
	0:  "HOOK_TYPE_UNSPECIFIED",
	1:  "HOOK_TYPE_AFTER_VALIDATOR_CREATED",
	2:  "HOOK_TYPE_BEFORE_VALIDATOR_MODIFIED",
	3:  "HOOK_TYPE_AFTER_VALIDATOR_REMOVED",
	4:  "HOOK_TYPE_AFTER_VALIDATOR_BONDED",
	5:  "HOOK_TYPE_AFTER_VALIDATOR_BEGIN_UNBONDING",
	6:  "HOOK_TYPE_BEFORE_DELEGATION_CREATED",
	7:  "HOOK_TYPE_BEFORE_DELEGATION_SHARES_MODIFIED",
	8:  "HOOK_TYPE_BEFORE_DELEGATION_REMOVED",
	9:  "HOOK_TYPE_AFTER_DELEGATION_MODIFIED",
	10: "HOOK_TYPE_BEFORE_VALIDATOR_SLASHED",
	11: "HOOK_TYPE_AFTER_UNBONDING_INITIATED",
}
View Source
var HookType_value = map[string]int32{
	"HOOK_TYPE_UNSPECIFIED":                       0,
	"HOOK_TYPE_AFTER_VALIDATOR_CREATED":           1,
	"HOOK_TYPE_BEFORE_VALIDATOR_MODIFIED":         2,
	"HOOK_TYPE_AFTER_VALIDATOR_REMOVED":           3,
	"HOOK_TYPE_AFTER_VALIDATOR_BONDED":            4,
	"HOOK_TYPE_AFTER_VALIDATOR_BEGIN_UNBONDING":   5,
	"HOOK_TYPE_BEFORE_DELEGATION_CREATED":         6,
	"HOOK_TYPE_BEFORE_DELEGATION_SHARES_MODIFIED": 7,
	"HOOK_TYPE_BEFORE_DELEGATION_REMOVED":         8,
	"HOOK_TYPE_AFTER_DELEGATION_MODIFIED":         9,
	"HOOK_TYPE_BEFORE_VALIDATOR_SLASHED":          10,
	"HOOK_TYPE_AFTER_UNBONDING_INITIATED":         11,
}

Functions

func GetHookSubscriptionKey

func GetHookSubscriptionKey(hookType HookType) []byte

GetHookSubscriptionKey returns the store key for a specific hook subscription.

func GetHookSubscriptionKeyPrefix

func GetHookSubscriptionKeyPrefix() []byte

GetHookSubscriptionKeyPrefix returns the store key for hook subscriptions.

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 ValidateHookType

func ValidateHookType(hook HookType) error

ValidateHookType ensures all hooks in the slice exist and are not unspecified

Types

type AfterDelegationModifiedMsg

type AfterDelegationModifiedMsg struct {
	DelAddr string `json:"del_addr"`
	ValAddr string `json:"val_addr"`
}

type AfterDelegationModifiedSudoMsg

type AfterDelegationModifiedSudoMsg struct {
	AfterDelegationModified AfterDelegationModifiedMsg `json:"after_delegation_modified,omitempty"`
}

type AfterUnbondingInitiatedMsg

type AfterUnbondingInitiatedMsg struct {
	ID uint64 `json:"id"`
}

type AfterUnbondingInitiatedSudoMsg

type AfterUnbondingInitiatedSudoMsg struct {
	AfterUnbondingInitiated AfterUnbondingInitiatedMsg `json:"after_unbonding_initiated,omitempty"`
}

type AfterValidatorBeginUnbondingMsg

type AfterValidatorBeginUnbondingMsg struct {
	ConsAddr string `json:"cons_addr"`
	ValAddr  string `json:"val_addr"`
}

type AfterValidatorBeginUnbondingSudoMsg

type AfterValidatorBeginUnbondingSudoMsg struct {
	AfterValidatorBeginUnbonding AfterValidatorBeginUnbondingMsg `json:"after_validator_begin_unbonding,omitempty"`
}

type AfterValidatorBondedMsg

type AfterValidatorBondedMsg struct {
	ConsAddr string `json:"cons_addr"`
	ValAddr  string `json:"val_addr"`
}

type AfterValidatorBondedSudoMsg

type AfterValidatorBondedSudoMsg struct {
	AfterValidatorBonded AfterValidatorBondedMsg `json:"after_validator_bonded,omitempty"`
}

type AfterValidatorCreatedMsg

type AfterValidatorCreatedMsg struct {
	ValAddr string `json:"val_addr"`
}

type AfterValidatorCreatedSudoMsg

type AfterValidatorCreatedSudoMsg struct {
	AfterValidatorCreated AfterValidatorCreatedMsg `json:"after_validator_created,omitempty"`
}

type AfterValidatorRemovedMsg

type AfterValidatorRemovedMsg struct {
	ConsAddr string `json:"cons_addr"`
	ValAddr  string `json:"val_addr"`
}

type AfterValidatorRemovedSudoMsg

type AfterValidatorRemovedSudoMsg struct {
	AfterValidatorRemoved AfterValidatorRemovedMsg `json:"after_validator_removed,omitempty"`
}

type BeforeDelegationCreatedMsg

type BeforeDelegationCreatedMsg struct {
	DelAddr string `json:"del_addr"`
	ValAddr string `json:"val_addr"`
}

type BeforeDelegationCreatedSudoMsg

type BeforeDelegationCreatedSudoMsg struct {
	BeforeDelegationCreated BeforeDelegationCreatedMsg `json:"before_delegation_created,omitempty"`
}

type BeforeDelegationRemovedMsg

type BeforeDelegationRemovedMsg struct {
	DelAddr string `json:"del_addr"`
	ValAddr string `json:"val_addr"`
}

type BeforeDelegationRemovedSudoMsg

type BeforeDelegationRemovedSudoMsg struct {
	BeforeDelegationRemoved BeforeDelegationRemovedMsg `json:"before_delegation_removed,omitempty"`
}

type BeforeDelegationSharesModifiedMsg

type BeforeDelegationSharesModifiedMsg struct {
	DelAddr string `json:"del_addr"`
	ValAddr string `json:"val_addr"`
}

type BeforeDelegationSharesModifiedSudoMsg

type BeforeDelegationSharesModifiedSudoMsg struct {
	BeforeDelegationSharesModified BeforeDelegationSharesModifiedMsg `json:"before_delegation_shares_modified,omitempty"`
}

type BeforeValidatorModifiedMsg

type BeforeValidatorModifiedMsg struct {
	ValAddr string `json:"val_addr"`
}

type BeforeValidatorModifiedSudoMsg

type BeforeValidatorModifiedSudoMsg struct {
	BeforeValidatorModified BeforeValidatorModifiedMsg `json:"before_validator_modified,omitempty"`
}

type BeforeValidatorSlashedMsg

type BeforeValidatorSlashedMsg struct {
	ValAddr      string         `json:"val_addr"`
	Fraction     math.LegacyDec `json:"fraction"`
	TokensToBurn math.Int       `json:"tokens_to_burn"`
}

type BeforeValidatorSlashedSudoMsg

type BeforeValidatorSlashedSudoMsg struct {
	BeforeValidatorSlashed BeforeValidatorSlashedMsg `json:"before_validator_slashed,omitempty"`
}

type GenesisState

type GenesisState struct {
	// List of hooks
	HookSubscriptions []HookSubscriptions `protobuf:"bytes,1,rep,name=hook_subscriptions,json=hookSubscriptions,proto3" json:"hook_subscriptions"`
}

Harpoon module genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetHookSubscriptions

func (m *GenesisState) GetHookSubscriptions() []HookSubscriptions

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 HookSubscription

type HookSubscription struct {
	// Contract address to update subscriptions for.
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// List of hooks to subscribe to. Hooks not listed here will be removed.
	Hooks []HookType `protobuf:"varint,3,rep,packed,name=hooks,proto3,enum=neutron.harpoon.HookType" json:"hooks,omitempty"`
}

Specifies new hook subscriptions for the contract_address.

func (*HookSubscription) Descriptor

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

func (*HookSubscription) GetContractAddress

func (m *HookSubscription) GetContractAddress() string

func (*HookSubscription) GetHooks

func (m *HookSubscription) GetHooks() []HookType

func (*HookSubscription) Marshal

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

func (*HookSubscription) MarshalTo

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

func (*HookSubscription) MarshalToSizedBuffer

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

func (*HookSubscription) ProtoMessage

func (*HookSubscription) ProtoMessage()

func (*HookSubscription) Reset

func (m *HookSubscription) Reset()

func (*HookSubscription) Size

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

func (*HookSubscription) String

func (m *HookSubscription) String() string

func (*HookSubscription) Unmarshal

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

func (*HookSubscription) XXX_DiscardUnknown

func (m *HookSubscription) XXX_DiscardUnknown()

func (*HookSubscription) XXX_Marshal

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

func (*HookSubscription) XXX_Merge

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

func (*HookSubscription) XXX_Size

func (m *HookSubscription) XXX_Size() int

func (*HookSubscription) XXX_Unmarshal

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

type HookSubscriptions

type HookSubscriptions struct {
	// The hook type being subscribed to.
	HookType HookType `protobuf:"varint,1,opt,name=hook_type,json=hookType,proto3,enum=neutron.harpoon.HookType" json:"hook_type,omitempty"`
	// Contract addresses subscribed to this hook type.
	ContractAddresses []string `protobuf:"bytes,2,rep,name=contract_addresses,json=contractAddresses,proto3" json:"contract_addresses,omitempty"`
}

Specifies how subscribed contract_addresses are stored in the KV store for each hook type.

func (*HookSubscriptions) Descriptor

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

func (*HookSubscriptions) GetContractAddresses

func (m *HookSubscriptions) GetContractAddresses() []string

func (*HookSubscriptions) GetHookType

func (m *HookSubscriptions) GetHookType() HookType

func (*HookSubscriptions) Marshal

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

func (*HookSubscriptions) MarshalTo

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

func (*HookSubscriptions) MarshalToSizedBuffer

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

func (*HookSubscriptions) ProtoMessage

func (*HookSubscriptions) ProtoMessage()

func (*HookSubscriptions) Reset

func (m *HookSubscriptions) Reset()

func (*HookSubscriptions) Size

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

func (*HookSubscriptions) String

func (m *HookSubscriptions) String() string

func (*HookSubscriptions) Unmarshal

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

func (*HookSubscriptions) XXX_DiscardUnknown

func (m *HookSubscriptions) XXX_DiscardUnknown()

func (*HookSubscriptions) XXX_Marshal

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

func (*HookSubscriptions) XXX_Merge

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

func (*HookSubscriptions) XXX_Size

func (m *HookSubscriptions) XXX_Size() int

func (*HookSubscriptions) XXX_Unmarshal

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

type HookType

type HookType int32

Hook types that can be subscribed to.

const (
	HOOK_TYPE_UNSPECIFIED HookType = 0
	// Triggered after validator is created
	HOOK_TYPE_AFTER_VALIDATOR_CREATED HookType = 1
	// Triggered before validator is modified
	HOOK_TYPE_BEFORE_VALIDATOR_MODIFIED HookType = 2
	// Triggered after validator is removed
	HOOK_TYPE_AFTER_VALIDATOR_REMOVED HookType = 3
	// Triggered after validator is bonded
	HOOK_TYPE_AFTER_VALIDATOR_BONDED HookType = 4
	// Triggered after validator begins unbonding
	HOOK_TYPE_AFTER_VALIDATOR_BEGIN_UNBONDING HookType = 5
	// Triggered before delegation is created
	HOOK_TYPE_BEFORE_DELEGATION_CREATED HookType = 6
	// Triggered before delegation's shares are modified
	HOOK_TYPE_BEFORE_DELEGATION_SHARES_MODIFIED HookType = 7
	// Triggered before delegation is removed
	HOOK_TYPE_BEFORE_DELEGATION_REMOVED HookType = 8
	// Triggered after delegation is modified
	HOOK_TYPE_AFTER_DELEGATION_MODIFIED HookType = 9
	// Triggered before validator is slashed
	HOOK_TYPE_BEFORE_VALIDATOR_SLASHED HookType = 10
	// Triggered after unbonding is initiated
	HOOK_TYPE_AFTER_UNBONDING_INITIATED HookType = 11
)

func (HookType) EnumDescriptor

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

func (HookType) String

func (x HookType) String() string

type MsgClient

type MsgClient interface {
	// Updates hook subscriptions for a specific contract address.
	// To remove a subscription, pass an empty array to `hook_subscription.hooks`.
	// Can only be executed by the module's authority.
	ManageHookSubscription(ctx context.Context, in *MsgManageHookSubscription, opts ...grpc.CallOption) (*MsgManageHookSubscriptionResponse, 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 MsgManageHookSubscription

type MsgManageHookSubscription struct {
	// Address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Hook subscription to be updated.
	HookSubscription *HookSubscription `protobuf:"bytes,2,opt,name=hook_subscription,json=hookSubscription,proto3" json:"hook_subscription,omitempty"`
}

Defines the Msg/ManageHookSubscription request type.

func (*MsgManageHookSubscription) Descriptor

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

func (*MsgManageHookSubscription) GetAuthority

func (m *MsgManageHookSubscription) GetAuthority() string

func (*MsgManageHookSubscription) GetHookSubscription

func (m *MsgManageHookSubscription) GetHookSubscription() *HookSubscription

func (*MsgManageHookSubscription) GetSignBytes

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

func (*MsgManageHookSubscription) GetSigners

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

func (*MsgManageHookSubscription) Marshal

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

func (*MsgManageHookSubscription) MarshalTo

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

func (*MsgManageHookSubscription) MarshalToSizedBuffer

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

func (*MsgManageHookSubscription) ProtoMessage

func (*MsgManageHookSubscription) ProtoMessage()

func (*MsgManageHookSubscription) Reset

func (m *MsgManageHookSubscription) Reset()

func (*MsgManageHookSubscription) Route

func (msg *MsgManageHookSubscription) Route() string

func (*MsgManageHookSubscription) Size

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

func (*MsgManageHookSubscription) String

func (m *MsgManageHookSubscription) String() string

func (*MsgManageHookSubscription) Type

func (msg *MsgManageHookSubscription) Type() string

func (*MsgManageHookSubscription) Unmarshal

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

func (*MsgManageHookSubscription) Validate

func (msg *MsgManageHookSubscription) Validate() error

func (*MsgManageHookSubscription) XXX_DiscardUnknown

func (m *MsgManageHookSubscription) XXX_DiscardUnknown()

func (*MsgManageHookSubscription) XXX_Marshal

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

func (*MsgManageHookSubscription) XXX_Merge

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

func (*MsgManageHookSubscription) XXX_Size

func (m *MsgManageHookSubscription) XXX_Size() int

func (*MsgManageHookSubscription) XXX_Unmarshal

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

type MsgManageHookSubscriptionResponse

type MsgManageHookSubscriptionResponse struct {
}

Defines the response structure for executing a MsgManageHookSubscription message.

func (*MsgManageHookSubscriptionResponse) Descriptor

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

func (*MsgManageHookSubscriptionResponse) Marshal

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

func (*MsgManageHookSubscriptionResponse) MarshalTo

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

func (*MsgManageHookSubscriptionResponse) MarshalToSizedBuffer

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

func (*MsgManageHookSubscriptionResponse) ProtoMessage

func (*MsgManageHookSubscriptionResponse) ProtoMessage()

func (*MsgManageHookSubscriptionResponse) Reset

func (*MsgManageHookSubscriptionResponse) Size

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

func (*MsgManageHookSubscriptionResponse) String

func (*MsgManageHookSubscriptionResponse) Unmarshal

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

func (*MsgManageHookSubscriptionResponse) XXX_DiscardUnknown

func (m *MsgManageHookSubscriptionResponse) XXX_DiscardUnknown()

func (*MsgManageHookSubscriptionResponse) XXX_Marshal

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

func (*MsgManageHookSubscriptionResponse) XXX_Merge

func (*MsgManageHookSubscriptionResponse) XXX_Size

func (m *MsgManageHookSubscriptionResponse) XXX_Size() int

func (*MsgManageHookSubscriptionResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Updates hook subscriptions for a specific contract address.
	// To remove a subscription, pass an empty array to `hook_subscription.hooks`.
	// Can only be executed by the module's authority.
	ManageHookSubscription(context.Context, *MsgManageHookSubscription) (*MsgManageHookSubscriptionResponse, error)
}

MsgServer is the server API for Msg service.

type QueryClient

type QueryClient interface {
	// Retrieves contracts subscribed to a specific hook type.
	SubscribedContracts(ctx context.Context, in *QuerySubscribedContractsRequest, opts ...grpc.CallOption) (*QuerySubscribedContractsResponse, 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 QueryServer

type QueryServer interface {
	// Retrieves contracts subscribed to a specific hook type.
	SubscribedContracts(context.Context, *QuerySubscribedContractsRequest) (*QuerySubscribedContractsResponse, error)
}

QueryServer is the server API for Query service.

type QuerySubscribedContractsRequest

type QuerySubscribedContractsRequest struct {
	// The response will include only contract addresses for this hook type.
	HookType HookType `protobuf:"varint,1,opt,name=hook_type,json=hookType,proto3,enum=neutron.harpoon.HookType" json:"hook_type,omitempty"`
}

Request type for the Query/SubscribedContracts RPC method.

func (*QuerySubscribedContractsRequest) Descriptor

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

func (*QuerySubscribedContractsRequest) GetHookType

func (m *QuerySubscribedContractsRequest) GetHookType() HookType

func (*QuerySubscribedContractsRequest) Marshal

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

func (*QuerySubscribedContractsRequest) MarshalTo

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

func (*QuerySubscribedContractsRequest) MarshalToSizedBuffer

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

func (*QuerySubscribedContractsRequest) ProtoMessage

func (*QuerySubscribedContractsRequest) ProtoMessage()

func (*QuerySubscribedContractsRequest) Reset

func (*QuerySubscribedContractsRequest) Size

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

func (*QuerySubscribedContractsRequest) String

func (*QuerySubscribedContractsRequest) Unmarshal

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

func (*QuerySubscribedContractsRequest) XXX_DiscardUnknown

func (m *QuerySubscribedContractsRequest) XXX_DiscardUnknown()

func (*QuerySubscribedContractsRequest) XXX_Marshal

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

func (*QuerySubscribedContractsRequest) XXX_Merge

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

func (*QuerySubscribedContractsRequest) XXX_Size

func (m *QuerySubscribedContractsRequest) XXX_Size() int

func (*QuerySubscribedContractsRequest) XXX_Unmarshal

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

type QuerySubscribedContractsResponse

type QuerySubscribedContractsResponse struct {
	// List of contract addresses subscribed to a specific hook.
	ContractAddresses []string `protobuf:"bytes,1,rep,name=contract_addresses,json=contractAddresses,proto3" json:"contract_addresses,omitempty"`
}

Response type for the Query/SubscribedContracts RPC method.

func (*QuerySubscribedContractsResponse) Descriptor

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

func (*QuerySubscribedContractsResponse) GetContractAddresses

func (m *QuerySubscribedContractsResponse) GetContractAddresses() []string

func (*QuerySubscribedContractsResponse) Marshal

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

func (*QuerySubscribedContractsResponse) MarshalTo

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

func (*QuerySubscribedContractsResponse) MarshalToSizedBuffer

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

func (*QuerySubscribedContractsResponse) ProtoMessage

func (*QuerySubscribedContractsResponse) ProtoMessage()

func (*QuerySubscribedContractsResponse) Reset

func (*QuerySubscribedContractsResponse) Size

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

func (*QuerySubscribedContractsResponse) String

func (*QuerySubscribedContractsResponse) Unmarshal

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

func (*QuerySubscribedContractsResponse) XXX_DiscardUnknown

func (m *QuerySubscribedContractsResponse) XXX_DiscardUnknown()

func (*QuerySubscribedContractsResponse) XXX_Marshal

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

func (*QuerySubscribedContractsResponse) XXX_Merge

func (*QuerySubscribedContractsResponse) XXX_Size

func (m *QuerySubscribedContractsResponse) XXX_Size() int

func (*QuerySubscribedContractsResponse) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ManageHookSubscription

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) SubscribedContracts

type WasmKeeper

type WasmKeeper interface {
	HasContractInfo(ctx context.Context, contractAddress sdk.AccAddress) bool
	Sudo(ctx context.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
}

WasmKeeper defines the expected interface for the Wasm module.

Jump to

Keyboard shortcuts

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