Documentation ¶
Overview ¶
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. * * The ontology is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The ontology is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with The ontology. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- Variables
- func DecodeValue(source *common.ZeroCopySource) (interface{}, error)
- func DeserializeCallParam(input []byte) (interface{}, error)
- func DeserializeNotify(input []byte) interface{}
- func EncodeAddress(sink *common.ZeroCopySink, addr common.Address)
- func EncodeBigInt(sink *common.ZeroCopySink, intval *big.Int) error
- func EncodeBool(sink *common.ZeroCopySink, b bool)
- func EncodeBytes(sink *common.ZeroCopySink, buf []byte)
- func EncodeH256(sink *common.ZeroCopySink, hash common.Uint256)
- func EncodeInt128(sink *common.ZeroCopySink, val common.I128)
- func EncodeList(sink *common.ZeroCopySink, list []interface{}) error
- func EncodeString(sink *common.ZeroCopySink, buf string)
- func EncodeValue(value interface{}) ([]byte, error)
Constants ¶
Variables ¶
var ERROR_PARAM_FORMAT = fmt.Errorf("error param format")
var ERROR_PARAM_NOT_SUPPORTED_TYPE = fmt.Errorf("error param format:not supported type")
Functions ¶
func DecodeValue ¶
func DecodeValue(source *common.ZeroCopySource) (interface{}, error)
func DeserializeCallParam ¶
input byte array should be the following format version(1byte) + type(1byte) + data...
func DeserializeNotify ¶
func DeserializeNotify(input []byte) interface{}
func EncodeAddress ¶
func EncodeAddress(sink *common.ZeroCopySink, addr common.Address)
func EncodeBigInt ¶
func EncodeBigInt(sink *common.ZeroCopySink, intval *big.Int) error
func EncodeBool ¶
func EncodeBool(sink *common.ZeroCopySink, b bool)
func EncodeBytes ¶
func EncodeBytes(sink *common.ZeroCopySink, buf []byte)
func EncodeH256 ¶
func EncodeH256(sink *common.ZeroCopySink, hash common.Uint256)
func EncodeInt128 ¶
func EncodeInt128(sink *common.ZeroCopySink, val common.I128)
func EncodeList ¶
func EncodeList(sink *common.ZeroCopySink, list []interface{}) error
func EncodeString ¶
func EncodeString(sink *common.ZeroCopySink, buf string)
func EncodeValue ¶
currently only used by test case
Types ¶
This section is empty.