httphandlers

package
v0.0.0-...-77960fc Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DepositMethodName = "deposit"
)

Variables

View Source
var (
	// Tx handles request for transactions
	Tx     TxHandler
	Action ActionHandler
)

Functions

This section is empty.

Types

type ActionHandler

type ActionHandler struct {
}

ActionHandler is a container for tx related handlers

func (ActionHandler) AfterSign

func (action ActionHandler) AfterSign(plasma *plasma.Plasma) http.HandlerFunc

func (ActionHandler) Deposit

func (action ActionHandler) Deposit(plasma *plasma.Plasma) http.HandlerFunc

deposit icst to root chain and create block in child chain

type AfterSignRequest

type AfterSignRequest struct {
	Owner  string `json:"owner"`
	Amount int    `json:"amount"`
	Sig    string `json:"sig"`
}

type AfterSignResponse

type AfterSignResponse struct {
	Res bool `json:"res"`
}

type DepositRequest

type DepositRequest struct {
	Owner  string `json:"owner"`
	Amount int    `json:"amount"`
}

type DepositResponse

type DepositResponse struct {
	TxHash string `json:"txhash"`
}

type TxHandler

type TxHandler struct {
}

TxHandler is a container for tx related handlers

func (TxHandler) New

func (th TxHandler) New(plasma *plasma.Plasma) http.HandlerFunc

New handles transaction creation request

func (TxHandler) Sign

func (th TxHandler) Sign() http.HandlerFunc

Sign handles transaction signature

Jump to

Keyboard shortcuts

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