rest

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareSendTx

func PrepareSendTx(si *SendInput) sdk.Tx

func RegisterAll

func RegisterAll(r *mux.Router) error

RegisterAll is a convenience function to register all the handlers in this package.

func RegisterCoinSend

func RegisterCoinSend(r *mux.Router) error

RegisterCoinSend is a mux.Router handler that exposes POST method access on route /build/send to create a transaction for sending money from one account to another.

func RegisterQueryAccount

func RegisterQueryAccount(r *mux.Router) error

RegisterQueryAccount is a mux.Router handler that exposes GET method access on route /query/account/{signature} to query accounts

func RegisterSearchSent added in v0.8.0

func RegisterSearchSent(r *mux.Router) error

RegisterSearchSent is a mux.Router handler that exposes GET method access on route /tx/coin/{account} to historical sendtx transactions

Types

type SendInput

type SendInput struct {
	Fees     *coin.Coin `json:"fees"`
	Multi    bool       `json:"multi,omitempty"`
	Sequence uint32     `json:"sequence"`

	To     *sdk.Actor `json:"to"`
	From   *sdk.Actor `json:"from"`
	Amount coin.Coins `json:"amount"`
}

SendInput is the request to send an amount from one actor to another. Note: Not using the `validator:""` tags here because SendInput has many fields so it would be nice to figure out all the invalid inputs and report them back to the caller, in one shot.

Jump to

Keyboard shortcuts

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