api

package
v0.0.0-...-b8f9f05 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHandler

func DefaultHandler(method, pattern string, params map[string]int, handlers ...apiHandle) hr.Handle

DefaultHandler is a common handle function for api requests

func InitSmartContract

func InitSmartContract(sc *smart.SmartContract, data []byte) error

InitSmartContract is initializes smart contract

func Route

func Route(route *hr.Router)

Route sets routing pathes

func VDEContract

func VDEContract(contractData []byte, data *apiData) (result *contractResult, err error)

VDEContract is init VDE contract

Types

type EncryptKey

type EncryptKey struct {
	Encrypted string `json:"encrypted"` //hex
	Public    string `json:"public"`    //hex
	WalletID  int64  `json:"wallet_id"`
	Address   string `json:"address"`
	Error     string `json:"error"`
}

EncryptKey is a structure for the answer of ajax_encrypt_key ajax request

type GetBlockInfoResult

type GetBlockInfoResult struct {
	Hash          []byte `json:"hash"`
	EcosystemID   int64  `json:"ecosystem_id"`
	KeyID         int64  `json:"key_id"`
	Time          int64  `json:"time"`
	Tx            int32  `json:"tx_count"`
	RollbacksHash []byte `json:"rollbacks_hash"`
}

type GetMaxBlockIDResult

type GetMaxBlockIDResult struct {
	MaxBlockID int64 `json:"max_block_id"`
}

type JWTClaims

type JWTClaims struct {
	UID         string `json:"uid,omitempty"`
	EcosystemID string `json:"ecosystem_id,omitempty"`
	KeyID       string `json:"key_id,omitempty"`
	jwt.StandardClaims
}

JWTClaims is storing jwt claims

type SignRes

type SignRes struct {
	Param string `json:"name"`
	Text  string `json:"text"`
}

SignRes contains the data of the signature

type TxSignJSON

type TxSignJSON struct {
	ForSign string    `json:"forsign"`
	Field   string    `json:"field"`
	Title   string    `json:"title"`
	Params  []SignRes `json:"params"`
}

TxSignJSON is a structure for additional signs of transaction

Jump to

Keyboard shortcuts

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