rest

package
v0.15.0-rc.2.accounts Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

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

Types

type AddLiquidityReq

type AddLiquidityReq struct {
	BaseReq             rest.BaseReq `json:"base_req"`
	Signer              string       `json:"signer"`                // User who is trying to add liquidity to the pool
	ExternalAsset       types.Asset  `json:"external_asset"`        // ExternalAsset in the pool pair (ex rwn:ceth)
	NativeAssetAmount   sdk.Uint     `json:"native_asset_amount"`   // NativeAssetAmount is the amount of native asset being added
	ExternalAssetAmount sdk.Uint     `json:"external_asset_amount"` // ExternalAssetAmount is the amount of external asset being added
}

type CreatePoolReq

type CreatePoolReq struct {
	BaseReq             rest.BaseReq `json:"base_req"`
	Signer              string       `json:"signer"`                // User who is trying to create the pool
	ExternalAsset       types.Asset  `json:"external_asset"`        // ExternalAsset in the pool pair (ex rwn:ceth)
	NativeAssetAmount   sdk.Uint     `json:"native_asset_amount"`   // NativeAssetAmount is the amount of native asset being added
	ExternalAssetAmount sdk.Uint     `json:"external_asset_amount"` // ExternalAssetAmount is the amount of external asset being added
}

type DecommissionPoolReq

type DecommissionPoolReq struct {
	BaseReq rest.BaseReq `json:"base_req"`
	Signer  string       `json:"signer"` // User who is trying to Decommission the pool
	Ticker  string       `json:"ticker"` // ExternalAsset Ticker in the pool pair (ex rwn:ceth ,would be ceth)
}

type RemoveLiquidityReq

type RemoveLiquidityReq struct {
	BaseReq       rest.BaseReq `json:"base_req"`
	Signer        string       `json:"signer"`         // User who is trying to remove liquidity to the pool
	ExternalAsset types.Asset  `json:"external_asset"` // ExternalAsset in the pool pair (ex rwn:ceth)
	WBasisPoints  sdk.Int      `json:"w_basis_points"` // WBasisPoints determines the amount of asset being withdrawn
	Asymmetry     sdk.Int      `json:"asymmetry"`      // Asymmetry decides the type of asset being withdrawn asymmetry means equal amounts of native and external

}

type RemoveLiquidityUnitsReq added in v0.13.0

type RemoveLiquidityUnitsReq struct {
	BaseReq       rest.BaseReq `json:"base_req"`
	Signer        string       `json:"signer"`         // User who is trying to remove liquidity to the pool
	ExternalAsset types.Asset  `json:"external_asset"` // ExternalAsset in the pool pair (ex rwn:ceth)
	WithdrawUnits sdk.Uint     `json:"withdraw_units"` // WithdrawUnits determines the amount of asset being withdrawn

}

type SwapReq

type SwapReq struct {
	BaseReq            rest.BaseReq `json:"base_req"`
	Signer             string       `json:"signer"`               // User who is trying to swap
	SentAsset          types.Asset  `json:"sent_asset"`           // Asset which the user is sending ,can be an external asset or RWN
	ReceivedAsset      types.Asset  `json:"received_asset"`       // Asset which the user wants to receive ,can be an external asset or RWN
	SentAmount         sdk.Uint     `json:"sent_amount"`          // Amount of SentAsset being sent
	MinReceivingAmount sdk.Uint     `json:"min_receiving_amount"` // Min amount specified by the user m the swap will not go through if the receiving amount drops below this value
}

Jump to

Keyboard shortcuts

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