rest

package
v0.1.0-mage.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestExpiration = "expiration"
	RestInvolve    = "involve"
	RestStatus     = "status"
	RestDirection  = "direction"
)

REST Variable names nolint

Variables

This section is empty.

Functions

func RegisterRoutes

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

RegisterRoutes registers bep3-related REST handlers to a router

Types

type PostClaimSwapReq

type PostClaimSwapReq struct {
	BaseReq      rest.BaseReq     `json:"base_req" yaml:"base_req"`
	From         sdk.AccAddress   `json:"from" yaml:"from"`
	SwapID       tmbytes.HexBytes `json:"swap_id" yaml:"swap_id"`
	RandomNumber tmbytes.HexBytes `json:"random_number" yaml:"random_number"`
}

PostClaimSwapReq defines the properties of a swap claim request's body

type PostCreateSwapReq

type PostCreateSwapReq struct {
	BaseReq             rest.BaseReq     `json:"base_req" yaml:"base_req"`
	From                sdk.AccAddress   `json:"from" yaml:"from"`
	To                  sdk.AccAddress   `json:"to" yaml:"to"`
	RecipientOtherChain string           `json:"recipient_other_chain" yaml:"recipient_other_chain"`
	SenderOtherChain    string           `json:"sender_other_chain" yaml:"sender_other_chain"`
	RandomNumberHash    tmbytes.HexBytes `json:"random_number_hash" yaml:"random_number_hash"`
	Timestamp           int64            `json:"timestamp" yaml:"timestamp"`
	Amount              sdk.Coins        `json:"amount" yaml:"amount"`
	HeightSpan          uint64           `json:"height_span" yaml:"height_span"`
	CrossChain          bool             `json:"cross_chain" yaml:"cross_chain"`
}

PostCreateSwapReq defines the properties of a swap create request's body

type PostRefundSwapReq

type PostRefundSwapReq struct {
	BaseReq rest.BaseReq     `json:"base_req" yaml:"base_req"`
	From    sdk.AccAddress   `json:"from" yaml:"from"`
	SwapID  tmbytes.HexBytes `json:"swap_id" yaml:"swap_id"`
}

PostRefundSwapReq defines the properties of swap refund request's body

Jump to

Keyboard shortcuts

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