天玄技术文档
  • 平台介绍
    • 天玄区块链
    • 版本信息
  • 快速开始
    • 快速搭建天玄链
      • 硬件要求
      • 软件要求
      • 构建节点安装包
      • 安装并启动节点
    • 应用部署示例
  • 安装手册
    • 天玄链
      • 打包可执行文件
      • 安装
      • 配置说明
      • 证书说明
      • 日志说明
    • 天玄网关
      • 安装
      • 配置说明
  • 应用开发手册
    • 创建和使用账户
    • 智能合约
    • Java SDK
      • 快速入门
      • 配置说明
      • 远程调用接口
    • 天玄链功能接口列表
  • 系统架构
    • 整体架构
    • 天玄链交易流程
    • 数据结构&编码
    • 核心模块
      • 共识算法
      • P2P网络
      • 交易并行
      • 存储
      • 流水线执行
      • CA机制
      • 网关
      • 虚拟机
      • 密码
  • 社区
    • 团队介绍
    • 合作伙伴
    • 社群入口
Powered by GitBook
On this page
  • 接口方法调用
  • 接口清单
  • thanosGetLatestBeExecutedNum
  • thanosGetLatestConsensusNumber
  • thanosGetCurrentCommitRound
  • thanosGetBlockNumber
  • thanosGetEthTransactionByHash
  • thanosGetEthTransactionByHashByChain
  • thanosGetEehTransactionsByHashes
  • thanosGetGlobalNodeEventByHash
  • thanosGetGlobalNodeEventByHashByChain
  • thanosGetGlobalNodeEventReceiptByHash
  • thanosEthCall
  • thanosSendGlobalNodeEvent
  • thanosSendEthRawTransaction
  • thanosSendEthRawTransactionList
  1. 应用开发手册
  2. Java SDK

远程调用接口

接口方法调用

按照教程配置好 web3j 并初始化 Web3Manager 实例后,以 thanosGetLatestBeExecutedNum 为例:

Web3j web3j = web3Manager.getHttpWeb3jRandomly();
Long res = web3j.thanosGetLatestBeExecutedNum().send().getNumber();

更多接口请参考后文。

接口清单

thanosGetLatestBeExecutedNum

获取目前最新被异步执行的区块块高

参数

  • 无

返回值

  • Long - 区块块高

thanosGetLatestConsensusNumber

获取目前最新被异步共识的区块块高

参数

  • 无

返回值

  • Long - 区块块高

thanosGetCurrentCommitRound

获取目前最新的共识轮次

参数

  • 无

返回值

  • Long - 轮次

thanosGetBlockNumber

通过blockNumber获取区块链信息

参数

  • blockNumber : String - 区块链编号

返回值

  • string - 区块链信息

thanosGetEthTransactionByHash

通过交易hash获取交易信息,只能获取到网关处缓存中的历史交易

参数

  • transactionHash : String - 交易hash

返回值

  • string - 交易信息

thanosGetEthTransactionByHashByChain

通过交易hash获取交易信息,可以获取到全量的历史交易

参数

  • transactionHash : String - 交易hash

返回值

  • string - 交易信息

thanosGetEehTransactionsByHashes

通过交易hash批量获取交易信息

参数

  • transactionHashList : String - 交易hash

返回值

  • string - 交易信息

thanosGetGlobalNodeEventByHash

通过全局节点事件hash获取事件信息,只能获取到网关处缓存中的历史全局节点事件

参数

  • eventHash : String - 事件hash

返回值

  • string - 事件信息

thanosGetGlobalNodeEventByHashByChain

通过交易hash批量获取交易信息,可以获取到全量的历史全局节点事件

参数

  • transactionHash : String - 交易hash

返回值

  • string - 交易信息

thanosGetGlobalNodeEventReceiptByHash

通过全局节点事件hash获取事件回执

参数

  • eventHash : String - 事件hash

返回值

  • string - 事件回执信息

thanosEthCall

发送交易请求到区块链立即执行,无需共识

参数

  • rawData : String - rlp序列化后交易

返回值

  • string - 交易执行回执

thanosSendGlobalNodeEvent

发送全局节点事件请求到区块链执行,返回事件hash

参数

  • rawData : String - rlp序列化后事件信息

返回值

  • string - 事件hash

thanosSendEthRawTransaction

发送交易请求到区块链执行,返回交易hash

参数

  • rawData : String - rlp序列化后交易

返回值

  • string - 交易hash

thanosSendEthRawTransactionList

批量发送交易请求到区块链执行,返回交易 hash 列表

参数

  • rawData : List<byte[]> - rlp序列化后的交易信息列表

返回值

  • list<string> - 交易 hash 列表

Previous配置说明Next天玄链功能接口列表

Last updated 8 months ago