Versions in this module Expand all Collapse all v0 v0.6.1 Jan 21, 2020 Changes in this version + const ASSET_ONG + const ASSET_ONT + const COMPRESS_TYPE_ZLIB + const CONTRACT_APPROVE + const CONTRACT_TRANSFER + const CONTRACT_TRANSFER_FROM + const DEFAULT_ABI_PATH + const DEFAULT_COMPRESS_TYPE + const DEFAULT_EXPORT_FILE + const DEFAULT_EXPORT_HEIGHT + const DEFAULT_WALLET_PATH + const ERROR_INVALID_PARAMS + const ERROR_ONTOLOGY_COMMON + const ERROR_ONTOLOGY_SUCCESS + const EXPORT_BLOCK_METADATA_LEN + const EXPORT_BLOCK_METADATA_VERSION + const JSON_RPC_VERSION + const PARAMS_SPLIT + const PARAM_ESC_CHAR + const PARAM_LEFT_BRACKET + const PARAM_RIGHT_BRACKET + const PARAM_TYPE_ARRAY + const PARAM_TYPE_BOOLEAN + const PARAM_TYPE_BYTE_ARRAY + const PARAM_TYPE_INTEGER + const PARAM_TYPE_SPLIT + const PARAM_TYPE_STRING + const PRECISION_ONG + const PRECISION_ONT + const VERSION_CONTRACT_ONG + const VERSION_CONTRACT_ONT + const VERSION_TRANSACTION + var AccountAddressFlag = cli.StringFlag + var AccountChangePasswdFlag = cli.BoolFlag + var AccountDefaultFlag = cli.BoolFlag + var AccountKeyFlag = cli.StringFlag + var AccountKeylenFlag = cli.StringFlag + var AccountLabelFlag = cli.StringFlag + var AccountLowSecurityFlag = cli.BoolFlag + var AccountMultiMFlag = cli.UintFlag + var AccountMultiPubKeyFlag = cli.StringFlag + var AccountPassFlag = cli.StringFlag + var AccountQuantityFlag = cli.UintFlag + var AccountSetDefaultFlag = cli.BoolFlag + var AccountSigSchemeFlag = cli.StringFlag + var AccountSourceFileFlag = cli.StringFlag + var AccountTypeFlag = cli.StringFlag + var AccountVerboseFlag = cli.BoolFlag + var AccountWIFFlag = cli.BoolFlag + var ApproveAmountFlag = cli.StringFlag + var ApproveAssetFlag = cli.StringFlag + var ApproveAssetFromFlag = cli.StringFlag + var ApproveAssetToFlag = cli.StringFlag + var BlockHashInfoFlag = cli.StringFlag + var BlockHeightInfoFlag = cli.UintFlag + var CliABIPathFlag = cli.StringFlag + var CliAddressFlag = cli.StringFlag + var CliRpcPortFlag = cli.UintFlag + var CliWalletDirFlag = cli.StringFlag + var ConfigFlag = cli.StringFlag + var ContractAddrFlag = cli.StringFlag + var ContractAuthorFlag = cli.StringFlag + var ContractCodeFileFlag = cli.StringFlag + var ContractDescFlag = cli.StringFlag + var ContractEmailFlag = cli.StringFlag + var ContractNameFlag = cli.StringFlag + var ContractParamsFlag = cli.StringFlag + var ContractPrepareDeployFlag = cli.BoolFlag + var ContractPrepareInvokeFlag = cli.BoolFlag + var ContractReturnTypeFlag = cli.StringFlag + var ContractStorageFlag = cli.BoolFlag + var ContractVersionFlag = cli.StringFlag + var DataDirFlag = cli.StringFlag + var DisableBroadcastNetTxFlag = cli.BoolFlag + var DisableEventLogFlag = cli.BoolFlag + var DisableSyncVerifyTxFlag = cli.BoolFlag + var EnableConsensusFlag = cli.BoolFlag + var EnableTestModeFlag = cli.BoolFlag + var ExportEndHeightFlag = cli.UintFlag + var ExportFileFlag = cli.StringFlag + var ExportSpeedFlag = cli.StringFlag + var ExportStartHeightFlag = cli.UintFlag + var ForceSendTxFlag = cli.BoolFlag + var ForceTxFlag = cli.BoolFlag + var GasLimitFlag = cli.Uint64Flag + var GasPriceFlag = cli.Uint64Flag + var HttpInfoPortFlag = cli.UintFlag + var IdentityFlag = cli.BoolFlag + var ImportEndHeightFlag = cli.UintFlag + var ImportFileFlag = cli.StringFlag + var LogLevelFlag = cli.UintFlag + var MaxConnInBoundFlag = cli.UintFlag + var MaxConnInBoundForSingleIPFlag = cli.UintFlag + var MaxConnOutBoundFlag = cli.UintFlag + var MaxTxInBlockFlag = cli.IntFlag + var NetworkIdFlag = cli.UintFlag + var NodePortFlag = cli.UintFlag + var NonOptionFlag = cli.StringFlag + var PARAM_SPLIT_INC = string([]byte{ ... }) + var PARAM_TYPE_SPLIT_INC = string([]byte{ ... }) + var PrepareExecTransactionFlag = cli.BoolFlag + var RPCDisabledFlag = cli.BoolFlag + var RPCLocalEnableFlag = cli.BoolFlag + var RPCLocalProtFlag = cli.UintFlag + var RPCPortFlag = cli.UintFlag + var RawTransactionFlag = cli.StringFlag + var ReservedPeersFileFlag = cli.StringFlag + var ReservedPeersOnlyFlag = cli.BoolFlag + var RestfulEnableFlag = cli.BoolFlag + var RestfulMaxConnsFlag = cli.UintFlag + var RestfulPortFlag = cli.UintFlag + var SendTxFlag = cli.BoolFlag + var TestModeGenBlockTimeFlag = cli.UintFlag + var TransactionAmountFlag = cli.StringFlag + var TransactionAssetFlag = cli.StringFlag + var TransactionFromFlag = cli.StringFlag + var TransactionGasLimitFlag = cli.Uint64Flag + var TransactionGasPriceFlag = cli.Uint64Flag + var TransactionHashFlag = cli.StringFlag + var TransactionPayerFlag = cli.StringFlag + var TransactionToFlag = cli.StringFlag + var TransferFromAmountFlag = cli.StringFlag + var TransferFromSenderFlag = cli.StringFlag + var TxpoolPreExecDisableFlag = cli.BoolFlag + var WalletFileFlag = cli.StringFlag + var WithdrawONGAmountFlag = cli.StringFlag + var WithdrawONGReceiveAccountFlag = cli.StringFlag + var WsEnabledFlag = cli.BoolFlag + var WsPortFlag = cli.UintFlag + func Approve(gasPrice, gasLimit uint64, signer *account.Account, asset, from, to string, ...) (string, error) + func ApproveTx(gasPrice, gasLimit uint64, asset string, from, to string, amount uint64) (*types.MutableTransaction, error) + func BuildWasmVMInvokeCode(smartcodeAddress common.Address, methodName string, paramType wasmvm.ParamType, ...) ([]byte, error) + func CheckAssetAmount(asset string, amount uint64) error + func CompressBlockData(data []byte, compressType byte) ([]byte, error) + func DecompressBlockData(data []byte, compressType byte) ([]byte, error) + func DeployContract(gasPrice, gasLimit uint64, signer *account.Account, needStorage bool, ...) (string, error) + func FormatAssetAmount(amount uint64, precision byte) string + func FormatOng(amount uint64) string + func FormatOnt(amount uint64) string + func GenExportBlocksFileName(name string, start, end uint32) string + func GetAccountBalance(address, asset string) (uint64, error) + func GetAllowance(asset, from, to string) (string, error) + func GetBalance(address string) (*httpcom.BalanceOfRsp, error) + func GetBlock(hashOrHeight interface{}) ([]byte, error) + func GetBlockCount() (uint32, error) + func GetBlockData(hashOrHeight interface{}) ([]byte, error) + func GetFlagName(flag cli.Flag) string + func GetJsonObjectFromFile(filePath string, jsonObject interface{}) error + func GetNetworkId() (uint32, error) + func GetRawTransaction(txHash string) ([]byte, error) + func GetSmartContractEvent(txHash string) (*rpccommon.ExecuteNotify, error) + func GetSmartContractEventInfo(txHash string) ([]byte, error) + func GetStoreDirPath(dataDir, networkName string) string + func GetTxHeight(txHash string) (uint32, error) + func InvokeNativeContract(gasPrice, gasLimit uint64, signer *account.Account, ...) (string, error) + func InvokeNeoVMContract(gasPrice, gasLimit uint64, signer *account.Account, ...) (string, error) + func InvokeSmartContract(signer *account.Account, tx *types.MutableTransaction) (string, error) + func InvokeWasmVMContract(gasPrice, gasLimit uint64, siger *account.Account, cversion byte, ...) (string, error) + func MultiSigTransaction(mutTx *types.MutableTransaction, m uint16, pubKeys []keypair.PublicKey, ...) error + func NewDeployCodeTransaction(gasPrice, gasLimit uint64, code []byte, needStorage bool, ...) *types.MutableTransaction + func NewInvokeTransaction(gasPrice, gasLimit uint64, invokeCode []byte) *types.MutableTransaction + func NewNativeInvokeTransaction(gasPrice, gasLimit uint64, contractAddr common.Address, version byte, ...) (*types.MutableTransaction, error) + func NewNeovmContractAbi(abiData []byte) (*abi.NeovmContractAbi, error) + func ParseAssetAmount(rawAmount string, precision byte) uint64 + func ParseNativeFuncParam(builder *neovm.ParamsBuilder, funName string, params []interface{}, ...) error + func ParseNativeParamAddress(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParamArray(builder *neovm.ParamsBuilder, param interface{}, ...) error + func ParseNativeParamBool(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParamByte(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParamByteArray(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParamInteger(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParamString(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParamStruct(builder *neovm.ParamsBuilder, param interface{}, ...) error + func ParseNativeParamUint256(builder *neovm.ParamsBuilder, param string) error + func ParseNativeParams(builder *neovm.ParamsBuilder, params []interface{}, ...) error + func ParseNeoVMContractReturnTypeBool(hexStr string) (bool, error) + func ParseNeoVMContractReturnTypeByteArray(hexStr string) (string, error) + func ParseNeoVMContractReturnTypeInteger(hexStr string) (int64, error) + func ParseNeoVMContractReturnTypeString(hexStr string) (string, error) + func ParseNeoVMInvokeParams(rawParams []interface{}) ([]interface{}, error) + func ParseNeovmFunc(rawParams []string, funcAbi *abi.NeovmContractFunctionAbi) ([]interface{}, error) + func ParseNeovmParam(params []string, paramsAbi []*abi.NeovmContractParamsAbi) ([]interface{}, error) + func ParseNeovmParamBoolean(param string) (interface{}, error) + func ParseNeovmParamByteArray(param string) (interface{}, error) + func ParseNeovmParamInteger(param string) (interface{}, error) + func ParseNeovmParamString(param string) (interface{}, error) + func ParseOng(rawAmount string) uint64 + func ParseOnt(rawAmount string) uint64 + func ParseParams(rawParamStr string) ([]interface{}, error) + func ParseReturnValue(rawValue interface{}, rawReturnTypeStr string) ([]interface{}, error) + func PrepareDeployContract(needStorage bool, code, cname, cversion, cauthor, cemail, cdesc string) (*cstates.PreExecResult, error) + func PrepareInvokeCodeNeoVMContract(code []byte) (*cstates.PreExecResult, error) + func PrepareInvokeNativeContract(contractAddress common.Address, version byte, method string, ...) (*cstates.PreExecResult, error) + func PrepareInvokeNeoVMContract(contractAddress common.Address, params []interface{}) (*cstates.PreExecResult, error) + func PrepareSendRawTransaction(txData string) (*cstates.PreExecResult, error) + func SendRawTransaction(tx *types.Transaction) (string, error) + func SendRawTransactionData(txData string) (string, error) + func Sign(data []byte, signer *account.Account) ([]byte, error) + func SignTransaction(signer *account.Account, tx *types.MutableTransaction) error + func Transfer(gasPrice, gasLimit uint64, signer *account.Account, asset, from, to string, ...) (string, error) + func TransferFrom(gasPrice, gasLimit uint64, signer *account.Account, ...) (string, error) + func TransferFromTx(gasPrice, gasLimit uint64, asset, sender, from, to string, amount uint64) (*types.MutableTransaction, error) + func TransferTx(gasPrice, gasLimit uint64, asset, from, to string, amount uint64) (*types.MutableTransaction, error) + func ZLibCompress(data []byte) ([]byte, error) + func ZLibDecompress(data []byte) ([]byte, error) + type ExportBlockMetadata struct + CompressType byte + EndBlockHeight uint32 + StartBlockHeight uint32 + Version byte + func NewExportBlockMetadata() *ExportBlockMetadata + func (this *ExportBlockMetadata) Deserialize(r io.Reader) error + func (this *ExportBlockMetadata) Serialize(w io.Writer) error + type JsonRpcRequest struct + Id string + Method string + Params []interface{} + Version string + type JsonRpcResponse struct + Desc string + Error int64 + Result json.RawMessage + type NeoVMInvokeParam struct + Type string + Value interface{} + type OntologyError struct + Error error + ErrorCode int64 + func NewOntologyError(err error, errCode ...int64) *OntologyError