bean

package
v0.0.0-...-48972bb Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

定义对外开放的HTTP API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	ID     int    // 最大255,必须从0开始填写顺序递增
	Src    string // src 地址
	Priv   string // src 私钥
	Dst    string // 目标帐户地址
	Amount string // 金额 无小数
	Data   string // 行为价值 最大长度256,大于256只存256字节
	Memo   string // 最大长度256,大于256只存256字节
	Time   string // 签名交易时需要此参数 RFC2399
	Sign   string // 签名信息(签名交易时必选)
}

type ActionResp

type ActionResp struct {
	ID   int    `json:"id"`
	Code int    `json:"code"` //0-success -1:失败 1:HOLD
	Msg  string `json:"msg"`
}

同步请求时 异步请求

type Response

type Response struct {
	IsSuccess bool        `json:"isSuccess"`
	Msg       string      `json:"msg"`
	Result    interface{} `json:"result"`
}

type TransResp

type TransResp struct {
	Tx          string       `json:"tx"`
	ActionResps []ActionResp `json:"actions"`
}

type Transaction

type Transaction struct {
	BaseFee string    //基础手续费 暂不支持
	Actions []*Action //请求时可以不排序,DAPP处理时按照ACTION ID 排ASC序
}

func (Transaction) Hash

func (p Transaction) Hash() (h ethcmn.Hash)

func (Transaction) Len

func (p Transaction) Len() int

func (Transaction) Less

func (p Transaction) Less(i, j int) bool

func (Transaction) String

func (p Transaction) String() string

func (Transaction) Swap

func (p Transaction) Swap(i, j int)

type ValidatorReq

type ValidatorReq struct {
	Pubkey string // pubkey hex
	Power  string // 0-100
	Sign   string // 采用私钥对 公钥 进行签名 hex
}

Jump to

Keyboard shortcuts

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