types

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: AGPL-3.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 = "affiliates"

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

Module name and store keys

View Source
const (
	ReferredByKeyPrefix = "RB:"

	ReferredVolumeKeyPrefix = "RV:"

	AffiliateTiersKey = "AT"

	AffiliateWhitelistKey = "AW"
)

State

Variables

View Source
var (
	ErrInvalidLengthAffiliates        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAffiliates          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAffiliates = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	DefaultAffiliateTiers = AffiliateTiers{
		Tiers: []AffiliateTiers_Tier{
			{
				ReqReferredVolumeQuoteQuantums: 0,
				ReqStakedWholeCoins:            0,
				TakerFeeSharePpm:               50_000,
			},
			{
				ReqReferredVolumeQuoteQuantums: 1_000_000_000_000,
				ReqStakedWholeCoins:            200,
				TakerFeeSharePpm:               100_000,
			},
			{
				ReqReferredVolumeQuoteQuantums: 5_000_000_000_000,
				ReqStakedWholeCoins:            1_000,
				TakerFeeSharePpm:               125_000,
			},
			{
				ReqReferredVolumeQuoteQuantums: 25_000_000_000_000,
				ReqStakedWholeCoins:            5_000,
				TakerFeeSharePpm:               150_000,
			},
		},
	}

	AffiliatesRevSharePpmCap = uint32(500_000) // 50%
)
View Source
var (
	ErrAffiliateAlreadyExistsForReferee = errorsmod.Register(ModuleName, 1, "Affiliate already exists for referee")
	ErrAffiliateTiersNotInitialized     = errorsmod.Register(ModuleName, 2, "Affiliate tier data not found")
	ErrInvalidAffiliateTiers            = errorsmod.Register(ModuleName, 3, "Invalid affiliate tier data")
	ErrUpdatingAffiliateReferredVolume  = errorsmod.Register(
		ModuleName, 4, "Error updating affiliate referred volume")
	ErrInvalidAddress          = errorsmod.Register(ModuleName, 5, "Invalid address")
	ErrAffiliateNotFound       = errorsmod.Register(ModuleName, 6, "Affiliate not found")
	ErrRevShareSafetyViolation = errorsmod.Register(
		ModuleName, 7, "Rev share safety violation")
	ErrDuplicateAffiliateAddressForWhitelist = errorsmod.Register(
		ModuleName, 8, "Duplicate affiliate address for whitelist")
	ErrAffiliateTiersNotSet = errorsmod.Register(ModuleName, 9,
		"Affiliate tiers not set (affiliate program is not active)")
	ErrSelfReferral = errorsmod.Register(ModuleName, 10, "Self referral not allowed")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

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)

Types

type AffiliateInfoRequest

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

AffiliateInfoRequest is the request type for the Query/AffiliateInfo RPC method.

func (*AffiliateInfoRequest) Descriptor

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

func (*AffiliateInfoRequest) GetAddress

func (m *AffiliateInfoRequest) GetAddress() string

func (*AffiliateInfoRequest) Marshal

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

func (*AffiliateInfoRequest) MarshalTo

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

func (*AffiliateInfoRequest) MarshalToSizedBuffer

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

func (*AffiliateInfoRequest) ProtoMessage

func (*AffiliateInfoRequest) ProtoMessage()

func (*AffiliateInfoRequest) Reset

func (m *AffiliateInfoRequest) Reset()

func (*AffiliateInfoRequest) Size

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

func (*AffiliateInfoRequest) String

func (m *AffiliateInfoRequest) String() string

func (*AffiliateInfoRequest) Unmarshal

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

func (*AffiliateInfoRequest) XXX_DiscardUnknown

func (m *AffiliateInfoRequest) XXX_DiscardUnknown()

func (*AffiliateInfoRequest) XXX_Marshal

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

func (*AffiliateInfoRequest) XXX_Merge

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

func (*AffiliateInfoRequest) XXX_Size

func (m *AffiliateInfoRequest) XXX_Size() int

func (*AffiliateInfoRequest) XXX_Unmarshal

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

type AffiliateInfoResponse

type AffiliateInfoResponse struct {
	// Whether the address is a whitelisted affiliate (VIP).
	IsWhitelisted bool `protobuf:"varint,1,opt,name=is_whitelisted,json=isWhitelisted,proto3" json:"is_whitelisted,omitempty"`
	// If `is_whiteslisted == false`, the affiliate's tier qualified through
	// regular affiliate program.
	Tier uint32 `protobuf:"varint,2,opt,name=tier,proto3" json:"tier,omitempty"`
	// The affiliate's taker fee share in parts-per-million (for both VIP and
	// regular affiliate).
	FeeSharePpm uint32 `protobuf:"varint,3,opt,name=fee_share_ppm,json=feeSharePpm,proto3" json:"fee_share_ppm,omitempty"`
	// The affiliate's all-time referred volume in quote quantums.
	ReferredVolume github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 160-byte string literal not displayed */
	// The affiliate's currently staked native tokens (in whole coins).
	StakedAmount github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 154-byte string literal not displayed */
}

AffiliateInfoResponse is the response type for the Query/AffiliateInfo RPC method.

func (*AffiliateInfoResponse) Descriptor

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

func (*AffiliateInfoResponse) GetFeeSharePpm

func (m *AffiliateInfoResponse) GetFeeSharePpm() uint32

func (*AffiliateInfoResponse) GetIsWhitelisted

func (m *AffiliateInfoResponse) GetIsWhitelisted() bool

func (*AffiliateInfoResponse) GetTier

func (m *AffiliateInfoResponse) GetTier() uint32

func (*AffiliateInfoResponse) Marshal

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

func (*AffiliateInfoResponse) MarshalTo

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

func (*AffiliateInfoResponse) MarshalToSizedBuffer

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

func (*AffiliateInfoResponse) ProtoMessage

func (*AffiliateInfoResponse) ProtoMessage()

func (*AffiliateInfoResponse) Reset

func (m *AffiliateInfoResponse) Reset()

func (*AffiliateInfoResponse) Size

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

func (*AffiliateInfoResponse) String

func (m *AffiliateInfoResponse) String() string

func (*AffiliateInfoResponse) Unmarshal

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

func (*AffiliateInfoResponse) XXX_DiscardUnknown

func (m *AffiliateInfoResponse) XXX_DiscardUnknown()

func (*AffiliateInfoResponse) XXX_Marshal

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

func (*AffiliateInfoResponse) XXX_Merge

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

func (*AffiliateInfoResponse) XXX_Size

func (m *AffiliateInfoResponse) XXX_Size() int

func (*AffiliateInfoResponse) XXX_Unmarshal

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

type AffiliateTiers

type AffiliateTiers struct {
	// All affiliate tiers
	Tiers []AffiliateTiers_Tier `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers"`
}

AffiliateTiers defines the affiliate tiers.

func (*AffiliateTiers) Descriptor

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

func (*AffiliateTiers) GetTiers

func (m *AffiliateTiers) GetTiers() []AffiliateTiers_Tier

func (*AffiliateTiers) Marshal

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

func (*AffiliateTiers) MarshalTo

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

func (*AffiliateTiers) MarshalToSizedBuffer

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

func (*AffiliateTiers) ProtoMessage

func (*AffiliateTiers) ProtoMessage()

func (*AffiliateTiers) Reset

func (m *AffiliateTiers) Reset()

func (*AffiliateTiers) Size

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

func (*AffiliateTiers) String

func (m *AffiliateTiers) String() string

func (*AffiliateTiers) Unmarshal

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

func (*AffiliateTiers) XXX_DiscardUnknown

func (m *AffiliateTiers) XXX_DiscardUnknown()

func (*AffiliateTiers) XXX_Marshal

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

func (*AffiliateTiers) XXX_Merge

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

func (*AffiliateTiers) XXX_Size

func (m *AffiliateTiers) XXX_Size() int

func (*AffiliateTiers) XXX_Unmarshal

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

type AffiliateTiers_Tier

type AffiliateTiers_Tier struct {
	// Required all-time referred volume in quote quantums.
	ReqReferredVolumeQuoteQuantums uint64 `` /* 158-byte string literal not displayed */
	// Required currently staked native tokens (in whole coins).
	ReqStakedWholeCoins uint32 `protobuf:"varint,2,opt,name=req_staked_whole_coins,json=reqStakedWholeCoins,proto3" json:"req_staked_whole_coins,omitempty"`
	// Taker fee share in parts-per-million.
	TakerFeeSharePpm uint32 `protobuf:"varint,3,opt,name=taker_fee_share_ppm,json=takerFeeSharePpm,proto3" json:"taker_fee_share_ppm,omitempty"`
}

Tier defines an affiliate tier.

func (*AffiliateTiers_Tier) Descriptor

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

func (*AffiliateTiers_Tier) GetReqReferredVolumeQuoteQuantums

func (m *AffiliateTiers_Tier) GetReqReferredVolumeQuoteQuantums() uint64

func (*AffiliateTiers_Tier) GetReqStakedWholeCoins

func (m *AffiliateTiers_Tier) GetReqStakedWholeCoins() uint32

func (*AffiliateTiers_Tier) GetTakerFeeSharePpm

func (m *AffiliateTiers_Tier) GetTakerFeeSharePpm() uint32

func (*AffiliateTiers_Tier) Marshal

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

func (*AffiliateTiers_Tier) MarshalTo

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

func (*AffiliateTiers_Tier) MarshalToSizedBuffer

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

func (*AffiliateTiers_Tier) ProtoMessage

func (*AffiliateTiers_Tier) ProtoMessage()

func (*AffiliateTiers_Tier) Reset

func (m *AffiliateTiers_Tier) Reset()

func (*AffiliateTiers_Tier) Size

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

func (*AffiliateTiers_Tier) String

func (m *AffiliateTiers_Tier) String() string

func (*AffiliateTiers_Tier) Unmarshal

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

func (*AffiliateTiers_Tier) XXX_DiscardUnknown

func (m *AffiliateTiers_Tier) XXX_DiscardUnknown()

func (*AffiliateTiers_Tier) XXX_Marshal

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

func (*AffiliateTiers_Tier) XXX_Merge

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

func (*AffiliateTiers_Tier) XXX_Size

func (m *AffiliateTiers_Tier) XXX_Size() int

func (*AffiliateTiers_Tier) XXX_Unmarshal

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

type AffiliateWhitelist

type AffiliateWhitelist struct {
	// All affiliate whitelist tiers.
	Tiers []AffiliateWhitelist_Tier `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers"`
}

AffiliateWhitelist specifies the whitelisted affiliates. If an address is in the whitelist, then the affiliate fee share in this object will override fee share from the regular affiliate tiers above.

func (*AffiliateWhitelist) Descriptor

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

func (*AffiliateWhitelist) GetTiers

func (*AffiliateWhitelist) Marshal

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

func (*AffiliateWhitelist) MarshalTo

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

func (*AffiliateWhitelist) MarshalToSizedBuffer

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

func (*AffiliateWhitelist) ProtoMessage

func (*AffiliateWhitelist) ProtoMessage()

func (*AffiliateWhitelist) Reset

func (m *AffiliateWhitelist) Reset()

func (*AffiliateWhitelist) Size

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

func (*AffiliateWhitelist) String

func (m *AffiliateWhitelist) String() string

func (*AffiliateWhitelist) Unmarshal

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

func (*AffiliateWhitelist) XXX_DiscardUnknown

func (m *AffiliateWhitelist) XXX_DiscardUnknown()

func (*AffiliateWhitelist) XXX_Marshal

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

func (*AffiliateWhitelist) XXX_Merge

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

func (*AffiliateWhitelist) XXX_Size

func (m *AffiliateWhitelist) XXX_Size() int

func (*AffiliateWhitelist) XXX_Unmarshal

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

type AffiliateWhitelistRequest

type AffiliateWhitelistRequest struct {
}

AffiliateWhitelistRequest is the request type for the Query/AffiliateWhitelist RPC method.

func (*AffiliateWhitelistRequest) Descriptor

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

func (*AffiliateWhitelistRequest) Marshal

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

func (*AffiliateWhitelistRequest) MarshalTo

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

func (*AffiliateWhitelistRequest) MarshalToSizedBuffer

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

func (*AffiliateWhitelistRequest) ProtoMessage

func (*AffiliateWhitelistRequest) ProtoMessage()

func (*AffiliateWhitelistRequest) Reset

func (m *AffiliateWhitelistRequest) Reset()

func (*AffiliateWhitelistRequest) Size

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

func (*AffiliateWhitelistRequest) String

func (m *AffiliateWhitelistRequest) String() string

func (*AffiliateWhitelistRequest) Unmarshal

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

func (*AffiliateWhitelistRequest) XXX_DiscardUnknown

func (m *AffiliateWhitelistRequest) XXX_DiscardUnknown()

func (*AffiliateWhitelistRequest) XXX_Marshal

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

func (*AffiliateWhitelistRequest) XXX_Merge

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

func (*AffiliateWhitelistRequest) XXX_Size

func (m *AffiliateWhitelistRequest) XXX_Size() int

func (*AffiliateWhitelistRequest) XXX_Unmarshal

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

type AffiliateWhitelistResponse

type AffiliateWhitelistResponse struct {
	Whitelist AffiliateWhitelist `protobuf:"bytes,1,opt,name=whitelist,proto3" json:"whitelist"`
}

AffiliateWhitelistResponse is the response type for the Query/AffiliateWhitelist RPC method.

func (*AffiliateWhitelistResponse) Descriptor

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

func (*AffiliateWhitelistResponse) GetWhitelist

func (*AffiliateWhitelistResponse) Marshal

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

func (*AffiliateWhitelistResponse) MarshalTo

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

func (*AffiliateWhitelistResponse) MarshalToSizedBuffer

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

func (*AffiliateWhitelistResponse) ProtoMessage

func (*AffiliateWhitelistResponse) ProtoMessage()

func (*AffiliateWhitelistResponse) Reset

func (m *AffiliateWhitelistResponse) Reset()

func (*AffiliateWhitelistResponse) Size

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

func (*AffiliateWhitelistResponse) String

func (m *AffiliateWhitelistResponse) String() string

func (*AffiliateWhitelistResponse) Unmarshal

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

func (*AffiliateWhitelistResponse) XXX_DiscardUnknown

func (m *AffiliateWhitelistResponse) XXX_DiscardUnknown()

func (*AffiliateWhitelistResponse) XXX_Marshal

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

func (*AffiliateWhitelistResponse) XXX_Merge

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

func (*AffiliateWhitelistResponse) XXX_Size

func (m *AffiliateWhitelistResponse) XXX_Size() int

func (*AffiliateWhitelistResponse) XXX_Unmarshal

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

type AffiliateWhitelist_Tier

type AffiliateWhitelist_Tier struct {
	// List of unique whitelisted addresses.
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// Taker fee share in parts-per-million.
	TakerFeeSharePpm uint32 `protobuf:"varint,2,opt,name=taker_fee_share_ppm,json=takerFeeSharePpm,proto3" json:"taker_fee_share_ppm,omitempty"`
}

Tier defines an affiliate whitelist tier.

func (*AffiliateWhitelist_Tier) Descriptor

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

func (*AffiliateWhitelist_Tier) GetAddresses

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

func (*AffiliateWhitelist_Tier) GetTakerFeeSharePpm

func (m *AffiliateWhitelist_Tier) GetTakerFeeSharePpm() uint32

func (*AffiliateWhitelist_Tier) Marshal

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

func (*AffiliateWhitelist_Tier) MarshalTo

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

func (*AffiliateWhitelist_Tier) MarshalToSizedBuffer

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

func (*AffiliateWhitelist_Tier) ProtoMessage

func (*AffiliateWhitelist_Tier) ProtoMessage()

func (*AffiliateWhitelist_Tier) Reset

func (m *AffiliateWhitelist_Tier) Reset()

func (*AffiliateWhitelist_Tier) Size

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

func (*AffiliateWhitelist_Tier) String

func (m *AffiliateWhitelist_Tier) String() string

func (*AffiliateWhitelist_Tier) Unmarshal

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

func (*AffiliateWhitelist_Tier) XXX_DiscardUnknown

func (m *AffiliateWhitelist_Tier) XXX_DiscardUnknown()

func (*AffiliateWhitelist_Tier) XXX_Marshal

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

func (*AffiliateWhitelist_Tier) XXX_Merge

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

func (*AffiliateWhitelist_Tier) XXX_Size

func (m *AffiliateWhitelist_Tier) XXX_Size() int

func (*AffiliateWhitelist_Tier) XXX_Unmarshal

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

type AllAffiliateTiersRequest

type AllAffiliateTiersRequest struct {
}

AllAffiliateTiersRequest is the request type for the Query/AllAffiliateTiers RPC method.

func (*AllAffiliateTiersRequest) Descriptor

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

func (*AllAffiliateTiersRequest) Marshal

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

func (*AllAffiliateTiersRequest) MarshalTo

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

func (*AllAffiliateTiersRequest) MarshalToSizedBuffer

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

func (*AllAffiliateTiersRequest) ProtoMessage

func (*AllAffiliateTiersRequest) ProtoMessage()

func (*AllAffiliateTiersRequest) Reset

func (m *AllAffiliateTiersRequest) Reset()

func (*AllAffiliateTiersRequest) Size

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

func (*AllAffiliateTiersRequest) String

func (m *AllAffiliateTiersRequest) String() string

func (*AllAffiliateTiersRequest) Unmarshal

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

func (*AllAffiliateTiersRequest) XXX_DiscardUnknown

func (m *AllAffiliateTiersRequest) XXX_DiscardUnknown()

func (*AllAffiliateTiersRequest) XXX_Marshal

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

func (*AllAffiliateTiersRequest) XXX_Merge

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

func (*AllAffiliateTiersRequest) XXX_Size

func (m *AllAffiliateTiersRequest) XXX_Size() int

func (*AllAffiliateTiersRequest) XXX_Unmarshal

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

type AllAffiliateTiersResponse

type AllAffiliateTiersResponse struct {
	// All affiliate tiers information.
	Tiers AffiliateTiers `protobuf:"bytes,1,opt,name=tiers,proto3" json:"tiers"`
}

AllAffiliateTiersResponse is the response type for the Query/AllAffiliateTiers RPC method.

func (*AllAffiliateTiersResponse) Descriptor

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

func (*AllAffiliateTiersResponse) GetTiers

func (*AllAffiliateTiersResponse) Marshal

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

func (*AllAffiliateTiersResponse) MarshalTo

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

func (*AllAffiliateTiersResponse) MarshalToSizedBuffer

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

func (*AllAffiliateTiersResponse) ProtoMessage

func (*AllAffiliateTiersResponse) ProtoMessage()

func (*AllAffiliateTiersResponse) Reset

func (m *AllAffiliateTiersResponse) Reset()

func (*AllAffiliateTiersResponse) Size

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

func (*AllAffiliateTiersResponse) String

func (m *AllAffiliateTiersResponse) String() string

func (*AllAffiliateTiersResponse) Unmarshal

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

func (*AllAffiliateTiersResponse) XXX_DiscardUnknown

func (m *AllAffiliateTiersResponse) XXX_DiscardUnknown()

func (*AllAffiliateTiersResponse) XXX_Marshal

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

func (*AllAffiliateTiersResponse) XXX_Merge

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

func (*AllAffiliateTiersResponse) XXX_Size

func (m *AllAffiliateTiersResponse) XXX_Size() int

func (*AllAffiliateTiersResponse) XXX_Unmarshal

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

type FeetiersKeeper

type FeetiersKeeper interface {
	GetAffiliateRefereeLowestTakerFee(ctx sdk.Context) int32
	GetLowestMakerFee(ctx sdk.Context) int32
}

type GenesisState

type GenesisState struct {
	// The list of affiliate tiers
	AffiliateTiers AffiliateTiers `protobuf:"bytes,1,opt,name=affiliate_tiers,json=affiliateTiers,proto3" json:"affiliate_tiers"`
}

GenesisState defines generis state of `x/affiliates`

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default stats genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAffiliateTiers

func (m *GenesisState) GetAffiliateTiers() AffiliateTiers

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 MsgClient

type MsgClient interface {
	// RegisterAffiliate registers a referee-affiliate relationship
	RegisterAffiliate(ctx context.Context, in *MsgRegisterAffiliate, opts ...grpc.CallOption) (*MsgRegisterAffiliateResponse, error)
	// UpdateAffiliateTiers updates affiliate tiers
	UpdateAffiliateTiers(ctx context.Context, in *MsgUpdateAffiliateTiers, opts ...grpc.CallOption) (*MsgUpdateAffiliateTiersResponse, error)
	// UpdateAffiliateWhitelist updates affiliate whitelist
	UpdateAffiliateWhitelist(ctx context.Context, in *MsgUpdateAffiliateWhitelist, opts ...grpc.CallOption) (*MsgUpdateAffiliateWhitelistResponse, 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 MsgRegisterAffiliate

type MsgRegisterAffiliate struct {
	// Address of the referee
	Referee string `protobuf:"bytes,1,opt,name=referee,proto3" json:"referee,omitempty"`
	// Address of the affiliate
	Affiliate string `protobuf:"bytes,2,opt,name=affiliate,proto3" json:"affiliate,omitempty"`
}

Message to register a referee-affiliate relationship

func (*MsgRegisterAffiliate) Descriptor

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

func (*MsgRegisterAffiliate) Marshal

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

func (*MsgRegisterAffiliate) MarshalTo

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

func (*MsgRegisterAffiliate) MarshalToSizedBuffer

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

func (*MsgRegisterAffiliate) ProtoMessage

func (*MsgRegisterAffiliate) ProtoMessage()

func (*MsgRegisterAffiliate) Reset

func (m *MsgRegisterAffiliate) Reset()

func (*MsgRegisterAffiliate) Size

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

func (*MsgRegisterAffiliate) String

func (m *MsgRegisterAffiliate) String() string

func (*MsgRegisterAffiliate) Unmarshal

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

func (*MsgRegisterAffiliate) XXX_DiscardUnknown

func (m *MsgRegisterAffiliate) XXX_DiscardUnknown()

func (*MsgRegisterAffiliate) XXX_Marshal

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

func (*MsgRegisterAffiliate) XXX_Merge

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

func (*MsgRegisterAffiliate) XXX_Size

func (m *MsgRegisterAffiliate) XXX_Size() int

func (*MsgRegisterAffiliate) XXX_Unmarshal

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

type MsgRegisterAffiliateResponse

type MsgRegisterAffiliateResponse struct {
}

Response to MsgRegisterAffiliate

func (*MsgRegisterAffiliateResponse) Descriptor

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

func (*MsgRegisterAffiliateResponse) Marshal

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

func (*MsgRegisterAffiliateResponse) MarshalTo

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

func (*MsgRegisterAffiliateResponse) MarshalToSizedBuffer

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

func (*MsgRegisterAffiliateResponse) ProtoMessage

func (*MsgRegisterAffiliateResponse) ProtoMessage()

func (*MsgRegisterAffiliateResponse) Reset

func (m *MsgRegisterAffiliateResponse) Reset()

func (*MsgRegisterAffiliateResponse) Size

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

func (*MsgRegisterAffiliateResponse) String

func (*MsgRegisterAffiliateResponse) Unmarshal

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

func (*MsgRegisterAffiliateResponse) XXX_DiscardUnknown

func (m *MsgRegisterAffiliateResponse) XXX_DiscardUnknown()

func (*MsgRegisterAffiliateResponse) XXX_Marshal

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

func (*MsgRegisterAffiliateResponse) XXX_Merge

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

func (*MsgRegisterAffiliateResponse) XXX_Size

func (m *MsgRegisterAffiliateResponse) XXX_Size() int

func (*MsgRegisterAffiliateResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// RegisterAffiliate registers a referee-affiliate relationship
	RegisterAffiliate(context.Context, *MsgRegisterAffiliate) (*MsgRegisterAffiliateResponse, error)
	// UpdateAffiliateTiers updates affiliate tiers
	UpdateAffiliateTiers(context.Context, *MsgUpdateAffiliateTiers) (*MsgUpdateAffiliateTiersResponse, error)
	// UpdateAffiliateWhitelist updates affiliate whitelist
	UpdateAffiliateWhitelist(context.Context, *MsgUpdateAffiliateWhitelist) (*MsgUpdateAffiliateWhitelistResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateAffiliateTiers

type MsgUpdateAffiliateTiers struct {
	// Authority sending this message. Will be sent by gov
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Updated affiliate tiers information
	Tiers AffiliateTiers `protobuf:"bytes,2,opt,name=tiers,proto3" json:"tiers"`
}

Message to update affiliate tiers

func (*MsgUpdateAffiliateTiers) Descriptor

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

func (*MsgUpdateAffiliateTiers) GetAuthority

func (m *MsgUpdateAffiliateTiers) GetAuthority() string

func (*MsgUpdateAffiliateTiers) GetTiers

func (*MsgUpdateAffiliateTiers) Marshal

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

func (*MsgUpdateAffiliateTiers) MarshalTo

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

func (*MsgUpdateAffiliateTiers) MarshalToSizedBuffer

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

func (*MsgUpdateAffiliateTiers) ProtoMessage

func (*MsgUpdateAffiliateTiers) ProtoMessage()

func (*MsgUpdateAffiliateTiers) Reset

func (m *MsgUpdateAffiliateTiers) Reset()

func (*MsgUpdateAffiliateTiers) Size

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

func (*MsgUpdateAffiliateTiers) String

func (m *MsgUpdateAffiliateTiers) String() string

func (*MsgUpdateAffiliateTiers) Unmarshal

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

func (*MsgUpdateAffiliateTiers) XXX_DiscardUnknown

func (m *MsgUpdateAffiliateTiers) XXX_DiscardUnknown()

func (*MsgUpdateAffiliateTiers) XXX_Marshal

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

func (*MsgUpdateAffiliateTiers) XXX_Merge

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

func (*MsgUpdateAffiliateTiers) XXX_Size

func (m *MsgUpdateAffiliateTiers) XXX_Size() int

func (*MsgUpdateAffiliateTiers) XXX_Unmarshal

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

type MsgUpdateAffiliateTiersResponse

type MsgUpdateAffiliateTiersResponse struct {
}

Response to MsgUpdateAffiliateTiers

func (*MsgUpdateAffiliateTiersResponse) Descriptor

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

func (*MsgUpdateAffiliateTiersResponse) Marshal

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

func (*MsgUpdateAffiliateTiersResponse) MarshalTo

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

func (*MsgUpdateAffiliateTiersResponse) MarshalToSizedBuffer

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

func (*MsgUpdateAffiliateTiersResponse) ProtoMessage

func (*MsgUpdateAffiliateTiersResponse) ProtoMessage()

func (*MsgUpdateAffiliateTiersResponse) Reset

func (*MsgUpdateAffiliateTiersResponse) Size

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

func (*MsgUpdateAffiliateTiersResponse) String

func (*MsgUpdateAffiliateTiersResponse) Unmarshal

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

func (*MsgUpdateAffiliateTiersResponse) XXX_DiscardUnknown

func (m *MsgUpdateAffiliateTiersResponse) XXX_DiscardUnknown()

func (*MsgUpdateAffiliateTiersResponse) XXX_Marshal

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

func (*MsgUpdateAffiliateTiersResponse) XXX_Merge

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

func (*MsgUpdateAffiliateTiersResponse) XXX_Size

func (m *MsgUpdateAffiliateTiersResponse) XXX_Size() int

func (*MsgUpdateAffiliateTiersResponse) XXX_Unmarshal

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

type MsgUpdateAffiliateWhitelist

type MsgUpdateAffiliateWhitelist struct {
	// Authority sending this message. Will be sent by gov
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Updated affiliate whitelist information
	Whitelist AffiliateWhitelist `protobuf:"bytes,2,opt,name=whitelist,proto3" json:"whitelist"`
}

Message to update affiliate whitelist

func (*MsgUpdateAffiliateWhitelist) Descriptor

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

func (*MsgUpdateAffiliateWhitelist) GetAuthority

func (m *MsgUpdateAffiliateWhitelist) GetAuthority() string

func (*MsgUpdateAffiliateWhitelist) GetWhitelist

func (*MsgUpdateAffiliateWhitelist) Marshal

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

func (*MsgUpdateAffiliateWhitelist) MarshalTo

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

func (*MsgUpdateAffiliateWhitelist) MarshalToSizedBuffer

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

func (*MsgUpdateAffiliateWhitelist) ProtoMessage

func (*MsgUpdateAffiliateWhitelist) ProtoMessage()

func (*MsgUpdateAffiliateWhitelist) Reset

func (m *MsgUpdateAffiliateWhitelist) Reset()

func (*MsgUpdateAffiliateWhitelist) Size

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

func (*MsgUpdateAffiliateWhitelist) String

func (m *MsgUpdateAffiliateWhitelist) String() string

func (*MsgUpdateAffiliateWhitelist) Unmarshal

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

func (*MsgUpdateAffiliateWhitelist) XXX_DiscardUnknown

func (m *MsgUpdateAffiliateWhitelist) XXX_DiscardUnknown()

func (*MsgUpdateAffiliateWhitelist) XXX_Marshal

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

func (*MsgUpdateAffiliateWhitelist) XXX_Merge

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

func (*MsgUpdateAffiliateWhitelist) XXX_Size

func (m *MsgUpdateAffiliateWhitelist) XXX_Size() int

func (*MsgUpdateAffiliateWhitelist) XXX_Unmarshal

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

type MsgUpdateAffiliateWhitelistResponse

type MsgUpdateAffiliateWhitelistResponse struct {
}

Response to MsgUpdateAffiliateWhitelist

func (*MsgUpdateAffiliateWhitelistResponse) Descriptor

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

func (*MsgUpdateAffiliateWhitelistResponse) Marshal

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

func (*MsgUpdateAffiliateWhitelistResponse) MarshalTo

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

func (*MsgUpdateAffiliateWhitelistResponse) MarshalToSizedBuffer

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

func (*MsgUpdateAffiliateWhitelistResponse) ProtoMessage

func (*MsgUpdateAffiliateWhitelistResponse) ProtoMessage()

func (*MsgUpdateAffiliateWhitelistResponse) Reset

func (*MsgUpdateAffiliateWhitelistResponse) Size

func (*MsgUpdateAffiliateWhitelistResponse) String

func (*MsgUpdateAffiliateWhitelistResponse) Unmarshal

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

func (*MsgUpdateAffiliateWhitelistResponse) XXX_DiscardUnknown

func (m *MsgUpdateAffiliateWhitelistResponse) XXX_DiscardUnknown()

func (*MsgUpdateAffiliateWhitelistResponse) XXX_Marshal

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

func (*MsgUpdateAffiliateWhitelistResponse) XXX_Merge

func (*MsgUpdateAffiliateWhitelistResponse) XXX_Size

func (*MsgUpdateAffiliateWhitelistResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Query AffiliateInfo returns the affiliate info for a given address.
	AffiliateInfo(ctx context.Context, in *AffiliateInfoRequest, opts ...grpc.CallOption) (*AffiliateInfoResponse, error)
	// Query ReferredBy returns the affiliate that referred a given address.
	ReferredBy(ctx context.Context, in *ReferredByRequest, opts ...grpc.CallOption) (*ReferredByResponse, error)
	// Query AllAffiliateTiers returns all affiliate tiers.
	AllAffiliateTiers(ctx context.Context, in *AllAffiliateTiersRequest, opts ...grpc.CallOption) (*AllAffiliateTiersResponse, error)
	// Query AffiliateWhitelist returns the affiliate whitelist.
	AffiliateWhitelist(ctx context.Context, in *AffiliateWhitelistRequest, opts ...grpc.CallOption) (*AffiliateWhitelistResponse, 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 {
	// Query AffiliateInfo returns the affiliate info for a given address.
	AffiliateInfo(context.Context, *AffiliateInfoRequest) (*AffiliateInfoResponse, error)
	// Query ReferredBy returns the affiliate that referred a given address.
	ReferredBy(context.Context, *ReferredByRequest) (*ReferredByResponse, error)
	// Query AllAffiliateTiers returns all affiliate tiers.
	AllAffiliateTiers(context.Context, *AllAffiliateTiersRequest) (*AllAffiliateTiersResponse, error)
	// Query AffiliateWhitelist returns the affiliate whitelist.
	AffiliateWhitelist(context.Context, *AffiliateWhitelistRequest) (*AffiliateWhitelistResponse, error)
}

QueryServer is the server API for Query service.

type ReferredByRequest

type ReferredByRequest struct {
	// The address to query.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

ReferredByRequest is the request type for the Query/ReferredBy RPC method.

func (*ReferredByRequest) Descriptor

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

func (*ReferredByRequest) GetAddress

func (m *ReferredByRequest) GetAddress() string

func (*ReferredByRequest) Marshal

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

func (*ReferredByRequest) MarshalTo

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

func (*ReferredByRequest) MarshalToSizedBuffer

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

func (*ReferredByRequest) ProtoMessage

func (*ReferredByRequest) ProtoMessage()

func (*ReferredByRequest) Reset

func (m *ReferredByRequest) Reset()

func (*ReferredByRequest) Size

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

func (*ReferredByRequest) String

func (m *ReferredByRequest) String() string

func (*ReferredByRequest) Unmarshal

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

func (*ReferredByRequest) XXX_DiscardUnknown

func (m *ReferredByRequest) XXX_DiscardUnknown()

func (*ReferredByRequest) XXX_Marshal

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

func (*ReferredByRequest) XXX_Merge

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

func (*ReferredByRequest) XXX_Size

func (m *ReferredByRequest) XXX_Size() int

func (*ReferredByRequest) XXX_Unmarshal

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

type ReferredByResponse

type ReferredByResponse struct {
	// The affiliate's address that referred the queried address.
	AffiliateAddress string `protobuf:"bytes,1,opt,name=affiliate_address,json=affiliateAddress,proto3" json:"affiliate_address,omitempty"`
}

ReferredByResponse is the response type for the Query/ReferredBy RPC method.

func (*ReferredByResponse) Descriptor

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

func (*ReferredByResponse) GetAffiliateAddress

func (m *ReferredByResponse) GetAffiliateAddress() string

func (*ReferredByResponse) Marshal

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

func (*ReferredByResponse) MarshalTo

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

func (*ReferredByResponse) MarshalToSizedBuffer

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

func (*ReferredByResponse) ProtoMessage

func (*ReferredByResponse) ProtoMessage()

func (*ReferredByResponse) Reset

func (m *ReferredByResponse) Reset()

func (*ReferredByResponse) Size

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

func (*ReferredByResponse) String

func (m *ReferredByResponse) String() string

func (*ReferredByResponse) Unmarshal

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

func (*ReferredByResponse) XXX_DiscardUnknown

func (m *ReferredByResponse) XXX_DiscardUnknown()

func (*ReferredByResponse) XXX_Marshal

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

func (*ReferredByResponse) XXX_Merge

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

func (*ReferredByResponse) XXX_Size

func (m *ReferredByResponse) XXX_Size() int

func (*ReferredByResponse) XXX_Unmarshal

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

type StatsKeeper

type StatsKeeper interface {
	GetStakedAmount(ctx sdk.Context, delegatorAddr string) *big.Int
	GetBlockStats(ctx sdk.Context) *stattypes.BlockStats
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) RegisterAffiliate

func (*UnimplementedMsgServer) UpdateAffiliateTiers

func (*UnimplementedMsgServer) UpdateAffiliateWhitelist

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AffiliateInfo

func (*UnimplementedQueryServer) AffiliateWhitelist

func (*UnimplementedQueryServer) AllAffiliateTiers

func (*UnimplementedQueryServer) ReferredBy

Jump to

Keyboard shortcuts

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