rest

package
v7.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestPoolID = "denom"
)

Rest variable names nolint

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(cliCtx client.Context, r *mux.Router)

RegisterHandlers registers asset-related REST handlers to a router

Types

type AddLiquidityReq

type AddLiquidityReq struct {
	BaseReq          rest.BaseReq `json:"base_req" yaml:"base_req"`
	ID               string       `json:"id" yaml:"id"`                                 // the unique liquidity id
	MaxToken         string       `json:"max_token" yaml:"max_token"`                   // token to be deposited as liquidity with an upper bound for its amount
	ExactStandardAmt string       `json:"exact_standard_amt" yaml:"exact_standard_amt"` // exact amount of standard token being add to the liquidity pool
	MinLiquidity     string       `json:"min_liquidity" yaml:"min_liquidity"`           // lower bound UNI sender is willing to accept for deposited coins
	Deadline         string       `json:"deadline" yaml:"deadline"`                     // deadline duration, e.g. 10m
	Sender           string       `json:"sender" yaml:"sender"`                         // msg sender
}

AddLiquidityReq defines the properties of a add liquidity request's body

type Input

type Input struct {
	Address string   `json:"address" yaml:"address"` // address of input
	Coin    sdk.Coin `json:"coin" yaml:"coin"`       // coins of input
}

Input defines the properties of order's input

type Output

type Output struct {
	Address string   `json:"address" yaml:"address"` // address of output
	Coin    sdk.Coin `json:"coin" yaml:"coin"`       // coins of output
}

Output defines the properties of order's output

type RemoveLiquidityReq

type RemoveLiquidityReq struct {
	BaseReq           rest.BaseReq `json:"base_req" yaml:"base_req"`
	ID                string       `json:"id" yaml:"id"`                                 // the unique liquidity id
	MinToken          string       `json:"min_token" yaml:"min_token"`                   // coin to be withdrawn with a lower bound for its amount
	WithdrawLiquidity string       `json:"withdraw_liquidity" yaml:"withdraw_liquidity"` // amount of UNI to be burned to withdraw liquidity from a reserve pool
	MinStandardAmt    string       `json:"min_standard_amt" yaml:"min_standard_amt"`     // minimum amount of the native asset the sender is willing to accept
	Deadline          string       `json:"deadline" yaml:"deadline"`                     // deadline duration, e.g. 10m
	Sender            string       `json:"sender" yaml:"sender"`                         // msg sender
}

RemoveLiquidityReq defines the properties of a remove liquidity request's body

type SwapOrderReq

type SwapOrderReq struct {
	BaseReq  rest.BaseReq `json:"base_req" yaml:"base_req"`
	Input    Input        `json:"input" yaml:"input"`       // the amount the sender is trading
	Output   Output       `json:"output" yaml:"output"`     // the amount the sender is receiving
	Deadline string       `json:"deadline" yaml:"deadline"` // deadline for the transaction to still be considered valid
}

SwapOrderReq defines the properties of a swap request's body

Jump to

Keyboard shortcuts

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