Documentation ¶
Index ¶
- Variables
- func HandleAccountCreate(cu *custodial.Custodial) func(echo.Context) error
- func HandleNetworkAccountStatus(cu *custodial.Custodial) func(echo.Context) error
- func HandleSignTranserAuthorization(cu *custodial.Custodial) func(echo.Context) error
- func HandleSignTransfer(cu *custodial.Custodial) func(echo.Context) error
- func HandleTrackTx(cu *custodial.Custodial) func(echo.Context) error
- func NewBadRequestError(message ...interface{}) *echo.HTTPError
- type ErrResp
- type H
- type OkResp
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidJSON = errors.New("Invalid JSON structure.")
)
Functions ¶
func HandleAccountCreate ¶
HandleAccountCreate godoc
@Summary Create a new custodial account. @Description Create a new custodial account. @Tags account @Accept */* @Produce json @Success 200 {object} OkResp @Failure 500 {object} ErrResp @Router /account/create [post]
func HandleNetworkAccountStatus ¶
HandleNetworkAccountStatus godoc
@Summary Get an address's network balance and nonce. @Description Return network balance and nonce. @Tags network @Accept */* @Produce json @Param address path string true "Account Public Key" @Success 200 {object} OkResp @Failure 400 {object} ErrResp @Failure 500 {object} ErrResp @Router /account/status/{address} [get]
func HandleSignTranserAuthorization ¶
HandleSignTransferAuthorization godoc
@Summary Sign and dispatch a transfer authorization (approve) request. @Description Sign and dispatch a transfer authorization (approve) request. @Tags network @Accept json @Produce json @Param signTransferAuthorzationRequest body object{amount=uint64,authorizer=string,authorizedAddress=string,voucherAddress=string} true "Sign Transfer Authorization (approve) Request" @Success 200 {object} OkResp @Failure 400 {object} ErrResp @Failure 500 {object} ErrResp @Router /sign/transferAuth [post]
func HandleSignTransfer ¶
HandleSignTransfer godoc
@Summary Sign and dispatch transfer request. @Description Sign and dispatch a transfer request. @Tags network @Accept json @Produce json @Param signTransferRequest body object{from=string,to=string,voucherAddress=string,amount=uint64} true "Sign Transfer Request" @Success 200 {object} OkResp @Failure 400 {object} ErrResp @Failure 500 {object} ErrResp @Router /sign/transfer [post]
func HandleTrackTx ¶
HandleTrackTx godoc
@Summary Track an OTX (Origin transaction) status. @Description Track an OTX (Origin transaction) status. @Tags track @Accept */* @Produce json @Param trackingId path string true "Tracking Id" @Success 200 {object} OkResp @Failure 400 {object} ErrResp @Failure 500 {object} ErrResp @Router /track/{trackingId} [get]
func NewBadRequestError ¶
func NewBadRequestError(message ...interface{}) *echo.HTTPError
Types ¶
Click to show internal directories.
Click to hide internal directories.