rest

package
v0.10.21 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MPL-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalanceReqHandler

func BalanceReqHandler(cdc *wire.Codec, ctx context.CLIContext, tokens tokens.Mapper) http.HandlerFunc

BalanceReqHandler creates an http request handler to get an individual token balance of a given address

func BalancesReqHandler

func BalancesReqHandler(
	cdc *wire.Codec, ctx context.CLIContext, tokens tokens.Mapper,
) http.HandlerFunc

BalanceReqHandler creates an http request handler to get the token balances of a given address

func GetTimeLockReqHandler

func GetTimeLockReqHandler(cdc *wire.Codec, ctx context.CLIContext) http.HandlerFunc

func GetTimeLocksReqHandler

func GetTimeLocksReqHandler(cdc *wire.Codec, ctx context.CLIContext) http.HandlerFunc

func GetTokenReqHandler

func GetTokenReqHandler(cdc *wire.Codec, ctx context.CLIContext, isMini bool) http.HandlerFunc

GetTokenReqHandler creates an http request handler to get info for an individual token

func GetTokensReqHandler

func GetTokensReqHandler(cdc *wire.Codec, ctx context.CLIContext, isMini bool) http.HandlerFunc

GetTokensReqHandler creates an http request handler to get the list of tokens in the token mapper

func QuerySwapIDsByCreatorReqHandler

func QuerySwapIDsByCreatorReqHandler(
	cdc *wire.Codec, ctx context.CLIContext) http.HandlerFunc

QuerySwapIDsByCreatorReqHandler creates an http request handler to query swapID list by creator address

func QuerySwapIDsByRecipientReqHandler

func QuerySwapIDsByRecipientReqHandler(
	cdc *wire.Codec, ctx context.CLIContext) http.HandlerFunc

QuerySwapIDsByRecipientReqHandler creates an http request handler to query swapID list by recipient address

func QuerySwapReqHandler

func QuerySwapReqHandler(
	cdc *wire.Codec, ctx context.CLIContext) http.HandlerFunc

QuerySwapReqHandler creates an http request handler to query an AtomicSwap record by swapID

Types

type TokenBalance

type TokenBalance struct {
	Symbol string       `json:"symbol"`
	Free   utils.Fixed8 `json:"free"`
	Locked utils.Fixed8 `json:"locked"`
	Frozen utils.Fixed8 `json:"frozen"`
}

func GetBalances

func GetBalances(
	cdc *wire.Codec, ctx context.CLIContext, tokens tokens.Mapper, addr sdk.AccAddress,
) ([]TokenBalance, error)

Jump to

Keyboard shortcuts

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