rest

package
v0.0.0-...-4696dcf Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestHashLock = "hash-lock"
)

Rest variable names nolint

Variables

This section is empty.

Functions

func RegisterHandlers

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

RegisterHandlers defines routes that get registered by the main application

Types

type ClaimHTLCReq

type ClaimHTLCReq struct {
	BaseReq rest.BaseReq   `json:"base_req" yaml:"base_req"`
	Sender  sdk.AccAddress `json:"sender" yaml:"sender"`
	Secret  string         `json:"secret" yaml:"secret"`
}

ClaimHTLCReq defines the properties of an HTLC claim request's body.

type CreateHTLCReq

type CreateHTLCReq struct {
	BaseReq              rest.BaseReq   `json:"base_req" yaml:"base_req"`
	Sender               sdk.AccAddress `json:"sender" yaml:"sender"`
	To                   sdk.AccAddress `json:"to" yaml:"to"`
	ReceiverOnOtherChain string         `json:"receiver_on_other_chain" yaml:"receiver_on_other_chain"`
	Amount               sdk.Coins      `json:"amount" yaml:"amount"`
	HashLock             string         `json:"hash_lock" yaml:"hash_lock"`
	TimeLock             uint64         `json:"time_lock" yaml:"time_lock"`
	Timestamp            uint64         `json:"timestamp" yaml:"timestamp"`
}

CreateHTLCReq defines the properties of an HTLC creation request's body.

type RefundHTLCReq

type RefundHTLCReq struct {
	BaseReq rest.BaseReq   `json:"base_req" yaml:"base_req"`
	Sender  sdk.AccAddress `json:"sender" yaml:"sender"`
}

RefundHTLCReq defines the properties of an HTLC refund request's body.

Jump to

Keyboard shortcuts

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