From 39522c61a8474aba6e8223a7298c6d47755966ac Mon Sep 17 00:00:00 2001 From: Leem Date: Thu, 18 Jun 2026 16:53:23 +0800 Subject: [PATCH 1/4] docs: add llms.txt, declare doc source of truth, and SR key safety notes - Add docs/llms.txt as an AI entry index linking the API references and node operation pages (served at /llms.txt). - Declare documentation-en as the authoritative source on the home page, with this Chinese repository as the translation that follows it. - Add a warning in the SR setup section to chmod 600 the config, never commit a config file with a real private key, and prefer keystore. --- docs/index.md | 4 ++ docs/llms.txt | 47 ++++++++++++++++++++++ docs/using_javatron/installing_javatron.md | 9 ++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 docs/llms.txt diff --git a/docs/index.md b/docs/index.md index 4e041ec2..884f0d82 100644 --- a/docs/index.md +++ b/docs/index.md @@ -71,3 +71,7 @@ java-tron 是 TRON 网络的官方 Java 客户端实现,由 TRON 协议团队 - [TRON 改进提案 (TIPs)](https://github.com/tronprotocol/tips) — 协议演进提案的提交、讨论与归档仓库 - [TRON 开发者中心](https://developers.tron.network/) — DApp 开发者文档、SDK、教程的英文总入口 - [TRON 官网](https://tron.network/index?lng=zh) — 项目动态、生态合作伙伴、社区入口 + +## 文档权威来源 + +英文文档仓库 ([`documentation-en`](https://github.com/tronprotocol/documentation-en)) 是 java-tron 文档的权威来源,本中文文档仓库 ([`documentation-zh`](https://github.com/tronprotocol/documentation-zh)) 为其翻译跟进版本。当中英文内容不一致时,以英文版为准;内容变更应先在英文源上进行,再同步到中文译文。 diff --git a/docs/llms.txt b/docs/llms.txt new file mode 100644 index 00000000..bb7a56b8 --- /dev/null +++ b/docs/llms.txt @@ -0,0 +1,47 @@ +# java-tron + +> java-tron 是 TRON 网络的官方 Java 客户端实现,由 TRON 协议团队维护。它实现了 TRON 主网协议——DPoS 共识、超级代表、账户与资源模型、智能合约、系统合约、多签权限——是运行全节点、参与超级代表选举、部署合约和构建 DApp 的基础软件。本站为英文权威文档 documentation-en 的中文翻译版本;当中英文不一致时,以英文版为准。 + +## 新手入门 + +- [入门指南](https://tronprotocol.github.io/documentation-zh/getting_started/getting_started_with_javatron/):java-tron 与 TRON 协议的第一步。 +- [术语表](https://tronprotocol.github.io/documentation-zh/glossary/):常见 TRON 与 java-tron 术语释义。 + +## 运行节点 + +- [部署 java-tron](https://tronprotocol.github.io/documentation-zh/using_javatron/installing_javatron/):硬件要求、JDK 先决条件、源码编译、启动全节点/固化节点/超级代表节点、JVM 调优。 +- [备份与恢复](https://tronprotocol.github.io/documentation-zh/using_javatron/backup_restore/):节点数据库的快照与恢复。 +- [轻全节点](https://tronprotocol.github.io/documentation-zh/using_javatron/litefullnode/):运行与维护裁剪后的低占用节点。 +- [私链网络](https://tronprotocol.github.io/documentation-zh/using_javatron/private_network/):搭建私有 TRON 链。 +- [节点监控](https://tronprotocol.github.io/documentation-zh/using_javatron/metrics/):Prometheus / Grafana 指标与健康检查端点。 +- [节点维护工具 (Toolkit)](https://tronprotocol.github.io/documentation-zh/using_javatron/toolkit/):数据库分区、轻节点裁剪、复制、LevelDB→RocksDB 转换、启动优化。 +- [升级到新版本](https://tronprotocol.github.io/documentation-zh/releases/upgrade-instruction/):新版本的升级步骤。 + +## API 接口 + +- [API 总览](https://tronprotocol.github.io/documentation-zh/api/):如何在 HTTP、JSON-RPC、gRPC 三套接口间选择。 +- [HTTP API 参考](https://tronprotocol.github.io/documentation-zh/api/http/):`/wallet/*` 与 `/walletsolidity/*` 端点,按功能分组(账户、资产、区块/交易查询、交易构建/广播、智能合约、超级代表/治理、质押 v1/v2、节点/工具)。 +- [JSON-RPC API 参考](https://tronprotocol.github.io/documentation-zh/api/json-rpc/):兼容以太坊的 `eth_*` / `net_*` / `web3_*` 方法,以及 Tron 特有的 `buildTransaction`,含端口、启用开关、编码约定与错误码。 +- [gRPC API 参考](https://tronprotocol.github.io/documentation-zh/api/rpc/):`protocol.Wallet` / `protocol.WalletSolidity` 方法;契约由 java-tron 仓库中的 `.proto` 文件定义。 + +## 核心协议 + +- [DPoS 共识](https://tronprotocol.github.io/documentation-zh/mechanism-algorithm/dpos/):委托权益证明出块机制。 +- [超级代表](https://tronprotocol.github.io/documentation-zh/mechanism-algorithm/sr/):超级代表选举与区块生产。 +- [账户模型](https://tronprotocol.github.io/documentation-zh/mechanism-algorithm/account/):账户类型与结构。 +- [资源模型](https://tronprotocol.github.io/documentation-zh/mechanism-algorithm/resource/):带宽与能量、质押、资源代理。 +- [智能合约](https://tronprotocol.github.io/documentation-zh/contracts/contract/):智能合约模型与生命周期。 +- [系统合约](https://tronprotocol.github.io/documentation-zh/mechanism-algorithm/system-contracts/):链上系统合约类型。 +- [账户权限管理](https://tronprotocol.github.io/documentation-zh/mechanism-algorithm/multi-signatures/):多签权限模型。 + +## 开发者 + +- [开发者指南](https://tronprotocol.github.io/documentation-zh/developers/java-tron/):构建、贡献与扩展 java-tron。 +- [核心模块](https://tronprotocol.github.io/documentation-zh/developers/code-structure/):源码结构与模块职责。 +- [wallet-cli](https://tronprotocol.github.io/documentation-zh/clients/wallet-cli/):官方命令行钱包与密钥管理。 + +## 其它 + +- [源码与版本发布 (GitHub)](https://github.com/tronprotocol/java-tron):java-tron 源码、版本发布与协议 `.proto` 定义。 +- [TRON 改进提案 (TIPs)](https://github.com/tronprotocol/tips):协议演进提案。 +- [TRON 开发者中心](https://developers.tron.network/):DApp 开发者文档、SDK、教程。 diff --git a/docs/using_javatron/installing_javatron.md b/docs/using_javatron/installing_javatron.md index 05d371aa..11130dc5 100644 --- a/docs/using_javatron/installing_javatron.md +++ b/docs/using_javatron/installing_javatron.md @@ -241,6 +241,13 @@ localwitness = [ ] ``` +!!! warning "保护好 SR 私钥" + `localwitness` 列表以明文形式存储 SR 账户私钥,任何能读取该文件的人都可以接管你的 SR 产块权限,因此务必妥善保护: + + - 限制文件权限,仅允许节点属主读取配置文件:`chmod 600 config.conf`(若使用 keystore 文件,请对其执行相同操作)。 + - 切勿将含有真实私钥的配置文件提交到 Git——即使之后删除,私钥仍会保留在提交历史中。请将含密钥的文件放在仓库目录之外,并加入 `.gitignore`。 + - 生产环境建议使用 keystore + 密码方式替代明文私钥(参见下文[使用 Keystore + 密码指定超级代表账户私钥](#keystore-password))。 + 对于运行在高性能服务器(例如,≥ 64GB 内存)上的 SR 节点,强烈建议使用以下优化的 Java 启动命令。这些配置旨在确保区块生产的最大稳定性和效率。请执行与您的环境相对应的命令: #### 选项 1:JDK 8(x86_64 架构) @@ -338,7 +345,7 @@ node.backup { 2. 将其解压至 `tron` 项目的 `output-directory` 目录下。 3. 启动节点,节点将在数据快照的基础上继续同步。 -### 使用 Keystore + 密码指定超级代表账户私钥 +### 使用 Keystore + 密码指定超级代表账户私钥 { #keystore-password } 为了避免以明文方式在配置文件中指定私钥,您可以选择使用 `keystore` 文件和密码的方式。 From 4c3dc7f453bd2056bee7cb757c6f4e43e973f7f7 Mon Sep 17 00:00:00 2001 From: Leem Date: Sat, 20 Jun 2026 12:46:49 +0800 Subject: [PATCH 2/4] Add source-derived API specs --- docs/api/index.md | 1 + docs/api/interface-definitions.md | 37 + docs/api/openapi.yaml | 7956 +++++++++++++++++ docs/api/openrpc.json | 1493 ++++ .../specs/http/accountpermissionupdate.yaml | 74 + docs/api/specs/http/broadcasthex.yaml | 52 + docs/api/specs/http/broadcasttransaction.yaml | 65 + docs/api/specs/http/cancelallunfreezev2.yaml | 63 + docs/api/specs/http/clearabi.yaml | 65 + docs/api/specs/http/createaccount.yaml | 68 + docs/api/specs/http/createassetissue.yaml | 102 + docs/api/specs/http/createtransaction.yaml | 69 + docs/api/specs/http/createwitness.yaml | 65 + docs/api/specs/http/delegateresource.yaml | 74 + docs/api/specs/http/deploycontract.yaml | 87 + docs/api/specs/http/estimateenergy.yaml | 73 + docs/api/specs/http/freezebalance.yaml | 72 + docs/api/specs/http/freezebalancev2.yaml | 68 + docs/api/specs/http/getBrokerage.yaml | 82 + docs/api/specs/http/getReward.yaml | 82 + docs/api/specs/http/getaccount.yaml | 289 + docs/api/specs/http/getaccountbalance.yaml | 57 + docs/api/specs/http/getaccountnet.yaml | 115 + docs/api/specs/http/getaccountresource.yaml | 150 + docs/api/specs/http/getapprovedlist.yaml | 85 + .../specs/http/getassetissuebyaccount.yaml | 101 + docs/api/specs/http/getassetissuebyid.yaml | 176 + docs/api/specs/http/getassetissuebyname.yaml | 176 + docs/api/specs/http/getassetissuelist.yaml | 92 + .../specs/http/getassetissuelistbyname.yaml | 104 + .../specs/http/getavailableunfreezecount.yaml | 108 + docs/api/specs/http/getbandwidthprices.yaml | 74 + docs/api/specs/http/getblock.yaml | 120 + docs/api/specs/http/getblockbalance.yaml | 60 + docs/api/specs/http/getblockbyid.yaml | 113 + docs/api/specs/http/getblockbylatestnum.yaml | 107 + docs/api/specs/http/getblockbylimitnext.yaml | 116 + docs/api/specs/http/getblockbynum.yaml | 113 + docs/api/specs/http/getburntrx.yaml | 66 + .../specs/http/getcandelegatedmaxsize.yaml | 110 + .../http/getcanwithdrawunfreezeamount.yaml | 110 + docs/api/specs/http/getchainparameters.yaml | 78 + docs/api/specs/http/getcontract.yaml | 139 + docs/api/specs/http/getcontractinfo.yaml | 109 + docs/api/specs/http/getdelegatedresource.yaml | 116 + .../getdelegatedresourceaccountindex.yaml | 121 + .../getdelegatedresourceaccountindexv2.yaml | 121 + .../specs/http/getdelegatedresourcev2.yaml | 116 + docs/api/specs/http/getenergyprices.yaml | 74 + .../specs/http/getnextmaintenancetime.yaml | 82 + docs/api/specs/http/getnodeinfo.yaml | 122 + docs/api/specs/http/getnowblock.yaml | 98 + .../http/getpaginatedassetissuelist.yaml | 116 + .../http/getpaginatednowwitnesslist.yaml | 116 + .../specs/http/getpaginatedproposallist.yaml | 112 + docs/api/specs/http/getpendingsize.yaml | 62 + docs/api/specs/http/getproposalbyid.yaml | 120 + docs/api/specs/http/getsignweight.yaml | 90 + docs/api/specs/http/gettransactionbyid.yaml | 121 + .../http/gettransactioncountbyblocknum.yaml | 86 + .../specs/http/gettransactionfrompending.yaml | 119 + .../http/gettransactioninfobyblocknum.yaml | 219 + .../specs/http/gettransactioninfobyid.yaml | 213 + .../http/gettransactionlistfrompending.yaml | 86 + docs/api/specs/http/listnodes.yaml | 88 + docs/api/specs/http/listproposals.yaml | 88 + docs/api/specs/http/listwitnesses.yaml | 92 + .../api/specs/http/participateassetissue.yaml | 69 + docs/api/specs/http/proposalapprove.yaml | 67 + docs/api/specs/http/proposalcreate.yaml | 63 + docs/api/specs/http/proposaldelete.yaml | 65 + docs/api/specs/http/transferasset.yaml | 71 + .../specs/http/triggerconstantcontract.yaml | 116 + docs/api/specs/http/triggersmartcontract.yaml | 114 + docs/api/specs/http/undelegateresource.yaml | 70 + docs/api/specs/http/unfreezeasset.yaml | 63 + docs/api/specs/http/unfreezebalance.yaml | 68 + docs/api/specs/http/unfreezebalancev2.yaml | 68 + docs/api/specs/http/updateBrokerage.yaml | 65 + docs/api/specs/http/updateaccount.yaml | 65 + docs/api/specs/http/updateasset.yaml | 71 + docs/api/specs/http/updateenergylimit.yaml | 67 + docs/api/specs/http/updatesetting.yaml | 67 + docs/api/specs/http/updatewitness.yaml | 65 + docs/api/specs/http/validateaddress.yaml | 81 + docs/api/specs/http/votewitnessaccount.yaml | 70 + docs/api/specs/http/withdrawbalance.yaml | 63 + .../specs/http/withdrawexpireunfreeze.yaml | 63 + docs/api/specs/json-rpc/buildTransaction.json | 59 + docs/api/specs/json-rpc/eth_accounts.json | 29 + docs/api/specs/json-rpc/eth_blockNumber.json | 26 + docs/api/specs/json-rpc/eth_call.json | 60 + docs/api/specs/json-rpc/eth_chainId.json | 26 + docs/api/specs/json-rpc/eth_coinbase.json | 32 + docs/api/specs/json-rpc/eth_estimateGas.json | 53 + docs/api/specs/json-rpc/eth_gasPrice.json | 26 + docs/api/specs/json-rpc/eth_getBalance.json | 51 + .../specs/json-rpc/eth_getBlockByHash.json | 52 + .../specs/json-rpc/eth_getBlockByNumber.json | 52 + .../specs/json-rpc/eth_getBlockReceipts.json | 51 + .../eth_getBlockTransactionCountByHash.json | 42 + .../eth_getBlockTransactionCountByNumber.json | 42 + docs/api/specs/json-rpc/eth_getCode.json | 51 + .../specs/json-rpc/eth_getFilterChanges.json | 53 + .../api/specs/json-rpc/eth_getFilterLogs.json | 76 + docs/api/specs/json-rpc/eth_getLogs.json | 77 + docs/api/specs/json-rpc/eth_getStorageAt.json | 60 + ...eth_getTransactionByBlockHashAndIndex.json | 52 + ...h_getTransactionByBlockNumberAndIndex.json | 52 + .../json-rpc/eth_getTransactionByHash.json | 43 + .../json-rpc/eth_getTransactionReceipt.json | 43 + docs/api/specs/json-rpc/eth_getWork.json | 27 + .../specs/json-rpc/eth_newBlockFilter.json | 37 + docs/api/specs/json-rpc/eth_newFilter.json | 48 + .../specs/json-rpc/eth_protocolVersion.json | 26 + docs/api/specs/json-rpc/eth_syncing.json | 25 + .../specs/json-rpc/eth_uninstallFilter.json | 52 + docs/api/specs/json-rpc/net_listening.json | 26 + docs/api/specs/json-rpc/net_peerCount.json | 26 + docs/api/specs/json-rpc/net_version.json | 26 + .../specs/json-rpc/web3_clientVersion.json | 26 + docs/api/specs/json-rpc/web3_sha3.json | 42 + mkdocs.yml | 1 + scripts/generate_api_specs.py | 1289 +++ 124 files changed, 20264 insertions(+) create mode 100644 docs/api/interface-definitions.md create mode 100644 docs/api/openapi.yaml create mode 100644 docs/api/openrpc.json create mode 100644 docs/api/specs/http/accountpermissionupdate.yaml create mode 100644 docs/api/specs/http/broadcasthex.yaml create mode 100644 docs/api/specs/http/broadcasttransaction.yaml create mode 100644 docs/api/specs/http/cancelallunfreezev2.yaml create mode 100644 docs/api/specs/http/clearabi.yaml create mode 100644 docs/api/specs/http/createaccount.yaml create mode 100644 docs/api/specs/http/createassetissue.yaml create mode 100644 docs/api/specs/http/createtransaction.yaml create mode 100644 docs/api/specs/http/createwitness.yaml create mode 100644 docs/api/specs/http/delegateresource.yaml create mode 100644 docs/api/specs/http/deploycontract.yaml create mode 100644 docs/api/specs/http/estimateenergy.yaml create mode 100644 docs/api/specs/http/freezebalance.yaml create mode 100644 docs/api/specs/http/freezebalancev2.yaml create mode 100644 docs/api/specs/http/getBrokerage.yaml create mode 100644 docs/api/specs/http/getReward.yaml create mode 100644 docs/api/specs/http/getaccount.yaml create mode 100644 docs/api/specs/http/getaccountbalance.yaml create mode 100644 docs/api/specs/http/getaccountnet.yaml create mode 100644 docs/api/specs/http/getaccountresource.yaml create mode 100644 docs/api/specs/http/getapprovedlist.yaml create mode 100644 docs/api/specs/http/getassetissuebyaccount.yaml create mode 100644 docs/api/specs/http/getassetissuebyid.yaml create mode 100644 docs/api/specs/http/getassetissuebyname.yaml create mode 100644 docs/api/specs/http/getassetissuelist.yaml create mode 100644 docs/api/specs/http/getassetissuelistbyname.yaml create mode 100644 docs/api/specs/http/getavailableunfreezecount.yaml create mode 100644 docs/api/specs/http/getbandwidthprices.yaml create mode 100644 docs/api/specs/http/getblock.yaml create mode 100644 docs/api/specs/http/getblockbalance.yaml create mode 100644 docs/api/specs/http/getblockbyid.yaml create mode 100644 docs/api/specs/http/getblockbylatestnum.yaml create mode 100644 docs/api/specs/http/getblockbylimitnext.yaml create mode 100644 docs/api/specs/http/getblockbynum.yaml create mode 100644 docs/api/specs/http/getburntrx.yaml create mode 100644 docs/api/specs/http/getcandelegatedmaxsize.yaml create mode 100644 docs/api/specs/http/getcanwithdrawunfreezeamount.yaml create mode 100644 docs/api/specs/http/getchainparameters.yaml create mode 100644 docs/api/specs/http/getcontract.yaml create mode 100644 docs/api/specs/http/getcontractinfo.yaml create mode 100644 docs/api/specs/http/getdelegatedresource.yaml create mode 100644 docs/api/specs/http/getdelegatedresourceaccountindex.yaml create mode 100644 docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml create mode 100644 docs/api/specs/http/getdelegatedresourcev2.yaml create mode 100644 docs/api/specs/http/getenergyprices.yaml create mode 100644 docs/api/specs/http/getnextmaintenancetime.yaml create mode 100644 docs/api/specs/http/getnodeinfo.yaml create mode 100644 docs/api/specs/http/getnowblock.yaml create mode 100644 docs/api/specs/http/getpaginatedassetissuelist.yaml create mode 100644 docs/api/specs/http/getpaginatednowwitnesslist.yaml create mode 100644 docs/api/specs/http/getpaginatedproposallist.yaml create mode 100644 docs/api/specs/http/getpendingsize.yaml create mode 100644 docs/api/specs/http/getproposalbyid.yaml create mode 100644 docs/api/specs/http/getsignweight.yaml create mode 100644 docs/api/specs/http/gettransactionbyid.yaml create mode 100644 docs/api/specs/http/gettransactioncountbyblocknum.yaml create mode 100644 docs/api/specs/http/gettransactionfrompending.yaml create mode 100644 docs/api/specs/http/gettransactioninfobyblocknum.yaml create mode 100644 docs/api/specs/http/gettransactioninfobyid.yaml create mode 100644 docs/api/specs/http/gettransactionlistfrompending.yaml create mode 100644 docs/api/specs/http/listnodes.yaml create mode 100644 docs/api/specs/http/listproposals.yaml create mode 100644 docs/api/specs/http/listwitnesses.yaml create mode 100644 docs/api/specs/http/participateassetissue.yaml create mode 100644 docs/api/specs/http/proposalapprove.yaml create mode 100644 docs/api/specs/http/proposalcreate.yaml create mode 100644 docs/api/specs/http/proposaldelete.yaml create mode 100644 docs/api/specs/http/transferasset.yaml create mode 100644 docs/api/specs/http/triggerconstantcontract.yaml create mode 100644 docs/api/specs/http/triggersmartcontract.yaml create mode 100644 docs/api/specs/http/undelegateresource.yaml create mode 100644 docs/api/specs/http/unfreezeasset.yaml create mode 100644 docs/api/specs/http/unfreezebalance.yaml create mode 100644 docs/api/specs/http/unfreezebalancev2.yaml create mode 100644 docs/api/specs/http/updateBrokerage.yaml create mode 100644 docs/api/specs/http/updateaccount.yaml create mode 100644 docs/api/specs/http/updateasset.yaml create mode 100644 docs/api/specs/http/updateenergylimit.yaml create mode 100644 docs/api/specs/http/updatesetting.yaml create mode 100644 docs/api/specs/http/updatewitness.yaml create mode 100644 docs/api/specs/http/validateaddress.yaml create mode 100644 docs/api/specs/http/votewitnessaccount.yaml create mode 100644 docs/api/specs/http/withdrawbalance.yaml create mode 100644 docs/api/specs/http/withdrawexpireunfreeze.yaml create mode 100644 docs/api/specs/json-rpc/buildTransaction.json create mode 100644 docs/api/specs/json-rpc/eth_accounts.json create mode 100644 docs/api/specs/json-rpc/eth_blockNumber.json create mode 100644 docs/api/specs/json-rpc/eth_call.json create mode 100644 docs/api/specs/json-rpc/eth_chainId.json create mode 100644 docs/api/specs/json-rpc/eth_coinbase.json create mode 100644 docs/api/specs/json-rpc/eth_estimateGas.json create mode 100644 docs/api/specs/json-rpc/eth_gasPrice.json create mode 100644 docs/api/specs/json-rpc/eth_getBalance.json create mode 100644 docs/api/specs/json-rpc/eth_getBlockByHash.json create mode 100644 docs/api/specs/json-rpc/eth_getBlockByNumber.json create mode 100644 docs/api/specs/json-rpc/eth_getBlockReceipts.json create mode 100644 docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json create mode 100644 docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json create mode 100644 docs/api/specs/json-rpc/eth_getCode.json create mode 100644 docs/api/specs/json-rpc/eth_getFilterChanges.json create mode 100644 docs/api/specs/json-rpc/eth_getFilterLogs.json create mode 100644 docs/api/specs/json-rpc/eth_getLogs.json create mode 100644 docs/api/specs/json-rpc/eth_getStorageAt.json create mode 100644 docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json create mode 100644 docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json create mode 100644 docs/api/specs/json-rpc/eth_getTransactionByHash.json create mode 100644 docs/api/specs/json-rpc/eth_getTransactionReceipt.json create mode 100644 docs/api/specs/json-rpc/eth_getWork.json create mode 100644 docs/api/specs/json-rpc/eth_newBlockFilter.json create mode 100644 docs/api/specs/json-rpc/eth_newFilter.json create mode 100644 docs/api/specs/json-rpc/eth_protocolVersion.json create mode 100644 docs/api/specs/json-rpc/eth_syncing.json create mode 100644 docs/api/specs/json-rpc/eth_uninstallFilter.json create mode 100644 docs/api/specs/json-rpc/net_listening.json create mode 100644 docs/api/specs/json-rpc/net_peerCount.json create mode 100644 docs/api/specs/json-rpc/net_version.json create mode 100644 docs/api/specs/json-rpc/web3_clientVersion.json create mode 100644 docs/api/specs/json-rpc/web3_sha3.json create mode 100644 scripts/generate_api_specs.py diff --git a/docs/api/index.md b/docs/api/index.md index 43e8f38e..bce3a190 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -22,3 +22,4 @@ java-tron 节点对外暴露三套 API。它们底层能力大体一致,区别 - [HTTP 接口参考](http/index.md) —— `/wallet/*` 与 `/walletsolidity/*`(部分支持)下的端点,按功能模块组织 - [JSON-RPC 接口参考](json-rpc/index.md) —— `eth_*` / `net_*` / `web3_*` 方法以及 Tron 专属的 `buildTransaction`,按功能模块组织 - [gRPC 接口参考](rpc/index.md) —— `protocol.Wallet` / `protocol.WalletSolidity`(部分支持)方法,按功能模块组织 +- [机器可读 API 定义](interface-definitions.md) —— HTTP 的 OpenAPI 定义以及 JSON-RPC 的 OpenRPC 定义 diff --git a/docs/api/interface-definitions.md b/docs/api/interface-definitions.md new file mode 100644 index 00000000..f69875d2 --- /dev/null +++ b/docs/api/interface-definitions.md @@ -0,0 +1,37 @@ +# 机器可读 API 定义 + +本仓库发布机器可读 API 定义,便于工具集成、SDK 生成和 AI agent 使用: + +| API 类型 | 格式 | 文件 | +|---|---|---| +| HTTP API | OpenAPI 3.1 | [`openapi.yaml`](openapi.yaml) | +| JSON-RPC API | OpenRPC 1.2.6 | [`openrpc.json`](openrpc.json) | + +每个接口对应的生成片段也会保留,方便审阅: + +| API 类型 | 片段目录 | +|---|---| +| HTTP API | [`specs/http/`](specs/http/) | +| JSON-RPC API | [`specs/json-rpc/`](specs/json-rpc/) | + +java-tron API 源码变更后,可执行以下命令重新生成: + +```bash +python3 scripts/generate_api_specs.py +``` + +生成脚本需要本地存在一份 java-tron 代码仓库。默认会从当前文档仓库相邻的 `../java-tron` 查找,也可以显式设置 `JAVA_TRON_SOURCE`: + +```bash +JAVA_TRON_SOURCE=/path/to/java-tron python3 scripts/generate_api_specs.py +``` + +生成的接口列表来自源码: + +- HTTP 路径、HTTP 方法、servlet 类、Solidity 端点映射以及请求消息提示来自 java-tron 源码树。 +- JSON-RPC 方法名、Java 参数名称/类型、返回类型以及声明的错误码来自 `TronJsonRpc.java`。 +- Markdown API 页面仅用于读取面向人的摘要、说明和外部文档链接。 + +默认情况下,生成脚本会确保发布的定义与文档化 API 范围保持一致。如果文档中的 HTTP 路径或 JSON-RPC 方法已不存在于 java-tron 源码中,生成过程会失败,而不是静默产出过期定义。 + +顶层 `openapi.yaml` 和 `openrpc.json` 由各接口片段汇总生成,方便工具直接消费一个标准文件。 diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml new file mode 100644 index 00000000..188d4aca --- /dev/null +++ b/docs/api/openapi.yaml @@ -0,0 +1,7956 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"openapi": "3.1.0" +"info": + "title": "java-tron HTTP API" + "version": "1.0.0" + "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation." +"servers": + - + "url": "https://nile.trongrid.io" + "description": "Nile testnet TronGrid" + - + "url": "http://127.0.0.1:8090" + "description": "Local FullNode HTTP API" +"paths": + "/wallet/getaccount": + "get": + "tags": + - "Account" + "summary": "Query an account by address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." + "operationId": "wallet_getaccount_get" + "externalDocs": + "url": "docs/api/http/account/getaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_name": + "type": "string" + "type": + "type": "object" + "additionalProperties": true + "address": + "type": "string" + "balance": + "type": "integer" + "votes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozen": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "net_usage": + "type": "integer" + "acquired_delegated_frozen_balance_for_bandwidth": + "type": "integer" + "delegated_frozen_balance_for_bandwidth": + "type": "integer" + "old_tron_power": + "type": "integer" + "tron_power": + "type": "object" + "additionalProperties": true + "asset_optimized": + "type": "boolean" + "create_time": + "type": "integer" + "latest_opration_time": + "type": "integer" + "allowance": + "type": "integer" + "latest_withdraw_time": + "type": "integer" + "code": + "type": "string" + "is_witness": + "type": "boolean" + "is_committee": + "type": "boolean" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "asset_issued_name": + "type": "string" + "asset_issued_ID": + "type": "string" + "free_net_usage": + "type": "integer" + "latest_consume_time": + "type": "integer" + "latest_consume_free_time": + "type": "integer" + "account_id": + "type": "string" + "net_window_size": + "type": "integer" + "net_window_optimized": + "type": "boolean" + "account_resource": + "type": "object" + "additionalProperties": true + "codeHash": + "type": "string" + "owner_permission": + "type": "object" + "additionalProperties": true + "witness_permission": + "type": "object" + "additionalProperties": true + "active_permission": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "unfrozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "acquired_delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "x-proto-message": "Account" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Account" + "x-java-response": "Account rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getaccount" + "x-solidity-servlet": "GetAccountOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Query an account by address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." + "operationId": "wallet_getaccount_post" + "externalDocs": + "url": "docs/api/http/account/getaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_name": + "type": "string" + "type": + "type": "object" + "additionalProperties": true + "address": + "type": "string" + "balance": + "type": "integer" + "votes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozen": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "net_usage": + "type": "integer" + "acquired_delegated_frozen_balance_for_bandwidth": + "type": "integer" + "delegated_frozen_balance_for_bandwidth": + "type": "integer" + "old_tron_power": + "type": "integer" + "tron_power": + "type": "object" + "additionalProperties": true + "asset_optimized": + "type": "boolean" + "create_time": + "type": "integer" + "latest_opration_time": + "type": "integer" + "allowance": + "type": "integer" + "latest_withdraw_time": + "type": "integer" + "code": + "type": "string" + "is_witness": + "type": "boolean" + "is_committee": + "type": "boolean" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "asset_issued_name": + "type": "string" + "asset_issued_ID": + "type": "string" + "free_net_usage": + "type": "integer" + "latest_consume_time": + "type": "integer" + "latest_consume_free_time": + "type": "integer" + "account_id": + "type": "string" + "net_window_size": + "type": "integer" + "net_window_optimized": + "type": "boolean" + "account_resource": + "type": "object" + "additionalProperties": true + "codeHash": + "type": "string" + "owner_permission": + "type": "object" + "additionalProperties": true + "witness_permission": + "type": "object" + "additionalProperties": true + "active_permission": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "unfrozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "acquired_delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "x-proto-message": "Account" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Account" + "x-java-response": "Account rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getaccount" + "x-solidity-servlet": "GetAccountOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" + "/wallet/getaccountbalance": + "post": + "tags": + - "Account" + "summary": "Query an account's balance at a specific block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountbalance.md` for examples and detailed behavior." + "operationId": "wallet_getaccountbalance_post" + "externalDocs": + "url": "docs/api/http/account/getaccountbalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "balance": + "type": "integer" + "block_identifier": + "type": "object" + "additionalProperties": true + "x-proto-message": "AccountBalanceResponse" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-java-response-type": "BalanceContract.AccountBalanceResponse" + "x-java-response": "AccountBalanceResponse rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_identifier": + "type": "object" + "additionalProperties": true + "block_identifier": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "x-proto-message": "AccountBalanceRequest" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "AccountBalanceRequest" + "/wallet/getaccountnet": + "get": + "tags": + - "Account" + "summary": "Query an account's bandwidth resources" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." + "operationId": "wallet_getaccountnet_get" + "externalDocs": + "url": "docs/api/http/account/getaccountnet.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "x-proto-message": "AccountNetMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" + "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountNetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Query an account's bandwidth resources" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." + "operationId": "wallet_getaccountnet_post" + "externalDocs": + "url": "docs/api/http/account/getaccountnet.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "x-proto-message": "AccountNetMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" + "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountNetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" + "/wallet/getaccountresource": + "get": + "tags": + - "Account" + "summary": "Query bandwidth + energy + TronPower" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." + "operationId": "wallet_getaccountresource_get" + "externalDocs": + "url": "docs/api/http/account/getaccountresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "TotalTronPowerWeight": + "type": "integer" + "tronPowerUsed": + "type": "integer" + "tronPowerLimit": + "type": "integer" + "EnergyUsed": + "type": "integer" + "EnergyLimit": + "type": "integer" + "TotalEnergyLimit": + "type": "integer" + "TotalEnergyWeight": + "type": "integer" + "storageUsed": + "type": "integer" + "storageLimit": + "type": "integer" + "x-proto-message": "AccountResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" + "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Query bandwidth + energy + TronPower" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." + "operationId": "wallet_getaccountresource_post" + "externalDocs": + "url": "docs/api/http/account/getaccountresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "TotalTronPowerWeight": + "type": "integer" + "tronPowerUsed": + "type": "integer" + "tronPowerLimit": + "type": "integer" + "EnergyUsed": + "type": "integer" + "EnergyLimit": + "type": "integer" + "TotalEnergyLimit": + "type": "integer" + "TotalEnergyWeight": + "type": "integer" + "storageUsed": + "type": "integer" + "storageLimit": + "type": "integer" + "x-proto-message": "AccountResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" + "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" + "/wallet/createaccount": + "post": + "tags": + - "Account" + "summary": "Create an on-chain account (costs 1 TRX)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/createaccount.md` for examples and detailed behavior." + "operationId": "wallet_createaccount_post" + "externalDocs": + "url": "docs/api/http/account/createaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CreateAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "account_address": + "type": "string" + "type": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AccountCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountCreateContract" + "/wallet/updateaccount": + "post": + "tags": + - "Account" + "summary": "Update an account's name" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/updateaccount.md` for examples and detailed behavior." + "operationId": "wallet_updateaccount_post" + "externalDocs": + "url": "docs/api/http/account/updateaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_name": + "type": "string" + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AccountUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountUpdateContract" + "/wallet/accountpermissionupdate": + "post": + "tags": + - "Account" + "summary": "Configure multi-sig permissions" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/accountpermissionupdate.md` for examples and detailed behavior." + "operationId": "wallet_accountpermissionupdate_post" + "externalDocs": + "url": "docs/api/http/account/accountpermissionupdate.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "AccountPermissionUpdateServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "owner": + "type": "object" + "additionalProperties": true + "witness": + "type": "object" + "additionalProperties": true + "actives": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AccountPermissionUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountPermissionUpdateContract" + "/wallet/validateaddress": + "get": + "tags": + - "Account" + "summary": "Validate an address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." + "operationId": "wallet_validateaddress_get" + "externalDocs": + "url": "docs/api/http/account/validateaddress.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "message": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ValidateAddressServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Validate an address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." + "operationId": "wallet_validateaddress_post" + "externalDocs": + "url": "docs/api/http/account/validateaddress.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "message": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ValidateAddressServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "x-source-shape": "servlet-json-fields" + "/wallet/getnowblock": + "get": + "tags": + - "Block / transaction query" + "summary": "Latest block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." + "operationId": "wallet_getnowblock_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNowBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnowblock" + "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Latest block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." + "operationId": "wallet_getnowblock_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNowBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnowblock" + "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/getblock": + "get": + "tags": + - "Block / transaction query" + "summary": "Generic block query (by num or hash)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." + "operationId": "wallet_getblock_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblock" + "x-solidity-servlet": "GetBlockOnSolidityServlet" + "parameters": + - + "name": "id_or_num" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "detail" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Generic block query (by num or hash)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." + "operationId": "wallet_getblock_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblock" + "x-solidity-servlet": "GetBlockOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id_or_num": + "type": "string" + "detail": + "type": "boolean" + "x-proto-message": "BlockReq" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BlockReq" + "/wallet/getblockbynum": + "get": + "tags": + - "Block / transaction query" + "summary": "Block by height" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbynum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbynum" + "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Block by height" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbynum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbynum" + "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "/wallet/getblockbyid": + "get": + "tags": + - "Block / transaction query" + "summary": "Block by hash" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." + "operationId": "wallet_getblockbyid_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbyid" + "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Block by hash" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." + "operationId": "wallet_getblockbyid_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbyid" + "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/getblockbylimitnext": + "get": + "tags": + - "Block / transaction query" + "summary": "Blocks in a range" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylimitnext_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLimitNextServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" + "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "parameters": + - + "name": "startNum" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "endNum" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Blocks in a range" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylimitnext_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLimitNextServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" + "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "startNum": + "type": "integer" + "endNum": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "BlockLimit" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BlockLimit" + "/wallet/getblockbylatestnum": + "get": + "tags": + - "Block / transaction query" + "summary": "The most recent N blocks" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylatestnum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLatestNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" + "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "The most recent N blocks" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylatestnum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLatestNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" + "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "/wallet/getblockbalance": + "post": + "tags": + - "Block / transaction query" + "summary": "Per-account balance changes within a block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbalance.md` for examples and detailed behavior." + "operationId": "wallet_getblockbalance_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block_identifier": + "type": "object" + "additionalProperties": true + "timestamp": + "type": "integer" + "transaction_balance_trace": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockBalanceTrace" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-java-response-type": "org.tron.protos.contract.BalanceContract.BlockBalanceTrace" + "x-java-response": "BlockBalanceTrace rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "hash": + "type": "string" + "number": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "BlockIdentifier" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "BlockIdentifier" + "/wallet/gettransactioncountbyblocknum": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction count in a block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioncountbyblocknum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionCountByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" + "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction count in a block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioncountbyblocknum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionCountByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" + "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "/wallet/gettransactionbyid": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionbyid_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "signature": + "type": "array" + "items": + "type": "string" + "ret": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "Transaction" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Transaction" + "x-java-response": "Transaction rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" + "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionbyid_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "signature": + "type": "array" + "items": + "type": "string" + "ret": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "Transaction" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Transaction" + "x-java-response": "Transaction rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" + "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/gettransactioninfobyid": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction receipt by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyid_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" + "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction receipt by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyid_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" + "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/gettransactioninfobyblocknum": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction receipts by block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyblocknum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" + "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction receipts by block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyblocknum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" + "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "/wallet/getpendingsize": + "get": + "tags": + - "Block / transaction query" + "summary": "Pending pool size" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." + "operationId": "wallet_getpendingsize_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "pendingSize": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPendingSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + [] + "post": + "tags": + - "Block / transaction query" + "summary": "Pending pool size" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." + "operationId": "wallet_getpendingsize_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "pendingSize": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPendingSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + [] + "/wallet/gettransactionfrompending": + "get": + "tags": + - "Block / transaction query" + "summary": "Single pending transaction" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionfrompending_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Single pending transaction" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionfrompending_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/gettransactionlistfrompending": + "get": + "tags": + - "Block / transaction query" + "summary": "All pending transaction IDs" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionlistfrompending_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txId": + "type": "array" + "items": + "type": "string" + "x-proto-message": "TransactionIdList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" + "x-java-response": "TransactionIdList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionListFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "All pending transaction IDs" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionlistfrompending_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txId": + "type": "array" + "items": + "type": "string" + "x-proto-message": "TransactionIdList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" + "x-java-response": "TransactionIdList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionListFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/createtransaction": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Build a TRX transfer transaction" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/createtransaction.md` for examples and detailed behavior." + "operationId": "wallet_createtransaction_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/createtransaction.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TransferServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "to_address": + "type": "string" + "amount": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "extra_data": + "type": "string" + "x-proto-message": "TransferContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.TransferContract" + "/wallet/getsignweight": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Current multi-sig weight" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getsignweight.md` for examples and detailed behavior." + "operationId": "wallet_getsignweight_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/getsignweight.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "object" + "additionalProperties": true + "approved_list": + "type": "array" + "items": + "type": "string" + "current_weight": + "type": "integer" + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "permission": + "type": "object" + "additionalProperties": true + "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionSignWeightServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "oneOf": + - + "required": + - "raw_data" + - + "required": + - "raw_data_hex" + "x-source-shape": "transaction-json" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "/wallet/getapprovedlist": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Addresses that have already signed" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getapprovedlist.md` for examples and detailed behavior." + "operationId": "wallet_getapprovedlist_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/getapprovedlist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "object" + "additionalProperties": true + "approved_list": + "type": "array" + "items": + "type": "string" + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionApprovedListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "oneOf": + - + "required": + - "raw_data" + - + "required": + - "raw_data_hex" + "x-source-shape": "transaction-json" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "/wallet/broadcasttransaction": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Broadcast a signed transaction (JSON)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasttransaction.md` for examples and detailed behavior." + "operationId": "wallet_broadcasttransaction_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/broadcasttransaction.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "BroadcastServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "oneOf": + - + "required": + - "raw_data" + - + "required": + - "raw_data_hex" + "x-source-shape": "transaction-json" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "/wallet/broadcasthex": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Broadcast a signed transaction (hex)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasthex.md` for examples and detailed behavior." + "operationId": "wallet_broadcasthex_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/broadcasthex.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "transaction": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "BroadcastHexServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transaction": + "type": "string" + "required": + - "transaction" + "x-source-shape": "servlet-json-fields" + "/wallet/createassetissue": + "post": + "tags": + - "TRC10 asset" + "summary": "Issue a TRC10 token" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/createassetissue.md` for examples and detailed behavior." + "operationId": "wallet_createassetissue_post" + "externalDocs": + "url": "docs/api/http/asset/createassetissue.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CreateAssetIssueServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "/wallet/updateasset": + "post": + "tags": + - "TRC10 asset" + "summary": "Update a TRC10's description / URL / limits" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/updateasset.md` for examples and detailed behavior." + "operationId": "wallet_updateasset_post" + "externalDocs": + "url": "docs/api/http/asset/updateasset.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateAssetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "description": + "type": "string" + "url": + "type": "string" + "new_limit": + "type": "integer" + "new_public_limit": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UpdateAssetContract" + "/wallet/transferasset": + "post": + "tags": + - "TRC10 asset" + "summary": "Transfer TRC10" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/transferasset.md` for examples and detailed behavior." + "operationId": "wallet_transferasset_post" + "externalDocs": + "url": "docs/api/http/asset/transferasset.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TransferAssetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "asset_name": + "type": "string" + "owner_address": + "type": "string" + "to_address": + "type": "string" + "amount": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "extra_data": + "type": "string" + "x-proto-message": "TransferAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.TransferAssetContract" + "/wallet/participateassetissue": + "post": + "tags": + - "TRC10 asset" + "summary": "Participate in a TRC10 fundraising" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/participateassetissue.md` for examples and detailed behavior." + "operationId": "wallet_participateassetissue_post" + "externalDocs": + "url": "docs/api/http/asset/participateassetissue.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ParticipateAssetIssueServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "to_address": + "type": "string" + "asset_name": + "type": "string" + "amount": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ParticipateAssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.ParticipateAssetIssueContract" + "/wallet/unfreezeasset": + "post": + "tags": + - "TRC10 asset" + "summary": "Unfreeze TRC10 frozen by the issuer" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/unfreezeasset.md` for examples and detailed behavior." + "operationId": "wallet_unfreezeasset_post" + "externalDocs": + "url": "docs/api/http/asset/unfreezeasset.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnFreezeAssetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnfreezeAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UnfreezeAssetContract" + "/wallet/getassetissuebyid": + "get": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by id (recommended)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyid_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" + "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by id (recommended)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyid_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" + "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" + "/wallet/getassetissuebyname": + "get": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by name (errors on duplicates)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyname_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" + "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by name (errors on duplicates)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyname_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" + "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" + "/wallet/getassetissuelistbyname": + "get": + "tags": + - "TRC10 asset" + "summary": "All TRC10s with a given name" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelistbyname_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelistbyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" + "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "All TRC10s with a given name" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelistbyname_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelistbyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" + "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" + "/wallet/getassetissuebyaccount": + "get": + "tags": + - "TRC10 asset" + "summary": "TRC10s issued by an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyaccount_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "TRC10s issued by an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyaccount_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" + "/wallet/getassetissuelist": + "get": + "tags": + - "TRC10 asset" + "summary": "All TRC10s on the network" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelist_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelist" + "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "All TRC10s on the network" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelist_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelist" + "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/getpaginatedassetissuelist": + "get": + "tags": + - "TRC10 asset" + "summary": "Paginated TRC10 list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedassetissuelist_get" + "externalDocs": + "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" + "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "parameters": + - + "name": "offset" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "limit" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "Paginated TRC10 list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedassetissuelist_post" + "externalDocs": + "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" + "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "offset": + "type": "integer" + "limit": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "/wallet/deploycontract": + "post": + "tags": + - "Smart contract" + "summary": "Deploy a contract" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/deploycontract.md` for examples and detailed behavior." + "operationId": "wallet_deploycontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/deploycontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "DeployContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "new_contract": + "type": "object" + "additionalProperties": true + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "abi": + "type": "object" + "additionalProperties": true + "bytecode": + "type": "string" + "parameter": + "type": "string" + "name": + "type": "string" + "call_value": + "type": "integer" + "consume_user_resource_percent": + "type": "integer" + "origin_energy_limit": + "type": "integer" + "fee_limit": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "CreateSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.CreateSmartContract" + "/wallet/triggersmartcontract": + "post": + "tags": + - "Smart contract" + "summary": "Trigger a contract (write)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggersmartcontract.md` for examples and detailed behavior." + "operationId": "wallet_triggersmartcontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/triggersmartcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "txid": + "type": "string" + "constant_result": + "type": "array" + "items": + "type": "string" + "result": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "energy_used": + "type": "integer" + "logs": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "energy_penalty": + "type": "integer" + "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TriggerSmartContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "call_value": + "type": "integer" + "data": + "type": "string" + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "fee_limit": + "type": "integer" + "function_selector": + "type": "string" + "parameter": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "/wallet/triggerconstantcontract": + "post": + "tags": + - "Smart contract" + "summary": "Read-only contract call" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggerconstantcontract.md` for examples and detailed behavior." + "operationId": "wallet_triggerconstantcontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/triggerconstantcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "txid": + "type": "string" + "constant_result": + "type": "array" + "items": + "type": "string" + "result": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "energy_used": + "type": "integer" + "logs": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "energy_penalty": + "type": "integer" + "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TriggerConstantContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/triggerconstantcontract" + "x-solidity-servlet": "TriggerConstantContractOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "call_value": + "type": "integer" + "data": + "type": "string" + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "function_selector": + "type": "string" + "parameter": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "extra_data": + "type": "string" + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "/wallet/estimateenergy": + "post": + "tags": + - "Smart contract" + "summary": "Estimate energy usage of a call" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/estimateenergy.md` for examples and detailed behavior." + "operationId": "wallet_estimateenergy_post" + "externalDocs": + "url": "docs/api/http/smart-contract/estimateenergy.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "energy_required": + "type": "integer" + "x-java-response": "EstimateEnergyMessage rendered by Util.printEstimateEnergyMessage" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "EstimateEnergyServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/estimateenergy" + "x-solidity-servlet": "EstimateEnergyOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "call_value": + "type": "integer" + "data": + "type": "string" + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "function_selector": + "type": "string" + "parameter": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "/wallet/getcontract": + "get": + "tags": + - "Smart contract" + "summary": "Contract metadata" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." + "operationId": "wallet_getcontract_get" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "origin_address": + "type": "string" + "contract_address": + "type": "string" + "abi": + "type": "object" + "additionalProperties": true + "bytecode": + "type": "string" + "call_value": + "type": "integer" + "consume_user_resource_percent": + "type": "integer" + "name": + "type": "string" + "origin_energy_limit": + "type": "integer" + "code_hash": + "type": "string" + "trx_hash": + "type": "string" + "version": + "type": "integer" + "x-proto-message": "SmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" + "x-java-response": "SmartContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Smart contract" + "summary": "Contract metadata" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." + "operationId": "wallet_getcontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "origin_address": + "type": "string" + "contract_address": + "type": "string" + "abi": + "type": "object" + "additionalProperties": true + "bytecode": + "type": "string" + "call_value": + "type": "integer" + "consume_user_resource_percent": + "type": "integer" + "name": + "type": "string" + "origin_energy_limit": + "type": "integer" + "code_hash": + "type": "string" + "trx_hash": + "type": "string" + "version": + "type": "integer" + "x-proto-message": "SmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" + "x-java-response": "SmartContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/getcontractinfo": + "get": + "tags": + - "Smart contract" + "summary": "Full contract runtime info" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." + "operationId": "wallet_getcontractinfo_get" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontractinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "smart_contract": + "type": "object" + "additionalProperties": true + "runtimecode": + "type": "string" + "contract_state": + "type": "object" + "additionalProperties": true + "x-proto-message": "SmartContractDataWrapper" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" + "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Smart contract" + "summary": "Full contract runtime info" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." + "operationId": "wallet_getcontractinfo_post" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontractinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "smart_contract": + "type": "object" + "additionalProperties": true + "runtimecode": + "type": "string" + "contract_state": + "type": "object" + "additionalProperties": true + "x-proto-message": "SmartContractDataWrapper" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" + "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/clearabi": + "post": + "tags": + - "Smart contract" + "summary": "Clear a contract's ABI" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/clearabi.md` for examples and detailed behavior." + "operationId": "wallet_clearabi_post" + "externalDocs": + "url": "docs/api/http/smart-contract/clearabi.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ClearABIServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ClearABIContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.ClearABIContract" + "/wallet/updatesetting": + "post": + "tags": + - "Smart contract" + "summary": "Change the user-energy percentage" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updatesetting.md` for examples and detailed behavior." + "operationId": "wallet_updatesetting_post" + "externalDocs": + "url": "docs/api/http/smart-contract/updatesetting.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateSettingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "consume_user_resource_percent": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateSettingContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateSettingContract" + "/wallet/updateenergylimit": + "post": + "tags": + - "Smart contract" + "summary": "Change the deployer's energy limit" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updateenergylimit.md` for examples and detailed behavior." + "operationId": "wallet_updateenergylimit_post" + "externalDocs": + "url": "docs/api/http/smart-contract/updateenergylimit.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateEnergyLimitServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "origin_energy_limit": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateEnergyLimitContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateEnergyLimitContract" + "/wallet/createwitness": + "post": + "tags": + - "Witness / governance" + "summary": "Apply to become an SR candidate" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/createwitness.md` for examples and detailed behavior." + "operationId": "wallet_createwitness_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/createwitness.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CreateWitnessServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "url": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WitnessCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessCreateContract" + "/wallet/updatewitness": + "post": + "tags": + - "Witness / governance" + "summary": "Update an SR's URL" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updatewitness.md` for examples and detailed behavior." + "operationId": "wallet_updatewitness_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/updatewitness.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateWitnessServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "update_url": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WitnessUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessUpdateContract" + "/wallet/listwitnesses": + "get": + "tags": + - "Witness / governance" + "summary": "All SR candidates" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." + "operationId": "wallet_listwitnesses_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListWitnessesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/listwitnesses" + "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "All SR candidates" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." + "operationId": "wallet_listwitnesses_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListWitnessesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/listwitnesses" + "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/getpaginatednowwitnesslist": + "get": + "tags": + - "Witness / governance" + "summary": "Paginated SR list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatednowwitnesslist_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedNowWitnessListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" + "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "parameters": + - + "name": "offset" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "limit" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Paginated SR list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatednowwitnesslist_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedNowWitnessListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" + "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "offset": + "type": "integer" + "limit": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "PaginatedMessage" + "/wallet/votewitnessaccount": + "post": + "tags": + - "Witness / governance" + "summary": "Vote for SRs" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/votewitnessaccount.md` for examples and detailed behavior." + "operationId": "wallet_votewitnessaccount_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/votewitnessaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "VoteWitnessAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "votes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "support": + "type": "boolean" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "VoteWitnessContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.VoteWitnessContract" + "/wallet/getBrokerage": + "get": + "tags": + - "Witness / governance" + "summary": "An SR's current brokerage rate" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." + "operationId": "wallet_getBrokerage_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "brokerage": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBrokerageServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getBrokerage" + "x-solidity-servlet": "GetBrokerageOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "An SR's current brokerage rate" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." + "operationId": "wallet_getBrokerage_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "brokerage": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBrokerageServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getBrokerage" + "x-solidity-servlet": "GetBrokerageOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "/wallet/updateBrokerage": + "post": + "tags": + - "Witness / governance" + "summary": "Update an SR's brokerage" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updateBrokerage.md` for examples and detailed behavior." + "operationId": "wallet_updateBrokerage_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/updateBrokerage.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateBrokerageServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "brokerage": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateBrokerageContract" + "x-proto-file": "protocol/src/main/protos/core/contract/storage_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.StorageContract.UpdateBrokerageContract" + "/wallet/getReward": + "get": + "tags": + - "Witness / governance" + "summary": "Claimable rewards for an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." + "operationId": "wallet_getReward_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getReward.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "reward": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetRewardServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getReward" + "x-solidity-servlet": "GetRewardOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Claimable rewards for an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." + "operationId": "wallet_getReward_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getReward.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "reward": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetRewardServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getReward" + "x-solidity-servlet": "GetRewardOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "/wallet/withdrawbalance": + "post": + "tags": + - "Witness / governance" + "summary": "Withdraw block production rewards / dividends" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/withdrawbalance.md` for examples and detailed behavior." + "operationId": "wallet_withdrawbalance_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/withdrawbalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "WithdrawBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WithdrawBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawBalanceContract" + "/wallet/proposalcreate": + "post": + "tags": + - "Witness / governance" + "summary": "Create a chain-parameter proposal" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalcreate.md` for examples and detailed behavior." + "operationId": "wallet_proposalcreate_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/proposalcreate.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ProposalCreateServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ProposalCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalCreateContract" + "/wallet/proposalapprove": + "post": + "tags": + - "Witness / governance" + "summary": "Vote on a proposal as an SR" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalapprove.md` for examples and detailed behavior." + "operationId": "wallet_proposalapprove_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/proposalapprove.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ProposalApproveServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "proposal_id": + "type": "integer" + "is_add_approval": + "type": "boolean" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ProposalApproveContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalApproveContract" + "/wallet/proposaldelete": + "post": + "tags": + - "Witness / governance" + "summary": "Withdraw your own proposal" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposaldelete.md` for examples and detailed behavior." + "operationId": "wallet_proposaldelete_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/proposaldelete.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ProposalDeleteServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "proposal_id": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ProposalDeleteContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalDeleteContract" + "/wallet/listproposals": + "get": + "tags": + - "Witness / governance" + "summary": "List of proposals" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." + "operationId": "wallet_listproposals_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listproposals.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListProposalsServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "List of proposals" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." + "operationId": "wallet_listproposals_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listproposals.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListProposalsServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/getproposalbyid": + "get": + "tags": + - "Witness / governance" + "summary": "Proposal by ID" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." + "operationId": "wallet_getproposalbyid_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposal_id": + "type": "integer" + "proposer_address": + "type": "string" + "expiration_time": + "type": "integer" + "create_time": + "type": "integer" + "approvals": + "type": "array" + "items": + "type": "string" + "state": + "type": "object" + "additionalProperties": true + "x-proto-message": "Proposal" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Proposal" + "x-java-response": "Proposal rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetProposalByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "id" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Proposal by ID" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." + "operationId": "wallet_getproposalbyid_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposal_id": + "type": "integer" + "proposer_address": + "type": "string" + "expiration_time": + "type": "integer" + "create_time": + "type": "integer" + "approvals": + "type": "array" + "items": + "type": "string" + "state": + "type": "object" + "additionalProperties": true + "x-proto-message": "Proposal" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Proposal" + "x-java-response": "Proposal rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetProposalByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" + "/wallet/getpaginatedproposallist": + "get": + "tags": + - "Witness / governance" + "summary": "Paginated proposal list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedproposallist_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedProposalListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "offset" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "limit" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Paginated proposal list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedproposallist_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedProposalListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "offset": + "type": "integer" + "limit": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "/wallet/getchainparameters": + "get": + "tags": + - "Witness / governance" + "summary": "Current chain parameters" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." + "operationId": "wallet_getchainparameters_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "chainParameter": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ChainParameters" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "ChainParameters rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetChainParametersServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Current chain parameters" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." + "operationId": "wallet_getchainparameters_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "chainParameter": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ChainParameters" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "ChainParameters rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetChainParametersServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "/wallet/getnextmaintenancetime": + "get": + "tags": + - "Witness / governance" + "summary": "Next maintenance period time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." + "operationId": "wallet_getnextmaintenancetime_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" + "x-java-response": "NumberMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNextMaintenanceTimeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Next maintenance period time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." + "operationId": "wallet_getnextmaintenancetime_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" + "x-java-response": "NumberMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNextMaintenanceTimeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/freezebalance": + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Freeze TRX for resources (V1, chain rejects new requests)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/freezebalance.md` for examples and detailed behavior." + "operationId": "wallet_freezebalance_post" + "externalDocs": + "url": "docs/api/http/stake-v1/freezebalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "FreezeBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "frozen_balance": + "type": "integer" + "frozen_duration": + "type": "integer" + "resource": + "type": "object" + "additionalProperties": true + "receiver_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "FreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceContract" + "/wallet/unfreezebalance": + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Unfreeze matured resources (V1, still usable for legacy positions)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/unfreezebalance.md` for examples and detailed behavior." + "operationId": "wallet_unfreezebalance_post" + "externalDocs": + "url": "docs/api/http/stake-v1/unfreezebalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnFreezeBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "resource": + "type": "object" + "additionalProperties": true + "receiver_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnfreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceContract" + "/wallet/getdelegatedresource": + "get": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation records (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresource_get" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" + "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "parameters": + - + "name": "fromAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "toAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation records (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresource_post" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" + "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "fromAddress": + "type": "string" + "toAddress": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "DelegatedResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "/wallet/getdelegatedresourceaccountindex": + "get": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation counterparty addresses (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindex_get" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation counterparty addresses (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindex_post" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/freezebalancev2": + "post": + "tags": + - "Stake 2.0" + "summary": "Freeze TRX for resources" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/freezebalancev2.md` for examples and detailed behavior." + "operationId": "wallet_freezebalancev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/freezebalancev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "FreezeBalanceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "frozen_balance": + "type": "integer" + "resource": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "FreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceV2Contract" + "/wallet/unfreezebalancev2": + "post": + "tags": + - "Stake 2.0" + "summary": "Initiate unfreeze (14-day waiting period)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/unfreezebalancev2.md` for examples and detailed behavior." + "operationId": "wallet_unfreezebalancev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/unfreezebalancev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnFreezeBalanceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "unfreeze_balance": + "type": "integer" + "resource": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnfreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceV2Contract" + "/wallet/withdrawexpireunfreeze": + "post": + "tags": + - "Stake 2.0" + "summary": "Withdraw matured unfreezes" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/withdrawexpireunfreeze.md` for examples and detailed behavior." + "operationId": "wallet_withdrawexpireunfreeze_post" + "externalDocs": + "url": "docs/api/http/stake-v2/withdrawexpireunfreeze.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "WithdrawExpireUnfreezeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WithdrawExpireUnfreezeContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawExpireUnfreezeContract" + "/wallet/cancelallunfreezev2": + "post": + "tags": + - "Stake 2.0" + "summary": "Cancel all unmatured unfreezes" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/cancelallunfreezev2.md` for examples and detailed behavior." + "operationId": "wallet_cancelallunfreezev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/cancelallunfreezev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CancelAllUnfreezeV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "CancelAllUnfreezeV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.CancelAllUnfreezeV2Contract" + "/wallet/delegateresource": + "post": + "tags": + - "Stake 2.0" + "summary": "Delegate resources to another account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/delegateresource.md` for examples and detailed behavior." + "operationId": "wallet_delegateresource_post" + "externalDocs": + "url": "docs/api/http/stake-v2/delegateresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "DelegateResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "resource": + "type": "object" + "additionalProperties": true + "balance": + "type": "integer" + "receiver_address": + "type": "string" + "lock": + "type": "boolean" + "lock_period": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "DelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.DelegateResourceContract" + "/wallet/undelegateresource": + "post": + "tags": + - "Stake 2.0" + "summary": "Undelegate resources from another account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/undelegateresource.md` for examples and detailed behavior." + "operationId": "wallet_undelegateresource_post" + "externalDocs": + "url": "docs/api/http/stake-v2/undelegateresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnDelegateResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "resource": + "type": "object" + "additionalProperties": true + "balance": + "type": "integer" + "receiver_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnDelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnDelegateResourceContract" + "/wallet/getdelegatedresourcev2": + "get": + "tags": + - "Stake 2.0" + "summary": "Query delegation records" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourcev2_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" + "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "parameters": + - + "name": "fromAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "toAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Query delegation records" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourcev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" + "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "fromAddress": + "type": "string" + "toAddress": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "DelegatedResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "/wallet/getdelegatedresourceaccountindexv2": + "get": + "tags": + - "Stake 2.0" + "summary": "Query delegation counterparty addresses" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindexv2_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Query delegation counterparty addresses" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindexv2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "/wallet/getcandelegatedmaxsize": + "get": + "tags": + - "Stake 2.0" + "summary": "Current maximum delegatable amount" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." + "operationId": "wallet_getcandelegatedmaxsize_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "max_size": + "type": "integer" + "x-proto-message": "CanDelegatedMaxSizeResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" + "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanDelegatedMaxSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" + "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "parameters": + - + "name": "type" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "owner_address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Current maximum delegatable amount" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." + "operationId": "wallet_getcandelegatedmaxsize_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "max_size": + "type": "integer" + "x-proto-message": "CanDelegatedMaxSizeResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" + "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanDelegatedMaxSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" + "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "type": + "type": "integer" + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "CanDelegatedMaxSizeRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "CanDelegatedMaxSizeRequestMessage" + "/wallet/getavailableunfreezecount": + "get": + "tags": + - "Stake 2.0" + "summary": "Remaining unfreeze count" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." + "operationId": "wallet_getavailableunfreezecount_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" + "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAvailableUnfreezeCountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" + "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "parameters": + - + "name": "ownerAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "owner_address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Remaining unfreeze count" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." + "operationId": "wallet_getavailableunfreezecount_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" + "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAvailableUnfreezeCountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" + "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "GetAvailableUnfreezeCountRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "GetAvailableUnfreezeCountRequestMessage" + "/wallet/getcanwithdrawunfreezeamount": + "get": + "tags": + - "Stake 2.0" + "summary": "Withdrawable unfreeze amount at a given time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." + "operationId": "wallet_getcanwithdrawunfreezeamount_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "amount": + "type": "integer" + "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" + "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" + "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "parameters": + - + "name": "owner_address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "timestamp" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Withdrawable unfreeze amount at a given time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." + "operationId": "wallet_getcanwithdrawunfreezeamount_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "amount": + "type": "integer" + "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" + "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" + "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "timestamp": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "CanWithdrawUnfreezeAmountRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "CanWithdrawUnfreezeAmountRequestMessage" + "/wallet/getnodeinfo": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Node status (also /monitor/getnodeinfo)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." + "operationId": "wallet_getnodeinfo_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "beginSyncNum": + "type": "integer" + "block": + "type": "string" + "solidityBlock": + "type": "string" + "currentConnectCount": + "type": "integer" + "activeConnectCount": + "type": "integer" + "passiveConnectCount": + "type": "integer" + "totalFlow": + "type": "integer" + "peerList": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "configNodeInfo": + "type": "object" + "additionalProperties": true + "machineInfo": + "type": "object" + "additionalProperties": true + "cheatWitnessInfoMap": + "type": "object" + "additionalProperties": true + "x-java-response-type": "org.tron.common.entity.NodeInfo" + "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNodeInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnodeinfo" + "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Node status (also /monitor/getnodeinfo)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." + "operationId": "wallet_getnodeinfo_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "beginSyncNum": + "type": "integer" + "block": + "type": "string" + "solidityBlock": + "type": "string" + "currentConnectCount": + "type": "integer" + "activeConnectCount": + "type": "integer" + "passiveConnectCount": + "type": "integer" + "totalFlow": + "type": "integer" + "peerList": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "configNodeInfo": + "type": "object" + "additionalProperties": true + "machineInfo": + "type": "object" + "additionalProperties": true + "cheatWitnessInfoMap": + "type": "object" + "additionalProperties": true + "x-java-response-type": "org.tron.common.entity.NodeInfo" + "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNodeInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnodeinfo" + "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "parameters": + [] + "/wallet/listnodes": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Known peers (also /net/listnodes)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." + "operationId": "wallet_listnodes_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/listnodes.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "nodes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "NodeList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" + "x-java-response": "NodeList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListNodesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Node / pricing / tools" + "summary": "Known peers (also /net/listnodes)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." + "operationId": "wallet_listnodes_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/listnodes.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "nodes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "NodeList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" + "x-java-response": "NodeList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListNodesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "/wallet/getenergyprices": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Historical energy unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." + "operationId": "wallet_getenergyprices_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getenergyprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetEnergyPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getenergyprices" + "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Historical energy unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." + "operationId": "wallet_getenergyprices_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getenergyprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetEnergyPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getenergyprices" + "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "parameters": + [] + "/wallet/getbandwidthprices": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Historical bandwidth unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." + "operationId": "wallet_getbandwidthprices_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBandwidthPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" + "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Historical bandwidth unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." + "operationId": "wallet_getbandwidthprices_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBandwidthPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" + "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "parameters": + [] + "/wallet/getburntrx": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Cumulative burned TRX" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." + "operationId": "wallet_getburntrx_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getburntrx.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "burnTrxAmount": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBurnTrxServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getburntrx" + "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Cumulative burned TRX" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." + "operationId": "wallet_getburntrx_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getburntrx.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "burnTrxAmount": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBurnTrxServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getburntrx" + "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "parameters": + [] +"components": + "schemas": + "JavaTronError": + "type": "object" + "additionalProperties": true + "properties": + "Error": + "type": "string" diff --git a/docs/api/openrpc.json b/docs/api/openrpc.json new file mode 100644 index 00000000..7d212ece --- /dev/null +++ b/docs/api/openrpc.json @@ -0,0 +1,1493 @@ +{ + "openrpc": "1.2.6", + "info": { + "title": "java-tron JSON-RPC API", + "version": "1.0.0", + "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation." + }, + "servers": [ + { + "name": "Nile testnet", + "url": "https://nile.trongrid.io/jsonrpc" + }, + { + "name": "Local FullNode", + "url": "http://127.0.0.1:8545/jsonrpc" + }, + { + "name": "Local Solidity", + "url": "http://127.0.0.1:8555/jsonrpc" + } + ], + "methods": [ + { + "name": "web3_clientVersion", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Client version string", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_clientVersion.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/web3_clientVersion.md" + }, + "x-source-derived": true, + "x-java-method": "web3ClientVersion", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "web3_sha3", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Keccak-256 hash", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_sha3.md` for examples and detailed behavior.", + "params": [ + { + "name": "data", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/node/web3_sha3.md" + }, + "x-source-derived": true, + "x-java-method": "web3Sha3", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "net_version", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Network ID (same as eth_chainId)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_version.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/net_version.md" + }, + "x-source-derived": true, + "x-java-method": "getNetVersion", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "net_listening", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Whether listening on P2P", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_listening.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "boolean", + "x-java-type": "boolean" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/net_listening.md" + }, + "x-source-derived": true, + "x-java-method": "isListening", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "net_peerCount", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Number of peers", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_peerCount.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/net_peerCount.md" + }, + "x-source-derived": true, + "x-java-method": "getPeerCount", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_chainId", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "chainId (last 4 bytes of the genesis block hash)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_chainId.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_chainId.md" + }, + "x-source-derived": true, + "x-java-method": "ethChainId", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_protocolVersion", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Protocol version of the current block header", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_protocolVersion.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_protocolVersion.md" + }, + "x-source-derived": true, + "x-java-method": "getProtocolVersion", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_syncing", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Sync status", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_syncing.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "x-java-type": "Object" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_syncing.md" + }, + "x-source-derived": true, + "x-java-method": "getSyncingStatus", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_blockNumber", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Latest block height", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_blockNumber.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_blockNumber.md" + }, + "x-source-derived": true, + "x-java-method": "getLatestBlockNum", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_gasPrice", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Current energy unit price (sun)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_gasPrice.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_gasPrice.md" + }, + "x-source-derived": true, + "x-java-method": "gasPrice", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getBlockByHash", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a block by hash", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockHash", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "fullTransactionObjects", + "required": true, + "schema": { + "type": "boolean" + }, + "x-java-type": "Boolean", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "BlockResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockByHash", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getBlockByNumber", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a block by height / tag", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md` for examples and detailed behavior.", + "params": [ + { + "name": "bnOrId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "fullTransactionObjects", + "required": true, + "schema": { + "type": "boolean" + }, + "x-java-type": "Boolean", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "BlockResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockByNumber", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getBlockTransactionCountByHash", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Block transaction count (by hash)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockHash", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockTransactionCountByHash", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getBlockTransactionCountByNumber", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Block transaction count (by height)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md` for examples and detailed behavior.", + "params": [ + { + "name": "bnOrId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockTransactionCountByNumber", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getTransactionByHash", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a transaction by txid", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md` for examples and detailed behavior.", + "params": [ + { + "name": "txId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionByHash", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getTransactionByBlockHashAndIndex", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a transaction by block hash + index", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockHash", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "index", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionByBlockHashAndIndex", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getTransactionByBlockNumberAndIndex", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a transaction by block height + index", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockNumOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "index", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionByBlockNumberAndIndex", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getTransactionReceipt", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a receipt by txid", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md` for examples and detailed behavior.", + "params": [ + { + "name": "txid", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionReceipt" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionReceipt", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getBlockReceipts", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Receipt list for an entire block", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockNumOrHashOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "List" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md" + }, + "x-source-derived": true, + "x-java-method": "getBlockReceipts", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getBalance", + "tags": [ + { + "name": "Account state" + } + ], + "summary": "Account TRX balance (sun)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getBalance.md` for examples and detailed behavior.", + "params": [ + { + "name": "address", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "blockNumOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/account/eth_getBalance.md" + }, + "x-source-derived": true, + "x-java-method": "getTrxBalance", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getStorageAt", + "tags": [ + { + "name": "Account state" + } + ], + "summary": "Contract storage slot", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getStorageAt.md` for examples and detailed behavior.", + "params": [ + { + "name": "address", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "storageIdx", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + }, + { + "name": "blockNumOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 2 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/account/eth_getStorageAt.md" + }, + "x-source-derived": true, + "x-java-method": "getStorageAt", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getCode", + "tags": [ + { + "name": "Account state" + } + ], + "summary": "Contract runtime bytecode", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getCode.md` for examples and detailed behavior.", + "params": [ + { + "name": "contractAddress", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "bnOrId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/account/eth_getCode.md" + }, + "x-source-derived": true, + "x-java-method": "getABIOfSmartContract", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_call", + "tags": [ + { + "name": "Smart contract calls" + } + ], + "summary": "Read-only contract call", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_call.md` for examples and detailed behavior.", + "params": [ + { + "name": "transactionCall", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "CallArguments", + "x-position": 0 + }, + { + "name": "blockNumOrTag", + "required": true, + "schema": {}, + "x-java-type": "Object", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32600, + "message": "JsonRpcInvalidRequestException", + "x-java-exception": "JsonRpcInvalidRequestException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/smart-contract/eth_call.md" + }, + "x-source-derived": true, + "x-java-method": "getCall", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_estimateGas", + "tags": [ + { + "name": "Smart contract calls" + } + ], + "summary": "Estimate energy consumption", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_estimateGas.md` for examples and detailed behavior.", + "params": [ + { + "name": "args", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "CallArguments", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32600, + "message": "JsonRpcInvalidRequestException", + "x-java-exception": "JsonRpcInvalidRequestException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/smart-contract/eth_estimateGas.md" + }, + "x-source-derived": true, + "x-java-method": "estimateGas", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getLogs", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "One-shot log query", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getLogs.md` for examples and detailed behavior.", + "params": [ + { + "name": "fr", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "FilterRequest", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "LogFilterElement[]" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32005, + "message": "JsonRpcTooManyResultException", + "x-java-exception": "JsonRpcTooManyResultException" + }, + { + "code": -32000, + "message": "BadItemException", + "x-java-exception": "BadItemException" + }, + { + "code": -32000, + "message": "ExecutionException", + "x-java-exception": "ExecutionException" + }, + { + "code": -32000, + "message": "InterruptedException", + "x-java-exception": "InterruptedException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_getLogs.md" + }, + "x-source-derived": true, + "x-java-method": "getLogs", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_newFilter", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Register a log filter", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newFilter.md` for examples and detailed behavior.", + "params": [ + { + "name": "fr", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "FilterRequest", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_newFilter.md" + }, + "x-source-derived": true, + "x-java-method": "newFilter", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_newBlockFilter", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Register a new-block filter", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newBlockFilter.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32005, + "message": "JsonRpcExceedLimitException", + "x-java-exception": "JsonRpcExceedLimitException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_newBlockFilter.md" + }, + "x-source-derived": true, + "x-java-method": "newBlockFilter", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_uninstallFilter", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Uninstall a filter", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_uninstallFilter.md` for examples and detailed behavior.", + "params": [ + { + "name": "filterId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "boolean", + "x-java-type": "boolean" + } + }, + "errors": [ + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_uninstallFilter.md" + }, + "x-source-derived": true, + "x-java-method": "uninstallFilter", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getFilterChanges", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Pull and drain filter increments", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterChanges.md` for examples and detailed behavior.", + "params": [ + { + "name": "filterId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": {}, + "x-java-type": "Object[]" + } + }, + "errors": [ + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_getFilterChanges.md" + }, + "x-source-derived": true, + "x-java-method": "getFilterChanges", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getFilterLogs", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Pull a log filter's full set (without draining)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterLogs.md` for examples and detailed behavior.", + "params": [ + { + "name": "filterId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "LogFilterElement[]" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32005, + "message": "JsonRpcTooManyResultException", + "x-java-exception": "JsonRpcTooManyResultException" + }, + { + "code": -32000, + "message": "BadItemException", + "x-java-exception": "BadItemException" + }, + { + "code": -32000, + "message": "ExecutionException", + "x-java-exception": "ExecutionException" + }, + { + "code": -32000, + "message": "InterruptedException", + "x-java-exception": "InterruptedException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_getFilterLogs.md" + }, + "x-source-derived": true, + "x-java-method": "getFilterLogs", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "buildTransaction", + "tags": [ + { + "name": "Transaction build" + } + ], + "summary": "Build an unsigned transaction (FullNode only; TRX transfer / TRC10 transfer / contract deploy / contract trigger)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/tx-build/buildTransaction.md` for examples and detailed behavior.", + "params": [ + { + "name": "args", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "BuildArguments", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionJson" + } + }, + "errors": [ + { + "code": -32600, + "message": "JsonRpcInvalidRequestException", + "x-java-exception": "JsonRpcInvalidRequestException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/tx-build/buildTransaction.md" + }, + "x-source-derived": true, + "x-java-method": "buildTransaction", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 only (the Solidity port throws -32601)" + }, + { + "name": "eth_coinbase", + "tags": [ + { + "name": "Compatibility stub methods" + } + ], + "summary": "The configured etherbase address", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_coinbase.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/stub/eth_coinbase.md" + }, + "x-source-derived": true, + "x-java-method": "getCoinbase", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_accounts", + "tags": [ + { + "name": "Compatibility stub methods" + } + ], + "summary": "[]", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_accounts.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "x-java-type": "String[]" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/stub/eth_accounts.md" + }, + "x-source-derived": true, + "x-java-method": "getAccounts", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + }, + { + "name": "eth_getWork", + "tags": [ + { + "name": "Compatibility stub methods" + } + ], + "summary": "[blockHash, null, null]", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_getWork.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": {}, + "x-java-type": "List" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/stub/eth_getWork.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetWork", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" + } + ] +} diff --git a/docs/api/specs/http/accountpermissionupdate.yaml b/docs/api/specs/http/accountpermissionupdate.yaml new file mode 100644 index 00000000..bd352dd7 --- /dev/null +++ b/docs/api/specs/http/accountpermissionupdate.yaml @@ -0,0 +1,74 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/accountpermissionupdate": + "post": + "tags": + - "Account" + "summary": "Configure multi-sig permissions" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/accountpermissionupdate.md` for examples and detailed behavior." + "operationId": "wallet_accountpermissionupdate_post" + "externalDocs": + "url": "docs/api/http/account/accountpermissionupdate.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "AccountPermissionUpdateServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "owner": + "type": "object" + "additionalProperties": true + "witness": + "type": "object" + "additionalProperties": true + "actives": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AccountPermissionUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountPermissionUpdateContract" diff --git a/docs/api/specs/http/broadcasthex.yaml b/docs/api/specs/http/broadcasthex.yaml new file mode 100644 index 00000000..8034b58a --- /dev/null +++ b/docs/api/specs/http/broadcasthex.yaml @@ -0,0 +1,52 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/broadcasthex": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Broadcast a signed transaction (hex)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasthex.md` for examples and detailed behavior." + "operationId": "wallet_broadcasthex_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/broadcasthex.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "transaction": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "BroadcastHexServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transaction": + "type": "string" + "required": + - "transaction" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/broadcasttransaction.yaml b/docs/api/specs/http/broadcasttransaction.yaml new file mode 100644 index 00000000..7588fa41 --- /dev/null +++ b/docs/api/specs/http/broadcasttransaction.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/broadcasttransaction": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Broadcast a signed transaction (JSON)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasttransaction.md` for examples and detailed behavior." + "operationId": "wallet_broadcasttransaction_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/broadcasttransaction.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "BroadcastServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "oneOf": + - + "required": + - "raw_data" + - + "required": + - "raw_data_hex" + "x-source-shape": "transaction-json" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" diff --git a/docs/api/specs/http/cancelallunfreezev2.yaml b/docs/api/specs/http/cancelallunfreezev2.yaml new file mode 100644 index 00000000..9d9732e9 --- /dev/null +++ b/docs/api/specs/http/cancelallunfreezev2.yaml @@ -0,0 +1,63 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/cancelallunfreezev2": + "post": + "tags": + - "Stake 2.0" + "summary": "Cancel all unmatured unfreezes" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/cancelallunfreezev2.md` for examples and detailed behavior." + "operationId": "wallet_cancelallunfreezev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/cancelallunfreezev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CancelAllUnfreezeV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "CancelAllUnfreezeV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.CancelAllUnfreezeV2Contract" diff --git a/docs/api/specs/http/clearabi.yaml b/docs/api/specs/http/clearabi.yaml new file mode 100644 index 00000000..d6265773 --- /dev/null +++ b/docs/api/specs/http/clearabi.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/clearabi": + "post": + "tags": + - "Smart contract" + "summary": "Clear a contract's ABI" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/clearabi.md` for examples and detailed behavior." + "operationId": "wallet_clearabi_post" + "externalDocs": + "url": "docs/api/http/smart-contract/clearabi.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ClearABIServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ClearABIContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.ClearABIContract" diff --git a/docs/api/specs/http/createaccount.yaml b/docs/api/specs/http/createaccount.yaml new file mode 100644 index 00000000..fa879e1b --- /dev/null +++ b/docs/api/specs/http/createaccount.yaml @@ -0,0 +1,68 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/createaccount": + "post": + "tags": + - "Account" + "summary": "Create an on-chain account (costs 1 TRX)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/createaccount.md` for examples and detailed behavior." + "operationId": "wallet_createaccount_post" + "externalDocs": + "url": "docs/api/http/account/createaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CreateAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "account_address": + "type": "string" + "type": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AccountCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountCreateContract" diff --git a/docs/api/specs/http/createassetissue.yaml b/docs/api/specs/http/createassetissue.yaml new file mode 100644 index 00000000..d05e338f --- /dev/null +++ b/docs/api/specs/http/createassetissue.yaml @@ -0,0 +1,102 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/createassetissue": + "post": + "tags": + - "TRC10 asset" + "summary": "Issue a TRC10 token" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/createassetissue.md` for examples and detailed behavior." + "operationId": "wallet_createassetissue_post" + "externalDocs": + "url": "docs/api/http/asset/createassetissue.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CreateAssetIssueServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" diff --git a/docs/api/specs/http/createtransaction.yaml b/docs/api/specs/http/createtransaction.yaml new file mode 100644 index 00000000..0a51c421 --- /dev/null +++ b/docs/api/specs/http/createtransaction.yaml @@ -0,0 +1,69 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/createtransaction": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Build a TRX transfer transaction" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/createtransaction.md` for examples and detailed behavior." + "operationId": "wallet_createtransaction_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/createtransaction.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TransferServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "to_address": + "type": "string" + "amount": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "extra_data": + "type": "string" + "x-proto-message": "TransferContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.TransferContract" diff --git a/docs/api/specs/http/createwitness.yaml b/docs/api/specs/http/createwitness.yaml new file mode 100644 index 00000000..979a806e --- /dev/null +++ b/docs/api/specs/http/createwitness.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/createwitness": + "post": + "tags": + - "Witness / governance" + "summary": "Apply to become an SR candidate" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/createwitness.md` for examples and detailed behavior." + "operationId": "wallet_createwitness_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/createwitness.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "CreateWitnessServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "url": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WitnessCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessCreateContract" diff --git a/docs/api/specs/http/delegateresource.yaml b/docs/api/specs/http/delegateresource.yaml new file mode 100644 index 00000000..ce4a4322 --- /dev/null +++ b/docs/api/specs/http/delegateresource.yaml @@ -0,0 +1,74 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/delegateresource": + "post": + "tags": + - "Stake 2.0" + "summary": "Delegate resources to another account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/delegateresource.md` for examples and detailed behavior." + "operationId": "wallet_delegateresource_post" + "externalDocs": + "url": "docs/api/http/stake-v2/delegateresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "DelegateResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "resource": + "type": "object" + "additionalProperties": true + "balance": + "type": "integer" + "receiver_address": + "type": "string" + "lock": + "type": "boolean" + "lock_period": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "DelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.DelegateResourceContract" diff --git a/docs/api/specs/http/deploycontract.yaml b/docs/api/specs/http/deploycontract.yaml new file mode 100644 index 00000000..10797325 --- /dev/null +++ b/docs/api/specs/http/deploycontract.yaml @@ -0,0 +1,87 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/deploycontract": + "post": + "tags": + - "Smart contract" + "summary": "Deploy a contract" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/deploycontract.md` for examples and detailed behavior." + "operationId": "wallet_deploycontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/deploycontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "DeployContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "new_contract": + "type": "object" + "additionalProperties": true + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "abi": + "type": "object" + "additionalProperties": true + "bytecode": + "type": "string" + "parameter": + "type": "string" + "name": + "type": "string" + "call_value": + "type": "integer" + "consume_user_resource_percent": + "type": "integer" + "origin_energy_limit": + "type": "integer" + "fee_limit": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "CreateSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.CreateSmartContract" diff --git a/docs/api/specs/http/estimateenergy.yaml b/docs/api/specs/http/estimateenergy.yaml new file mode 100644 index 00000000..1800ccdc --- /dev/null +++ b/docs/api/specs/http/estimateenergy.yaml @@ -0,0 +1,73 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/estimateenergy": + "post": + "tags": + - "Smart contract" + "summary": "Estimate energy usage of a call" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/estimateenergy.md` for examples and detailed behavior." + "operationId": "wallet_estimateenergy_post" + "externalDocs": + "url": "docs/api/http/smart-contract/estimateenergy.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "energy_required": + "type": "integer" + "x-java-response": "EstimateEnergyMessage rendered by Util.printEstimateEnergyMessage" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "EstimateEnergyServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/estimateenergy" + "x-solidity-servlet": "EstimateEnergyOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "call_value": + "type": "integer" + "data": + "type": "string" + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "function_selector": + "type": "string" + "parameter": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" diff --git a/docs/api/specs/http/freezebalance.yaml b/docs/api/specs/http/freezebalance.yaml new file mode 100644 index 00000000..d17f9e0d --- /dev/null +++ b/docs/api/specs/http/freezebalance.yaml @@ -0,0 +1,72 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/freezebalance": + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Freeze TRX for resources (V1, chain rejects new requests)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/freezebalance.md` for examples and detailed behavior." + "operationId": "wallet_freezebalance_post" + "externalDocs": + "url": "docs/api/http/stake-v1/freezebalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "FreezeBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "frozen_balance": + "type": "integer" + "frozen_duration": + "type": "integer" + "resource": + "type": "object" + "additionalProperties": true + "receiver_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "FreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceContract" diff --git a/docs/api/specs/http/freezebalancev2.yaml b/docs/api/specs/http/freezebalancev2.yaml new file mode 100644 index 00000000..db2f325c --- /dev/null +++ b/docs/api/specs/http/freezebalancev2.yaml @@ -0,0 +1,68 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/freezebalancev2": + "post": + "tags": + - "Stake 2.0" + "summary": "Freeze TRX for resources" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/freezebalancev2.md` for examples and detailed behavior." + "operationId": "wallet_freezebalancev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/freezebalancev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "FreezeBalanceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "frozen_balance": + "type": "integer" + "resource": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "FreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceV2Contract" diff --git a/docs/api/specs/http/getBrokerage.yaml b/docs/api/specs/http/getBrokerage.yaml new file mode 100644 index 00000000..52376b38 --- /dev/null +++ b/docs/api/specs/http/getBrokerage.yaml @@ -0,0 +1,82 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getBrokerage": + "get": + "tags": + - "Witness / governance" + "summary": "An SR's current brokerage rate" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." + "operationId": "wallet_getBrokerage_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "brokerage": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBrokerageServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getBrokerage" + "x-solidity-servlet": "GetBrokerageOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "An SR's current brokerage rate" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." + "operationId": "wallet_getBrokerage_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "brokerage": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBrokerageServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getBrokerage" + "x-solidity-servlet": "GetBrokerageOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true diff --git a/docs/api/specs/http/getReward.yaml b/docs/api/specs/http/getReward.yaml new file mode 100644 index 00000000..f083148b --- /dev/null +++ b/docs/api/specs/http/getReward.yaml @@ -0,0 +1,82 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getReward": + "get": + "tags": + - "Witness / governance" + "summary": "Claimable rewards for an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." + "operationId": "wallet_getReward_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getReward.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "reward": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetRewardServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getReward" + "x-solidity-servlet": "GetRewardOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Claimable rewards for an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." + "operationId": "wallet_getReward_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getReward.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "reward": + "type": "integer" + "Error": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetRewardServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getReward" + "x-solidity-servlet": "GetRewardOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true diff --git a/docs/api/specs/http/getaccount.yaml b/docs/api/specs/http/getaccount.yaml new file mode 100644 index 00000000..b4029b6c --- /dev/null +++ b/docs/api/specs/http/getaccount.yaml @@ -0,0 +1,289 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getaccount": + "get": + "tags": + - "Account" + "summary": "Query an account by address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." + "operationId": "wallet_getaccount_get" + "externalDocs": + "url": "docs/api/http/account/getaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_name": + "type": "string" + "type": + "type": "object" + "additionalProperties": true + "address": + "type": "string" + "balance": + "type": "integer" + "votes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozen": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "net_usage": + "type": "integer" + "acquired_delegated_frozen_balance_for_bandwidth": + "type": "integer" + "delegated_frozen_balance_for_bandwidth": + "type": "integer" + "old_tron_power": + "type": "integer" + "tron_power": + "type": "object" + "additionalProperties": true + "asset_optimized": + "type": "boolean" + "create_time": + "type": "integer" + "latest_opration_time": + "type": "integer" + "allowance": + "type": "integer" + "latest_withdraw_time": + "type": "integer" + "code": + "type": "string" + "is_witness": + "type": "boolean" + "is_committee": + "type": "boolean" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "asset_issued_name": + "type": "string" + "asset_issued_ID": + "type": "string" + "free_net_usage": + "type": "integer" + "latest_consume_time": + "type": "integer" + "latest_consume_free_time": + "type": "integer" + "account_id": + "type": "string" + "net_window_size": + "type": "integer" + "net_window_optimized": + "type": "boolean" + "account_resource": + "type": "object" + "additionalProperties": true + "codeHash": + "type": "string" + "owner_permission": + "type": "object" + "additionalProperties": true + "witness_permission": + "type": "object" + "additionalProperties": true + "active_permission": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "unfrozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "acquired_delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "x-proto-message": "Account" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Account" + "x-java-response": "Account rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getaccount" + "x-solidity-servlet": "GetAccountOnSolidityServlet" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Query an account by address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." + "operationId": "wallet_getaccount_post" + "externalDocs": + "url": "docs/api/http/account/getaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_name": + "type": "string" + "type": + "type": "object" + "additionalProperties": true + "address": + "type": "string" + "balance": + "type": "integer" + "votes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozen": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "net_usage": + "type": "integer" + "acquired_delegated_frozen_balance_for_bandwidth": + "type": "integer" + "delegated_frozen_balance_for_bandwidth": + "type": "integer" + "old_tron_power": + "type": "integer" + "tron_power": + "type": "object" + "additionalProperties": true + "asset_optimized": + "type": "boolean" + "create_time": + "type": "integer" + "latest_opration_time": + "type": "integer" + "allowance": + "type": "integer" + "latest_withdraw_time": + "type": "integer" + "code": + "type": "string" + "is_witness": + "type": "boolean" + "is_committee": + "type": "boolean" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "asset_issued_name": + "type": "string" + "asset_issued_ID": + "type": "string" + "free_net_usage": + "type": "integer" + "latest_consume_time": + "type": "integer" + "latest_consume_free_time": + "type": "integer" + "account_id": + "type": "string" + "net_window_size": + "type": "integer" + "net_window_optimized": + "type": "boolean" + "account_resource": + "type": "object" + "additionalProperties": true + "codeHash": + "type": "string" + "owner_permission": + "type": "object" + "additionalProperties": true + "witness_permission": + "type": "object" + "additionalProperties": true + "active_permission": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "frozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "unfrozenV2": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "acquired_delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "x-proto-message": "Account" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Account" + "x-java-response": "Account rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getaccount" + "x-solidity-servlet": "GetAccountOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" diff --git a/docs/api/specs/http/getaccountbalance.yaml b/docs/api/specs/http/getaccountbalance.yaml new file mode 100644 index 00000000..d9d29b0e --- /dev/null +++ b/docs/api/specs/http/getaccountbalance.yaml @@ -0,0 +1,57 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getaccountbalance": + "post": + "tags": + - "Account" + "summary": "Query an account's balance at a specific block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountbalance.md` for examples and detailed behavior." + "operationId": "wallet_getaccountbalance_post" + "externalDocs": + "url": "docs/api/http/account/getaccountbalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "balance": + "type": "integer" + "block_identifier": + "type": "object" + "additionalProperties": true + "x-proto-message": "AccountBalanceResponse" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-java-response-type": "BalanceContract.AccountBalanceResponse" + "x-java-response": "AccountBalanceResponse rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_identifier": + "type": "object" + "additionalProperties": true + "block_identifier": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "x-proto-message": "AccountBalanceRequest" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "AccountBalanceRequest" diff --git a/docs/api/specs/http/getaccountnet.yaml b/docs/api/specs/http/getaccountnet.yaml new file mode 100644 index 00000000..c363f355 --- /dev/null +++ b/docs/api/specs/http/getaccountnet.yaml @@ -0,0 +1,115 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getaccountnet": + "get": + "tags": + - "Account" + "summary": "Query an account's bandwidth resources" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." + "operationId": "wallet_getaccountnet_get" + "externalDocs": + "url": "docs/api/http/account/getaccountnet.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "x-proto-message": "AccountNetMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" + "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountNetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Query an account's bandwidth resources" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." + "operationId": "wallet_getaccountnet_post" + "externalDocs": + "url": "docs/api/http/account/getaccountnet.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "x-proto-message": "AccountNetMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" + "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountNetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" diff --git a/docs/api/specs/http/getaccountresource.yaml b/docs/api/specs/http/getaccountresource.yaml new file mode 100644 index 00000000..9f01a221 --- /dev/null +++ b/docs/api/specs/http/getaccountresource.yaml @@ -0,0 +1,150 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getaccountresource": + "get": + "tags": + - "Account" + "summary": "Query bandwidth + energy + TronPower" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." + "operationId": "wallet_getaccountresource_get" + "externalDocs": + "url": "docs/api/http/account/getaccountresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "TotalTronPowerWeight": + "type": "integer" + "tronPowerUsed": + "type": "integer" + "tronPowerLimit": + "type": "integer" + "EnergyUsed": + "type": "integer" + "EnergyLimit": + "type": "integer" + "TotalEnergyLimit": + "type": "integer" + "TotalEnergyWeight": + "type": "integer" + "storageUsed": + "type": "integer" + "storageLimit": + "type": "integer" + "x-proto-message": "AccountResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" + "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Query bandwidth + energy + TronPower" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." + "operationId": "wallet_getaccountresource_post" + "externalDocs": + "url": "docs/api/http/account/getaccountresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "freeNetUsed": + "type": "integer" + "freeNetLimit": + "type": "integer" + "NetUsed": + "type": "integer" + "NetLimit": + "type": "integer" + "TotalNetLimit": + "type": "integer" + "TotalNetWeight": + "type": "integer" + "TotalTronPowerWeight": + "type": "integer" + "tronPowerUsed": + "type": "integer" + "tronPowerLimit": + "type": "integer" + "EnergyUsed": + "type": "integer" + "EnergyLimit": + "type": "integer" + "TotalEnergyLimit": + "type": "integer" + "TotalEnergyWeight": + "type": "integer" + "storageUsed": + "type": "integer" + "storageLimit": + "type": "integer" + "x-proto-message": "AccountResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" + "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAccountResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/getapprovedlist.yaml b/docs/api/specs/http/getapprovedlist.yaml new file mode 100644 index 00000000..0eebbe46 --- /dev/null +++ b/docs/api/specs/http/getapprovedlist.yaml @@ -0,0 +1,85 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getapprovedlist": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Addresses that have already signed" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getapprovedlist.md` for examples and detailed behavior." + "operationId": "wallet_getapprovedlist_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/getapprovedlist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "object" + "additionalProperties": true + "approved_list": + "type": "array" + "items": + "type": "string" + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionApprovedListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "oneOf": + - + "required": + - "raw_data" + - + "required": + - "raw_data_hex" + "x-source-shape": "transaction-json" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" diff --git a/docs/api/specs/http/getassetissuebyaccount.yaml b/docs/api/specs/http/getassetissuebyaccount.yaml new file mode 100644 index 00000000..e41bed4f --- /dev/null +++ b/docs/api/specs/http/getassetissuebyaccount.yaml @@ -0,0 +1,101 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getassetissuebyaccount": + "get": + "tags": + - "TRC10 asset" + "summary": "TRC10s issued by an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyaccount_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "TRC10s issued by an account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyaccount_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" diff --git a/docs/api/specs/http/getassetissuebyid.yaml b/docs/api/specs/http/getassetissuebyid.yaml new file mode 100644 index 00000000..69521df7 --- /dev/null +++ b/docs/api/specs/http/getassetissuebyid.yaml @@ -0,0 +1,176 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getassetissuebyid": + "get": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by id (recommended)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyid_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" + "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by id (recommended)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyid_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" + "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/getassetissuebyname.yaml b/docs/api/specs/http/getassetissuebyname.yaml new file mode 100644 index 00000000..f389e994 --- /dev/null +++ b/docs/api/specs/http/getassetissuebyname.yaml @@ -0,0 +1,176 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getassetissuebyname": + "get": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by name (errors on duplicates)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyname_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" + "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "Look up a TRC10 by name (errors on duplicates)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuebyname_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuebyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "owner_address": + "type": "string" + "name": + "type": "string" + "abbr": + "type": "string" + "total_supply": + "type": "integer" + "frozen_supply": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "trx_num": + "type": "integer" + "precision": + "type": "integer" + "num": + "type": "integer" + "start_time": + "type": "integer" + "end_time": + "type": "integer" + "order": + "type": "integer" + "vote_score": + "type": "integer" + "description": + "type": "string" + "url": + "type": "string" + "free_asset_net_limit": + "type": "integer" + "public_free_asset_net_limit": + "type": "integer" + "public_free_asset_net_usage": + "type": "integer" + "public_latest_free_net_time": + "type": "integer" + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" + "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/getassetissuelist.yaml b/docs/api/specs/http/getassetissuelist.yaml new file mode 100644 index 00000000..91783924 --- /dev/null +++ b/docs/api/specs/http/getassetissuelist.yaml @@ -0,0 +1,92 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getassetissuelist": + "get": + "tags": + - "TRC10 asset" + "summary": "All TRC10s on the network" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelist_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelist" + "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "All TRC10s on the network" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelist_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelist" + "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/getassetissuelistbyname.yaml b/docs/api/specs/http/getassetissuelistbyname.yaml new file mode 100644 index 00000000..48e98a12 --- /dev/null +++ b/docs/api/specs/http/getassetissuelistbyname.yaml @@ -0,0 +1,104 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getassetissuelistbyname": + "get": + "tags": + - "TRC10 asset" + "summary": "All TRC10s with a given name" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelistbyname_get" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelistbyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" + "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "All TRC10s with a given name" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." + "operationId": "wallet_getassetissuelistbyname_post" + "externalDocs": + "url": "docs/api/http/asset/getassetissuelistbyname.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAssetIssueListByNameServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" + "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/getavailableunfreezecount.yaml b/docs/api/specs/http/getavailableunfreezecount.yaml new file mode 100644 index 00000000..679a6e8a --- /dev/null +++ b/docs/api/specs/http/getavailableunfreezecount.yaml @@ -0,0 +1,108 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getavailableunfreezecount": + "get": + "tags": + - "Stake 2.0" + "summary": "Remaining unfreeze count" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." + "operationId": "wallet_getavailableunfreezecount_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" + "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAvailableUnfreezeCountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" + "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "parameters": + - + "name": "ownerAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "owner_address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Remaining unfreeze count" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." + "operationId": "wallet_getavailableunfreezecount_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" + "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetAvailableUnfreezeCountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" + "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "GetAvailableUnfreezeCountRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "GetAvailableUnfreezeCountRequestMessage" diff --git a/docs/api/specs/http/getbandwidthprices.yaml b/docs/api/specs/http/getbandwidthprices.yaml new file mode 100644 index 00000000..d6e1a8a7 --- /dev/null +++ b/docs/api/specs/http/getbandwidthprices.yaml @@ -0,0 +1,74 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getbandwidthprices": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Historical bandwidth unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." + "operationId": "wallet_getbandwidthprices_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBandwidthPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" + "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Historical bandwidth unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." + "operationId": "wallet_getbandwidthprices_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBandwidthPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" + "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "parameters": + [] diff --git a/docs/api/specs/http/getblock.yaml b/docs/api/specs/http/getblock.yaml new file mode 100644 index 00000000..6390e265 --- /dev/null +++ b/docs/api/specs/http/getblock.yaml @@ -0,0 +1,120 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getblock": + "get": + "tags": + - "Block / transaction query" + "summary": "Generic block query (by num or hash)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." + "operationId": "wallet_getblock_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblock" + "x-solidity-servlet": "GetBlockOnSolidityServlet" + "parameters": + - + "name": "id_or_num" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "detail" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Generic block query (by num or hash)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." + "operationId": "wallet_getblock_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblock" + "x-solidity-servlet": "GetBlockOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id_or_num": + "type": "string" + "detail": + "type": "boolean" + "x-proto-message": "BlockReq" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BlockReq" diff --git a/docs/api/specs/http/getblockbalance.yaml b/docs/api/specs/http/getblockbalance.yaml new file mode 100644 index 00000000..379f10b4 --- /dev/null +++ b/docs/api/specs/http/getblockbalance.yaml @@ -0,0 +1,60 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getblockbalance": + "post": + "tags": + - "Block / transaction query" + "summary": "Per-account balance changes within a block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbalance.md` for examples and detailed behavior." + "operationId": "wallet_getblockbalance_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block_identifier": + "type": "object" + "additionalProperties": true + "timestamp": + "type": "integer" + "transaction_balance_trace": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockBalanceTrace" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-java-response-type": "org.tron.protos.contract.BalanceContract.BlockBalanceTrace" + "x-java-response": "BlockBalanceTrace rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "hash": + "type": "string" + "number": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "BlockIdentifier" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "BlockIdentifier" diff --git a/docs/api/specs/http/getblockbyid.yaml b/docs/api/specs/http/getblockbyid.yaml new file mode 100644 index 00000000..5409ff44 --- /dev/null +++ b/docs/api/specs/http/getblockbyid.yaml @@ -0,0 +1,113 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getblockbyid": + "get": + "tags": + - "Block / transaction query" + "summary": "Block by hash" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." + "operationId": "wallet_getblockbyid_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbyid" + "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Block by hash" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." + "operationId": "wallet_getblockbyid_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbyid" + "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/getblockbylatestnum.yaml b/docs/api/specs/http/getblockbylatestnum.yaml new file mode 100644 index 00000000..e4b105c8 --- /dev/null +++ b/docs/api/specs/http/getblockbylatestnum.yaml @@ -0,0 +1,107 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getblockbylatestnum": + "get": + "tags": + - "Block / transaction query" + "summary": "The most recent N blocks" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylatestnum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLatestNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" + "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "The most recent N blocks" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylatestnum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLatestNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" + "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" diff --git a/docs/api/specs/http/getblockbylimitnext.yaml b/docs/api/specs/http/getblockbylimitnext.yaml new file mode 100644 index 00000000..37f6f6b6 --- /dev/null +++ b/docs/api/specs/http/getblockbylimitnext.yaml @@ -0,0 +1,116 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getblockbylimitnext": + "get": + "tags": + - "Block / transaction query" + "summary": "Blocks in a range" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylimitnext_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLimitNextServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" + "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "parameters": + - + "name": "startNum" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "endNum" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Blocks in a range" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." + "operationId": "wallet_getblockbylimitnext_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "block": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByLimitNextServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" + "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "startNum": + "type": "integer" + "endNum": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "BlockLimit" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BlockLimit" diff --git a/docs/api/specs/http/getblockbynum.yaml b/docs/api/specs/http/getblockbynum.yaml new file mode 100644 index 00000000..06b68090 --- /dev/null +++ b/docs/api/specs/http/getblockbynum.yaml @@ -0,0 +1,113 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getblockbynum": + "get": + "tags": + - "Block / transaction query" + "summary": "Block by height" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbynum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbynum" + "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Block by height" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." + "operationId": "wallet_getblockbynum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBlockByNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getblockbynum" + "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" diff --git a/docs/api/specs/http/getburntrx.yaml b/docs/api/specs/http/getburntrx.yaml new file mode 100644 index 00000000..75fbe741 --- /dev/null +++ b/docs/api/specs/http/getburntrx.yaml @@ -0,0 +1,66 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getburntrx": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Cumulative burned TRX" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." + "operationId": "wallet_getburntrx_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getburntrx.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "burnTrxAmount": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBurnTrxServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getburntrx" + "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Cumulative burned TRX" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." + "operationId": "wallet_getburntrx_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getburntrx.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "burnTrxAmount": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetBurnTrxServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getburntrx" + "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "parameters": + [] diff --git a/docs/api/specs/http/getcandelegatedmaxsize.yaml b/docs/api/specs/http/getcandelegatedmaxsize.yaml new file mode 100644 index 00000000..68e96919 --- /dev/null +++ b/docs/api/specs/http/getcandelegatedmaxsize.yaml @@ -0,0 +1,110 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getcandelegatedmaxsize": + "get": + "tags": + - "Stake 2.0" + "summary": "Current maximum delegatable amount" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." + "operationId": "wallet_getcandelegatedmaxsize_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "max_size": + "type": "integer" + "x-proto-message": "CanDelegatedMaxSizeResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" + "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanDelegatedMaxSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" + "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "parameters": + - + "name": "type" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "owner_address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Current maximum delegatable amount" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." + "operationId": "wallet_getcandelegatedmaxsize_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "max_size": + "type": "integer" + "x-proto-message": "CanDelegatedMaxSizeResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" + "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanDelegatedMaxSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" + "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "type": + "type": "integer" + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "CanDelegatedMaxSizeRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "CanDelegatedMaxSizeRequestMessage" diff --git a/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml b/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml new file mode 100644 index 00000000..cd90774e --- /dev/null +++ b/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml @@ -0,0 +1,110 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getcanwithdrawunfreezeamount": + "get": + "tags": + - "Stake 2.0" + "summary": "Withdrawable unfreeze amount at a given time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." + "operationId": "wallet_getcanwithdrawunfreezeamount_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "amount": + "type": "integer" + "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" + "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" + "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "parameters": + - + "name": "owner_address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "timestamp" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Withdrawable unfreeze amount at a given time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." + "operationId": "wallet_getcanwithdrawunfreezeamount_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "amount": + "type": "integer" + "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" + "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" + "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "timestamp": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "CanWithdrawUnfreezeAmountRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "CanWithdrawUnfreezeAmountRequestMessage" diff --git a/docs/api/specs/http/getchainparameters.yaml b/docs/api/specs/http/getchainparameters.yaml new file mode 100644 index 00000000..22d931c5 --- /dev/null +++ b/docs/api/specs/http/getchainparameters.yaml @@ -0,0 +1,78 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getchainparameters": + "get": + "tags": + - "Witness / governance" + "summary": "Current chain parameters" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." + "operationId": "wallet_getchainparameters_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "chainParameter": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ChainParameters" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "ChainParameters rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetChainParametersServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Current chain parameters" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." + "operationId": "wallet_getchainparameters_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "chainParameter": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ChainParameters" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "ChainParameters rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetChainParametersServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" diff --git a/docs/api/specs/http/getcontract.yaml b/docs/api/specs/http/getcontract.yaml new file mode 100644 index 00000000..50ac3c26 --- /dev/null +++ b/docs/api/specs/http/getcontract.yaml @@ -0,0 +1,139 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getcontract": + "get": + "tags": + - "Smart contract" + "summary": "Contract metadata" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." + "operationId": "wallet_getcontract_get" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "origin_address": + "type": "string" + "contract_address": + "type": "string" + "abi": + "type": "object" + "additionalProperties": true + "bytecode": + "type": "string" + "call_value": + "type": "integer" + "consume_user_resource_percent": + "type": "integer" + "name": + "type": "string" + "origin_energy_limit": + "type": "integer" + "code_hash": + "type": "string" + "trx_hash": + "type": "string" + "version": + "type": "integer" + "x-proto-message": "SmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" + "x-java-response": "SmartContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Smart contract" + "summary": "Contract metadata" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." + "operationId": "wallet_getcontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "origin_address": + "type": "string" + "contract_address": + "type": "string" + "abi": + "type": "object" + "additionalProperties": true + "bytecode": + "type": "string" + "call_value": + "type": "integer" + "consume_user_resource_percent": + "type": "integer" + "name": + "type": "string" + "origin_energy_limit": + "type": "integer" + "code_hash": + "type": "string" + "trx_hash": + "type": "string" + "version": + "type": "integer" + "x-proto-message": "SmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" + "x-java-response": "SmartContract rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/getcontractinfo.yaml b/docs/api/specs/http/getcontractinfo.yaml new file mode 100644 index 00000000..e360e0be --- /dev/null +++ b/docs/api/specs/http/getcontractinfo.yaml @@ -0,0 +1,109 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getcontractinfo": + "get": + "tags": + - "Smart contract" + "summary": "Full contract runtime info" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." + "operationId": "wallet_getcontractinfo_get" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontractinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "smart_contract": + "type": "object" + "additionalProperties": true + "runtimecode": + "type": "string" + "contract_state": + "type": "object" + "additionalProperties": true + "x-proto-message": "SmartContractDataWrapper" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" + "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Smart contract" + "summary": "Full contract runtime info" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." + "operationId": "wallet_getcontractinfo_post" + "externalDocs": + "url": "docs/api/http/smart-contract/getcontractinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "smart_contract": + "type": "object" + "additionalProperties": true + "runtimecode": + "type": "string" + "contract_state": + "type": "object" + "additionalProperties": true + "x-proto-message": "SmartContractDataWrapper" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" + "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetContractInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/getdelegatedresource.yaml b/docs/api/specs/http/getdelegatedresource.yaml new file mode 100644 index 00000000..3f90a849 --- /dev/null +++ b/docs/api/specs/http/getdelegatedresource.yaml @@ -0,0 +1,116 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getdelegatedresource": + "get": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation records (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresource_get" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" + "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "parameters": + - + "name": "fromAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "toAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation records (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresource_post" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" + "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "fromAddress": + "type": "string" + "toAddress": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "DelegatedResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" diff --git a/docs/api/specs/http/getdelegatedresourceaccountindex.yaml b/docs/api/specs/http/getdelegatedresourceaccountindex.yaml new file mode 100644 index 00000000..8ccb80b9 --- /dev/null +++ b/docs/api/specs/http/getdelegatedresourceaccountindex.yaml @@ -0,0 +1,121 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getdelegatedresourceaccountindex": + "get": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation counterparty addresses (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindex_get" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Query delegation counterparty addresses (V1, read-only)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindex_post" + "externalDocs": + "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml b/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml new file mode 100644 index 00000000..88bc32e6 --- /dev/null +++ b/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml @@ -0,0 +1,121 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getdelegatedresourceaccountindexv2": + "get": + "tags": + - "Stake 2.0" + "summary": "Query delegation counterparty addresses" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindexv2_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Query delegation counterparty addresses" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourceaccountindexv2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" + "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/getdelegatedresourcev2.yaml b/docs/api/specs/http/getdelegatedresourcev2.yaml new file mode 100644 index 00000000..ae307558 --- /dev/null +++ b/docs/api/specs/http/getdelegatedresourcev2.yaml @@ -0,0 +1,116 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getdelegatedresourcev2": + "get": + "tags": + - "Stake 2.0" + "summary": "Query delegation records" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourcev2_get" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" + "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "parameters": + - + "name": "fromAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "toAddress" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Stake 2.0" + "summary": "Query delegation records" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." + "operationId": "wallet_getdelegatedresourcev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "delegatedResource": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetDelegatedResourceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" + "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "fromAddress": + "type": "string" + "toAddress": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "DelegatedResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" diff --git a/docs/api/specs/http/getenergyprices.yaml b/docs/api/specs/http/getenergyprices.yaml new file mode 100644 index 00000000..b51ac2aa --- /dev/null +++ b/docs/api/specs/http/getenergyprices.yaml @@ -0,0 +1,74 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getenergyprices": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Historical energy unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." + "operationId": "wallet_getenergyprices_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getenergyprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetEnergyPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getenergyprices" + "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Historical energy unit prices" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." + "operationId": "wallet_getenergyprices_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getenergyprices.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetEnergyPricesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getenergyprices" + "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "parameters": + [] diff --git a/docs/api/specs/http/getnextmaintenancetime.yaml b/docs/api/specs/http/getnextmaintenancetime.yaml new file mode 100644 index 00000000..58d42e44 --- /dev/null +++ b/docs/api/specs/http/getnextmaintenancetime.yaml @@ -0,0 +1,82 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getnextmaintenancetime": + "get": + "tags": + - "Witness / governance" + "summary": "Next maintenance period time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." + "operationId": "wallet_getnextmaintenancetime_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" + "x-java-response": "NumberMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNextMaintenanceTimeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Next maintenance period time" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." + "operationId": "wallet_getnextmaintenancetime_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" + "x-java-response": "NumberMessage rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNextMaintenanceTimeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/getnodeinfo.yaml b/docs/api/specs/http/getnodeinfo.yaml new file mode 100644 index 00000000..eeb26d33 --- /dev/null +++ b/docs/api/specs/http/getnodeinfo.yaml @@ -0,0 +1,122 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getnodeinfo": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Node status (also /monitor/getnodeinfo)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." + "operationId": "wallet_getnodeinfo_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "beginSyncNum": + "type": "integer" + "block": + "type": "string" + "solidityBlock": + "type": "string" + "currentConnectCount": + "type": "integer" + "activeConnectCount": + "type": "integer" + "passiveConnectCount": + "type": "integer" + "totalFlow": + "type": "integer" + "peerList": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "configNodeInfo": + "type": "object" + "additionalProperties": true + "machineInfo": + "type": "object" + "additionalProperties": true + "cheatWitnessInfoMap": + "type": "object" + "additionalProperties": true + "x-java-response-type": "org.tron.common.entity.NodeInfo" + "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNodeInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnodeinfo" + "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "parameters": + [] + "post": + "tags": + - "Node / pricing / tools" + "summary": "Node status (also /monitor/getnodeinfo)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." + "operationId": "wallet_getnodeinfo_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "beginSyncNum": + "type": "integer" + "block": + "type": "string" + "solidityBlock": + "type": "string" + "currentConnectCount": + "type": "integer" + "activeConnectCount": + "type": "integer" + "passiveConnectCount": + "type": "integer" + "totalFlow": + "type": "integer" + "peerList": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "configNodeInfo": + "type": "object" + "additionalProperties": true + "machineInfo": + "type": "object" + "additionalProperties": true + "cheatWitnessInfoMap": + "type": "object" + "additionalProperties": true + "x-java-response-type": "org.tron.common.entity.NodeInfo" + "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNodeInfoServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnodeinfo" + "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "parameters": + [] diff --git a/docs/api/specs/http/getnowblock.yaml b/docs/api/specs/http/getnowblock.yaml new file mode 100644 index 00000000..56bbaa0e --- /dev/null +++ b/docs/api/specs/http/getnowblock.yaml @@ -0,0 +1,98 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getnowblock": + "get": + "tags": + - "Block / transaction query" + "summary": "Latest block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." + "operationId": "wallet_getnowblock_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNowBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnowblock" + "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Latest block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." + "operationId": "wallet_getnowblock_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "block_header": + "type": "object" + "additionalProperties": true + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Block" + "x-java-response": "Block rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetNowBlockServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getnowblock" + "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/getpaginatedassetissuelist.yaml b/docs/api/specs/http/getpaginatedassetissuelist.yaml new file mode 100644 index 00000000..afdadd61 --- /dev/null +++ b/docs/api/specs/http/getpaginatedassetissuelist.yaml @@ -0,0 +1,116 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getpaginatedassetissuelist": + "get": + "tags": + - "TRC10 asset" + "summary": "Paginated TRC10 list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedassetissuelist_get" + "externalDocs": + "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" + "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "parameters": + - + "name": "offset" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "limit" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "TRC10 asset" + "summary": "Paginated TRC10 list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedassetissuelist_post" + "externalDocs": + "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "assetIssue": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedAssetIssueListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" + "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "offset": + "type": "integer" + "limit": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" diff --git a/docs/api/specs/http/getpaginatednowwitnesslist.yaml b/docs/api/specs/http/getpaginatednowwitnesslist.yaml new file mode 100644 index 00000000..bf29e006 --- /dev/null +++ b/docs/api/specs/http/getpaginatednowwitnesslist.yaml @@ -0,0 +1,116 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getpaginatednowwitnesslist": + "get": + "tags": + - "Witness / governance" + "summary": "Paginated SR list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatednowwitnesslist_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedNowWitnessListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" + "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "parameters": + - + "name": "offset" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "limit" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Paginated SR list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatednowwitnesslist_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedNowWitnessListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" + "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "offset": + "type": "integer" + "limit": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "PaginatedMessage" diff --git a/docs/api/specs/http/getpaginatedproposallist.yaml b/docs/api/specs/http/getpaginatedproposallist.yaml new file mode 100644 index 00000000..51834e08 --- /dev/null +++ b/docs/api/specs/http/getpaginatedproposallist.yaml @@ -0,0 +1,112 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getpaginatedproposallist": + "get": + "tags": + - "Witness / governance" + "summary": "Paginated proposal list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedproposallist_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedProposalListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "offset" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "limit" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Paginated proposal list" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." + "operationId": "wallet_getpaginatedproposallist_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPaginatedProposalListServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "offset": + "type": "integer" + "limit": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" diff --git a/docs/api/specs/http/getpendingsize.yaml b/docs/api/specs/http/getpendingsize.yaml new file mode 100644 index 00000000..bbc33ba8 --- /dev/null +++ b/docs/api/specs/http/getpendingsize.yaml @@ -0,0 +1,62 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getpendingsize": + "get": + "tags": + - "Block / transaction query" + "summary": "Pending pool size" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." + "operationId": "wallet_getpendingsize_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "pendingSize": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPendingSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + [] + "post": + "tags": + - "Block / transaction query" + "summary": "Pending pool size" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." + "operationId": "wallet_getpendingsize_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "pendingSize": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetPendingSizeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + [] diff --git a/docs/api/specs/http/getproposalbyid.yaml b/docs/api/specs/http/getproposalbyid.yaml new file mode 100644 index 00000000..e9a2e2e0 --- /dev/null +++ b/docs/api/specs/http/getproposalbyid.yaml @@ -0,0 +1,120 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getproposalbyid": + "get": + "tags": + - "Witness / governance" + "summary": "Proposal by ID" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." + "operationId": "wallet_getproposalbyid_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposal_id": + "type": "integer" + "proposer_address": + "type": "string" + "expiration_time": + "type": "integer" + "create_time": + "type": "integer" + "approvals": + "type": "array" + "items": + "type": "string" + "state": + "type": "object" + "additionalProperties": true + "x-proto-message": "Proposal" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Proposal" + "x-java-response": "Proposal rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetProposalByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "id" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "Proposal by ID" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." + "operationId": "wallet_getproposalbyid_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposal_id": + "type": "integer" + "proposer_address": + "type": "string" + "expiration_time": + "type": "integer" + "create_time": + "type": "integer" + "approvals": + "type": "array" + "items": + "type": "string" + "state": + "type": "object" + "additionalProperties": true + "x-proto-message": "Proposal" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Proposal" + "x-java-response": "Proposal rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetProposalByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "visible": + "type": "boolean" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/getsignweight.yaml b/docs/api/specs/http/getsignweight.yaml new file mode 100644 index 00000000..a147ecc9 --- /dev/null +++ b/docs/api/specs/http/getsignweight.yaml @@ -0,0 +1,90 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/getsignweight": + "post": + "tags": + - "Transaction build / broadcast" + "summary": "Current multi-sig weight" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getsignweight.md` for examples and detailed behavior." + "operationId": "wallet_getsignweight_post" + "externalDocs": + "url": "docs/api/http/tx-build-and-broadcast/getsignweight.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "object" + "additionalProperties": true + "approved_list": + "type": "array" + "items": + "type": "string" + "current_weight": + "type": "integer" + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "permission": + "type": "object" + "additionalProperties": true + "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionSignWeightServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "oneOf": + - + "required": + - "raw_data" + - + "required": + - "raw_data_hex" + "x-source-shape": "transaction-json" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" diff --git a/docs/api/specs/http/gettransactionbyid.yaml b/docs/api/specs/http/gettransactionbyid.yaml new file mode 100644 index 00000000..fa4d7e10 --- /dev/null +++ b/docs/api/specs/http/gettransactionbyid.yaml @@ -0,0 +1,121 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/gettransactionbyid": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionbyid_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "signature": + "type": "array" + "items": + "type": "string" + "ret": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "Transaction" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Transaction" + "x-java-response": "Transaction rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" + "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionbyid_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "raw_data": + "type": "object" + "additionalProperties": true + "signature": + "type": "array" + "items": + "type": "string" + "ret": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "Transaction" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.protos.Protocol.Transaction" + "x-java-response": "Transaction rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" + "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/gettransactioncountbyblocknum.yaml b/docs/api/specs/http/gettransactioncountbyblocknum.yaml new file mode 100644 index 00000000..b1bfac8d --- /dev/null +++ b/docs/api/specs/http/gettransactioncountbyblocknum.yaml @@ -0,0 +1,86 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/gettransactioncountbyblocknum": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction count in a block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioncountbyblocknum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionCountByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" + "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction count in a block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioncountbyblocknum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "count": + "type": "integer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionCountByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" + "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" diff --git a/docs/api/specs/http/gettransactionfrompending.yaml b/docs/api/specs/http/gettransactionfrompending.yaml new file mode 100644 index 00000000..f3126341 --- /dev/null +++ b/docs/api/specs/http/gettransactionfrompending.yaml @@ -0,0 +1,119 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/gettransactionfrompending": + "get": + "tags": + - "Block / transaction query" + "summary": "Single pending transaction" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionfrompending_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Single pending transaction" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionfrompending_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/gettransactioninfobyblocknum.yaml b/docs/api/specs/http/gettransactioninfobyblocknum.yaml new file mode 100644 index 00000000..a8b6c443 --- /dev/null +++ b/docs/api/specs/http/gettransactioninfobyblocknum.yaml @@ -0,0 +1,219 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/gettransactioninfobyblocknum": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction receipts by block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyblocknum_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" + "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "parameters": + - + "name": "num" + "in": "query" + "required": false + "schema": + "type": "integer" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction receipts by block" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyblocknum_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByBlockNumServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" + "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "num": + "type": "integer" + "visible": + "type": "boolean" + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" diff --git a/docs/api/specs/http/gettransactioninfobyid.yaml b/docs/api/specs/http/gettransactioninfobyid.yaml new file mode 100644 index 00000000..5d48d9eb --- /dev/null +++ b/docs/api/specs/http/gettransactioninfobyid.yaml @@ -0,0 +1,213 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/gettransactioninfobyid": + "get": + "tags": + - "Block / transaction query" + "summary": "Transaction receipt by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyid_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" + "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "parameters": + - + "name": "value" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "Transaction receipt by txid" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." + "operationId": "wallet_gettransactioninfobyid_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "id": + "type": "string" + "fee": + "type": "integer" + "blockNumber": + "type": "integer" + "blockTimeStamp": + "type": "integer" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "receipt": + "type": "object" + "additionalProperties": true + "log": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "result": + "type": "object" + "additionalProperties": true + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "unfreeze_amount": + "type": "integer" + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "exchange_received_amount": + "type": "integer" + "exchange_inject_another_amount": + "type": "integer" + "exchange_withdraw_another_amount": + "type": "integer" + "exchange_id": + "type": "integer" + "shielded_transaction_fee": + "type": "integer" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "packingFee": + "type": "integer" + "withdraw_expire_amount": + "type": "integer" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionInfoByIdServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" + "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "value": + "type": "string" + "visible": + "type": "boolean" + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" diff --git a/docs/api/specs/http/gettransactionlistfrompending.yaml b/docs/api/specs/http/gettransactionlistfrompending.yaml new file mode 100644 index 00000000..c40596e0 --- /dev/null +++ b/docs/api/specs/http/gettransactionlistfrompending.yaml @@ -0,0 +1,86 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/gettransactionlistfrompending": + "get": + "tags": + - "Block / transaction query" + "summary": "All pending transaction IDs" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionlistfrompending_get" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txId": + "type": "array" + "items": + "type": "string" + "x-proto-message": "TransactionIdList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" + "x-java-response": "TransactionIdList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionListFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Block / transaction query" + "summary": "All pending transaction IDs" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." + "operationId": "wallet_gettransactionlistfrompending_post" + "externalDocs": + "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txId": + "type": "array" + "items": + "type": "string" + "x-proto-message": "TransactionIdList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" + "x-java-response": "TransactionIdList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "GetTransactionListFromPendingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/listnodes.yaml b/docs/api/specs/http/listnodes.yaml new file mode 100644 index 00000000..8518c34c --- /dev/null +++ b/docs/api/specs/http/listnodes.yaml @@ -0,0 +1,88 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/listnodes": + "get": + "tags": + - "Node / pricing / tools" + "summary": "Known peers (also /net/listnodes)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." + "operationId": "wallet_listnodes_get" + "externalDocs": + "url": "docs/api/http/node-and-tools/listnodes.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "nodes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "NodeList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" + "x-java-response": "NodeList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListNodesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Node / pricing / tools" + "summary": "Known peers (also /net/listnodes)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." + "operationId": "wallet_listnodes_post" + "externalDocs": + "url": "docs/api/http/node-and-tools/listnodes.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "nodes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "NodeList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" + "x-java-response": "NodeList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListNodesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/listproposals.yaml b/docs/api/specs/http/listproposals.yaml new file mode 100644 index 00000000..42c9377e --- /dev/null +++ b/docs/api/specs/http/listproposals.yaml @@ -0,0 +1,88 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/listproposals": + "get": + "tags": + - "Witness / governance" + "summary": "List of proposals" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." + "operationId": "wallet_listproposals_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listproposals.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListProposalsServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "List of proposals" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." + "operationId": "wallet_listproposals_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listproposals.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "proposals": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListProposalsServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/listwitnesses.yaml b/docs/api/specs/http/listwitnesses.yaml new file mode 100644 index 00000000..18fd0110 --- /dev/null +++ b/docs/api/specs/http/listwitnesses.yaml @@ -0,0 +1,92 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/listwitnesses": + "get": + "tags": + - "Witness / governance" + "summary": "All SR candidates" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." + "operationId": "wallet_listwitnesses_get" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListWitnessesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/listwitnesses" + "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true + "post": + "tags": + - "Witness / governance" + "summary": "All SR candidates" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." + "operationId": "wallet_listwitnesses_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "witnesses": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ListWitnessesServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/listwitnesses" + "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "parameters": + - + "name": "visible" + "in": "query" + "required": false + "schema": + "type": "boolean" + "x-source-derived": true diff --git a/docs/api/specs/http/participateassetissue.yaml b/docs/api/specs/http/participateassetissue.yaml new file mode 100644 index 00000000..464ac6a8 --- /dev/null +++ b/docs/api/specs/http/participateassetissue.yaml @@ -0,0 +1,69 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/participateassetissue": + "post": + "tags": + - "TRC10 asset" + "summary": "Participate in a TRC10 fundraising" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/participateassetissue.md` for examples and detailed behavior." + "operationId": "wallet_participateassetissue_post" + "externalDocs": + "url": "docs/api/http/asset/participateassetissue.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ParticipateAssetIssueServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "to_address": + "type": "string" + "asset_name": + "type": "string" + "amount": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ParticipateAssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.ParticipateAssetIssueContract" diff --git a/docs/api/specs/http/proposalapprove.yaml b/docs/api/specs/http/proposalapprove.yaml new file mode 100644 index 00000000..614ea21c --- /dev/null +++ b/docs/api/specs/http/proposalapprove.yaml @@ -0,0 +1,67 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/proposalapprove": + "post": + "tags": + - "Witness / governance" + "summary": "Vote on a proposal as an SR" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalapprove.md` for examples and detailed behavior." + "operationId": "wallet_proposalapprove_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/proposalapprove.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ProposalApproveServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "proposal_id": + "type": "integer" + "is_add_approval": + "type": "boolean" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ProposalApproveContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalApproveContract" diff --git a/docs/api/specs/http/proposalcreate.yaml b/docs/api/specs/http/proposalcreate.yaml new file mode 100644 index 00000000..dde41c17 --- /dev/null +++ b/docs/api/specs/http/proposalcreate.yaml @@ -0,0 +1,63 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/proposalcreate": + "post": + "tags": + - "Witness / governance" + "summary": "Create a chain-parameter proposal" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalcreate.md` for examples and detailed behavior." + "operationId": "wallet_proposalcreate_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/proposalcreate.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ProposalCreateServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ProposalCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalCreateContract" diff --git a/docs/api/specs/http/proposaldelete.yaml b/docs/api/specs/http/proposaldelete.yaml new file mode 100644 index 00000000..997e87aa --- /dev/null +++ b/docs/api/specs/http/proposaldelete.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/proposaldelete": + "post": + "tags": + - "Witness / governance" + "summary": "Withdraw your own proposal" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposaldelete.md` for examples and detailed behavior." + "operationId": "wallet_proposaldelete_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/proposaldelete.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ProposalDeleteServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "proposal_id": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "ProposalDeleteContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalDeleteContract" diff --git a/docs/api/specs/http/transferasset.yaml b/docs/api/specs/http/transferasset.yaml new file mode 100644 index 00000000..bb7e58ea --- /dev/null +++ b/docs/api/specs/http/transferasset.yaml @@ -0,0 +1,71 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/transferasset": + "post": + "tags": + - "TRC10 asset" + "summary": "Transfer TRC10" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/transferasset.md` for examples and detailed behavior." + "operationId": "wallet_transferasset_post" + "externalDocs": + "url": "docs/api/http/asset/transferasset.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TransferAssetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "asset_name": + "type": "string" + "owner_address": + "type": "string" + "to_address": + "type": "string" + "amount": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "extra_data": + "type": "string" + "x-proto-message": "TransferAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.TransferAssetContract" diff --git a/docs/api/specs/http/triggerconstantcontract.yaml b/docs/api/specs/http/triggerconstantcontract.yaml new file mode 100644 index 00000000..ea29fb2e --- /dev/null +++ b/docs/api/specs/http/triggerconstantcontract.yaml @@ -0,0 +1,116 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/triggerconstantcontract": + "post": + "tags": + - "Smart contract" + "summary": "Read-only contract call" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggerconstantcontract.md` for examples and detailed behavior." + "operationId": "wallet_triggerconstantcontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/triggerconstantcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "txid": + "type": "string" + "constant_result": + "type": "array" + "items": + "type": "string" + "result": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "energy_used": + "type": "integer" + "logs": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "energy_penalty": + "type": "integer" + "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TriggerConstantContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-solidity-endpoint": "/walletsolidity/triggerconstantcontract" + "x-solidity-servlet": "TriggerConstantContractOnSolidityServlet" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "call_value": + "type": "integer" + "data": + "type": "string" + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "function_selector": + "type": "string" + "parameter": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "extra_data": + "type": "string" + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" diff --git a/docs/api/specs/http/triggersmartcontract.yaml b/docs/api/specs/http/triggersmartcontract.yaml new file mode 100644 index 00000000..b87e12c7 --- /dev/null +++ b/docs/api/specs/http/triggersmartcontract.yaml @@ -0,0 +1,114 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/triggersmartcontract": + "post": + "tags": + - "Smart contract" + "summary": "Trigger a contract (write)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggersmartcontract.md` for examples and detailed behavior." + "operationId": "wallet_triggersmartcontract_post" + "externalDocs": + "url": "docs/api/http/smart-contract/triggersmartcontract.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "transaction": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "nested-transaction-json" + "txid": + "type": "string" + "constant_result": + "type": "array" + "items": + "type": "string" + "result": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "energy_used": + "type": "integer" + "logs": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "internal_transactions": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "energy_penalty": + "type": "integer" + "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "TriggerSmartContractServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "call_value": + "type": "integer" + "data": + "type": "string" + "call_token_value": + "type": "integer" + "token_id": + "type": "integer" + "fee_limit": + "type": "integer" + "function_selector": + "type": "string" + "parameter": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" diff --git a/docs/api/specs/http/undelegateresource.yaml b/docs/api/specs/http/undelegateresource.yaml new file mode 100644 index 00000000..f0321f16 --- /dev/null +++ b/docs/api/specs/http/undelegateresource.yaml @@ -0,0 +1,70 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/undelegateresource": + "post": + "tags": + - "Stake 2.0" + "summary": "Undelegate resources from another account" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/undelegateresource.md` for examples and detailed behavior." + "operationId": "wallet_undelegateresource_post" + "externalDocs": + "url": "docs/api/http/stake-v2/undelegateresource.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnDelegateResourceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "resource": + "type": "object" + "additionalProperties": true + "balance": + "type": "integer" + "receiver_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnDelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnDelegateResourceContract" diff --git a/docs/api/specs/http/unfreezeasset.yaml b/docs/api/specs/http/unfreezeasset.yaml new file mode 100644 index 00000000..477a3127 --- /dev/null +++ b/docs/api/specs/http/unfreezeasset.yaml @@ -0,0 +1,63 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/unfreezeasset": + "post": + "tags": + - "TRC10 asset" + "summary": "Unfreeze TRC10 frozen by the issuer" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/unfreezeasset.md` for examples and detailed behavior." + "operationId": "wallet_unfreezeasset_post" + "externalDocs": + "url": "docs/api/http/asset/unfreezeasset.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnFreezeAssetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnfreezeAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UnfreezeAssetContract" diff --git a/docs/api/specs/http/unfreezebalance.yaml b/docs/api/specs/http/unfreezebalance.yaml new file mode 100644 index 00000000..edf5fc03 --- /dev/null +++ b/docs/api/specs/http/unfreezebalance.yaml @@ -0,0 +1,68 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/unfreezebalance": + "post": + "tags": + - "Stake 1.0 (unfreeze and query only)" + "summary": "Unfreeze matured resources (V1, still usable for legacy positions)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/unfreezebalance.md` for examples and detailed behavior." + "operationId": "wallet_unfreezebalance_post" + "externalDocs": + "url": "docs/api/http/stake-v1/unfreezebalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnFreezeBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "resource": + "type": "object" + "additionalProperties": true + "receiver_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnfreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceContract" diff --git a/docs/api/specs/http/unfreezebalancev2.yaml b/docs/api/specs/http/unfreezebalancev2.yaml new file mode 100644 index 00000000..ec5360a4 --- /dev/null +++ b/docs/api/specs/http/unfreezebalancev2.yaml @@ -0,0 +1,68 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/unfreezebalancev2": + "post": + "tags": + - "Stake 2.0" + "summary": "Initiate unfreeze (14-day waiting period)" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/unfreezebalancev2.md` for examples and detailed behavior." + "operationId": "wallet_unfreezebalancev2_post" + "externalDocs": + "url": "docs/api/http/stake-v2/unfreezebalancev2.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UnFreezeBalanceV2Servlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "unfreeze_balance": + "type": "integer" + "resource": + "type": "object" + "additionalProperties": true + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UnfreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceV2Contract" diff --git a/docs/api/specs/http/updateBrokerage.yaml b/docs/api/specs/http/updateBrokerage.yaml new file mode 100644 index 00000000..8f6b5244 --- /dev/null +++ b/docs/api/specs/http/updateBrokerage.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/updateBrokerage": + "post": + "tags": + - "Witness / governance" + "summary": "Update an SR's brokerage" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updateBrokerage.md` for examples and detailed behavior." + "operationId": "wallet_updateBrokerage_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/updateBrokerage.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateBrokerageServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "brokerage": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateBrokerageContract" + "x-proto-file": "protocol/src/main/protos/core/contract/storage_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.StorageContract.UpdateBrokerageContract" diff --git a/docs/api/specs/http/updateaccount.yaml b/docs/api/specs/http/updateaccount.yaml new file mode 100644 index 00000000..e45eccd3 --- /dev/null +++ b/docs/api/specs/http/updateaccount.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/updateaccount": + "post": + "tags": + - "Account" + "summary": "Update an account's name" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/updateaccount.md` for examples and detailed behavior." + "operationId": "wallet_updateaccount_post" + "externalDocs": + "url": "docs/api/http/account/updateaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "account_name": + "type": "string" + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "AccountUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountUpdateContract" diff --git a/docs/api/specs/http/updateasset.yaml b/docs/api/specs/http/updateasset.yaml new file mode 100644 index 00000000..66b1895d --- /dev/null +++ b/docs/api/specs/http/updateasset.yaml @@ -0,0 +1,71 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/updateasset": + "post": + "tags": + - "TRC10 asset" + "summary": "Update a TRC10's description / URL / limits" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/updateasset.md` for examples and detailed behavior." + "operationId": "wallet_updateasset_post" + "externalDocs": + "url": "docs/api/http/asset/updateasset.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateAssetServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "description": + "type": "string" + "url": + "type": "string" + "new_limit": + "type": "integer" + "new_public_limit": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UpdateAssetContract" diff --git a/docs/api/specs/http/updateenergylimit.yaml b/docs/api/specs/http/updateenergylimit.yaml new file mode 100644 index 00000000..c74d480b --- /dev/null +++ b/docs/api/specs/http/updateenergylimit.yaml @@ -0,0 +1,67 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/updateenergylimit": + "post": + "tags": + - "Smart contract" + "summary": "Change the deployer's energy limit" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updateenergylimit.md` for examples and detailed behavior." + "operationId": "wallet_updateenergylimit_post" + "externalDocs": + "url": "docs/api/http/smart-contract/updateenergylimit.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateEnergyLimitServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "origin_energy_limit": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateEnergyLimitContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateEnergyLimitContract" diff --git a/docs/api/specs/http/updatesetting.yaml b/docs/api/specs/http/updatesetting.yaml new file mode 100644 index 00000000..fb2e1bfb --- /dev/null +++ b/docs/api/specs/http/updatesetting.yaml @@ -0,0 +1,67 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/updatesetting": + "post": + "tags": + - "Smart contract" + "summary": "Change the user-energy percentage" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updatesetting.md` for examples and detailed behavior." + "operationId": "wallet_updatesetting_post" + "externalDocs": + "url": "docs/api/http/smart-contract/updatesetting.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateSettingServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "contract_address": + "type": "string" + "consume_user_resource_percent": + "type": "integer" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "UpdateSettingContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateSettingContract" diff --git a/docs/api/specs/http/updatewitness.yaml b/docs/api/specs/http/updatewitness.yaml new file mode 100644 index 00000000..d00bfcad --- /dev/null +++ b/docs/api/specs/http/updatewitness.yaml @@ -0,0 +1,65 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/updatewitness": + "post": + "tags": + - "Witness / governance" + "summary": "Update an SR's URL" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updatewitness.md` for examples and detailed behavior." + "operationId": "wallet_updatewitness_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/updatewitness.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "UpdateWitnessServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "update_url": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WitnessUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessUpdateContract" diff --git a/docs/api/specs/http/validateaddress.yaml b/docs/api/specs/http/validateaddress.yaml new file mode 100644 index 00000000..17f6b372 --- /dev/null +++ b/docs/api/specs/http/validateaddress.yaml @@ -0,0 +1,81 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/validateaddress": + "get": + "tags": + - "Account" + "summary": "Validate an address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." + "operationId": "wallet_validateaddress_get" + "externalDocs": + "url": "docs/api/http/account/validateaddress.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "message": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ValidateAddressServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "parameters": + - + "name": "address" + "in": "query" + "required": false + "schema": + "type": "string" + "x-source-derived": true + "post": + "tags": + - "Account" + "summary": "Validate an address" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." + "operationId": "wallet_validateaddress_post" + "externalDocs": + "url": "docs/api/http/account/validateaddress.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "result": + "type": "boolean" + "message": + "type": "string" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "ValidateAddressServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "address": + "type": "string" + "x-source-shape": "servlet-json-fields" diff --git a/docs/api/specs/http/votewitnessaccount.yaml b/docs/api/specs/http/votewitnessaccount.yaml new file mode 100644 index 00000000..3f6a6dbc --- /dev/null +++ b/docs/api/specs/http/votewitnessaccount.yaml @@ -0,0 +1,70 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/votewitnessaccount": + "post": + "tags": + - "Witness / governance" + "summary": "Vote for SRs" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/votewitnessaccount.md` for examples and detailed behavior." + "operationId": "wallet_votewitnessaccount_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/votewitnessaccount.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "VoteWitnessAccountServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "votes": + "type": "array" + "items": + "type": "object" + "additionalProperties": true + "support": + "type": "boolean" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "VoteWitnessContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.VoteWitnessContract" diff --git a/docs/api/specs/http/withdrawbalance.yaml b/docs/api/specs/http/withdrawbalance.yaml new file mode 100644 index 00000000..69176156 --- /dev/null +++ b/docs/api/specs/http/withdrawbalance.yaml @@ -0,0 +1,63 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/withdrawbalance": + "post": + "tags": + - "Witness / governance" + "summary": "Withdraw block production rewards / dividends" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/withdrawbalance.md` for examples and detailed behavior." + "operationId": "wallet_withdrawbalance_post" + "externalDocs": + "url": "docs/api/http/witness-and-governance/withdrawbalance.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "WithdrawBalanceServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WithdrawBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawBalanceContract" diff --git a/docs/api/specs/http/withdrawexpireunfreeze.yaml b/docs/api/specs/http/withdrawexpireunfreeze.yaml new file mode 100644 index 00000000..62e7b3c0 --- /dev/null +++ b/docs/api/specs/http/withdrawexpireunfreeze.yaml @@ -0,0 +1,63 @@ +# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. +"/wallet/withdrawexpireunfreeze": + "post": + "tags": + - "Stake 2.0" + "summary": "Withdraw matured unfreezes" + "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/withdrawexpireunfreeze.md` for examples and detailed behavior." + "operationId": "wallet_withdrawexpireunfreeze_post" + "externalDocs": + "url": "docs/api/http/stake-v2/withdrawexpireunfreeze.md" + "responses": + "200": + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "txID": + "type": "string" + "raw_data": + "type": "object" + "additionalProperties": true + "raw_data_hex": + "type": "string" + "signature": + "type": "array" + "items": + "type": "string" + "visible": + "type": "boolean" + "contract_address": + "type": "string" + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "text/plain": + "schema": + "type": "string" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "WithdrawExpireUnfreezeServlet" + "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "requestBody": + "required": true + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": true + "properties": + "owner_address": + "type": "string" + "visible": + "type": "boolean" + "Permission_id": + "type": "integer" + "x-proto-message": "WithdrawExpireUnfreezeContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawExpireUnfreezeContract" diff --git a/docs/api/specs/json-rpc/buildTransaction.json b/docs/api/specs/json-rpc/buildTransaction.json new file mode 100644 index 00000000..6540bd6f --- /dev/null +++ b/docs/api/specs/json-rpc/buildTransaction.json @@ -0,0 +1,59 @@ +{ + "name": "buildTransaction", + "tags": [ + { + "name": "Transaction build" + } + ], + "summary": "Build an unsigned transaction (FullNode only; TRX transfer / TRC10 transfer / contract deploy / contract trigger)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/tx-build/buildTransaction.md` for examples and detailed behavior.", + "params": [ + { + "name": "args", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "BuildArguments", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionJson" + } + }, + "errors": [ + { + "code": -32600, + "message": "JsonRpcInvalidRequestException", + "x-java-exception": "JsonRpcInvalidRequestException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/tx-build/buildTransaction.md" + }, + "x-source-derived": true, + "x-java-method": "buildTransaction", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 only (the Solidity port throws -32601)" +} diff --git a/docs/api/specs/json-rpc/eth_accounts.json b/docs/api/specs/json-rpc/eth_accounts.json new file mode 100644 index 00000000..4d6d9024 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_accounts.json @@ -0,0 +1,29 @@ +{ + "name": "eth_accounts", + "tags": [ + { + "name": "Compatibility stub methods" + } + ], + "summary": "[]", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_accounts.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "x-java-type": "String[]" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/stub/eth_accounts.md" + }, + "x-source-derived": true, + "x-java-method": "getAccounts", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_blockNumber.json b/docs/api/specs/json-rpc/eth_blockNumber.json new file mode 100644 index 00000000..badc852d --- /dev/null +++ b/docs/api/specs/json-rpc/eth_blockNumber.json @@ -0,0 +1,26 @@ +{ + "name": "eth_blockNumber", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Latest block height", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_blockNumber.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_blockNumber.md" + }, + "x-source-derived": true, + "x-java-method": "getLatestBlockNum", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_call.json b/docs/api/specs/json-rpc/eth_call.json new file mode 100644 index 00000000..ee84ace4 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_call.json @@ -0,0 +1,60 @@ +{ + "name": "eth_call", + "tags": [ + { + "name": "Smart contract calls" + } + ], + "summary": "Read-only contract call", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_call.md` for examples and detailed behavior.", + "params": [ + { + "name": "transactionCall", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "CallArguments", + "x-position": 0 + }, + { + "name": "blockNumOrTag", + "required": true, + "schema": {}, + "x-java-type": "Object", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32600, + "message": "JsonRpcInvalidRequestException", + "x-java-exception": "JsonRpcInvalidRequestException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/smart-contract/eth_call.md" + }, + "x-source-derived": true, + "x-java-method": "getCall", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_chainId.json b/docs/api/specs/json-rpc/eth_chainId.json new file mode 100644 index 00000000..abcc858c --- /dev/null +++ b/docs/api/specs/json-rpc/eth_chainId.json @@ -0,0 +1,26 @@ +{ + "name": "eth_chainId", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "chainId (last 4 bytes of the genesis block hash)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_chainId.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_chainId.md" + }, + "x-source-derived": true, + "x-java-method": "ethChainId", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_coinbase.json b/docs/api/specs/json-rpc/eth_coinbase.json new file mode 100644 index 00000000..05067011 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_coinbase.json @@ -0,0 +1,32 @@ +{ + "name": "eth_coinbase", + "tags": [ + { + "name": "Compatibility stub methods" + } + ], + "summary": "The configured etherbase address", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_coinbase.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/stub/eth_coinbase.md" + }, + "x-source-derived": true, + "x-java-method": "getCoinbase", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_estimateGas.json b/docs/api/specs/json-rpc/eth_estimateGas.json new file mode 100644 index 00000000..ed6352b1 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_estimateGas.json @@ -0,0 +1,53 @@ +{ + "name": "eth_estimateGas", + "tags": [ + { + "name": "Smart contract calls" + } + ], + "summary": "Estimate energy consumption", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_estimateGas.md` for examples and detailed behavior.", + "params": [ + { + "name": "args", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "CallArguments", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32600, + "message": "JsonRpcInvalidRequestException", + "x-java-exception": "JsonRpcInvalidRequestException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/smart-contract/eth_estimateGas.md" + }, + "x-source-derived": true, + "x-java-method": "estimateGas", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_gasPrice.json b/docs/api/specs/json-rpc/eth_gasPrice.json new file mode 100644 index 00000000..eebd5b2a --- /dev/null +++ b/docs/api/specs/json-rpc/eth_gasPrice.json @@ -0,0 +1,26 @@ +{ + "name": "eth_gasPrice", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Current energy unit price (sun)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_gasPrice.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_gasPrice.md" + }, + "x-source-derived": true, + "x-java-method": "gasPrice", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getBalance.json b/docs/api/specs/json-rpc/eth_getBalance.json new file mode 100644 index 00000000..bab019d3 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getBalance.json @@ -0,0 +1,51 @@ +{ + "name": "eth_getBalance", + "tags": [ + { + "name": "Account state" + } + ], + "summary": "Account TRX balance (sun)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getBalance.md` for examples and detailed behavior.", + "params": [ + { + "name": "address", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "blockNumOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/account/eth_getBalance.md" + }, + "x-source-derived": true, + "x-java-method": "getTrxBalance", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getBlockByHash.json b/docs/api/specs/json-rpc/eth_getBlockByHash.json new file mode 100644 index 00000000..93b453bd --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getBlockByHash.json @@ -0,0 +1,52 @@ +{ + "name": "eth_getBlockByHash", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a block by hash", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockHash", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "fullTransactionObjects", + "required": true, + "schema": { + "type": "boolean" + }, + "x-java-type": "Boolean", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "BlockResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockByHash", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getBlockByNumber.json b/docs/api/specs/json-rpc/eth_getBlockByNumber.json new file mode 100644 index 00000000..c59a7862 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getBlockByNumber.json @@ -0,0 +1,52 @@ +{ + "name": "eth_getBlockByNumber", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a block by height / tag", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md` for examples and detailed behavior.", + "params": [ + { + "name": "bnOrId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "fullTransactionObjects", + "required": true, + "schema": { + "type": "boolean" + }, + "x-java-type": "Boolean", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "BlockResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockByNumber", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getBlockReceipts.json b/docs/api/specs/json-rpc/eth_getBlockReceipts.json new file mode 100644 index 00000000..93b80890 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getBlockReceipts.json @@ -0,0 +1,51 @@ +{ + "name": "eth_getBlockReceipts", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Receipt list for an entire block", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockNumOrHashOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "List" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "JsonRpcInternalException", + "x-java-exception": "JsonRpcInternalException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md" + }, + "x-source-derived": true, + "x-java-method": "getBlockReceipts", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json new file mode 100644 index 00000000..7f3c1477 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json @@ -0,0 +1,42 @@ +{ + "name": "eth_getBlockTransactionCountByHash", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Block transaction count (by hash)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockHash", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockTransactionCountByHash", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json new file mode 100644 index 00000000..2ad526b0 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json @@ -0,0 +1,42 @@ +{ + "name": "eth_getBlockTransactionCountByNumber", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Block transaction count (by height)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md` for examples and detailed behavior.", + "params": [ + { + "name": "bnOrId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetBlockTransactionCountByNumber", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getCode.json b/docs/api/specs/json-rpc/eth_getCode.json new file mode 100644 index 00000000..3f981b03 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getCode.json @@ -0,0 +1,51 @@ +{ + "name": "eth_getCode", + "tags": [ + { + "name": "Account state" + } + ], + "summary": "Contract runtime bytecode", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getCode.md` for examples and detailed behavior.", + "params": [ + { + "name": "contractAddress", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "bnOrId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/account/eth_getCode.md" + }, + "x-source-derived": true, + "x-java-method": "getABIOfSmartContract", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getFilterChanges.json b/docs/api/specs/json-rpc/eth_getFilterChanges.json new file mode 100644 index 00000000..5906541c --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getFilterChanges.json @@ -0,0 +1,53 @@ +{ + "name": "eth_getFilterChanges", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Pull and drain filter increments", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterChanges.md` for examples and detailed behavior.", + "params": [ + { + "name": "filterId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": {}, + "x-java-type": "Object[]" + } + }, + "errors": [ + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_getFilterChanges.md" + }, + "x-source-derived": true, + "x-java-method": "getFilterChanges", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getFilterLogs.json b/docs/api/specs/json-rpc/eth_getFilterLogs.json new file mode 100644 index 00000000..f8261c87 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getFilterLogs.json @@ -0,0 +1,76 @@ +{ + "name": "eth_getFilterLogs", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Pull a log filter's full set (without draining)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterLogs.md` for examples and detailed behavior.", + "params": [ + { + "name": "filterId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "LogFilterElement[]" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32005, + "message": "JsonRpcTooManyResultException", + "x-java-exception": "JsonRpcTooManyResultException" + }, + { + "code": -32000, + "message": "BadItemException", + "x-java-exception": "BadItemException" + }, + { + "code": -32000, + "message": "ExecutionException", + "x-java-exception": "ExecutionException" + }, + { + "code": -32000, + "message": "InterruptedException", + "x-java-exception": "InterruptedException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_getFilterLogs.md" + }, + "x-source-derived": true, + "x-java-method": "getFilterLogs", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getLogs.json b/docs/api/specs/json-rpc/eth_getLogs.json new file mode 100644 index 00000000..c05a792b --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getLogs.json @@ -0,0 +1,77 @@ +{ + "name": "eth_getLogs", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "One-shot log query", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getLogs.md` for examples and detailed behavior.", + "params": [ + { + "name": "fr", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "FilterRequest", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "LogFilterElement[]" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32005, + "message": "JsonRpcTooManyResultException", + "x-java-exception": "JsonRpcTooManyResultException" + }, + { + "code": -32000, + "message": "BadItemException", + "x-java-exception": "BadItemException" + }, + { + "code": -32000, + "message": "ExecutionException", + "x-java-exception": "ExecutionException" + }, + { + "code": -32000, + "message": "InterruptedException", + "x-java-exception": "InterruptedException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_getLogs.md" + }, + "x-source-derived": true, + "x-java-method": "getLogs", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getStorageAt.json b/docs/api/specs/json-rpc/eth_getStorageAt.json new file mode 100644 index 00000000..b30faa31 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getStorageAt.json @@ -0,0 +1,60 @@ +{ + "name": "eth_getStorageAt", + "tags": [ + { + "name": "Account state" + } + ], + "summary": "Contract storage slot", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getStorageAt.md` for examples and detailed behavior.", + "params": [ + { + "name": "address", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "storageIdx", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + }, + { + "name": "blockNumOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 2 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/account/eth_getStorageAt.md" + }, + "x-source-derived": true, + "x-java-method": "getStorageAt", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json b/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json new file mode 100644 index 00000000..5d11c8ca --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json @@ -0,0 +1,52 @@ +{ + "name": "eth_getTransactionByBlockHashAndIndex", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a transaction by block hash + index", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockHash", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "index", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionByBlockHashAndIndex", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json b/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json new file mode 100644 index 00000000..e973700b --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json @@ -0,0 +1,52 @@ +{ + "name": "eth_getTransactionByBlockNumberAndIndex", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a transaction by block height + index", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md` for examples and detailed behavior.", + "params": [ + { + "name": "blockNumOrTag", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + }, + { + "name": "index", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 1 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionByBlockNumberAndIndex", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getTransactionByHash.json b/docs/api/specs/json-rpc/eth_getTransactionByHash.json new file mode 100644 index 00000000..d8ac6f70 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getTransactionByHash.json @@ -0,0 +1,43 @@ +{ + "name": "eth_getTransactionByHash", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a transaction by txid", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md` for examples and detailed behavior.", + "params": [ + { + "name": "txId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionResult" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionByHash", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getTransactionReceipt.json b/docs/api/specs/json-rpc/eth_getTransactionReceipt.json new file mode 100644 index 00000000..b69df01e --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getTransactionReceipt.json @@ -0,0 +1,43 @@ +{ + "name": "eth_getTransactionReceipt", + "tags": [ + { + "name": "Block / transaction query" + } + ], + "summary": "Query a receipt by txid", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md` for examples and detailed behavior.", + "params": [ + { + "name": "txid", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "additionalProperties": true, + "x-java-type": "TransactionReceipt" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md" + }, + "x-source-derived": true, + "x-java-method": "getTransactionReceipt", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_getWork.json b/docs/api/specs/json-rpc/eth_getWork.json new file mode 100644 index 00000000..e8b5551c --- /dev/null +++ b/docs/api/specs/json-rpc/eth_getWork.json @@ -0,0 +1,27 @@ +{ + "name": "eth_getWork", + "tags": [ + { + "name": "Compatibility stub methods" + } + ], + "summary": "[blockHash, null, null]", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_getWork.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "array", + "items": {}, + "x-java-type": "List" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/stub/eth_getWork.md" + }, + "x-source-derived": true, + "x-java-method": "ethGetWork", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_newBlockFilter.json b/docs/api/specs/json-rpc/eth_newBlockFilter.json new file mode 100644 index 00000000..84e0bacf --- /dev/null +++ b/docs/api/specs/json-rpc/eth_newBlockFilter.json @@ -0,0 +1,37 @@ +{ + "name": "eth_newBlockFilter", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Register a new-block filter", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newBlockFilter.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32005, + "message": "JsonRpcExceedLimitException", + "x-java-exception": "JsonRpcExceedLimitException" + }, + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_newBlockFilter.md" + }, + "x-source-derived": true, + "x-java-method": "newBlockFilter", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_newFilter.json b/docs/api/specs/json-rpc/eth_newFilter.json new file mode 100644 index 00000000..f6e62a46 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_newFilter.json @@ -0,0 +1,48 @@ +{ + "name": "eth_newFilter", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Register a log filter", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newFilter.md` for examples and detailed behavior.", + "params": [ + { + "name": "fr", + "required": true, + "schema": { + "type": "object", + "additionalProperties": true + }, + "x-java-type": "FilterRequest", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_newFilter.md" + }, + "x-source-derived": true, + "x-java-method": "newFilter", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_protocolVersion.json b/docs/api/specs/json-rpc/eth_protocolVersion.json new file mode 100644 index 00000000..6ecfb17c --- /dev/null +++ b/docs/api/specs/json-rpc/eth_protocolVersion.json @@ -0,0 +1,26 @@ +{ + "name": "eth_protocolVersion", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Protocol version of the current block header", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_protocolVersion.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_protocolVersion.md" + }, + "x-source-derived": true, + "x-java-method": "getProtocolVersion", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_syncing.json b/docs/api/specs/json-rpc/eth_syncing.json new file mode 100644 index 00000000..49156fe0 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_syncing.json @@ -0,0 +1,25 @@ +{ + "name": "eth_syncing", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Sync status", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_syncing.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "x-java-type": "Object" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/eth_syncing.md" + }, + "x-source-derived": true, + "x-java-method": "getSyncingStatus", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/eth_uninstallFilter.json b/docs/api/specs/json-rpc/eth_uninstallFilter.json new file mode 100644 index 00000000..0d1a2ff6 --- /dev/null +++ b/docs/api/specs/json-rpc/eth_uninstallFilter.json @@ -0,0 +1,52 @@ +{ + "name": "eth_uninstallFilter", + "tags": [ + { + "name": "Logs / filters" + } + ], + "summary": "Uninstall a filter", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_uninstallFilter.md` for examples and detailed behavior.", + "params": [ + { + "name": "filterId", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "boolean", + "x-java-type": "boolean" + } + }, + "errors": [ + { + "code": -32601, + "message": "JsonRpcMethodNotFoundException", + "x-java-exception": "JsonRpcMethodNotFoundException" + }, + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + }, + { + "code": -32000, + "message": "ItemNotFoundException", + "x-java-exception": "ItemNotFoundException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/filter/eth_uninstallFilter.md" + }, + "x-source-derived": true, + "x-java-method": "uninstallFilter", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/net_listening.json b/docs/api/specs/json-rpc/net_listening.json new file mode 100644 index 00000000..947ce216 --- /dev/null +++ b/docs/api/specs/json-rpc/net_listening.json @@ -0,0 +1,26 @@ +{ + "name": "net_listening", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Whether listening on P2P", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_listening.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "boolean", + "x-java-type": "boolean" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/net_listening.md" + }, + "x-source-derived": true, + "x-java-method": "isListening", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/net_peerCount.json b/docs/api/specs/json-rpc/net_peerCount.json new file mode 100644 index 00000000..a5453225 --- /dev/null +++ b/docs/api/specs/json-rpc/net_peerCount.json @@ -0,0 +1,26 @@ +{ + "name": "net_peerCount", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Number of peers", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_peerCount.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/net_peerCount.md" + }, + "x-source-derived": true, + "x-java-method": "getPeerCount", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/net_version.json b/docs/api/specs/json-rpc/net_version.json new file mode 100644 index 00000000..42535281 --- /dev/null +++ b/docs/api/specs/json-rpc/net_version.json @@ -0,0 +1,26 @@ +{ + "name": "net_version", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Network ID (same as eth_chainId)", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_version.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/net_version.md" + }, + "x-source-derived": true, + "x-java-method": "getNetVersion", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/web3_clientVersion.json b/docs/api/specs/json-rpc/web3_clientVersion.json new file mode 100644 index 00000000..2b5c3679 --- /dev/null +++ b/docs/api/specs/json-rpc/web3_clientVersion.json @@ -0,0 +1,26 @@ +{ + "name": "web3_clientVersion", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Client version string", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_clientVersion.md` for examples and detailed behavior.", + "params": [], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [], + "externalDocs": { + "url": "docs/api/json-rpc/node/web3_clientVersion.md" + }, + "x-source-derived": true, + "x-java-method": "web3ClientVersion", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/docs/api/specs/json-rpc/web3_sha3.json b/docs/api/specs/json-rpc/web3_sha3.json new file mode 100644 index 00000000..31e83ee1 --- /dev/null +++ b/docs/api/specs/json-rpc/web3_sha3.json @@ -0,0 +1,42 @@ +{ + "name": "web3_sha3", + "tags": [ + { + "name": "Node info / chain identity" + } + ], + "summary": "Keccak-256 hash", + "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_sha3.md` for examples and detailed behavior.", + "params": [ + { + "name": "data", + "required": true, + "schema": { + "type": "string" + }, + "x-java-type": "String", + "x-position": 0 + } + ], + "result": { + "name": "result", + "schema": { + "type": "string", + "x-java-type": "String" + } + }, + "errors": [ + { + "code": -32602, + "message": "JsonRpcInvalidParamsException", + "x-java-exception": "JsonRpcInvalidParamsException" + } + ], + "externalDocs": { + "url": "docs/api/json-rpc/node/web3_sha3.md" + }, + "x-source-derived": true, + "x-java-method": "web3Sha3", + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "x-ports": "FullNode 8545 / Solidity 8555" +} diff --git a/mkdocs.yml b/mkdocs.yml index a9b57ffa..2bc23b54 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -20,6 +20,7 @@ nav: - 节点维护工具: using_javatron/toolkit.md - API接口: - 概述: api/index.md + - 机器可读定义: api/interface-definitions.md - HTTP 接口: - 概述: api/http/index.md - 账户: diff --git a/scripts/generate_api_specs.py b/scripts/generate_api_specs.py new file mode 100644 index 00000000..d06b41b5 --- /dev/null +++ b/scripts/generate_api_specs.py @@ -0,0 +1,1289 @@ +#!/usr/bin/env python3 +"""Generate machine-readable API specs from java-tron source plus docs metadata.""" + +from __future__ import annotations + +import json +import os +import re +from pathlib import Path +from typing import Any + + +ROOT = Path(__file__).resolve().parents[1] +DOCS = ROOT / "docs" +HTTP_INDEX = DOCS / "api" / "http" / "index.md" +JSON_RPC_INDEX = DOCS / "api" / "json-rpc" / "index.md" +OPENAPI_OUT = DOCS / "api" / "openapi.yaml" +OPENRPC_OUT = DOCS / "api" / "openrpc.json" +HTTP_SPECS_DIR = DOCS / "api" / "specs" / "http" +JSON_RPC_SPECS_DIR = DOCS / "api" / "specs" / "json-rpc" + + +def find_java_tron_root() -> Path: + candidates = [ + Path(os.environ["JAVA_TRON_SOURCE"]) if os.environ.get("JAVA_TRON_SOURCE") else None, + ROOT.parent / "java-tron", + ] + for candidate in candidates: + if candidate and (candidate / "framework/src/main/java").is_dir(): + return candidate + raise FileNotFoundError( + "java-tron source tree not found. Set JAVA_TRON_SOURCE to the java-tron checkout." + ) + + +JAVA_TRON = find_java_tron_root() +JAVA_MAIN = JAVA_TRON / "framework/src/main/java" +JAVA_SOURCE_ROOTS = [path for path in JAVA_TRON.glob("*/src/main/java") if path.is_dir()] +PROTO_ROOTS = [ + JAVA_TRON / "protocol/src/main/protos", + JAVA_TRON / "framework/src/main/protos", +] + + +TYPE_MAP = { + "bool": "boolean", + "boolean": "boolean", + "int": "integer", + "int32": "integer", + "int64": "integer", + "long": "integer", + "number": "number", + "object": "object", + "json object": "object", + "array": "array", + "string[]": "array", + "object[]": "array", +} + + +def slug(value: str) -> str: + return re.sub(r"[^A-Za-z0-9]+", "_", value).strip("_") + + +def clean_inline(value: str) -> str: + value = value.replace("\\|", "|") + value = re.sub(r"\[([^\]]+)\]\([^)]+\)", r"\1", value) + value = value.replace("**", "") + value = value.replace("`", "") + return value.strip() + + +def read(path: Path) -> str: + return path.read_text(encoding="utf-8") + + +def strip_java_comments(text: str) -> str: + text = re.sub(r"/\*.*?\*/", "", text, flags=re.S) + return "\n".join(line for line in text.splitlines() if not line.strip().startswith("//")) + + +def extract_index_entries(index_path: Path, base_dir: Path, link_pattern: str) -> list[dict[str, str]]: + entries: list[dict[str, str]] = [] + current_section = "" + for line in read(index_path).splitlines(): + heading = re.match(r"^##\s+(.+)", line) + if heading: + current_section = clean_inline(heading.group(1)) + continue + match = re.match(rf"^\|\s*\[`?({link_pattern})`?\]\(([^)]+)\)\s*\|\s*(.*?)\s*\|", line) + if not match: + continue + name, rel, description = match.groups() + entries.append( + { + "name": clean_inline(name), + "description": clean_inline(description), + "section": current_section, + "doc": str((base_dir / rel).resolve().relative_to(ROOT)), + } + ) + return entries + + +def extract_bullet(markdown: str, label: str) -> str | None: + match = re.search(rf"^- {re.escape(label)}:\s*(.+)$", markdown, flags=re.MULTILINE) + return clean_inline(match.group(1)) if match else None + + +def doc_entry_map(entries: list[dict[str, str]]) -> dict[str, dict[str, str]]: + return {entry["name"]: entry for entry in entries} + + +def servlet_class_files() -> dict[str, Path]: + files: dict[str, Path] = {} + for root in JAVA_SOURCE_ROOTS: + for path in root.rglob("*.java"): + files.setdefault(path.stem, path) + return files + + +CLASS_FILES = servlet_class_files() + + +def parse_autowired_fields(java_text: str) -> dict[str, str]: + fields: dict[str, str] = {} + for match in re.finditer(r"private\s+([A-Za-z0-9_]+)\s+([A-Za-z0-9_]+)\s*;", java_text): + class_name, field_name = match.groups() + fields[field_name] = class_name + return fields + + +def extract_servlet_registrations(service_file: Path) -> list[dict[str, str]]: + java = strip_java_comments(read(service_file)) + fields = parse_autowired_fields(java) + registrations: list[dict[str, str]] = [] + pattern = re.compile( + r"\.?\s*addServlet\s*\(\s*new\s+ServletHolder\s*\(\s*([A-Za-z0-9_]+)\s*\)" + r"\s*,\s*\"([^\"]+)\"\s*\)", + re.S, + ) + for match in pattern.finditer(java): + field_name, path = match.groups() + servlet_class = fields.get(field_name, field_name) + registrations.append( + { + "path": path, + "servlet": servlet_class, + "field": field_name, + "source": str(service_file.relative_to(JAVA_TRON)), + } + ) + return registrations + + +def source_http_registrations() -> dict[str, dict[str, Any]]: + fullnode_file = JAVA_MAIN / "org/tron/core/services/http/FullNodeHttpApiService.java" + solidity_file = ( + JAVA_MAIN + / "org/tron/core/services/interfaceOnSolidity/http/solidity/HttpApiOnSolidityService.java" + ) + registrations: dict[str, dict[str, Any]] = {} + for item in extract_servlet_registrations(fullnode_file): + if not item["path"].startswith("/wallet/"): + continue + registrations[item["path"]] = {**item, "service": "FullNode HTTP"} + for item in extract_servlet_registrations(solidity_file): + if not item["path"].startswith("/walletsolidity/"): + continue + wallet_path = "/wallet/" + item["path"].removeprefix("/walletsolidity/") + if wallet_path in registrations: + registrations[wallet_path]["solidityEndpoint"] = item["path"] + registrations[wallet_path]["solidityServlet"] = item["servlet"] + return registrations + + +def java_class_text(class_name: str) -> str: + path = CLASS_FILES.get(class_name) + return read(path) if path else "" + + +def class_extends(java: str) -> str | None: + match = re.search(r"\bclass\s+[A-Za-z0-9_]+\s+extends\s+([A-Za-z0-9_]+)", java) + return match.group(1) if match else None + + +def java_method_body(java: str, method_name: str) -> str | None: + match = re.search(rf"\b{method_name}\s*\([^)]*\)\s*(?:throws\s+[^\{{]+)?\{{", java) + if not match: + return None + start = match.end() + depth = 1 + idx = start + while idx < len(java) and depth: + if java[idx] == "{": + depth += 1 + elif java[idx] == "}": + depth -= 1 + idx += 1 + return java[start : idx - 1] + + +def java_class_body(java: str, class_name: str | None = None) -> str: + if class_name: + match = re.search(rf"\bclass\s+{re.escape(class_name)}\b[^\{{]*\{{", java) + else: + match = re.search(r"\bclass\s+[A-Za-z0-9_]+\b[^\{]*\{", java) + if not match: + return java + start = match.end() + depth = 1 + idx = start + while idx < len(java) and depth: + if java[idx] == "{": + depth += 1 + elif java[idx] == "}": + depth -= 1 + idx += 1 + return java[start : idx - 1] + + +def remove_nested_class_bodies(java_body: str) -> str: + result = [] + idx = 0 + nested = re.compile(r"\b(?:public|private|protected|static|\s)*class\s+[A-Za-z0-9_]+\b[^\{]*\{") + while idx < len(java_body): + match = nested.search(java_body, idx) + if not match: + result.append(java_body[idx:]) + break + result.append(java_body[idx : match.start()]) + depth = 1 + pos = match.end() + while pos < len(java_body) and depth: + if java_body[pos] == "{": + depth += 1 + elif java_body[pos] == "}": + depth -= 1 + pos += 1 + idx = pos + return "".join(result) + + +def servlet_http_methods(class_name: str, seen: set[str] | None = None) -> list[str]: + seen = seen or set() + if class_name in seen: + return ["post"] + seen.add(class_name) + java = strip_java_comments(java_class_text(class_name)) + methods = [] + do_get = java_method_body(java, "doGet") + do_post = java_method_body(java, "doPost") + if do_get and do_get.strip(): + methods.append("get") + if do_post and do_post.strip(): + methods.append("post") + if methods: + return methods + parent = class_extends(java) + return servlet_http_methods(parent, seen) if parent else ["post"] + + +def method_delegates_to(class_name: str, method_name: str, target_method: str) -> bool: + java = strip_java_comments(java_class_text(class_name)) + body = java_method_body(java, method_name) or "" + return bool( + re.fullmatch( + rf"\s*{re.escape(target_method)}\s*\(\s*request\s*,\s*response\s*\)\s*;?\s*", + body, + re.S, + ) + ) + + +def imports_by_simple_name(java: str) -> dict[str, str]: + imports: dict[str, str] = {} + for match in re.finditer(r"^import\s+([A-Za-z0-9_.]+)\.([A-Za-z0-9_]+);", java, re.M): + package, simple = match.groups() + imports[simple] = f"{package}.{simple}" + return imports + + +def servlet_request_type(class_name: str, seen: set[str] | None = None) -> tuple[str | None, str | None]: + seen = seen or set() + if class_name in seen: + return None, None + seen.add(class_name) + java = strip_java_comments(java_class_text(class_name)) + imports = imports_by_simple_name(java) + match = re.search(r"\b([A-Za-z0-9_]+)\.Builder\s+[A-Za-z0-9_]+\s*=", java) + if not match: + match = re.search(r"\b([A-Za-z0-9_]+)\.newBuilder\s*\(", java) + if match: + simple = match.group(1) + return simple, imports.get(simple) + if "Util.packTransaction" in java: + return "Transaction", imports.get("Transaction", "org.tron.protos.Protocol.Transaction") + parent = class_extends(java) + return servlet_request_type(parent, seen) if parent else (None, None) + + +def source_field_schema(name: str) -> dict[str, Any]: + integer_names = { + "fee_limit", + "call_value", + "consume_user_resource_percent", + "origin_energy_limit", + "call_token_value", + "token_id", + "timestamp", + "num", + "offset", + "limit", + "Permission_id", + "count", + "burnTrxAmount", + "brokerage", + "reward", + } + boolean_names = {"visible", "approved", "result"} + array_names = {"signature", "votes"} + object_names = {"raw_data", "abi", "new_contract", "transaction"} + if name in integer_names or name.endswith("_count") or name.endswith("_amount") or name.endswith("Size"): + return {"type": "integer"} + if name in boolean_names: + return {"type": "boolean"} + if name in array_names: + return {"type": "array", "items": {"type": "object"}} + if name in object_names: + return {"type": "object", "additionalProperties": True} + return {"type": "string"} + + +def transaction_json_request_schema(source_shape: str = "transaction-json") -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "raw_data": {"type": "object", "additionalProperties": True}, + "raw_data_hex": {"type": "string"}, + "signature": {"type": "array", "items": {"type": "string"}}, + "visible": {"type": "boolean"}, + }, + "oneOf": [ + {"required": ["raw_data"]}, + {"required": ["raw_data_hex"]}, + ], + "x-source-shape": source_shape, + } + + +def transaction_response_schema( + source_shape: str = "transaction-json", + java_response: str = "protocol.Transaction rendered by Util.printCreateTransaction", +) -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "txID": {"type": "string"}, + "raw_data": {"type": "object", "additionalProperties": True}, + "raw_data_hex": {"type": "string"}, + "signature": {"type": "array", "items": {"type": "string"}}, + "visible": {"type": "boolean"}, + "contract_address": {"type": "string"}, + }, + "x-java-response": java_response, + "x-source-shape": source_shape, + } + + +def proto_response_schema(message_name: str, description: str | None = None) -> dict[str, Any]: + schema = proto_message_schema(message_name) or { + "type": "object", + "additionalProperties": True, + "properties": {}, + } + schema["x-java-response"] = description or f"{message_name} rendered by java-tron JSON printer" + return schema + + +def array_response_schema(item_schema: dict[str, Any], description: str) -> dict[str, Any]: + return { + "type": "array", + "items": item_schema, + "x-java-response": description, + } + + +def address_visible_request_schema(source_shape: str = "servlet-effective-input") -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "address": {"type": "string"}, + "visible": {"type": "boolean"}, + }, + "x-source-shape": source_shape, + } + + +def transaction_sign_weight_response_schema() -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "result": {"type": "object", "additionalProperties": True}, + "approved_list": {"type": "array", "items": {"type": "string"}}, + "current_weight": {"type": "integer"}, + "transaction": transaction_response_schema("nested-transaction-json"), + "permission": {"type": "object", "additionalProperties": True}, + }, + "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight", + } + + +def transaction_approved_list_response_schema() -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "result": {"type": "object", "additionalProperties": True}, + "approved_list": {"type": "array", "items": {"type": "string"}}, + "transaction": transaction_response_schema("nested-transaction-json"), + }, + "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList", + } + + +def broadcast_response_schema(include_transaction: bool = False) -> dict[str, Any]: + properties: dict[str, Any] = { + "result": {"type": "boolean"}, + "code": {"type": "string"}, + "message": {"type": "string"}, + "txid": {"type": "string"}, + } + if include_transaction: + properties["transaction"] = {"type": "string"} + return { + "type": "object", + "additionalProperties": True, + "properties": properties, + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields", + } + + +def return_result_schema() -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "result": {"type": "boolean"}, + "code": {"type": "string"}, + "message": {"type": "string"}, + }, + } + + +def transaction_extention_response_schema() -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "transaction": transaction_response_schema("nested-transaction-json"), + "txid": {"type": "string"}, + "constant_result": {"type": "array", "items": {"type": "string"}}, + "result": return_result_schema(), + "energy_used": {"type": "integer"}, + "logs": {"type": "array", "items": {"type": "object", "additionalProperties": True}}, + "internal_transactions": { + "type": "array", + "items": {"type": "object", "additionalProperties": True}, + }, + "energy_penalty": {"type": "integer"}, + }, + "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention", + } + + +def estimate_energy_response_schema() -> dict[str, Any]: + return { + "type": "object", + "additionalProperties": True, + "properties": { + "result": return_result_schema(), + "energy_required": {"type": "integer"}, + }, + "x-java-response": "EstimateEnergyMessage rendered by Util.printEstimateEnergyMessage", + } + + +UTIL_CONSTANTS = { + "PERMISSION_ID": "Permission_id", + "S_VALUE": "value", + "VISIBLE": "visible", + "TRANSACTION": "transaction", + "VALUE": "value", + "VALUE_FIELD_NAME": "value", + "CONTRACT_TYPE": "contractType", + "EXTRA_DATA": "extra_data", + "OWNER_ADDRESS": "owner_address", + "CONTRACT_ADDRESS": "contract_address", + "FUNCTION_SELECTOR": "function_selector", + "FUNCTION_PARAMETER": "parameter", + "CALL_DATA": "data", +} + + +def java_string_constants(java: str) -> dict[str, str]: + constants = dict(UTIL_CONSTANTS) + for match in re.finditer( + r"\b(?:public|private|protected)?\s*(?:static\s+)?final\s+String\s+([A-Za-z0-9_]+)\s*=\s*\"([^\"]+)\"", + java, + ): + name, value = match.groups() + constants[name] = value + return constants + + +def literal_json_fields(java: str) -> list[str]: + fields: list[str] = [] + patterns = [ + r"\.getString\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", + r"\.getInteger\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", + r"\.getBoolean\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", + r"\.getLong\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", + r"\.getBigDecimal\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", + r"\.containsKey\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", + r"Util\.getJsonLongValue\s*\([^,]+,\s*\"([A-Za-z0-9_]+)\"", + ] + for pattern in patterns: + fields.extend(re.findall(pattern, java)) + for constant, field_name in UTIL_CONSTANTS.items(): + if re.search(rf"\bUtil\.{constant}\b|\b{constant}\b", java): + fields.append(field_name) + return list(dict.fromkeys(fields)) + + +def source_post_fields(class_name: str, seen: set[str] | None = None) -> list[str]: + seen = seen or set() + if class_name in seen: + return [] + seen.add(class_name) + java = strip_java_comments(java_class_text(class_name)) + body = java_method_body(java, "doPost") or "" + fields = literal_json_fields(body) + if "Util.getVisiblePost" in body or "params.isVisible()" in body: + fields.append("visible") + if "setTransactionPermissionId" in body: + fields.append("Permission_id") + if "setTransactionExtraData" in body: + fields.append("extra_data") + if "Util.packTransaction" in body: + fields.extend(["raw_data", "raw_data_hex", "signature"]) + parent = class_extends(java) + if parent: + fields.extend(source_post_fields(parent, seen)) + return list(dict.fromkeys(fields)) + + +def post_body_uses_direct_json(class_name: str) -> bool: + java = strip_java_comments(java_class_text(class_name)) + body = java_method_body(java, "doPost") or "" + if "JsonFormat.merge" not in body: + return bool(literal_json_fields(body)) + return False + + +def servlet_get_parameters(class_name: str, seen: set[str] | None = None) -> list[str]: + seen = seen or set() + if class_name in seen: + return [] + seen.add(class_name) + java = strip_java_comments(java_class_text(class_name)) + if class_name == "GetBlockServlet": + return ["id_or_num", "detail", "visible"] + body = java_method_body(java, "doGet") or "" + if method_delegates_to(class_name, "doGet", "doPost"): + body += "\n" + (java_method_body(java, "doPost") or "") + constants = java_string_constants(java) + params = [] + for match in re.finditer(r"\.getParameter\s*\(\s*(?:\"([A-Za-z0-9_]+)\"|([A-Za-z0-9_]+))\s*\)", body): + literal, identifier = match.groups() + if literal: + params.append(literal) + elif identifier in constants: + params.append(constants[identifier]) + if "Util.getAddress(request)" in body: + params.append("address") + suppress_visible = { + "GetBrokerageServlet", + "GetRewardServlet", + "GetTransactionCountByBlockNumServlet", + "ValidateAddressServlet", + } + if "Util.getVisible(request)" in body or (params and class_name not in suppress_visible): + params.append("visible") + if params: + return list(dict.fromkeys(params)) + parent = class_extends(java) + return servlet_get_parameters(parent, seen) if parent else [] + + +def proto_type_to_schema(proto_type: str, repeated: bool) -> dict[str, Any]: + mapping = { + "string": {"type": "string"}, + "bytes": {"type": "string"}, + "bool": {"type": "boolean"}, + "double": {"type": "number"}, + "float": {"type": "number"}, + "int32": {"type": "integer"}, + "int64": {"type": "integer"}, + "uint32": {"type": "integer"}, + "uint64": {"type": "integer"}, + "sint32": {"type": "integer"}, + "sint64": {"type": "integer"}, + "fixed32": {"type": "integer"}, + "fixed64": {"type": "integer"}, + } + schema = mapping.get(proto_type.lstrip("."), {"type": "object", "additionalProperties": True}) + if repeated: + return {"type": "array", "items": schema} + return schema + + +def remove_proto_nested_blocks(body: str) -> str: + result = [] + idx = 0 + nested = re.compile(r"^\s*(?:message|enum)\s+[A-Za-z0-9_]+\s*\{", re.M) + while idx < len(body): + match = nested.search(body, idx) + if not match: + result.append(body[idx:]) + break + result.append(body[idx : match.start()]) + depth = 1 + pos = match.end() + while pos < len(body) and depth: + if body[pos] == "{": + depth += 1 + elif body[pos] == "}": + depth -= 1 + pos += 1 + idx = pos + return "".join(result) + + +def proto_message_schema(message_name: str | None) -> dict[str, Any] | None: + if not message_name: + return None + for root in PROTO_ROOTS: + if not root.exists(): + continue + for path in root.rglob("*.proto"): + text = read(path) + match = re.search(rf"\bmessage\s+{re.escape(message_name)}\s*\{{", text) + if not match: + continue + start = match.end() + depth = 1 + idx = start + while idx < len(text) and depth: + if text[idx] == "{": + depth += 1 + elif text[idx] == "}": + depth -= 1 + idx += 1 + body = remove_proto_nested_blocks(re.sub(r"//.*", "", text[start : idx - 1])) + properties: dict[str, Any] = {} + for field in re.finditer( + r"^\s*(?:(optional|required|repeated)\s+)?([.\w]+)\s+([A-Za-z0-9_]+)\s*=", + body, + re.M, + ): + label, proto_type, name = field.groups() + properties[name] = proto_type_to_schema(proto_type, label == "repeated") + return { + "type": "object", + "additionalProperties": True, + "properties": properties, + "x-proto-message": message_name, + "x-proto-file": str(path.relative_to(JAVA_TRON)), + } + return None + + +def java_path_for_fqn(fqn: str) -> Path | None: + rel = Path(*fqn.split(".")).with_suffix(".java") + for root in JAVA_SOURCE_ROOTS: + path = root / rel + if path.exists(): + return path + return None + + +def java_field_schema(java_type: str) -> dict[str, Any]: + java_type = java_type.strip() + if java_type.startswith("List<"): + inner = java_type.removeprefix("List<").removesuffix(">") + return {"type": "array", "items": java_field_schema(inner)} + if java_type.startswith("Map<"): + return {"type": "object", "additionalProperties": True} + return java_type_schema(java_type) + + +def java_pojo_schema(fqn: str) -> dict[str, Any] | None: + path = java_path_for_fqn(fqn) + if not path: + return None + text = remove_nested_class_bodies(java_class_body(strip_java_comments(read(path)), path.stem)) + properties: dict[str, Any] = {} + for match in re.finditer( + r"private\s+(?:final\s+)?([A-Za-z0-9_<>, ?\[\]]+)\s+([A-Za-z0-9_]+)\s*(?:=|;)", + text, + ): + java_type, name = match.groups() + properties[name] = java_field_schema(java_type) + if not properties: + return None + return { + "type": "object", + "additionalProperties": True, + "properties": properties, + "x-java-response-type": fqn, + "x-java-response-source": str(path.relative_to(JAVA_TRON)), + } + + +def schema_for_printed_proto(body: str, imports: dict[str, str]) -> dict[str, Any] | None: + printed_vars = re.findall( + r"(?:JsonFormat\.printToString|Util\.print[A-Za-z0-9_]*)\s*\(\s*([A-Za-z0-9_]+)\b", + body, + ) + for var_name in printed_vars: + declaration = re.search( + rf"\b([A-Za-z0-9_.]+(?:\.Builder)?)\s+{re.escape(var_name)}\s*(?:=|;)", + body, + ) + if not declaration: + continue + java_type = declaration.group(1).removesuffix(".Builder") + simple_type = java_type.split(".")[-1] + schema = proto_message_schema(simple_type) + if schema: + schema["x-java-response-type"] = imports.get(simple_type, java_type) + schema["x-java-response"] = f"{simple_type} rendered by java-tron JSON printer" + return schema + return None + + +def source_request_schema(class_name: str, request_type: str | None, request_fqn: str | None) -> dict[str, Any]: + explicit_fields = source_post_fields(class_name) + java = strip_java_comments(java_class_text(class_name)) + post_body = java_method_body(java, "doPost") or "" + if class_name in { + "GetAccountServlet", + "GetAccountNetServlet", + "GetAssetIssueByAccountServlet", + }: + schema = address_visible_request_schema() + if request_type: + schema["x-java-request-type"] = request_fqn or request_type + return schema + if class_name == "BroadcastHexServlet": + return { + "type": "object", + "additionalProperties": True, + "properties": {"transaction": {"type": "string"}}, + "required": ["transaction"], + "x-source-shape": "servlet-json-fields", + } + if "Util.packTransaction" in post_body: + schema = transaction_json_request_schema() + if request_type: + schema["x-java-request-type"] = request_fqn or request_type + return schema + if re.search(r"\bdoGet\s*\(\s*request\s*,\s*response\s*\)", post_body): + explicit_fields.extend(servlet_get_parameters(class_name)) + request_type = request_type if request_type != "Transaction" else request_type + proto_schema = proto_message_schema(request_type) + if post_body_uses_direct_json(class_name): + schema: dict[str, Any] = { + "type": "object", + "additionalProperties": True, + "properties": {name: source_field_schema(name) for name in explicit_fields}, + "x-source-shape": "servlet-json-fields", + } + else: + schema = proto_schema or { + "type": "object", + "additionalProperties": True, + "properties": {}, + } + schema.setdefault("properties", {}) + for name in explicit_fields: + schema["properties"].setdefault(name, source_field_schema(name)) + schema["x-source-shape"] = "protobuf-json-plus-servlet-fields" if proto_schema else "servlet-json-fields" + if request_type: + schema["x-java-request-type"] = request_fqn or request_type + return schema + + +def source_response_schema(class_name: str, seen: set[str] | None = None) -> dict[str, Any]: + seen = seen or set() + if class_name in seen: + return {"type": "object", "additionalProperties": True} + seen.add(class_name) + java = strip_java_comments(java_class_text(class_name)) + imports = imports_by_simple_name(java) + body = java_class_body(java, class_name) + if class_name == "BroadcastServlet": + return broadcast_response_schema() + if class_name == "BroadcastHexServlet": + return broadcast_response_schema(include_transaction=True) + if "Util.printCreateTransaction" in body: + return transaction_response_schema() + if "Util.printTransactionExtention" in body: + return transaction_extention_response_schema() + if "Util.printEstimateEnergyMessage" in body: + return estimate_energy_response_schema() + if "Util.printTransactionSignWeight" in body: + return transaction_sign_weight_response_schema() + if "Util.printTransactionApprovedList" in body: + return transaction_approved_list_response_schema() + if "convertLogAddressToTronAddress(reply" in body: + return proto_response_schema( + "TransactionInfo", + "TransactionInfo rendered through convertLogAddressToTronAddress", + ) + if "printTransactionInfoList(reply" in body: + return array_response_schema( + proto_response_schema( + "TransactionInfo", + "TransactionInfo rendered through convertLogAddressToTronAddress", + ), + "Array of TransactionInfo rendered by printTransactionInfoList", + ) + if "Util.printTransaction(reply.getInstance()" in body: + return transaction_response_schema( + java_response="protocol.Transaction rendered by Util.printTransaction" + ) + if "wallet.getChainParameters()" in body: + return proto_response_schema("ChainParameters") + json_response = re.search( + r"\b([A-Za-z0-9_]+)\s+([A-Za-z0-9_]+)\s*=.*?;\s*.*?JSON\.toJSONString\s*\(\s*\2\s*\)", + body, + re.S, + ) + if json_response: + simple_type = json_response.group(1) + pojo = java_pojo_schema(imports.get(simple_type, simple_type)) + if pojo: + return pojo + proto_print = schema_for_printed_proto(body, imports) + if proto_print: + return proto_print + properties: dict[str, Any] = {} + for field in re.findall(r'\{\s*\\?"([A-Za-z0-9_]+)\\?"\s*:', body): + properties[field] = source_field_schema(field) + for field in re.findall(r"\.put\s*\(\s*\"([A-Za-z0-9_]+)\"", body): + properties[field] = source_field_schema(field) + for constant, field_name in UTIL_CONSTANTS.items(): + if re.search(rf"\.put\s*\(\s*(?:Util\.)?{constant}\b", body): + properties[field_name] = source_field_schema(field_name) + util_prints = { + "Util.printCreateTransaction": "protocol.Transaction plus txID/raw_data_hex/visible", + "Util.printTransactionExtention": "TransactionExtention with expanded transaction", + "Util.printEstimateEnergyMessage": "EstimateEnergyMessage", + "Util.printTransactionSignWeight": "TransactionSignWeight", + "Util.printTransactionApprovedList": "TransactionApprovedList", + "JsonFormat.printToString": "protobuf JSON", + } + schema: dict[str, Any] = {"type": "object", "additionalProperties": True} + if properties: + schema["properties"] = properties + for marker, description in util_prints.items(): + if marker in body: + schema["x-java-response"] = description + break + parent = class_extends(java) + if not properties and parent: + return source_response_schema(parent, seen) + return schema + + +def documented_http_entries() -> dict[str, dict[str, str]]: + return doc_entry_map(extract_index_entries(HTTP_INDEX, HTTP_INDEX.parent, r"/wallet/[A-Za-z0-9/_-]+")) + + +def split_table_row(line: str) -> list[str]: + stripped = line.strip().strip("|") + return [clean_inline(part) for part in re.split(r"(? list[dict[str, str]]: + marker = re.search(r"^## Request parameters\s*$", markdown, flags=re.MULTILINE) + if not marker: + return [] + lines = markdown[marker.end() :].splitlines() + table: list[str] = [] + in_table = False + for line in lines: + if line.startswith("|"): + table.append(line) + in_table = True + elif in_table: + break + if len(table) < 3: + return [] + headers = [h.lower() for h in split_table_row(table[0])] + rows = [] + for line in table[2:]: + cells = split_table_row(line) + if len(cells) < len(headers): + continue + item = dict(zip(headers, cells)) + rows.append(item) + return rows + + +def schema_for_type(type_text: str) -> dict[str, Any]: + lowered = type_text.lower().replace(" ", "") + if lowered.endswith("[]") or "array" in lowered or lowered.startswith("repeated"): + return {"type": "array", "items": {"type": "object"}} + if lowered in TYPE_MAP: + schema_type = TYPE_MAP[lowered] + if schema_type == "array": + return {"type": "array", "items": {"type": "object"}} + return {"type": schema_type} + if any(token in lowered for token in ["int", "uint", "long"]): + return {"type": "integer"} + if any(token in lowered for token in ["bool"]): + return {"type": "boolean"} + if any(token in lowered for token in ["object", "map", "json"]): + return {"type": "object", "additionalProperties": True} + return {"type": "string"} + + +def required_value(value: str) -> bool: + return value.strip().lower() in {"yes", "true", "required"} + + +def http_request_schema(rows: list[dict[str, str]]) -> dict[str, Any]: + properties: dict[str, Any] = {} + required: list[str] = [] + for row in rows: + field = row.get("field", "") + if not field: + continue + name = field.split("/")[0].strip() + schema = schema_for_type(row.get("type", "string")) + description = row.get("description") + if description: + schema["description"] = description + properties[name] = schema + if required_value(row.get("required", "")): + required.append(name) + schema: dict[str, Any] = {"type": "object", "additionalProperties": True} + if properties: + schema["properties"] = properties + if required: + schema["required"] = required + return schema + + +def build_openapi() -> dict[str, Any]: + entries = documented_http_entries() + source_paths = source_http_registrations() + missing_in_source = sorted(set(entries) - set(source_paths)) + if missing_in_source: + raise RuntimeError( + "Documented HTTP endpoints are not registered in java-tron source: " + + ", ".join(missing_in_source) + ) + paths: dict[str, Any] = {} + for endpoint, entry in entries.items(): + source = source_paths[endpoint] + markdown = read(ROOT / entry["doc"]) + method_names = servlet_http_methods(source["servlet"]) + request_type, request_fqn = servlet_request_type(source["servlet"]) + request_schema = source_request_schema(source["servlet"], request_type, request_fqn) + response_schema = source_response_schema(source["servlet"]) + operation_base = { + "tags": [entry["section"]], + "summary": entry["description"], + "description": f"Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `{entry['doc']}` for examples and detailed behavior.", + "operationId": slug(entry["name"]), + "externalDocs": {"url": entry["doc"]}, + "responses": { + "200": { + "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body.", + "content": { + "application/json": { + "schema": response_schema, + }, + "text/plain": {"schema": {"type": "string"}}, + }, + }, + "404": {"description": "Endpoint disabled by node configuration."}, + }, + "x-source-derived": True, + "x-java-service": source["service"], + "x-java-servlet": source["servlet"], + "x-java-source": source["source"], + } + if source.get("solidityEndpoint"): + operation_base["x-solidity-endpoint"] = source["solidityEndpoint"] + operation_base["x-solidity-servlet"] = source.get("solidityServlet") + + path_item: dict[str, Any] = {} + for method in method_names: + operation = json.loads(json.dumps(operation_base)) + operation["operationId"] = f"{slug(entry['name'])}_{method}" + if method == "get": + get_params = servlet_get_parameters(source["servlet"]) + operation["parameters"] = [ + { + "name": name, + "in": "query", + "required": False, + "schema": request_schema.get("properties", {}).get(name, source_field_schema(name)), + "x-source-derived": True, + } + for name in get_params + ] + else: + if method_delegates_to(source["servlet"], "doPost", "doGet") or source[ + "servlet" + ] == "GetTransactionListFromPendingServlet": + post_params = servlet_get_parameters(source["servlet"]) + operation["parameters"] = [ + { + "name": name, + "in": "query", + "required": False, + "schema": source_field_schema(name), + "x-source-derived": True, + } + for name in post_params + ] + elif request_schema.get("properties") or request_schema.get("x-java-request-type"): + operation["requestBody"] = { + "required": method == "post", + "content": { + "application/json": { + "schema": request_schema, + } + }, + } + path_item[method] = operation + paths[endpoint] = path_item + return { + "openapi": "3.1.0", + "info": { + "title": "java-tron HTTP API", + "version": "1.0.0", + "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation.", + }, + "servers": [ + {"url": "https://nile.trongrid.io", "description": "Nile testnet TronGrid"}, + {"url": "http://127.0.0.1:8090", "description": "Local FullNode HTTP API"}, + ], + "paths": paths, + "components": { + "schemas": { + "JavaTronError": { + "type": "object", + "additionalProperties": True, + "properties": {"Error": {"type": "string"}}, + } + } + }, + } + + +def http_fragment_name(endpoint: str) -> str: + return endpoint.removeprefix("/wallet/").replace("/", "-") + ".yaml" + + +def json_rpc_fragment_name(method: str) -> str: + return method + ".json" + + +def clean_generated_files(directory: Path, suffix: str) -> None: + directory.mkdir(parents=True, exist_ok=True) + for path in directory.glob(f"*{suffix}"): + path.unlink() + + +def write_http_fragments(paths: dict[str, Any]) -> None: + clean_generated_files(HTTP_SPECS_DIR, ".yaml") + for endpoint, path_item in paths.items(): + out = HTTP_SPECS_DIR / http_fragment_name(endpoint) + out.write_text( + "# This file is generated by scripts/generate_api_specs.py. Do not edit by hand.\n" + + dump_yaml({endpoint: path_item}) + + "\n", + encoding="utf-8", + ) + + +def write_json_rpc_fragments(methods: list[dict[str, Any]]) -> None: + clean_generated_files(JSON_RPC_SPECS_DIR, ".json") + for method in methods: + out = JSON_RPC_SPECS_DIR / json_rpc_fragment_name(method["name"]) + out.write_text(json.dumps(method, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + + +def java_type_schema(java_type: str) -> dict[str, Any]: + cleaned = java_type.strip() + if cleaned.endswith("[]"): + return {"type": "array", "items": java_type_schema(cleaned[:-2])} + if cleaned.startswith("List<"): + inner = cleaned.removeprefix("List<").removesuffix(">") + return {"type": "array", "items": java_type_schema(inner)} + mapping = { + "String": {"type": "string"}, + "Object": {}, + "Boolean": {"type": "boolean"}, + "boolean": {"type": "boolean"}, + "int": {"type": "integer"}, + "Integer": {"type": "integer"}, + "long": {"type": "integer"}, + "Long": {"type": "integer"}, + } + return mapping.get(cleaned, {"type": "object", "additionalProperties": True}) + + +def extract_source_jsonrpc_methods() -> dict[str, dict[str, Any]]: + java = strip_java_comments(read(JAVA_MAIN / "org/tron/core/services/jsonrpc/TronJsonRpc.java")) + methods: dict[str, dict[str, Any]] = {} + pattern = re.compile( + r"@JsonRpcMethod\(\"([^\"]+)\"\)(?P.*?);", + re.S, + ) + signature_re = re.compile( + r"(?:public\s+)?([A-Za-z0-9_<>, ?\[\]]+)\s+([A-Za-z0-9_]+)\s*\((.*?)\)" + ) + for match in pattern.finditer(java): + rpc_name = match.group(1) + body = match.group("body") + signature = signature_re.search(body) + if not signature: + continue + return_type, java_method, params_text = signature.groups() + params = [] + if params_text.strip(): + for idx, param in enumerate(re.split(r"\s*,\s*", params_text.strip())): + pieces = param.rsplit(" ", 1) + if len(pieces) != 2: + continue + java_type, name = pieces + params.append( + { + "name": name, + "required": True, + "schema": java_type_schema(java_type), + "x-java-type": java_type, + "x-position": idx, + } + ) + errors = [] + for error in re.finditer( + r"@JsonRpcError\(exception\s*=\s*([A-Za-z0-9_]+)\.class,\s*code\s*=\s*(-?\d+)", + body, + ): + exception, code = error.groups() + errors.append({"code": int(code), "message": exception, "x-java-exception": exception}) + methods[rpc_name] = { + "name": rpc_name, + "x-java-method": java_method, + "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", + "params": params, + "result": { + "name": "result", + "schema": { + **java_type_schema(return_type), + "x-java-type": return_type.strip(), + }, + }, + "errors": errors, + } + return methods + + +def openrpc_params(rows: list[dict[str, str]]) -> list[dict[str, Any]]: + params = [] + for row in rows: + position = row.get("position", "") + name = position.replace("params[", "param").replace("]", "") + params.append( + { + "name": name, + "required": required_value(row.get("required", "")), + "description": row.get("description", ""), + "schema": schema_for_type(row.get("type", "string")), + } + ) + return params + + +def build_openrpc() -> dict[str, Any]: + entries = extract_index_entries(JSON_RPC_INDEX, JSON_RPC_INDEX.parent, r"[A-Za-z0-9_]+") + source_methods = extract_source_jsonrpc_methods() + missing_in_source = sorted(entry["name"] for entry in entries if entry["name"] not in source_methods) + if missing_in_source: + raise RuntimeError( + "Documented JSON-RPC methods are not declared in java-tron source: " + + ", ".join(missing_in_source) + ) + methods = [] + for entry in entries: + markdown = read(ROOT / entry["doc"]) + ports = extract_bullet(markdown, "Ports") + source = source_methods[entry["name"]] + method: dict[str, Any] = { + "name": entry["name"], + "tags": [{"name": entry["section"]}], + "summary": entry["description"], + "description": f"Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `{entry['doc']}` for examples and detailed behavior.", + "params": source["params"], + "result": source["result"], + "errors": source["errors"], + "externalDocs": {"url": entry["doc"]}, + "x-source-derived": True, + "x-java-method": source["x-java-method"], + "x-java-source": source["x-java-source"], + } + if ports: + method["x-ports"] = ports + methods.append(method) + return { + "openrpc": "1.2.6", + "info": { + "title": "java-tron JSON-RPC API", + "version": "1.0.0", + "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation.", + }, + "servers": [ + {"name": "Nile testnet", "url": "https://nile.trongrid.io/jsonrpc"}, + {"name": "Local FullNode", "url": "http://127.0.0.1:8545/jsonrpc"}, + {"name": "Local Solidity", "url": "http://127.0.0.1:8555/jsonrpc"}, + ], + "methods": methods, + } + + +def dump_yaml(value: Any, indent: int = 0) -> str: + space = " " * indent + if isinstance(value, dict): + lines = [] + for key, item in value.items(): + yaml_key = json.dumps(str(key)) + if isinstance(item, (dict, list)): + lines.append(f"{space}{yaml_key}:") + lines.append(dump_yaml(item, indent + 1)) + else: + lines.append(f"{space}{yaml_key}: {json.dumps(item)}") + return "\n".join(lines) + if isinstance(value, list): + if not value: + return f"{space}[]" + lines = [] + for item in value: + if isinstance(item, (dict, list)): + lines.append(f"{space}-") + lines.append(dump_yaml(item, indent + 1)) + else: + lines.append(f"{space}- {json.dumps(item)}") + return "\n".join(lines) + return f"{space}{json.dumps(value)}" + + +def main() -> None: + openapi = build_openapi() + openrpc = build_openrpc() + write_http_fragments(openapi["paths"]) + write_json_rpc_fragments(openrpc["methods"]) + OPENAPI_OUT.write_text( + "# This file is generated by scripts/generate_api_specs.py. Do not edit by hand.\n" + + dump_yaml(openapi) + + "\n", + encoding="utf-8", + ) + OPENRPC_OUT.write_text(json.dumps(openrpc, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + + +if __name__ == "__main__": + main() From afa1f1bc1451fe2f5c15097d3d992171170f4409 Mon Sep 17 00:00:00 2001 From: Leem Date: Sat, 20 Jun 2026 13:16:06 +0800 Subject: [PATCH 3/4] docs: link OpenAPI/OpenRPC specs from llms.txt API index --- docs/llms.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/llms.txt b/docs/llms.txt index bb7a56b8..a6211d73 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -23,6 +23,8 @@ - [HTTP API 参考](https://tronprotocol.github.io/documentation-zh/api/http/):`/wallet/*` 与 `/walletsolidity/*` 端点,按功能分组(账户、资产、区块/交易查询、交易构建/广播、智能合约、超级代表/治理、质押 v1/v2、节点/工具)。 - [JSON-RPC API 参考](https://tronprotocol.github.io/documentation-zh/api/json-rpc/):兼容以太坊的 `eth_*` / `net_*` / `web3_*` 方法,以及 Tron 特有的 `buildTransaction`,含端口、启用开关、编码约定与错误码。 - [gRPC API 参考](https://tronprotocol.github.io/documentation-zh/api/rpc/):`protocol.Wallet` / `protocol.WalletSolidity` 方法;契约由 java-tron 仓库中的 `.proto` 文件定义。 +- [OpenAPI 规范(HTTP)](https://tronprotocol.github.io/documentation-zh/api/openapi.yaml):`/wallet/*` 与 `/walletsolidity/*` HTTP 接口的机器可读 OpenAPI 契约。 +- [OpenRPC 规范(JSON-RPC)](https://tronprotocol.github.io/documentation-zh/api/openrpc.json):`eth_*` / `net_*` / `web3_*` 及 `buildTransaction` 方法的机器可读 OpenRPC 契约。 ## 核心协议 From e2e3348080d0ac76568bb642f4fdddea3628e3cf Mon Sep 17 00:00:00 2001 From: Leem Date: Mon, 29 Jun 2026 21:05:13 +0800 Subject: [PATCH 4/4] docs: regenerate API specs via base + per-endpoint overlay --- docs/api/interface-definitions.md | 28 +- docs/api/openapi.yaml | 11113 ++++++++++------ docs/api/openrpc.json | 1687 ++- .../specs/http/accountpermissionupdate.yaml | 70 +- docs/api/specs/http/broadcasthex.yaml | 54 +- docs/api/specs/http/broadcasttransaction.yaml | 73 +- docs/api/specs/http/cancelallunfreezev2.yaml | 57 +- docs/api/specs/http/clearabi.yaml | 60 +- docs/api/specs/http/createaccount.yaml | 63 +- docs/api/specs/http/createassetissue.yaml | 103 +- docs/api/specs/http/createtransaction.yaml | 65 +- docs/api/specs/http/createwitness.yaml | 60 +- docs/api/specs/http/delegateresource.yaml | 71 +- docs/api/specs/http/deploycontract.yaml | 84 +- docs/api/specs/http/estimateenergy.yaml | 62 +- docs/api/specs/http/freezebalance.yaml | 68 +- docs/api/specs/http/freezebalancev2.yaml | 64 +- docs/api/specs/http/getBrokerage.yaml | 118 +- docs/api/specs/http/getReward.yaml | 120 +- docs/api/specs/http/getaccount.yaml | 279 +- docs/api/specs/http/getaccountbalance.yaml | 47 +- docs/api/specs/http/getaccountnet.yaml | 93 +- docs/api/specs/http/getaccountresource.yaml | 117 +- docs/api/specs/http/getapprovedlist.yaml | 78 +- .../specs/http/getassetissuebyaccount.yaml | 79 +- docs/api/specs/http/getassetissuebyid.yaml | 158 +- docs/api/specs/http/getassetissuebyname.yaml | 158 +- docs/api/specs/http/getassetissuelist.yaml | 77 +- .../specs/http/getassetissuelistbyname.yaml | 86 +- .../specs/http/getavailableunfreezecount.yaml | 90 +- docs/api/specs/http/getbandwidthprices.yaml | 69 +- docs/api/specs/http/getblock.yaml | 98 +- docs/api/specs/http/getblockbalance.yaml | 50 +- docs/api/specs/http/getblockbyid.yaml | 103 +- docs/api/specs/http/getblockbylatestnum.yaml | 94 +- docs/api/specs/http/getblockbylimitnext.yaml | 101 +- docs/api/specs/http/getblockbynum.yaml | 98 +- docs/api/specs/http/getburntrx.yaml | 79 +- .../specs/http/getcandelegatedmaxsize.yaml | 91 +- .../http/getcanwithdrawunfreezeamount.yaml | 91 +- docs/api/specs/http/getchainparameters.yaml | 58 +- docs/api/specs/http/getcontract.yaml | 117 +- docs/api/specs/http/getcontractinfo.yaml | 87 +- docs/api/specs/http/getdelegatedresource.yaml | 99 +- .../getdelegatedresourceaccountindex.yaml | 107 +- .../getdelegatedresourceaccountindexv2.yaml | 107 +- .../specs/http/getdelegatedresourcev2.yaml | 99 +- docs/api/specs/http/getenergyprices.yaml | 69 +- .../specs/http/getnextmaintenancetime.yaml | 55 +- docs/api/specs/http/getnodeinfo.yaml | 117 +- docs/api/specs/http/getnowblock.yaml | 83 +- .../http/getpaginatedassetissuelist.yaml | 105 +- .../http/getpaginatednowwitnesslist.yaml | 105 +- .../specs/http/getpaginatedproposallist.yaml | 89 +- docs/api/specs/http/getpendingsize.yaml | 63 +- docs/api/specs/http/getproposalbyid.yaml | 96 +- docs/api/specs/http/getsignweight.yaml | 83 +- docs/api/specs/http/gettransactionbyid.yaml | 111 +- .../http/gettransactioncountbyblocknum.yaml | 97 +- .../specs/http/gettransactionfrompending.yaml | 93 +- .../http/gettransactioninfobyblocknum.yaml | 230 +- .../specs/http/gettransactioninfobyid.yaml | 203 +- .../http/gettransactionlistfrompending.yaml | 57 +- docs/api/specs/http/listnodes.yaml | 58 +- docs/api/specs/http/listproposals.yaml | 61 +- docs/api/specs/http/listwitnesses.yaml | 77 +- .../api/specs/http/participateassetissue.yaml | 66 +- docs/api/specs/http/proposalapprove.yaml | 62 +- docs/api/specs/http/proposalcreate.yaml | 58 +- docs/api/specs/http/proposaldelete.yaml | 60 +- docs/api/specs/http/transferasset.yaml | 68 +- .../specs/http/triggerconstantcontract.yaml | 117 +- docs/api/specs/http/triggersmartcontract.yaml | 102 +- docs/api/specs/http/undelegateresource.yaml | 67 +- docs/api/specs/http/unfreezeasset.yaml | 57 +- docs/api/specs/http/unfreezebalance.yaml | 63 +- docs/api/specs/http/unfreezebalancev2.yaml | 64 +- docs/api/specs/http/updateBrokerage.yaml | 59 +- docs/api/specs/http/updateaccount.yaml | 59 +- docs/api/specs/http/updateasset.yaml | 66 +- docs/api/specs/http/updateenergylimit.yaml | 63 +- docs/api/specs/http/updatesetting.yaml | 62 +- docs/api/specs/http/updatewitness.yaml | 60 +- docs/api/specs/http/validateaddress.yaml | 30 +- docs/api/specs/http/votewitnessaccount.yaml | 65 +- docs/api/specs/http/withdrawbalance.yaml | 57 +- .../specs/http/withdrawexpireunfreeze.yaml | 57 +- docs/api/specs/json-rpc/buildTransaction.json | 117 +- docs/api/specs/json-rpc/eth_accounts.json | 10 +- docs/api/specs/json-rpc/eth_blockNumber.json | 10 +- docs/api/specs/json-rpc/eth_call.json | 70 +- docs/api/specs/json-rpc/eth_chainId.json | 17 +- docs/api/specs/json-rpc/eth_coinbase.json | 13 +- docs/api/specs/json-rpc/eth_estimateGas.json | 26 +- docs/api/specs/json-rpc/eth_gasPrice.json | 10 +- docs/api/specs/json-rpc/eth_getBalance.json | 24 +- .../specs/json-rpc/eth_getBlockByHash.json | 36 +- .../specs/json-rpc/eth_getBlockByNumber.json | 52 +- .../specs/json-rpc/eth_getBlockReceipts.json | 67 +- .../eth_getBlockTransactionCountByHash.json | 27 +- .../eth_getBlockTransactionCountByNumber.json | 27 +- docs/api/specs/json-rpc/eth_getCode.json | 24 +- .../specs/json-rpc/eth_getFilterChanges.json | 24 +- .../api/specs/json-rpc/eth_getFilterLogs.json | 36 +- docs/api/specs/json-rpc/eth_getLogs.json | 42 +- docs/api/specs/json-rpc/eth_getStorageAt.json | 27 +- ...eth_getTransactionByBlockHashAndIndex.json | 38 +- ...h_getTransactionByBlockNumberAndIndex.json | 53 +- .../json-rpc/eth_getTransactionByHash.json | 32 +- .../json-rpc/eth_getTransactionReceipt.json | 32 +- docs/api/specs/json-rpc/eth_getWork.json | 14 +- .../specs/json-rpc/eth_newBlockFilter.json | 16 +- docs/api/specs/json-rpc/eth_newFilter.json | 23 +- .../specs/json-rpc/eth_protocolVersion.json | 10 +- docs/api/specs/json-rpc/eth_syncing.json | 41 +- .../specs/json-rpc/eth_uninstallFilter.json | 20 +- docs/api/specs/json-rpc/net_listening.json | 10 +- docs/api/specs/json-rpc/net_peerCount.json | 10 +- docs/api/specs/json-rpc/net_version.json | 17 +- .../specs/json-rpc/web3_clientVersion.json | 10 +- docs/api/specs/json-rpc/web3_sha3.json | 14 +- scripts/generate_api_specs.py | 1289 -- 122 files changed, 11788 insertions(+), 10544 deletions(-) delete mode 100644 scripts/generate_api_specs.py diff --git a/docs/api/interface-definitions.md b/docs/api/interface-definitions.md index f69875d2..669719fe 100644 --- a/docs/api/interface-definitions.md +++ b/docs/api/interface-definitions.md @@ -7,31 +7,11 @@ | HTTP API | OpenAPI 3.1 | [`openapi.yaml`](openapi.yaml) | | JSON-RPC API | OpenRPC 1.2.6 | [`openrpc.json`](openrpc.json) | -每个接口对应的生成片段也会保留,方便审阅: +每个接口对应的片段也会保留,方便审阅: | API 类型 | 片段目录 | |---|---| -| HTTP API | [`specs/http/`](specs/http/) | -| JSON-RPC API | [`specs/json-rpc/`](specs/json-rpc/) | +| HTTP API | [`specs/http/`](https://github.com/tronprotocol/documentation-zh/tree/master/docs/api/specs/http) | +| JSON-RPC API | [`specs/json-rpc/`](https://github.com/tronprotocol/documentation-zh/tree/master/docs/api/specs/json-rpc) | -java-tron API 源码变更后,可执行以下命令重新生成: - -```bash -python3 scripts/generate_api_specs.py -``` - -生成脚本需要本地存在一份 java-tron 代码仓库。默认会从当前文档仓库相邻的 `../java-tron` 查找,也可以显式设置 `JAVA_TRON_SOURCE`: - -```bash -JAVA_TRON_SOURCE=/path/to/java-tron python3 scripts/generate_api_specs.py -``` - -生成的接口列表来自源码: - -- HTTP 路径、HTTP 方法、servlet 类、Solidity 端点映射以及请求消息提示来自 java-tron 源码树。 -- JSON-RPC 方法名、Java 参数名称/类型、返回类型以及声明的错误码来自 `TronJsonRpc.java`。 -- Markdown API 页面仅用于读取面向人的摘要、说明和外部文档链接。 - -默认情况下,生成脚本会确保发布的定义与文档化 API 范围保持一致。如果文档中的 HTTP 路径或 JSON-RPC 方法已不存在于 java-tron 源码中,生成过程会失败,而不是静默产出过期定义。 - -顶层 `openapi.yaml` 和 `openrpc.json` 由各接口片段汇总生成,方便工具直接消费一个标准文件。 +发布的定义来自 java-tron API 行为,并附带指向相应人类可读 API 文档的链接。顶层 `openapi.yaml` 和 `openrpc.json` 由各接口片段汇总生成,方便工具直接消费一个标准文件。 diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index 188d4aca..67b9a331 100644 --- a/docs/api/openapi.yaml +++ b/docs/api/openapi.yaml @@ -1,9 +1,12 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "openapi": "3.1.0" "info": "title": "java-tron HTTP API" "version": "1.0.0" "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation." + "x-java-tron-source": + "repo": "tronprotocol/java-tron" + "commit": "a79693e4508c05650cc474f23e7f97451d2861ec" + "version": "GreatVoyage-v4.8.1.1" "servers": - "url": "https://nile.trongrid.io" @@ -11,6 +14,34 @@ - "url": "http://127.0.0.1:8090" "description": "Local FullNode HTTP API" +"tags": + - + "name": "Account" + "description": "Account lookup and account resource query endpoints." + - + "name": "Block / transaction query" + "description": "Block, transaction, and transaction-info query endpoints." + - + "name": "Transaction build / broadcast" + "description": "Transaction creation, signing, permission, and broadcast endpoints." + - + "name": "TRC10 asset" + "description": "TRC10 asset issuance and asset query endpoints." + - + "name": "Smart contract" + "description": "Smart contract deployment, trigger, and contract metadata endpoints." + - + "name": "Witness / governance" + "description": "Witness, brokerage, reward, proposal, and governance endpoints." + - + "name": "Stake 1.0 (unfreeze and query only)" + "description": "Stake 1.0 unfreeze and related query endpoints." + - + "name": "Stake 2.0" + "description": "Stake 2.0 resource delegation, unfreeze, and withdrawal endpoints." + - + "name": "Node / pricing / tools" + "description": "Node status, chain pricing, and utility endpoints." "paths": "/wallet/getaccount": "get": @@ -20,135 +51,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." "operationId": "wallet_getaccount_get" "externalDocs": - "url": "docs/api/http/account/getaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_name": - "type": "string" - "type": - "type": "object" - "additionalProperties": true - "address": - "type": "string" - "balance": - "type": "integer" - "votes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozen": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "net_usage": - "type": "integer" - "acquired_delegated_frozen_balance_for_bandwidth": - "type": "integer" - "delegated_frozen_balance_for_bandwidth": - "type": "integer" - "old_tron_power": - "type": "integer" - "tron_power": - "type": "object" - "additionalProperties": true - "asset_optimized": - "type": "boolean" - "create_time": - "type": "integer" - "latest_opration_time": - "type": "integer" - "allowance": - "type": "integer" - "latest_withdraw_time": - "type": "integer" - "code": - "type": "string" - "is_witness": - "type": "boolean" - "is_committee": - "type": "boolean" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "asset_issued_name": - "type": "string" - "asset_issued_ID": - "type": "string" - "free_net_usage": - "type": "integer" - "latest_consume_time": - "type": "integer" - "latest_consume_free_time": - "type": "integer" - "account_id": - "type": "string" - "net_window_size": - "type": "integer" - "net_window_optimized": - "type": "boolean" - "account_resource": - "type": "object" - "additionalProperties": true - "codeHash": - "type": "string" - "owner_permission": - "type": "object" - "additionalProperties": true - "witness_permission": - "type": "object" - "additionalProperties": true - "active_permission": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "unfrozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "acquired_delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "x-proto-message": "Account" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Account" - "x-java-response": "Account rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Account" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAccountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getaccount" - "x-solidity-servlet": "GetAccountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getaccount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAccountOnSolidityServlet" "parameters": - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -156,7 +94,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "post": "tags": - "Account" @@ -164,142 +107,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." "operationId": "wallet_getaccount_post" "externalDocs": - "url": "docs/api/http/account/getaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_name": - "type": "string" - "type": - "type": "object" - "additionalProperties": true - "address": - "type": "string" - "balance": - "type": "integer" - "votes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozen": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "net_usage": - "type": "integer" - "acquired_delegated_frozen_balance_for_bandwidth": - "type": "integer" - "delegated_frozen_balance_for_bandwidth": - "type": "integer" - "old_tron_power": - "type": "integer" - "tron_power": - "type": "object" - "additionalProperties": true - "asset_optimized": - "type": "boolean" - "create_time": - "type": "integer" - "latest_opration_time": - "type": "integer" - "allowance": - "type": "integer" - "latest_withdraw_time": - "type": "integer" - "code": - "type": "string" - "is_witness": - "type": "boolean" - "is_committee": - "type": "boolean" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "asset_issued_name": - "type": "string" - "asset_issued_ID": - "type": "string" - "free_net_usage": - "type": "integer" - "latest_consume_time": - "type": "integer" - "latest_consume_free_time": - "type": "integer" - "account_id": - "type": "string" - "net_window_size": - "type": "integer" - "net_window_optimized": - "type": "boolean" - "account_resource": - "type": "object" - "additionalProperties": true - "codeHash": - "type": "string" - "owner_permission": - "type": "object" - "additionalProperties": true - "witness_permission": - "type": "object" - "additionalProperties": true - "active_permission": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "unfrozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "acquired_delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "x-proto-message": "Account" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Account" - "x-java-response": "Account rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Account" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAccountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getaccount" - "x-solidity-servlet": "GetAccountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getaccount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAccountOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "address": - "type": "string" - "visible": - "type": "boolean" - "x-source-shape": "servlet-effective-input" - "x-java-request-type": "org.tron.protos.Protocol.Account" + "allOf": + - + "$ref": "#/components/schemas/AccountRequest" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "/wallet/getaccountbalance": "post": "tags": @@ -308,28 +157,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountbalance.md` for examples and detailed behavior." "operationId": "wallet_getaccountbalance_post" "externalDocs": - "url": "docs/api/http/account/getaccountbalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountbalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "balance": - "type": "integer" - "block_identifier": - "type": "object" - "additionalProperties": true - "x-proto-message": "AccountBalanceResponse" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-java-response-type": "BalanceContract.AccountBalanceResponse" - "x-java-response": "AccountBalanceResponse rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountBalanceResponse" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -341,21 +184,11 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_identifier": - "type": "object" - "additionalProperties": true - "block_identifier": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "x-proto-message": "AccountBalanceRequest" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "AccountBalanceRequest" + "$ref": "#/components/schemas/AccountBalanceRequestRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountBalanceServlet.java" + - "protocol/src/main/protos/core/contract/balance_contract.proto#AccountBalanceRequest" "/wallet/getaccountnet": "get": "tags": @@ -364,35 +197,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." "operationId": "wallet_getaccountnet_get" "externalDocs": - "url": "docs/api/http/account/getaccountnet.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountnet.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "x-proto-message": "AccountNetMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" - "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountNetMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -403,9 +223,10 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -413,7 +234,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountNetServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "post": "tags": - "Account" @@ -421,35 +247,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." "operationId": "wallet_getaccountnet_post" "externalDocs": - "url": "docs/api/http/account/getaccountnet.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountnet.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "x-proto-message": "AccountNetMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" - "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountNetMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -461,15 +274,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "address": - "type": "string" - "visible": - "type": "boolean" - "x-source-shape": "servlet-effective-input" - "x-java-request-type": "org.tron.protos.Protocol.Account" + "allOf": + - + "$ref": "#/components/schemas/AccountRequest" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountNetServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "/wallet/getaccountresource": "get": "tags": @@ -478,53 +291,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." "operationId": "wallet_getaccountresource_get" "externalDocs": - "url": "docs/api/http/account/getaccountresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "TotalTronPowerWeight": - "type": "integer" - "tronPowerUsed": - "type": "integer" - "tronPowerLimit": - "type": "integer" - "EnergyUsed": - "type": "integer" - "EnergyLimit": - "type": "integer" - "TotalEnergyLimit": - "type": "integer" - "TotalEnergyWeight": - "type": "integer" - "storageUsed": - "type": "integer" - "storageLimit": - "type": "integer" - "x-proto-message": "AccountResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" - "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountResourceMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -535,9 +317,10 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -545,6 +328,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -553,53 +337,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." "operationId": "wallet_getaccountresource_post" "externalDocs": - "url": "docs/api/http/account/getaccountresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "TotalTronPowerWeight": - "type": "integer" - "tronPowerUsed": - "type": "integer" - "tronPowerLimit": - "type": "integer" - "EnergyUsed": - "type": "integer" - "EnergyLimit": - "type": "integer" - "TotalEnergyLimit": - "type": "integer" - "TotalEnergyWeight": - "type": "integer" - "storageUsed": - "type": "integer" - "storageLimit": - "type": "integer" - "x-proto-message": "AccountResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" - "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountResourceMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -612,13 +365,21 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "address": "type": "string" + "description": "Account or contract address accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountResourceServlet.java" "/wallet/createaccount": "post": "tags": @@ -627,36 +388,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/createaccount.md` for examples and detailed behavior." "operationId": "wallet_createaccount_post" "externalDocs": - "url": "docs/api/http/account/createaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/createaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -668,24 +415,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "account_address": - "type": "string" - "type": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AccountCreateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountCreateContract" + "allOf": + - + "$ref": "#/components/schemas/AccountCreateContractRequest" + "required": + - "owner_address" + - "account_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/CreateAccountActuator.java#validate" + - "protocol/src/main/protos/core/contract/account_contract.proto#AccountCreateContract" "/wallet/updateaccount": "post": "tags": @@ -694,36 +433,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/updateaccount.md` for examples and detailed behavior." "operationId": "wallet_updateaccount_post" "externalDocs": - "url": "docs/api/http/account/updateaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/updateaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -735,21 +460,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_name": - "type": "string" - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AccountUpdateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountUpdateContract" + "allOf": + - + "$ref": "#/components/schemas/AccountUpdateContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateAccountActuator.java#validate" + - "protocol/src/main/protos/core/contract/account_contract.proto#AccountUpdateContract" "/wallet/accountpermissionupdate": "post": "tags": @@ -758,36 +477,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/accountpermissionupdate.md` for examples and detailed behavior." "operationId": "wallet_accountpermissionupdate_post" "externalDocs": - "url": "docs/api/http/account/accountpermissionupdate.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/accountpermissionupdate.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -799,30 +504,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "owner": - "type": "object" - "additionalProperties": true - "witness": - "type": "object" - "additionalProperties": true - "actives": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AccountPermissionUpdateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountPermissionUpdateContract" + "allOf": + - + "$ref": "#/components/schemas/AccountPermissionUpdateContractRequest" + "required": + - "owner_address" + - "owner" + - "actives" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/AccountPermissionUpdateActuator.java#validate" + - "protocol/src/main/protos/core/contract/account_contract.proto#AccountPermissionUpdateContract" "/wallet/validateaddress": "get": "tags": @@ -831,7 +523,7 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." "operationId": "wallet_validateaddress_get" "externalDocs": - "url": "docs/api/http/account/validateaddress.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/validateaddress.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." @@ -839,15 +531,12 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "boolean" "message": "type": "string" - "text/plain": - "schema": - "type": "string" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -858,10 +547,14 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ValidateAddressServlet.java" "post": "tags": - "Account" @@ -869,7 +562,7 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." "operationId": "wallet_validateaddress_post" "externalDocs": - "url": "docs/api/http/account/validateaddress.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/validateaddress.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." @@ -877,15 +570,12 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "boolean" "message": "type": "string" - "text/plain": - "schema": - "type": "string" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -898,11 +588,18 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "address": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ValidateAddressServlet.java" "/wallet/getnowblock": "get": "tags": @@ -911,39 +608,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." "operationId": "wallet_getnowblock_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getnowblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNowBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnowblock" - "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnowblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNowBlockOnSolidityServlet" "parameters": - "name": "visible" @@ -951,7 +643,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNowBlockServlet.java" "post": "tags": - "Block / transaction query" @@ -959,39 +655,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." "operationId": "wallet_getnowblock_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getnowblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNowBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnowblock" - "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnowblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNowBlockOnSolidityServlet" "parameters": - "name": "visible" @@ -999,7 +690,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNowBlockServlet.java" "/wallet/getblock": "get": "tags": @@ -1008,39 +703,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." "operationId": "wallet_getblock_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblock" - "x-solidity-servlet": "GetBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockOnSolidityServlet" "parameters": - "name": "id_or_num" @@ -1048,6 +738,7 @@ "required": false "schema": "type": "string" + "description": "Block id or block number." "x-source-derived": true - "name": "detail" @@ -1055,6 +746,7 @@ "required": false "schema": "type": "boolean" + "description": "Whether to return detailed block information." "x-source-derived": true - "name": "visible" @@ -1062,7 +754,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockServlet.java" + - "protocol/src/main/protos/api/api.proto#BlockReq" "post": "tags": - "Block / transaction query" @@ -1070,55 +767,44 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." "operationId": "wallet_getblock_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblock" - "x-solidity-servlet": "GetBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id_or_num": - "type": "string" - "detail": - "type": "boolean" - "x-proto-message": "BlockReq" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BlockReq" + "$ref": "#/components/schemas/BlockReqRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockServlet.java" + - "protocol/src/main/protos/api/api.proto#BlockReq" "/wallet/getblockbynum": "get": "tags": @@ -1127,39 +813,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." "operationId": "wallet_getblockbynum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbynum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbynum" - "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbynum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByNumOnSolidityServlet" "parameters": - "name": "num" @@ -1167,6 +848,8 @@ "required": false "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true - "name": "visible" @@ -1174,7 +857,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "post": "tags": - "Block / transaction query" @@ -1182,55 +870,44 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." "operationId": "wallet_getblockbynum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbynum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbynum" - "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbynum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "$ref": "#/components/schemas/NumberMessageRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "/wallet/getblockbyid": "get": "tags": @@ -1239,46 +916,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." "operationId": "wallet_getblockbyid_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbyid" - "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -1286,7 +959,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Block / transaction query" @@ -1294,55 +972,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." "operationId": "wallet_getblockbyid_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbyid" - "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/getblockbylimitnext": "get": "tags": @@ -1351,50 +1022,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." "operationId": "wallet_getblockbylimitnext_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylimitnext.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLimitNextServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" - "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylimitnext" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLimitNextOnSolidityServlet" "parameters": - "name": "startNum" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Starting block number for the query range." "x-source-derived": true - "name": "endNum" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Ending block number for the query range." "x-source-derived": true - "name": "visible" @@ -1402,6 +1075,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -1410,54 +1084,49 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." "operationId": "wallet_getblockbylimitnext_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylimitnext.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLimitNextServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" - "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylimitnext" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLimitNextOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "startNum": - "type": "integer" - "endNum": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "BlockLimit" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BlockLimit" + "allOf": + - + "$ref": "#/components/schemas/BlockLimitRequest" + "required": + - "endNum" + - "startNum" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByLimitNextServlet.java" + - "protocol/src/main/protos/api/api.proto#BlockLimit" "/wallet/getblockbylatestnum": "get": "tags": @@ -1466,43 +1135,43 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." "operationId": "wallet_getblockbylatestnum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylatestnum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLatestNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" - "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylatestnum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLatestNumOnSolidityServlet" "parameters": - "name": "num" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true - "name": "visible" @@ -1510,6 +1179,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -1518,52 +1188,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." "operationId": "wallet_getblockbylatestnum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylatestnum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLatestNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" - "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylatestnum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLatestNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "allOf": + - + "$ref": "#/components/schemas/NumberMessageRequest" + "required": + - "num" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByLatestNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "/wallet/getblockbalance": "post": "tags": @@ -1572,33 +1238,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbalance.md` for examples and detailed behavior." "operationId": "wallet_getblockbalance_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block_identifier": - "type": "object" - "additionalProperties": true - "timestamp": - "type": "integer" - "transaction_balance_trace": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockBalanceTrace" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-java-response-type": "org.tron.protos.contract.BalanceContract.BlockBalanceTrace" - "x-java-response": "BlockBalanceTrace rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockBalanceTrace" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -1610,19 +1265,11 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "hash": - "type": "string" - "number": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "BlockIdentifier" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "BlockIdentifier" + "$ref": "#/components/schemas/BlockIdentifierRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockBalanceServlet.java" + - "protocol/src/main/protos/core/contract/balance_contract.proto#BlockIdentifier" "/wallet/gettransactioncountbyblocknum": "get": "tags": @@ -1631,37 +1278,57 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioncountbyblocknum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "count": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GettransactioncountbyblocknumGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionCountByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" - "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioncountbyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" "parameters": - "name": "num" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionCountByBlockNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "post": "tags": - "Block / transaction query" @@ -1669,45 +1336,53 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioncountbyblocknum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "count": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GettransactioncountbyblocknumPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionCountByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" - "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioncountbyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "allOf": + - + "$ref": "#/components/schemas/NumberMessageRequest" + "required": + - "num" "/wallet/gettransactionbyid": "get": "tags": @@ -1716,50 +1391,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactionbyid_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "signature": - "type": "array" - "items": - "type": "string" - "ret": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "Transaction" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Transaction" - "x-java-response": "Transaction rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" - "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactionbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -1767,7 +1434,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Block / transaction query" @@ -1775,59 +1447,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactionbyid_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "signature": - "type": "array" - "items": - "type": "string" - "ret": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "Transaction" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Transaction" - "x-java-response": "Transaction rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" - "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactionbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/gettransactioninfobyid": "get": "tags": @@ -1836,96 +1497,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyid_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" - "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -1933,7 +1540,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Block / transaction query" @@ -1941,105 +1553,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyid_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" - "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/gettransactioninfobyblocknum": "get": "tags": @@ -2048,99 +1603,53 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyblocknum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionInfo" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "title": "GettransactioninfobyblocknumGetResultArray1" + - + "type": "object" + "additionalProperties": false + "maxProperties": 0 + "x-java-response": "Empty object returned when num is not positive" + "title": "GettransactioninfobyblocknumGetResultEmpty2" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" - "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" "parameters": - "name": "num" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true - "name": "visible" @@ -2148,7 +1657,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByBlockNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "post": "tags": - "Block / transaction query" @@ -2156,108 +1670,58 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyblocknum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionInfo" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "title": "GettransactioninfobyblocknumPostResultArray1" + - + "type": "object" + "additionalProperties": false + "maxProperties": 0 + "x-java-response": "Empty object returned when num is not positive" + "title": "GettransactioninfobyblocknumPostResultEmpty2" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" - "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "allOf": + - + "$ref": "#/components/schemas/NumberMessageRequest" + "required": + - "num" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByBlockNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "/wallet/getpendingsize": "get": "tags": @@ -2266,21 +1730,31 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." "operationId": "wallet_getpendingsize_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getpendingsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "pendingSize": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "pendingSize": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetpendingsizeGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2289,6 +1763,9 @@ "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPendingSizeServlet.java" "post": "tags": - "Block / transaction query" @@ -2296,21 +1773,31 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." "operationId": "wallet_getpendingsize_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getpendingsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "pendingSize": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "pendingSize": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetpendingsizePostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2319,6 +1806,9 @@ "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPendingSizeServlet.java" "/wallet/gettransactionfrompending": "get": "tags": @@ -2327,36 +1817,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionfrompending_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2367,9 +1843,10 @@ - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -2377,6 +1854,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -2385,36 +1863,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionfrompending_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2426,17 +1890,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionFromPendingServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/gettransactionlistfrompending": "get": "tags": @@ -2445,27 +1907,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionlistfrompending_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txId": - "type": "array" - "items": - "type": "string" - "x-proto-message": "TransactionIdList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" - "x-java-response": "TransactionIdList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionIdList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2479,6 +1936,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -2487,27 +1945,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionlistfrompending_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txId": - "type": "array" - "items": - "type": "string" - "x-proto-message": "TransactionIdList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" - "x-java-response": "TransactionIdList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionIdList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2521,7 +1974,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionListFromPendingServlet.java" + - "protocol/src/main/protos/api/api.proto#TransactionIdList" "/wallet/createtransaction": "post": "tags": @@ -2530,36 +1988,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/createtransaction.md` for examples and detailed behavior." "operationId": "wallet_createtransaction_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/createtransaction.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/createtransaction.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2571,25 +2015,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "to_address": - "type": "string" - "amount": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "extra_data": - "type": "string" - "x-proto-message": "TransferContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.TransferContract" + "allOf": + - + "$ref": "#/components/schemas/TransferContractRequest" + "required": + - "owner_address" + - "to_address" + - "amount" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/TransferActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#TransferContract" "/wallet/getsignweight": "post": "tags": @@ -2598,53 +2034,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getsignweight.md` for examples and detailed behavior." "operationId": "wallet_getsignweight_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/getsignweight.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/getsignweight.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "object" - "additionalProperties": true - "approved_list": - "type": "array" - "items": - "type": "string" - "current_weight": - "type": "integer" - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "permission": - "type": "object" - "additionalProperties": true - "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionSignWeight" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2656,29 +2061,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "oneOf": - - - "required": - - "raw_data" + "allOf": - - "required": - - "raw_data_hex" - "x-source-shape": "transaction-json" - "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "$ref": "#/components/schemas/TransactionRequest" + "required": + - "raw_data" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionSignWeightServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" + - "protocol/src/main/protos/core/Tron.proto#Transaction" "/wallet/getapprovedlist": "post": "tags": @@ -2687,48 +2079,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getapprovedlist.md` for examples and detailed behavior." "operationId": "wallet_getapprovedlist_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/getapprovedlist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/getapprovedlist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "object" - "additionalProperties": true - "approved_list": - "type": "array" - "items": - "type": "string" - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionApprovedList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2740,29 +2106,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "oneOf": - - - "required": - - "raw_data" + "allOf": - - "required": - - "raw_data_hex" - "x-source-shape": "transaction-json" - "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "$ref": "#/components/schemas/TransactionRequest" + "required": + - "raw_data" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionApprovedListServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" + - "protocol/src/main/protos/core/Tron.proto#Transaction" "/wallet/broadcasttransaction": "post": "tags": @@ -2771,28 +2124,37 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasttransaction.md` for examples and detailed behavior." "operationId": "wallet_broadcasttransaction_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/broadcasttransaction.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/broadcasttransaction.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "txid": - "type": "string" - "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "not": + "required": + - "Error" + "title": "BroadcasttransactionPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2804,29 +2166,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "oneOf": + "allOf": - - "required": - - "raw_data" - - - "required": - - "raw_data_hex" - "x-source-shape": "transaction-json" - "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "$ref": "#/components/schemas/TransactionRequest" + "required": + - "raw_data" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/BroadcastServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" + - "protocol/src/main/protos/core/Tron.proto#Transaction" "/wallet/broadcasthex": "post": "tags": @@ -2835,35 +2184,44 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasthex.md` for examples and detailed behavior." "operationId": "wallet_broadcasthex_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/broadcasthex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/broadcasthex.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "txid": - "type": "string" - "transaction": - "type": "string" - "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" - "text/plain": - "schema": - "type": "string" - "404": - "description": "Endpoint disabled by node configuration." - "x-source-derived": true - "x-java-service": "FullNode HTTP" - "x-java-servlet": "BroadcastHexServlet" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "transaction": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "not": + "required": + - "Error" + "title": "BroadcasthexPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" + "404": + "description": "Endpoint disabled by node configuration." + "x-source-derived": true + "x-java-service": "FullNode HTTP" + "x-java-servlet": "BroadcastHexServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" "requestBody": "required": true @@ -2871,13 +2229,19 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "transaction": "type": "string" + "description": "Transaction object." "required": - "transaction" "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/BroadcastHexServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" "/wallet/createassetissue": "post": "tags": @@ -2886,36 +2250,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/createassetissue.md` for examples and detailed behavior." "operationId": "wallet_createassetissue_post" "externalDocs": - "url": "docs/api/http/asset/createassetissue.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/createassetissue.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -2927,58 +2277,22 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "allOf": + - + "$ref": "#/components/schemas/AssetIssueContractRequest" + "required": + - "owner_address" + - "name" + - "total_supply" + - "trx_num" + - "num" + - "start_time" + - "end_time" + - "url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/AssetIssueActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#AssetIssueContract" "/wallet/updateasset": "post": "tags": @@ -2987,36 +2301,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/updateasset.md` for examples and detailed behavior." "operationId": "wallet_updateasset_post" "externalDocs": - "url": "docs/api/http/asset/updateasset.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/updateasset.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -3028,27 +2328,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "description": - "type": "string" - "url": - "type": "string" - "new_limit": - "type": "integer" - "new_public_limit": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateAssetContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UpdateAssetContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateAssetContractRequest" + "required": + - "owner_address" + - "url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateAssetActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#UpdateAssetContract" "/wallet/transferasset": "post": "tags": @@ -3057,36 +2346,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/transferasset.md` for examples and detailed behavior." "operationId": "wallet_transferasset_post" "externalDocs": - "url": "docs/api/http/asset/transferasset.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/transferasset.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -3098,27 +2373,18 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "asset_name": - "type": "string" - "owner_address": - "type": "string" - "to_address": - "type": "string" - "amount": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "extra_data": - "type": "string" - "x-proto-message": "TransferAssetContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.TransferAssetContract" + "allOf": + - + "$ref": "#/components/schemas/TransferAssetContractRequest" + "required": + - "asset_name" + - "owner_address" + - "to_address" + - "amount" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/TransferAssetActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#TransferAssetContract" "/wallet/participateassetissue": "post": "tags": @@ -3127,36 +2393,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/participateassetissue.md` for examples and detailed behavior." "operationId": "wallet_participateassetissue_post" "externalDocs": - "url": "docs/api/http/asset/participateassetissue.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/participateassetissue.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -3168,25 +2420,18 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "to_address": - "type": "string" - "asset_name": - "type": "string" - "amount": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ParticipateAssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.ParticipateAssetIssueContract" + "allOf": + - + "$ref": "#/components/schemas/ParticipateAssetIssueContractRequest" + "required": + - "owner_address" + - "to_address" + - "asset_name" + - "amount" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ParticipateAssetIssueActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#ParticipateAssetIssueContract" "/wallet/unfreezeasset": "post": "tags": @@ -3195,36 +2440,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/unfreezeasset.md` for examples and detailed behavior." "operationId": "wallet_unfreezeasset_post" "externalDocs": - "url": "docs/api/http/asset/unfreezeasset.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/unfreezeasset.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -3236,19 +2467,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnfreezeAssetContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UnfreezeAssetContract" + "allOf": + - + "$ref": "#/components/schemas/UnfreezeAssetContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnfreezeAssetActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#UnfreezeAssetContract" "/wallet/getassetissuebyid": "get": "tags": @@ -3257,79 +2484,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyid_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" - "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -3337,7 +2527,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByIdServlet.java" "post": "tags": - "TRC10 asset" @@ -3345,85 +2539,55 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyid_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" - "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "value": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByIdServlet.java" "/wallet/getassetissuebyname": "get": "tags": @@ -3432,79 +2596,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyname_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" - "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByNameOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -3512,7 +2639,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByNameServlet.java" "post": "tags": - "TRC10 asset" @@ -3520,85 +2651,55 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyname_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" - "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByNameOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "value": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByNameServlet.java" "/wallet/getassetissuelistbyname": "get": "tags": @@ -3607,43 +2708,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelistbyname_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuelistbyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelistbyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" - "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelistbyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListByNameOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -3651,7 +2751,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListByNameServlet.java" "post": "tags": - "TRC10 asset" @@ -3659,49 +2763,55 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelistbyname_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuelistbyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelistbyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" - "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelistbyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListByNameOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "value": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListByNameServlet.java" "/wallet/getassetissuebyaccount": "get": "tags": @@ -3710,28 +2820,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyaccount_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -3742,9 +2846,10 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -3752,7 +2857,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "post": "tags": - "TRC10 asset" @@ -3760,28 +2870,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyaccount_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -3793,15 +2897,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "address": - "type": "string" - "visible": - "type": "boolean" - "x-source-shape": "servlet-effective-input" - "x-java-request-type": "org.tron.protos.Protocol.Account" + "allOf": + - + "$ref": "#/components/schemas/AccountRequest" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "/wallet/getassetissuelist": "get": "tags": @@ -3810,36 +2914,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelist_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelist" - "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListOnSolidityServlet" "parameters": - "name": "visible" @@ -3847,7 +2949,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListServlet.java" "post": "tags": - "TRC10 asset" @@ -3855,36 +2961,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelist_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelist" - "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListOnSolidityServlet" "parameters": - "name": "visible" @@ -3892,7 +2996,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListServlet.java" "/wallet/getpaginatedassetissuelist": "get": "tags": @@ -3901,50 +3009,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedassetissuelist_get" "externalDocs": - "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getpaginatedassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" - "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatedassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" "parameters": - "name": "offset" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." "x-source-derived": true - "name": "limit" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." "x-source-derived": true - "name": "visible" @@ -3952,7 +3062,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedAssetIssueListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "post": "tags": - "TRC10 asset" @@ -3960,54 +3075,49 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedassetissuelist_post" "externalDocs": - "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getpaginatedassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" - "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatedassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "offset": - "type": "integer" - "limit": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "PaginatedMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "allOf": + - + "$ref": "#/components/schemas/PaginatedMessageRequest" + "required": + - "limit" + - "offset" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedAssetIssueListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "/wallet/deploycontract": "post": "tags": @@ -4016,36 +3126,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/deploycontract.md` for examples and detailed behavior." "operationId": "wallet_deploycontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/deploycontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/deploycontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4057,43 +3153,18 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "new_contract": - "type": "object" - "additionalProperties": true - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "abi": - "type": "object" - "additionalProperties": true - "bytecode": - "type": "string" - "parameter": - "type": "string" - "name": - "type": "string" - "call_value": - "type": "integer" - "consume_user_resource_percent": - "type": "integer" - "origin_energy_limit": - "type": "integer" - "fee_limit": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "CreateSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.CreateSmartContract" + "allOf": + - + "$ref": "#/components/schemas/CreateSmartContractRequest" + "required": + - "owner_address" + - "bytecode" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/VMActuator.java#validate" + - "framework/src/main/java/org/tron/core/services/http/DeployContractServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#CreateSmartContract" + - "protocol/src/main/protos/core/contract/smart_contract.proto#message ABI" "/wallet/triggersmartcontract": "post": "tags": @@ -4102,71 +3173,14 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggersmartcontract.md` for examples and detailed behavior." "operationId": "wallet_triggersmartcontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/triggersmartcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/triggersmartcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "txid": - "type": "string" - "constant_result": - "type": "array" - "items": - "type": "string" - "result": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "energy_used": - "type": "integer" - "logs": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "energy_penalty": - "type": "integer" - "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" - "text/plain": - "schema": - "type": "string" + "$ref": "#/components/schemas/TransactionExtention" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4178,35 +3192,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "call_value": - "type": "integer" - "data": - "type": "string" - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "fee_limit": - "type": "integer" - "function_selector": - "type": "string" - "parameter": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "TriggerSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "allOf": + - + "$ref": "#/components/schemas/TriggerSmartContractRequest" + "required": + - "owner_address" + - "contract_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/VMActuator.java#validate" + - "framework/src/main/java/org/tron/core/services/http/TriggerSmartContractServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#TriggerSmartContract" "/wallet/triggerconstantcontract": "post": "tags": @@ -4215,113 +3211,49 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggerconstantcontract.md` for examples and detailed behavior." "operationId": "wallet_triggerconstantcontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/triggerconstantcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/triggerconstantcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "txid": - "type": "string" - "constant_result": - "type": "array" - "items": - "type": "string" - "result": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "energy_used": - "type": "integer" - "logs": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "energy_penalty": - "type": "integer" - "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" - "text/plain": - "schema": - "type": "string" + "$ref": "#/components/schemas/TransactionExtention" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "TriggerConstantContractServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/triggerconstantcontract" - "x-solidity-servlet": "TriggerConstantContractOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/triggerconstantcontract" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "TriggerConstantContractOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "call_value": - "type": "integer" - "data": - "type": "string" - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "function_selector": - "type": "string" - "parameter": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "extra_data": - "type": "string" - "x-proto-message": "TriggerSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "allOf": + - + "$ref": "#/components/schemas/TriggerSmartContractRequest" + "required": + - "owner_address" + "anyOf": + - + "required": + - "contract_address" + "title": "TriggerconstantcontractPostRequestRequiresContractAddress1" + - + "required": + - "data" + "title": "TriggerconstantcontractPostRequestRequiresData2" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/TriggerConstantContractServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#TriggerSmartContract" "/wallet/estimateenergy": "post": "tags": @@ -4330,7 +3262,7 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/estimateenergy.md` for examples and detailed behavior." "operationId": "wallet_estimateenergy_post" "externalDocs": - "url": "docs/api/http/smart-contract/estimateenergy.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/estimateenergy.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." @@ -4338,11 +3270,11 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "boolean" @@ -4352,48 +3284,43 @@ "type": "string" "energy_required": "type": "integer" + "format": "int64" "x-java-response": "EstimateEnergyMessage rendered by Util.printEstimateEnergyMessage" - "text/plain": - "schema": - "type": "string" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "EstimateEnergyServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/estimateenergy" - "x-solidity-servlet": "EstimateEnergyOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/estimateenergy" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "EstimateEnergyOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "call_value": - "type": "integer" - "data": - "type": "string" - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "function_selector": - "type": "string" - "parameter": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "TriggerSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "allOf": + - + "$ref": "#/components/schemas/TriggerSmartContractRequest" + "required": + - "owner_address" + "anyOf": + - + "required": + - "contract_address" + "title": "EstimateenergyPostRequestRequiresContractAddress1" + - + "required": + - "data" + "title": "EstimateenergyPostRequestRequiresData2" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/EstimateEnergyServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#TriggerSmartContract" "/wallet/getcontract": "get": "tags": @@ -4402,46 +3329,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." "operationId": "wallet_getcontract_get" "externalDocs": - "url": "docs/api/http/smart-contract/getcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "origin_address": - "type": "string" - "contract_address": - "type": "string" - "abi": - "type": "object" - "additionalProperties": true - "bytecode": - "type": "string" - "call_value": - "type": "integer" - "consume_user_resource_percent": - "type": "integer" - "name": - "type": "string" - "origin_energy_limit": - "type": "integer" - "code_hash": - "type": "string" - "trx_hash": - "type": "string" - "version": - "type": "integer" - "x-proto-message": "SmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" - "x-java-response": "SmartContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4452,9 +3355,10 @@ - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -4462,7 +3366,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Smart contract" @@ -4470,46 +3379,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." "operationId": "wallet_getcontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/getcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "origin_address": - "type": "string" - "contract_address": - "type": "string" - "abi": - "type": "object" - "additionalProperties": true - "bytecode": - "type": "string" - "call_value": - "type": "integer" - "consume_user_resource_percent": - "type": "integer" - "name": - "type": "string" - "origin_energy_limit": - "type": "integer" - "code_hash": - "type": "string" - "trx_hash": - "type": "string" - "version": - "type": "integer" - "x-proto-message": "SmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" - "x-java-response": "SmartContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4521,17 +3406,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/getcontractinfo": "get": "tags": @@ -4540,31 +3423,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." "operationId": "wallet_getcontractinfo_get" "externalDocs": - "url": "docs/api/http/smart-contract/getcontractinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontractinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "smart_contract": - "type": "object" - "additionalProperties": true - "runtimecode": - "type": "string" - "contract_state": - "type": "object" - "additionalProperties": true - "x-proto-message": "SmartContractDataWrapper" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" - "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContractDataWrapper" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4575,9 +3449,10 @@ - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -4585,7 +3460,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractInfoServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Smart contract" @@ -4593,31 +3473,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." "operationId": "wallet_getcontractinfo_post" "externalDocs": - "url": "docs/api/http/smart-contract/getcontractinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontractinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "smart_contract": - "type": "object" - "additionalProperties": true - "runtimecode": - "type": "string" - "contract_state": - "type": "object" - "additionalProperties": true - "x-proto-message": "SmartContractDataWrapper" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" - "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContractDataWrapper" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4629,17 +3500,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractInfoServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/clearabi": "post": "tags": @@ -4648,36 +3517,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/clearabi.md` for examples and detailed behavior." "operationId": "wallet_clearabi_post" "externalDocs": - "url": "docs/api/http/smart-contract/clearabi.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/clearabi.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4689,21 +3544,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ClearABIContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.ClearABIContract" + "allOf": + - + "$ref": "#/components/schemas/ClearABIContractRequest" + "required": + - "owner_address" + - "contract_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ClearABIContractActuator.java#validate" + - "protocol/src/main/protos/core/contract/smart_contract.proto#ClearABIContract" "/wallet/updatesetting": "post": "tags": @@ -4712,36 +3562,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updatesetting.md` for examples and detailed behavior." "operationId": "wallet_updatesetting_post" "externalDocs": - "url": "docs/api/http/smart-contract/updatesetting.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/updatesetting.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4753,23 +3589,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "consume_user_resource_percent": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateSettingContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateSettingContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateSettingContractRequest" + "required": + - "owner_address" + - "contract_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateSettingContractActuator.java#validate" + - "protocol/src/main/protos/core/contract/smart_contract.proto#UpdateSettingContract" "/wallet/updateenergylimit": "post": "tags": @@ -4778,36 +3607,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updateenergylimit.md` for examples and detailed behavior." "operationId": "wallet_updateenergylimit_post" "externalDocs": - "url": "docs/api/http/smart-contract/updateenergylimit.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/updateenergylimit.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4819,23 +3634,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "origin_energy_limit": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateEnergyLimitContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateEnergyLimitContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateEnergyLimitContractRequest" + "required": + - "owner_address" + - "contract_address" + - "origin_energy_limit" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateEnergyLimitContractActuator.java#validate" + - "protocol/src/main/protos/core/contract/smart_contract.proto#UpdateEnergyLimitContract" "/wallet/createwitness": "post": "tags": @@ -4844,36 +3653,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/createwitness.md` for examples and detailed behavior." "operationId": "wallet_createwitness_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/createwitness.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/createwitness.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4885,21 +3680,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "url": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WitnessCreateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessCreateContract" + "allOf": + - + "$ref": "#/components/schemas/WitnessCreateContractRequest" + "required": + - "owner_address" + - "url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WitnessCreateActuator.java#validate" + - "protocol/src/main/protos/core/contract/witness_contract.proto#WitnessCreateContract" "/wallet/updatewitness": "post": "tags": @@ -4908,36 +3698,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updatewitness.md` for examples and detailed behavior." "operationId": "wallet_updatewitness_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/updatewitness.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/updatewitness.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -4949,21 +3725,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "update_url": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WitnessUpdateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessUpdateContract" + "allOf": + - + "$ref": "#/components/schemas/WitnessUpdateContractRequest" + "required": + - "owner_address" + - "update_url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WitnessUpdateActuator.java#validate" + - "protocol/src/main/protos/core/contract/witness_contract.proto#WitnessUpdateContract" "/wallet/listwitnesses": "get": "tags": @@ -4972,36 +3743,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." "operationId": "wallet_listwitnesses_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listwitnesses.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "ListWitnessesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/listwitnesses" - "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/listwitnesses" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "ListWitnessesOnSolidityServlet" "parameters": - "name": "visible" @@ -5009,7 +3778,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListWitnessesServlet.java" "post": "tags": - "Witness / governance" @@ -5017,36 +3790,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." "operationId": "wallet_listwitnesses_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listwitnesses.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "ListWitnessesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/listwitnesses" - "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/listwitnesses" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "ListWitnessesOnSolidityServlet" "parameters": - "name": "visible" @@ -5054,7 +3825,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListWitnessesServlet.java" "/wallet/getpaginatednowwitnesslist": "get": "tags": @@ -5063,50 +3838,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatednowwitnesslist_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedNowWitnessListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" - "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatednowwitnesslist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" "parameters": - "name": "offset" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." "x-source-derived": true - "name": "limit" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." "x-source-derived": true - "name": "visible" @@ -5114,7 +3891,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedNowWitnessListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "post": "tags": - "Witness / governance" @@ -5122,54 +3904,49 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatednowwitnesslist_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedNowWitnessListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" - "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatednowwitnesslist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "offset": - "type": "integer" - "limit": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "PaginatedMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "PaginatedMessage" + "allOf": + - + "$ref": "#/components/schemas/PaginatedMessageRequest" + "required": + - "limit" + - "offset" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedNowWitnessListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "/wallet/votewitnessaccount": "post": "tags": @@ -5178,36 +3955,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/votewitnessaccount.md` for examples and detailed behavior." "operationId": "wallet_votewitnessaccount_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/votewitnessaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/votewitnessaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5219,26 +3982,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "votes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "support": - "type": "boolean" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "VoteWitnessContract" - "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.WitnessContract.VoteWitnessContract" + "allOf": + - + "$ref": "#/components/schemas/VoteWitnessContractRequest" + "required": + - "owner_address" + - "votes" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/VoteWitnessActuator.java#validate" + - "protocol/src/main/protos/core/contract/witness_contract.proto#VoteWitnessContract" "/wallet/getBrokerage": "get": "tags": @@ -5247,31 +4000,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." "operationId": "wallet_getBrokerage_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getBrokerage.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "brokerage": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "brokerage": + "type": "integer" + "format": "int32" + "description": "Witness brokerage percentage, from 0 to 100." + "Error": + "type": "string" + "not": + "required": + - "Error" + "title": "GetBrokerageGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBrokerageServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getBrokerage" - "x-solidity-servlet": "GetBrokerageOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getBrokerage" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBrokerageOnSolidityServlet" "parameters": - "name": "address" @@ -5279,7 +4047,11 @@ "required": false "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBrokerageServlet.java" "post": "tags": - "Witness / governance" @@ -5287,39 +4059,71 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." "operationId": "wallet_getBrokerage_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getBrokerage.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "brokerage": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "brokerage": + "type": "integer" + "format": "int32" + "description": "Witness brokerage percentage, from 0 to 100." + "Error": + "type": "string" + "not": + "required": + - "Error" + "title": "GetBrokeragePostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBrokerageServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getBrokerage" - "x-solidity-servlet": "GetBrokerageOnSolidityServlet" - "parameters": + "x-tron-alternate-endpoints": - - "name": "address" - "in": "query" - "required": false - "schema": - "type": "string" - "x-source-derived": true + "path": "/walletsolidity/getBrokerage" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBrokerageOnSolidityServlet" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBrokerageServlet.java" + "requestBody": + "required": false + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-json-body" + "x-java-unknown-fields": "ignored-by-servlet-helper" + "application/x-www-form-urlencoded": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-form-body" "/wallet/updateBrokerage": "post": "tags": @@ -5328,36 +4132,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updateBrokerage.md` for examples and detailed behavior." "operationId": "wallet_updateBrokerage_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/updateBrokerage.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/updateBrokerage.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5369,21 +4159,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "brokerage": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateBrokerageContract" - "x-proto-file": "protocol/src/main/protos/core/contract/storage_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.StorageContract.UpdateBrokerageContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateBrokerageContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateBrokerageActuator.java#validate" + - "protocol/src/main/protos/core/contract/storage_contract.proto#UpdateBrokerageContract" "/wallet/getReward": "get": "tags": @@ -5392,31 +4176,47 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." "operationId": "wallet_getReward_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getReward.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getReward.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "reward": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" - "404": - "description": "Endpoint disabled by node configuration." + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "reward": + "type": "integer" + "format": "int64" + "Error": + "type": "string" + "required": + - "reward" + "not": + "required": + - "Error" + "title": "GetRewardGetResultRequiresReward1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" + "404": + "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetRewardServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getReward" - "x-solidity-servlet": "GetRewardOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getReward" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetRewardOnSolidityServlet" "parameters": - "name": "address" @@ -5424,7 +4224,11 @@ "required": false "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetRewardServlet.java" "post": "tags": - "Witness / governance" @@ -5432,39 +4236,72 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." "operationId": "wallet_getReward_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getReward.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getReward.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "reward": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "reward": + "type": "integer" + "format": "int64" + "Error": + "type": "string" + "required": + - "reward" + "not": + "required": + - "Error" + "title": "GetRewardPostResultRequiresReward1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetRewardServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getReward" - "x-solidity-servlet": "GetRewardOnSolidityServlet" - "parameters": + "x-tron-alternate-endpoints": - - "name": "address" - "in": "query" - "required": false - "schema": - "type": "string" - "x-source-derived": true + "path": "/walletsolidity/getReward" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetRewardOnSolidityServlet" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetRewardServlet.java" + "requestBody": + "required": false + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-json-body" + "x-java-unknown-fields": "ignored-by-servlet-helper" + "application/x-www-form-urlencoded": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-form-body" "/wallet/withdrawbalance": "post": "tags": @@ -5473,36 +4310,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/withdrawbalance.md` for examples and detailed behavior." "operationId": "wallet_withdrawbalance_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/withdrawbalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/withdrawbalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5514,19 +4337,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WithdrawBalanceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawBalanceContract" + "allOf": + - + "$ref": "#/components/schemas/WithdrawBalanceContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WithdrawBalanceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#WithdrawBalanceContract" "/wallet/proposalcreate": "post": "tags": @@ -5535,36 +4354,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalcreate.md` for examples and detailed behavior." "operationId": "wallet_proposalcreate_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/proposalcreate.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/proposalcreate.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5576,19 +4381,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ProposalCreateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalCreateContract" + "allOf": + - + "$ref": "#/components/schemas/ProposalCreateContractRequest" + "required": + - "owner_address" + - "parameters" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ProposalCreateActuator.java#validate" + - "protocol/src/main/protos/core/contract/proposal_contract.proto#ProposalCreateContract" "/wallet/proposalapprove": "post": "tags": @@ -5597,36 +4399,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalapprove.md` for examples and detailed behavior." "operationId": "wallet_proposalapprove_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/proposalapprove.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/proposalapprove.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5638,23 +4426,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "proposal_id": - "type": "integer" - "is_add_approval": - "type": "boolean" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ProposalApproveContract" - "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalApproveContract" + "allOf": + - + "$ref": "#/components/schemas/ProposalApproveContractRequest" + "required": + - "owner_address" + - "proposal_id" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ProposalApproveActuator.java#validate" + - "protocol/src/main/protos/core/contract/proposal_contract.proto#ProposalApproveContract" "/wallet/proposaldelete": "post": "tags": @@ -5663,36 +4444,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposaldelete.md` for examples and detailed behavior." "operationId": "wallet_proposaldelete_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/proposaldelete.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/proposaldelete.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5704,21 +4471,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "proposal_id": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ProposalDeleteContract" - "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalDeleteContract" + "allOf": + - + "$ref": "#/components/schemas/ProposalDeleteContractRequest" + "required": + - "owner_address" + - "proposal_id" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ProposalDeleteActuator.java#validate" + - "protocol/src/main/protos/core/contract/proposal_contract.proto#ProposalDeleteContract" "/wallet/listproposals": "get": "tags": @@ -5727,28 +4489,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." "operationId": "wallet_listproposals_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/listproposals.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listproposals.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5762,7 +4518,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListProposalsServlet.java" "post": "tags": - "Witness / governance" @@ -5770,28 +4530,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." "operationId": "wallet_listproposals_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/listproposals.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listproposals.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5805,7 +4559,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListProposalsServlet.java" "/wallet/getproposalbyid": "get": "tags": @@ -5814,38 +4572,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." "operationId": "wallet_getproposalbyid_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getproposalbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposal_id": - "type": "integer" - "proposer_address": - "type": "string" - "expiration_time": - "type": "integer" - "create_time": - "type": "integer" - "approvals": - "type": "array" - "items": - "type": "string" - "state": - "type": "object" - "additionalProperties": true - "x-proto-message": "Proposal" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Proposal" - "x-java-response": "Proposal rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Proposal" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5856,9 +4598,11 @@ - "name": "id" "in": "query" - "required": false + "required": true "schema": - "type": "string" + "type": "integer" + "format": "int64" + "description": "Proposal id." "x-source-derived": true - "name": "visible" @@ -5866,7 +4610,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetProposalByIdServlet.java" "post": "tags": - "Witness / governance" @@ -5874,38 +4622,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." "operationId": "wallet_getproposalbyid_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getproposalbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposal_id": - "type": "integer" - "proposer_address": - "type": "string" - "expiration_time": - "type": "integer" - "create_time": - "type": "integer" - "approvals": - "type": "array" - "items": - "type": "string" - "state": - "type": "object" - "additionalProperties": true - "x-proto-message": "Proposal" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Proposal" - "x-java-response": "Proposal rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Proposal" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5918,13 +4650,22 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "id": - "type": "string" + "type": "integer" + "description": "Proposal id." + "format": "int64" "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "required": + - "id" + "x-java-unknown-fields": "ignored-by-jsonformat" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetProposalByIdServlet.java" "/wallet/getpaginatedproposallist": "get": "tags": @@ -5933,28 +4674,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedproposallist_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatedproposallist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -5965,16 +4700,20 @@ - "name": "offset" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." "x-source-derived": true - "name": "limit" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." "x-source-derived": true - "name": "visible" @@ -5982,7 +4721,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedProposalListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "post": "tags": - "Witness / governance" @@ -5990,28 +4734,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedproposallist_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatedproposallist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6023,19 +4761,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "offset": - "type": "integer" - "limit": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "PaginatedMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "allOf": + - + "$ref": "#/components/schemas/PaginatedMessageRequest" + "required": + - "limit" + - "offset" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedProposalListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "/wallet/getchainparameters": "get": "tags": @@ -6044,27 +4779,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." "operationId": "wallet_getchainparameters_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getchainparameters.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "chainParameter": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ChainParameters" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "ChainParameters rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ChainParameters" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6078,7 +4808,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetChainParametersServlet.java" "post": "tags": - "Witness / governance" @@ -6086,33 +4820,31 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." "operationId": "wallet_getchainparameters_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getchainparameters.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "chainParameter": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ChainParameters" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "ChainParameters rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ChainParameters" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetChainParametersServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetChainParametersServlet.java" "/wallet/getnextmaintenancetime": "get": "tags": @@ -6121,25 +4853,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." "operationId": "wallet_getnextmaintenancetime_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getnextmaintenancetime.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" - "x-java-response": "NumberMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NumberMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6153,7 +4882,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNextMaintenanceTimeServlet.java" "post": "tags": - "Witness / governance" @@ -6161,25 +4894,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." "operationId": "wallet_getnextmaintenancetime_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getnextmaintenancetime.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" - "x-java-response": "NumberMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NumberMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6193,7 +4923,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNextMaintenanceTimeServlet.java" "/wallet/freezebalance": "post": "tags": @@ -6202,36 +4936,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/freezebalance.md` for examples and detailed behavior." "operationId": "wallet_freezebalance_post" "externalDocs": - "url": "docs/api/http/stake-v1/freezebalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/freezebalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6243,28 +4963,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "frozen_balance": - "type": "integer" - "frozen_duration": - "type": "integer" - "resource": - "type": "object" - "additionalProperties": true - "receiver_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "FreezeBalanceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceContract" + "allOf": + - + "$ref": "#/components/schemas/FreezeBalanceContractRequest" + "required": + - "owner_address" + - "frozen_balance" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/FreezeBalanceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#FreezeBalanceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" "/wallet/unfreezebalance": "post": "tags": @@ -6273,36 +4982,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/unfreezebalance.md` for examples and detailed behavior." "operationId": "wallet_unfreezebalance_post" "externalDocs": - "url": "docs/api/http/stake-v1/unfreezebalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/unfreezebalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6314,24 +5009,16 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "resource": - "type": "object" - "additionalProperties": true - "receiver_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnfreezeBalanceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceContract" + "allOf": + - + "$ref": "#/components/schemas/UnfreezeBalanceContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnfreezeBalanceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#UnfreezeBalanceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" "/wallet/getdelegatedresource": "get": "tags": @@ -6340,50 +5027,50 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresource_get" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" - "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresource" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceOnSolidityServlet" "parameters": - "name": "fromAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Source account address." "x-source-derived": true - "name": "toAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Destination account address." "x-source-derived": true - "name": "visible" @@ -6391,6 +5078,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -6399,54 +5087,49 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresource_post" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" - "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresource" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "fromAddress": - "type": "string" - "toAddress": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "DelegatedResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "allOf": + - + "$ref": "#/components/schemas/DelegatedResourceMessageRequest" + "required": + - "fromAddress" + - "toAddress" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceServlet.java" + - "protocol/src/main/protos/api/api.proto#DelegatedResourceMessage" "/wallet/getdelegatedresourceaccountindex": "get": "tags": @@ -6455,50 +5138,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindex_get" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindex" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -6506,6 +5181,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -6514,59 +5190,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindex_post" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindex" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceAccountIndexServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/freezebalancev2": "post": "tags": @@ -6575,36 +5240,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/freezebalancev2.md` for examples and detailed behavior." "operationId": "wallet_freezebalancev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/freezebalancev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/freezebalancev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6616,24 +5267,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "frozen_balance": - "type": "integer" - "resource": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "FreezeBalanceV2Contract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceV2Contract" + "allOf": + - + "$ref": "#/components/schemas/FreezeBalanceV2ContractRequest" + "required": + - "owner_address" + - "frozen_balance" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/FreezeBalanceV2Actuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#FreezeBalanceV2Contract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" "/wallet/unfreezebalancev2": "post": "tags": @@ -6642,36 +5286,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/unfreezebalancev2.md` for examples and detailed behavior." "operationId": "wallet_unfreezebalancev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/unfreezebalancev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/unfreezebalancev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6683,24 +5313,17 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "unfreeze_balance": - "type": "integer" - "resource": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnfreezeBalanceV2Contract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceV2Contract" + "allOf": + - + "$ref": "#/components/schemas/UnfreezeBalanceV2ContractRequest" + "required": + - "owner_address" + - "unfreeze_balance" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnfreezeBalanceV2Actuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#UnfreezeBalanceV2Contract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" "/wallet/withdrawexpireunfreeze": "post": "tags": @@ -6709,36 +5332,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/withdrawexpireunfreeze.md` for examples and detailed behavior." "operationId": "wallet_withdrawexpireunfreeze_post" "externalDocs": - "url": "docs/api/http/stake-v2/withdrawexpireunfreeze.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/withdrawexpireunfreeze.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6750,19 +5359,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WithdrawExpireUnfreezeContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawExpireUnfreezeContract" + "allOf": + - + "$ref": "#/components/schemas/WithdrawExpireUnfreezeContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WithdrawExpireUnfreezeActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#WithdrawExpireUnfreezeContract" "/wallet/cancelallunfreezev2": "post": "tags": @@ -6771,36 +5376,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/cancelallunfreezev2.md` for examples and detailed behavior." "operationId": "wallet_cancelallunfreezev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/cancelallunfreezev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/cancelallunfreezev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6812,19 +5403,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "CancelAllUnfreezeV2Contract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.CancelAllUnfreezeV2Contract" + "allOf": + - + "$ref": "#/components/schemas/CancelAllUnfreezeV2ContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/CancelAllUnfreezeV2Actuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#CancelAllUnfreezeV2Contract" "/wallet/delegateresource": "post": "tags": @@ -6833,36 +5420,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/delegateresource.md` for examples and detailed behavior." "operationId": "wallet_delegateresource_post" "externalDocs": - "url": "docs/api/http/stake-v2/delegateresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/delegateresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6874,30 +5447,18 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "resource": - "type": "object" - "additionalProperties": true - "balance": - "type": "integer" - "receiver_address": - "type": "string" - "lock": - "type": "boolean" - "lock_period": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "DelegateResourceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.DelegateResourceContract" + "allOf": + - + "$ref": "#/components/schemas/DelegateResourceContractRequest" + "required": + - "owner_address" + - "balance" + - "receiver_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/DelegateResourceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#DelegateResourceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" "/wallet/undelegateresource": "post": "tags": @@ -6906,36 +5467,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/undelegateresource.md` for examples and detailed behavior." "operationId": "wallet_undelegateresource_post" "externalDocs": - "url": "docs/api/http/stake-v2/undelegateresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/undelegateresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -6947,26 +5494,18 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "resource": - "type": "object" - "additionalProperties": true - "balance": - "type": "integer" - "receiver_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnDelegateResourceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnDelegateResourceContract" + "allOf": + - + "$ref": "#/components/schemas/UnDelegateResourceContractRequest" + "required": + - "owner_address" + - "balance" + - "receiver_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnDelegateResourceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#UnDelegateResourceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" "/wallet/getdelegatedresourcev2": "get": "tags": @@ -6975,50 +5514,50 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourcev2_get" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourcev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" - "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourcev2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceV2OnSolidityServlet" "parameters": - "name": "fromAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Source account address." "x-source-derived": true - "name": "toAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Destination account address." "x-source-derived": true - "name": "visible" @@ -7026,6 +5565,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -7034,54 +5574,49 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourcev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourcev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" - "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourcev2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceV2OnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "fromAddress": - "type": "string" - "toAddress": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "DelegatedResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "allOf": + - + "$ref": "#/components/schemas/DelegatedResourceMessageRequest" + "required": + - "fromAddress" + - "toAddress" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceV2Servlet.java" + - "protocol/src/main/protos/api/api.proto#DelegatedResourceMessage" "/wallet/getdelegatedresourceaccountindexv2": "get": "tags": @@ -7090,50 +5625,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindexv2_get" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindexv2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -7141,6 +5668,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -7149,59 +5677,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindexv2_post" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindexv2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceAccountIndexV2Servlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "/wallet/getcandelegatedmaxsize": "get": "tags": @@ -7210,33 +5727,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." "operationId": "wallet_getcandelegatedmaxsize_get" "externalDocs": - "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcandelegatedmaxsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "max_size": - "type": "integer" - "x-proto-message": "CanDelegatedMaxSizeResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" - "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanDelegatedMaxSizeResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanDelegatedMaxSizeServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" - "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcandelegatedmaxsize" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" "parameters": - "name": "type" @@ -7244,13 +5762,16 @@ "required": false "schema": "type": "integer" + "format": "int32" + "description": "Account, contract, or resource type." "x-source-derived": true - "name": "owner_address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Address of the account that owns or initiates the request." "x-source-derived": true - "name": "visible" @@ -7258,6 +5779,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -7266,51 +5788,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." "operationId": "wallet_getcandelegatedmaxsize_post" "externalDocs": - "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcandelegatedmaxsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "max_size": - "type": "integer" - "x-proto-message": "CanDelegatedMaxSizeResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" - "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanDelegatedMaxSizeResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanDelegatedMaxSizeServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" - "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcandelegatedmaxsize" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "type": - "type": "integer" - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "CanDelegatedMaxSizeRequestMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "CanDelegatedMaxSizeRequestMessage" + "allOf": + - + "$ref": "#/components/schemas/CanDelegatedMaxSizeRequestMessageRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetCanDelegatedMaxSizeServlet.java" + - "protocol/src/main/protos/api/api.proto#CanDelegatedMaxSizeRequestMessage" "/wallet/getavailableunfreezecount": "get": "tags": @@ -7319,33 +5838,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." "operationId": "wallet_getavailableunfreezecount_get" "externalDocs": - "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getavailableunfreezecount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" - "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/GetAvailableUnfreezeCountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAvailableUnfreezeCountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" - "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getavailableunfreezecount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" "parameters": - "name": "ownerAddress" @@ -7353,6 +5873,7 @@ "required": false "schema": "type": "string" + "description": "Alias for owner_address. At least one of ownerAddress or owner_address must be provided." "x-source-derived": true - "name": "owner_address" @@ -7360,6 +5881,7 @@ "required": false "schema": "type": "string" + "description": "Address of the account that owns or initiates the request. At least one of ownerAddress or owner_address must be provided." "x-source-derived": true - "name": "visible" @@ -7367,7 +5889,16 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAvailableUnfreezeCountServlet.java" + "x-query-required-anyOf": + - + - "ownerAddress" + - + - "owner_address" "post": "tags": - "Stake 2.0" @@ -7375,49 +5906,44 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." "operationId": "wallet_getavailableunfreezecount_post" "externalDocs": - "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getavailableunfreezecount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" - "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/GetAvailableUnfreezeCountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAvailableUnfreezeCountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" - "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getavailableunfreezecount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "GetAvailableUnfreezeCountRequestMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "GetAvailableUnfreezeCountRequestMessage" + "$ref": "#/components/schemas/GetAvailableUnfreezeCountRequestMessageRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAvailableUnfreezeCountServlet.java" + - "protocol/src/main/protos/api/api.proto#GetAvailableUnfreezeCountRequestMessage" "/wallet/getcanwithdrawunfreezeamount": "get": "tags": @@ -7426,40 +5952,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." "operationId": "wallet_getcanwithdrawunfreezeamount_get" "externalDocs": - "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "amount": - "type": "integer" - "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" - "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanWithdrawUnfreezeAmountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" - "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcanwithdrawunfreezeamount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" "parameters": - "name": "owner_address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Address of the account that owns or initiates the request." "x-source-derived": true - "name": "timestamp" @@ -7467,6 +5995,8 @@ "required": false "schema": "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." "x-source-derived": true - "name": "visible" @@ -7474,6 +6004,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -7482,51 +6013,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." "operationId": "wallet_getcanwithdrawunfreezeamount_post" "externalDocs": - "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "amount": - "type": "integer" - "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" - "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanWithdrawUnfreezeAmountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" - "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcanwithdrawunfreezeamount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "timestamp": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "CanWithdrawUnfreezeAmountRequestMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "CanWithdrawUnfreezeAmountRequestMessage" + "allOf": + - + "$ref": "#/components/schemas/CanWithdrawUnfreezeAmountRequestMessageRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetCanWithdrawUnfreezeAmountServlet.java" + - "protocol/src/main/protos/api/api.proto#CanWithdrawUnfreezeAmountRequestMessage" "/wallet/getnodeinfo": "get": "tags": @@ -7535,59 +6063,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." "operationId": "wallet_getnodeinfo_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getnodeinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "beginSyncNum": - "type": "integer" - "block": - "type": "string" - "solidityBlock": - "type": "string" - "currentConnectCount": - "type": "integer" - "activeConnectCount": - "type": "integer" - "passiveConnectCount": - "type": "integer" - "totalFlow": - "type": "integer" - "peerList": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "configNodeInfo": - "type": "object" - "additionalProperties": true - "machineInfo": - "type": "object" - "additionalProperties": true - "cheatWitnessInfoMap": - "type": "object" - "additionalProperties": true - "x-java-response-type": "org.tron.common.entity.NodeInfo" - "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNodeInfoServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnodeinfo" - "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnodeinfo" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNodeInfoOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNodeInfoServlet.java" "post": "tags": - "Node / pricing / tools" @@ -7595,59 +6103,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." "operationId": "wallet_getnodeinfo_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getnodeinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "beginSyncNum": - "type": "integer" - "block": - "type": "string" - "solidityBlock": - "type": "string" - "currentConnectCount": - "type": "integer" - "activeConnectCount": - "type": "integer" - "passiveConnectCount": - "type": "integer" - "totalFlow": - "type": "integer" - "peerList": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "configNodeInfo": - "type": "object" - "additionalProperties": true - "machineInfo": - "type": "object" - "additionalProperties": true - "cheatWitnessInfoMap": - "type": "object" - "additionalProperties": true - "x-java-response-type": "org.tron.common.entity.NodeInfo" - "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNodeInfoServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnodeinfo" - "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnodeinfo" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNodeInfoOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNodeInfoServlet.java" "/wallet/listnodes": "get": "tags": @@ -7656,28 +6144,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." "operationId": "wallet_listnodes_get" "externalDocs": - "url": "docs/api/http/node-and-tools/listnodes.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/listnodes.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "nodes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "NodeList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" - "x-java-response": "NodeList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -7691,7 +6173,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListNodesServlet.java" "post": "tags": - "Node / pricing / tools" @@ -7699,28 +6185,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." "operationId": "wallet_listnodes_post" "externalDocs": - "url": "docs/api/http/node-and-tools/listnodes.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/listnodes.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "nodes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "NodeList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" - "x-java-response": "NodeList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -7734,6 +6214,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "/wallet/getenergyprices": "get": @@ -7743,35 +6224,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." "operationId": "wallet_getenergyprices_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getenergyprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getenergyprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetEnergyPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getenergyprices" - "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getenergyprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetEnergyPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetEnergyPricesServlet.java" "post": "tags": - "Node / pricing / tools" @@ -7779,35 +6264,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." "operationId": "wallet_getenergyprices_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getenergyprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getenergyprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetEnergyPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getenergyprices" - "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getenergyprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetEnergyPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetEnergyPricesServlet.java" "/wallet/getbandwidthprices": "get": "tags": @@ -7816,35 +6305,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." "operationId": "wallet_getbandwidthprices_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getbandwidthprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBandwidthPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" - "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getbandwidthprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBandwidthPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBandwidthPricesServlet.java" "post": "tags": - "Node / pricing / tools" @@ -7852,35 +6345,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." "operationId": "wallet_getbandwidthprices_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getbandwidthprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBandwidthPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" - "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getbandwidthprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBandwidthPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBandwidthPricesServlet.java" "/wallet/getburntrx": "get": "tags": @@ -7889,31 +6386,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." "operationId": "wallet_getburntrx_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getburntrx.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getburntrx.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "burnTrxAmount": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "burnTrxAmount": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetburntrxGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBurnTrxServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getburntrx" - "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getburntrx" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBurnTrxOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBurnTrxServlet.java" "post": "tags": - "Node / pricing / tools" @@ -7921,36 +6435,3985 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." "operationId": "wallet_getburntrx_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getburntrx.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getburntrx.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "burnTrxAmount": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "burnTrxAmount": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetburntrxPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBurnTrxServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getburntrx" - "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getburntrx" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBurnTrxOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBurnTrxServlet.java" "components": "schemas": "JavaTronError": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "Error": "type": "string" + "required": + - "Error" + "AccountId": + "type": "object" + "additionalProperties": false + "properties": + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-proto-message": "AccountId" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "Authority": + "type": "object" + "additionalProperties": false + "properties": + "account": + "$ref": "#/components/schemas/AccountId" + "permission_name": + "type": "string" + "x-proto-message": "authority" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "AccountCreateContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "account_address": + "type": "string" + "description": "Address of the account to create." + "type": + "type": "string" + "enum": + - "Normal" + - "AssetIssue" + - "Contract" + "description": "Account, contract, or resource type." + "x-proto-message": "AccountCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "Key": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "weight": + "type": "integer" + "format": "int64" + "x-proto-message": "Key" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "Permission": + "type": "object" + "additionalProperties": false + "properties": + "type": + "type": "string" + "enum": + - "Owner" + - "Witness" + - "Active" + "description": "Account, contract, or resource type." + "id": + "type": "integer" + "format": "int32" + "description": "Identifier used by this query." + "permission_name": + "type": "string" + "threshold": + "type": "integer" + "format": "int64" + "parent_id": + "type": "integer" + "format": "int32" + "operations": + "type": "string" + "keys": + "type": "array" + "items": + "$ref": "#/components/schemas/Key" + "x-proto-message": "Permission" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "description": "Owner permission definition." + "AccountPermissionUpdateContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "owner": + "$ref": "#/components/schemas/Permission" + "witness": + "$ref": "#/components/schemas/Permission" + "actives": + "type": "array" + "items": + "$ref": "#/components/schemas/Permission" + "description": "Active permission definitions for account permission update." + "x-proto-message": "AccountPermissionUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "AccountUpdateContract": + "type": "object" + "additionalProperties": false + "properties": + "account_name": + "type": "string" + "description": "New account name encoded as expected by java-tron." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "x-proto-message": "AccountUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "AssetIssueContractFrozenSupply": + "type": "object" + "additionalProperties": false + "properties": + "frozen_amount": + "type": "integer" + "format": "int64" + "frozen_days": + "type": "integer" + "format": "int64" + "x-proto-message": "AssetIssueContract.FrozenSupply" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "AssetIssueContract": + "type": "object" + "additionalProperties": false + "properties": + "id": + "type": "string" + "description": "Identifier used by this query." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "abbr": + "type": "string" + "description": "Asset abbreviation." + "total_supply": + "type": "integer" + "format": "int64" + "description": "Total asset supply." + "frozen_supply": + "type": "array" + "items": + "$ref": "#/components/schemas/AssetIssueContractFrozenSupply" + "description": "Frozen supply schedules for an asset issue." + "trx_num": + "type": "integer" + "format": "int32" + "description": "TRX amount used in the asset issue exchange ratio." + "precision": + "type": "integer" + "format": "int32" + "description": "Asset precision." + "num": + "type": "integer" + "format": "int32" + "description": "Number of items or blocks to return." + "start_time": + "type": "integer" + "format": "int64" + "description": "Start timestamp in milliseconds." + "end_time": + "type": "integer" + "format": "int64" + "description": "End timestamp in milliseconds." + "order": + "type": "integer" + "format": "int64" + "description": "Sort order." + "vote_score": + "type": "integer" + "format": "int32" + "description": "Vote count or vote weight." + "description": + "type": "string" + "description": "Human-readable description for this object." + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "free_asset_net_limit": + "type": "integer" + "format": "int64" + "description": "Free asset bandwidth limit for each account." + "public_free_asset_net_limit": + "type": "integer" + "format": "int64" + "description": "Public free asset bandwidth limit." + "public_free_asset_net_usage": + "type": "integer" + "format": "int64" + "description": "Public free asset bandwidth usage." + "public_latest_free_net_time": + "type": "integer" + "format": "int64" + "description": "Latest public free bandwidth usage timestamp." + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" + "CancelAllUnfreezeV2Contract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "x-proto-message": "CancelAllUnfreezeV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "ClearABIContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "x-proto-message": "ClearABIContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "CreateSmartContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "new_contract": + "$ref": "#/components/schemas/SmartContract" + "call_token_value": + "type": "integer" + "format": "int64" + "description": "TRC10 token amount transferred with the smart contract call." + "token_id": + "type": "integer" + "format": "int64" + "description": "TRC10 token id." + "x-proto-message": "CreateSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "DelegateResourceContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type." + "balance": + "type": "integer" + "format": "int64" + "description": "Resource amount in sun, where 1 TRX equals 1,000,000 sun." + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "lock": + "type": "boolean" + "description": "Whether delegated resources are locked." + "lock_period": + "type": "integer" + "format": "int64" + "description": "Resource delegation lock period." + "x-proto-message": "DelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "ExchangeCreateContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "first_token_id": + "type": "string" + "first_token_balance": + "type": "integer" + "format": "int64" + "second_token_id": + "type": "string" + "second_token_balance": + "type": "integer" + "format": "int64" + "x-proto-message": "ExchangeCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/exchange_contract.proto" + "ExchangeInjectContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "exchange_id": + "type": "integer" + "format": "int64" + "token_id": + "type": "string" + "description": "TRC10 token id." + "quant": + "type": "integer" + "format": "int64" + "x-proto-message": "ExchangeInjectContract" + "x-proto-file": "protocol/src/main/protos/core/contract/exchange_contract.proto" + "ExchangeTransactionContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "exchange_id": + "type": "integer" + "format": "int64" + "token_id": + "type": "string" + "description": "TRC10 token id." + "quant": + "type": "integer" + "format": "int64" + "expected": + "type": "integer" + "format": "int64" + "x-proto-message": "ExchangeTransactionContract" + "x-proto-file": "protocol/src/main/protos/core/contract/exchange_contract.proto" + "ExchangeWithdrawContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "exchange_id": + "type": "integer" + "format": "int64" + "token_id": + "type": "string" + "description": "TRC10 token id." + "quant": + "type": "integer" + "format": "int64" + "x-proto-message": "ExchangeWithdrawContract" + "x-proto-file": "protocol/src/main/protos/core/contract/exchange_contract.proto" + "FreezeBalanceContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "frozen_balance": + "type": "integer" + "format": "int64" + "description": "Amount to freeze in sun, where 1 TRX equals 1,000,000 sun." + "frozen_duration": + "type": "integer" + "format": "int64" + "description": "Freeze duration in days." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type." + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "x-proto-message": "FreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "FreezeBalanceV2Contract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "frozen_balance": + "type": "integer" + "format": "int64" + "description": "Amount to freeze in sun, where 1 TRX equals 1,000,000 sun." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type." + "x-proto-message": "FreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "MarketCancelOrderContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "order_id": + "type": "string" + "x-proto-message": "MarketCancelOrderContract" + "x-proto-file": "protocol/src/main/protos/core/contract/market_contract.proto" + "MarketSellAssetContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "sell_token_id": + "type": "string" + "sell_token_quantity": + "type": "integer" + "format": "int64" + "buy_token_id": + "type": "string" + "buy_token_quantity": + "type": "integer" + "format": "int64" + "x-proto-message": "MarketSellAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/market_contract.proto" + "ParticipateAssetIssueContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "to_address": + "type": "string" + "description": "Destination account address." + "asset_name": + "type": "string" + "description": "Asset name or token identifier encoded as expected by java-tron." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "x-proto-message": "ParticipateAssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "ProposalApproveContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "proposal_id": + "type": "integer" + "format": "int64" + "description": "Proposal id." + "is_add_approval": + "type": "boolean" + "description": "Whether to add approval for the proposal." + "x-proto-message": "ProposalApproveContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "ProposalCreateContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "parameters": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "description": "Proposal parameter map." + "x-proto-message": "ProposalCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "ProposalDeleteContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "proposal_id": + "type": "integer" + "format": "int64" + "description": "Proposal id." + "x-proto-message": "ProposalDeleteContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "SetAccountIdContract": + "type": "object" + "additionalProperties": false + "properties": + "account_id": + "type": "string" + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "x-proto-message": "SetAccountIdContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "SpendDescription": + "type": "object" + "additionalProperties": false + "properties": + "value_commitment": + "type": "string" + "anchor": + "type": "string" + "nullifier": + "type": "string" + "rk": + "type": "string" + "zkproof": + "type": "string" + "spend_authority_signature": + "type": "string" + "x-proto-message": "SpendDescription" + "x-proto-file": "protocol/src/main/protos/core/contract/shield_contract.proto" + "ReceiveDescription": + "type": "object" + "additionalProperties": false + "properties": + "value_commitment": + "type": "string" + "note_commitment": + "type": "string" + "epk": + "type": "string" + "c_enc": + "type": "string" + "c_out": + "type": "string" + "zkproof": + "type": "string" + "x-proto-message": "ReceiveDescription" + "x-proto-file": "protocol/src/main/protos/core/contract/shield_contract.proto" + "ShieldedTransferContract": + "type": "object" + "additionalProperties": false + "properties": + "transparent_from_address": + "type": "string" + "from_amount": + "type": "integer" + "format": "int64" + "spend_description": + "type": "array" + "items": + "$ref": "#/components/schemas/SpendDescription" + "receive_description": + "type": "array" + "items": + "$ref": "#/components/schemas/ReceiveDescription" + "binding_signature": + "type": "string" + "transparent_to_address": + "type": "string" + "to_amount": + "type": "integer" + "format": "int64" + "x-proto-message": "ShieldedTransferContract" + "x-proto-file": "protocol/src/main/protos/core/contract/shield_contract.proto" + "TransferAssetContract": + "type": "object" + "additionalProperties": false + "properties": + "asset_name": + "type": "string" + "description": "Asset name or token identifier encoded as expected by java-tron." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "to_address": + "type": "string" + "description": "Destination account address." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "x-proto-message": "TransferAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "TransferContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "to_address": + "type": "string" + "description": "Destination account address." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "x-proto-message": "TransferContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "TriggerSmartContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "call_value": + "type": "integer" + "format": "int64" + "description": "TRX amount in sun transferred with the smart contract call." + "data": + "type": "string" + "description": "Hex-encoded contract call data or transaction data." + "call_token_value": + "type": "integer" + "format": "int64" + "description": "TRC10 token amount transferred with the smart contract call." + "token_id": + "type": "integer" + "format": "int64" + "description": "TRC10 token id." + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "UnDelegateResourceContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type." + "balance": + "type": "integer" + "format": "int64" + "description": "Resource amount in sun, where 1 TRX equals 1,000,000 sun." + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "x-proto-message": "UnDelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "UnfreezeAssetContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "x-proto-message": "UnfreezeAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "UnfreezeBalanceContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type." + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "x-proto-message": "UnfreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "UnfreezeBalanceV2Contract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "unfreeze_balance": + "type": "integer" + "format": "int64" + "description": "Amount to unfreeze in sun, where 1 TRX equals 1,000,000 sun." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type." + "x-proto-message": "UnfreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "UpdateAssetContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "description": + "type": "string" + "description": "Human-readable description for this object." + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "new_limit": + "type": "integer" + "format": "int64" + "description": "New account resource limit." + "new_public_limit": + "type": "integer" + "format": "int64" + "description": "New public resource limit." + "x-proto-message": "UpdateAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "UpdateBrokerageContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "brokerage": + "type": "integer" + "format": "int32" + "description": "Witness brokerage percentage, from 0 to 100." + "x-proto-message": "UpdateBrokerageContract" + "x-proto-file": "protocol/src/main/protos/core/contract/storage_contract.proto" + "UpdateEnergyLimitContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "origin_energy_limit": + "type": "integer" + "format": "int64" + "description": "Origin energy limit for a deployed smart contract." + "x-proto-message": "UpdateEnergyLimitContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "UpdateSettingContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "consume_user_resource_percent": + "type": "integer" + "format": "int64" + "description": "Percentage of contract execution resource cost paid by the user." + "x-proto-message": "UpdateSettingContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "VoteWitnessContractVote": + "type": "object" + "additionalProperties": false + "properties": + "vote_address": + "type": "string" + "vote_count": + "type": "integer" + "format": "int64" + "x-proto-message": "VoteWitnessContract.Vote" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "VoteWitnessContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "votes": + "type": "array" + "items": + "$ref": "#/components/schemas/VoteWitnessContractVote" + "description": "Witness vote entries." + "support": + "type": "boolean" + "description": "Proposal support flag." + "x-proto-message": "VoteWitnessContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "WithdrawBalanceContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "x-proto-message": "WithdrawBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "WithdrawExpireUnfreezeContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "x-proto-message": "WithdrawExpireUnfreezeContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "WitnessCreateContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "x-proto-message": "WitnessCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "WitnessUpdateContract": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "update_url": + "type": "string" + "description": "Updated URL encoded as expected by java-tron." + "x-proto-message": "WitnessUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "TransactionContract": + "type": "object" + "additionalProperties": false + "properties": + "type": + "type": "string" + "enum": + - "AccountCreateContract" + - "TransferContract" + - "TransferAssetContract" + - "VoteAssetContract" + - "VoteWitnessContract" + - "WitnessCreateContract" + - "AssetIssueContract" + - "WitnessUpdateContract" + - "ParticipateAssetIssueContract" + - "AccountUpdateContract" + - "FreezeBalanceContract" + - "UnfreezeBalanceContract" + - "WithdrawBalanceContract" + - "UnfreezeAssetContract" + - "UpdateAssetContract" + - "ProposalCreateContract" + - "ProposalApproveContract" + - "ProposalDeleteContract" + - "SetAccountIdContract" + - "CustomContract" + - "CreateSmartContract" + - "TriggerSmartContract" + - "GetContract" + - "UpdateSettingContract" + - "ExchangeCreateContract" + - "ExchangeInjectContract" + - "ExchangeWithdrawContract" + - "ExchangeTransactionContract" + - "UpdateEnergyLimitContract" + - "AccountPermissionUpdateContract" + - "ClearABIContract" + - "UpdateBrokerageContract" + - "ShieldedTransferContract" + - "MarketSellAssetContract" + - "MarketCancelOrderContract" + - "FreezeBalanceV2Contract" + - "UnfreezeBalanceV2Contract" + - "WithdrawExpireUnfreezeContract" + - "DelegateResourceContract" + - "UnDelegateResourceContract" + - "CancelAllUnfreezeV2Contract" + "description": "Account, contract, or resource type." + "parameter": + "type": "object" + "additionalProperties": false + "properties": + "type_url": + "type": "string" + "value": + "oneOf": + - + "$ref": "#/components/schemas/AccountCreateContract" + - + "$ref": "#/components/schemas/AccountPermissionUpdateContract" + - + "$ref": "#/components/schemas/AccountUpdateContract" + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/CancelAllUnfreezeV2Contract" + - + "$ref": "#/components/schemas/ClearABIContract" + - + "$ref": "#/components/schemas/CreateSmartContract" + - + "$ref": "#/components/schemas/DelegateResourceContract" + - + "$ref": "#/components/schemas/ExchangeCreateContract" + - + "$ref": "#/components/schemas/ExchangeInjectContract" + - + "$ref": "#/components/schemas/ExchangeTransactionContract" + - + "$ref": "#/components/schemas/ExchangeWithdrawContract" + - + "$ref": "#/components/schemas/FreezeBalanceContract" + - + "$ref": "#/components/schemas/FreezeBalanceV2Contract" + - + "$ref": "#/components/schemas/MarketCancelOrderContract" + - + "$ref": "#/components/schemas/MarketSellAssetContract" + - + "$ref": "#/components/schemas/ParticipateAssetIssueContract" + - + "$ref": "#/components/schemas/ProposalApproveContract" + - + "$ref": "#/components/schemas/ProposalCreateContract" + - + "$ref": "#/components/schemas/ProposalDeleteContract" + - + "$ref": "#/components/schemas/SetAccountIdContract" + - + "$ref": "#/components/schemas/ShieldedTransferContract" + - + "$ref": "#/components/schemas/TransferAssetContract" + - + "$ref": "#/components/schemas/TransferContract" + - + "$ref": "#/components/schemas/TriggerSmartContract" + - + "$ref": "#/components/schemas/UnDelegateResourceContract" + - + "$ref": "#/components/schemas/UnfreezeAssetContract" + - + "$ref": "#/components/schemas/UnfreezeBalanceContract" + - + "$ref": "#/components/schemas/UnfreezeBalanceV2Contract" + - + "$ref": "#/components/schemas/UpdateAssetContract" + - + "$ref": "#/components/schemas/UpdateBrokerageContract" + - + "$ref": "#/components/schemas/UpdateEnergyLimitContract" + - + "$ref": "#/components/schemas/UpdateSettingContract" + - + "$ref": "#/components/schemas/VoteWitnessContract" + - + "$ref": "#/components/schemas/WithdrawBalanceContract" + - + "$ref": "#/components/schemas/WithdrawExpireUnfreezeContract" + - + "$ref": "#/components/schemas/WitnessCreateContract" + - + "$ref": "#/components/schemas/WitnessUpdateContract" + - + "type": "null" + "title": "TransactionContractNull39" + "description": "Hex string, amount, or value field accepted by this endpoint." + "required": + - "type_url" + - "value" + "x-java-response": "Transaction.Contract.parameter rendered by Util.printTransactionToJSON" + "description": "Contract parameter payload." + "provider": + "type": "string" + "ContractName": + "type": "string" + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "Transaction.Contract" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "TransactionRaw": + "type": "object" + "additionalProperties": false + "properties": + "ref_block_bytes": + "type": "string" + "ref_block_num": + "type": "integer" + "format": "int64" + "ref_block_hash": + "type": "string" + "expiration": + "type": "integer" + "format": "int64" + "auths": + "type": "array" + "items": + "$ref": "#/components/schemas/Authority" + "data": + "type": "string" + "description": "Hex-encoded contract call data or transaction data." + "contract": + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionContract" + "scripts": + "type": "string" + "timestamp": + "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." + "fee_limit": + "type": "integer" + "format": "int64" + "description": "Maximum fee in sun for smart contract execution." + "x-proto-message": "Transaction.raw" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "description": "Transaction raw data object." + "Transaction": + "type": "object" + "additionalProperties": false + "properties": + "txID": + "type": "string" + "raw_data": + "$ref": "#/components/schemas/TransactionRaw" + "raw_data_hex": + "type": "string" + "description": "Hex-encoded transaction raw data." + "signature": + "type": "array" + "items": + "type": "string" + "description": "Transaction signatures." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "contract_address": + "type": "string" + "description": "Smart contract address." + "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" + "x-source-shape": "transaction-json" + "Return": + "type": "object" + "additionalProperties": false + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "enum": + - "SUCCESS" + - "SIGERROR" + - "CONTRACT_VALIDATE_ERROR" + - "CONTRACT_EXE_ERROR" + - "BANDWITH_ERROR" + - "DUP_TRANSACTION_ERROR" + - "TAPOS_ERROR" + - "TOO_BIG_TRANSACTION_ERROR" + - "TRANSACTION_EXPIRATION_ERROR" + - "SERVER_BUSY" + - "NO_CONNECTION" + - "NOT_ENOUGH_EFFECTIVE_CONNECTION" + - "BLOCK_UNSOLIDIFIED" + - "OTHER_ERROR" + "message": + "type": "string" + "x-proto-message": "Return" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "TransactionInfoLog": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "topics": + "type": "array" + "items": + "type": "string" + "description": "Log topics filter." + "data": + "type": "string" + "description": "Hex-encoded contract call data or transaction data." + "x-proto-message": "TransactionInfo.Log" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "InternalTransactionCallValueInfo": + "type": "object" + "additionalProperties": false + "properties": + "callValue": + "type": "integer" + "format": "int64" + "tokenId": + "type": "string" + "description": "TRC10 token id." + "x-proto-message": "InternalTransaction.CallValueInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "InternalTransaction": + "type": "object" + "additionalProperties": false + "properties": + "hash": + "type": "string" + "description": "Block or transaction hash." + "caller_address": + "type": "string" + "transferTo_address": + "type": "string" + "callValueInfo": + "type": "array" + "items": + "$ref": "#/components/schemas/InternalTransactionCallValueInfo" + "note": + "type": "string" + "rejected": + "type": "boolean" + "extra": + "type": "string" + "x-proto-message": "InternalTransaction" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "TransactionExtention": + "type": "object" + "additionalProperties": false + "properties": + "transaction": + "$ref": "#/components/schemas/Transaction" + "txid": + "type": "string" + "constant_result": + "type": "array" + "items": + "type": "string" + "result": + "$ref": "#/components/schemas/Return" + "energy_used": + "type": "integer" + "format": "int64" + "logs": + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionInfoLog" + "internal_transactions": + "type": "array" + "items": + "$ref": "#/components/schemas/InternalTransaction" + "energy_penalty": + "type": "integer" + "format": "int64" + "x-proto-message": "TransactionExtention" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" + "TransactionSignWeightResult": + "type": "object" + "additionalProperties": false + "properties": + "code": + "type": "string" + "enum": + - "ENOUGH_PERMISSION" + - "NOT_ENOUGH_PERMISSION" + - "SIGNATURE_FORMAT_ERROR" + - "COMPUTE_ADDRESS_ERROR" + - "PERMISSION_ERROR" + - "OTHER_ERROR" + "message": + "type": "string" + "x-proto-message": "TransactionSignWeight.Result" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "TransactionSignWeight": + "type": "object" + "additionalProperties": false + "properties": + "permission": + "$ref": "#/components/schemas/Permission" + "approved_list": + "type": "array" + "items": + "type": "string" + "current_weight": + "type": "integer" + "format": "int64" + "result": + "$ref": "#/components/schemas/TransactionSignWeightResult" + "transaction": + "$ref": "#/components/schemas/TransactionExtention" + "x-proto-message": "TransactionSignWeight" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight" + "TransactionApprovedListResult": + "type": "object" + "additionalProperties": false + "properties": + "code": + "type": "string" + "enum": + - "SUCCESS" + - "SIGNATURE_FORMAT_ERROR" + - "COMPUTE_ADDRESS_ERROR" + - "OTHER_ERROR" + "message": + "type": "string" + "x-proto-message": "TransactionApprovedList.Result" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "TransactionApprovedList": + "type": "object" + "additionalProperties": false + "properties": + "approved_list": + "type": "array" + "items": + "type": "string" + "result": + "$ref": "#/components/schemas/TransactionApprovedListResult" + "transaction": + "$ref": "#/components/schemas/TransactionExtention" + "x-proto-message": "TransactionApprovedList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList" + "Vote": + "type": "object" + "additionalProperties": false + "properties": + "vote_address": + "type": "string" + "vote_count": + "type": "integer" + "format": "int64" + "x-proto-message": "Vote" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "AccountFrozen": + "type": "object" + "additionalProperties": false + "properties": + "frozen_balance": + "type": "integer" + "format": "int64" + "description": "Amount to freeze in sun, where 1 TRX equals 1,000,000 sun." + "expire_time": + "type": "integer" + "format": "int64" + "x-proto-message": "Account.Frozen" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "AccountAccountResource": + "type": "object" + "additionalProperties": false + "properties": + "energy_usage": + "type": "integer" + "format": "int64" + "frozen_balance_for_energy": + "$ref": "#/components/schemas/AccountFrozen" + "latest_consume_time_for_energy": + "type": "integer" + "format": "int64" + "acquired_delegated_frozen_balance_for_energy": + "type": "integer" + "format": "int64" + "delegated_frozen_balance_for_energy": + "type": "integer" + "format": "int64" + "storage_limit": + "type": "integer" + "format": "int64" + "storage_usage": + "type": "integer" + "format": "int64" + "latest_exchange_storage_time": + "type": "integer" + "format": "int64" + "energy_window_size": + "type": "integer" + "format": "int64" + "delegated_frozenV2_balance_for_energy": + "type": "integer" + "format": "int64" + "acquired_delegated_frozenV2_balance_for_energy": + "type": "integer" + "format": "int64" + "energy_window_optimized": + "type": "boolean" + "x-proto-message": "Account.AccountResource" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "AccountFreezeV2": + "type": "object" + "additionalProperties": false + "properties": + "type": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Account, contract, or resource type." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "x-proto-message": "Account.FreezeV2" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "AccountUnFreezeV2": + "type": "object" + "additionalProperties": false + "properties": + "type": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Account, contract, or resource type." + "unfreeze_amount": + "type": "integer" + "format": "int64" + "unfreeze_expire_time": + "type": "integer" + "format": "int64" + "x-proto-message": "Account.UnFreezeV2" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "Account": + "type": "object" + "additionalProperties": false + "properties": + "account_name": + "type": "string" + "description": "New account name encoded as expected by java-tron." + "type": + "type": "string" + "enum": + - "Normal" + - "AssetIssue" + - "Contract" + "description": "Account, contract, or resource type." + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "balance": + "type": "integer" + "format": "int64" + "description": "Resource amount in sun, where 1 TRX equals 1,000,000 sun." + "votes": + "type": "array" + "items": + "$ref": "#/components/schemas/Vote" + "description": "Witness vote entries." + "frozen": + "type": "array" + "items": + "$ref": "#/components/schemas/AccountFrozen" + "net_usage": + "type": "integer" + "format": "int64" + "acquired_delegated_frozen_balance_for_bandwidth": + "type": "integer" + "format": "int64" + "delegated_frozen_balance_for_bandwidth": + "type": "integer" + "format": "int64" + "old_tron_power": + "type": "integer" + "format": "int64" + "tron_power": + "$ref": "#/components/schemas/AccountFrozen" + "asset_optimized": + "type": "boolean" + "create_time": + "type": "integer" + "format": "int64" + "latest_opration_time": + "type": "integer" + "format": "int64" + "allowance": + "type": "integer" + "format": "int64" + "latest_withdraw_time": + "type": "integer" + "format": "int64" + "code": + "type": "string" + "is_witness": + "type": "boolean" + "is_committee": + "type": "boolean" + "frozen_supply": + "type": "array" + "items": + "$ref": "#/components/schemas/AccountFrozen" + "description": "Frozen supply schedules for an asset issue." + "asset_issued_name": + "type": "string" + "asset_issued_ID": + "type": "string" + "free_net_usage": + "type": "integer" + "format": "int64" + "latest_consume_time": + "type": "integer" + "format": "int64" + "latest_consume_free_time": + "type": "integer" + "format": "int64" + "account_id": + "type": "string" + "net_window_size": + "type": "integer" + "format": "int64" + "net_window_optimized": + "type": "boolean" + "account_resource": + "$ref": "#/components/schemas/AccountAccountResource" + "codeHash": + "type": "string" + "owner_permission": + "$ref": "#/components/schemas/Permission" + "witness_permission": + "$ref": "#/components/schemas/Permission" + "active_permission": + "type": "array" + "items": + "$ref": "#/components/schemas/Permission" + "frozenV2": + "type": "array" + "items": + "$ref": "#/components/schemas/AccountFreezeV2" + "unfrozenV2": + "type": "array" + "items": + "$ref": "#/components/schemas/AccountUnFreezeV2" + "delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "format": "int64" + "acquired_delegated_frozenV2_balance_for_bandwidth": + "type": "integer" + "format": "int64" + "asset": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "assetV2": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "latest_asset_operation_time": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "latest_asset_operation_timeV2": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "free_asset_net_usage": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "free_asset_net_usageV2": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "x-proto-message": "Account" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "Account rendered by java-tron JSON printer" + "AccountNetMessage": + "type": "object" + "additionalProperties": false + "properties": + "freeNetUsed": + "type": "integer" + "format": "int64" + "freeNetLimit": + "type": "integer" + "format": "int64" + "NetUsed": + "type": "integer" + "format": "int64" + "NetLimit": + "type": "integer" + "format": "int64" + "TotalNetLimit": + "type": "integer" + "format": "int64" + "TotalNetWeight": + "type": "integer" + "format": "int64" + "assetNetUsed": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "assetNetLimit": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "x-proto-message": "AccountNetMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" + "AccountResourceMessage": + "type": "object" + "additionalProperties": false + "properties": + "freeNetUsed": + "type": "integer" + "format": "int64" + "freeNetLimit": + "type": "integer" + "format": "int64" + "NetUsed": + "type": "integer" + "format": "int64" + "NetLimit": + "type": "integer" + "format": "int64" + "TotalNetLimit": + "type": "integer" + "format": "int64" + "TotalNetWeight": + "type": "integer" + "format": "int64" + "TotalTronPowerWeight": + "type": "integer" + "format": "int64" + "tronPowerUsed": + "type": "integer" + "format": "int64" + "tronPowerLimit": + "type": "integer" + "format": "int64" + "EnergyUsed": + "type": "integer" + "format": "int64" + "EnergyLimit": + "type": "integer" + "format": "int64" + "TotalEnergyLimit": + "type": "integer" + "format": "int64" + "TotalEnergyWeight": + "type": "integer" + "format": "int64" + "storageUsed": + "type": "integer" + "format": "int64" + "storageLimit": + "type": "integer" + "format": "int64" + "assetNetUsed": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "assetNetLimit": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "x-proto-message": "AccountResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" + "AssetIssueList": + "type": "object" + "additionalProperties": false + "properties": + "assetIssue": + "type": "array" + "items": + "$ref": "#/components/schemas/AssetIssueContract" + "x-proto-message": "AssetIssueList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "AssetIssueList rendered by java-tron JSON printer" + "BlockHeaderRaw": + "type": "object" + "additionalProperties": false + "properties": + "timestamp": + "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." + "txTrieRoot": + "type": "string" + "parentHash": + "type": "string" + "number": + "type": "integer" + "format": "int64" + "description": "Block number or numeric query value." + "witness_id": + "type": "integer" + "format": "int64" + "witness_address": + "type": "string" + "version": + "type": "integer" + "format": "int32" + "accountStateRoot": + "type": "string" + "x-proto-message": "BlockHeader.raw" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "description": "Transaction raw data object." + "BlockHeader": + "type": "object" + "additionalProperties": false + "properties": + "raw_data": + "$ref": "#/components/schemas/BlockHeaderRaw" + "witness_signature": + "type": "string" + "x-proto-message": "BlockHeader" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "Block": + "type": "object" + "additionalProperties": false + "properties": + "transactions": + "type": "array" + "items": + "$ref": "#/components/schemas/Transaction" + "block_header": + "$ref": "#/components/schemas/BlockHeader" + "blockID": + "type": "string" + "description": "Block id injected by Util.printBlockToJSON." + "x-proto-message": "Block" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "Block rendered by java-tron JSON printer" + "BlockList": + "type": "object" + "additionalProperties": false + "properties": + "block": + "type": "array" + "items": + "$ref": "#/components/schemas/Block" + "x-proto-message": "BlockList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "BlockList rendered by java-tron JSON printer" + "DelegatedResourceAccountIndex": + "type": "object" + "additionalProperties": false + "properties": + "account": + "type": "string" + "fromAccounts": + "type": "array" + "items": + "type": "string" + "toAccounts": + "type": "array" + "items": + "type": "string" + "timestamp": + "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." + "x-proto-message": "DelegatedResourceAccountIndex" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" + "DelegatedResource": + "type": "object" + "additionalProperties": false + "properties": + "from": + "type": "string" + "description": "Sender account address." + "to": + "type": "string" + "description": "Recipient account or contract address." + "frozen_balance_for_bandwidth": + "type": "integer" + "format": "int64" + "frozen_balance_for_energy": + "type": "integer" + "format": "int64" + "expire_time_for_bandwidth": + "type": "integer" + "format": "int64" + "expire_time_for_energy": + "type": "integer" + "format": "int64" + "x-proto-message": "DelegatedResource" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "DelegatedResourceList": + "type": "object" + "additionalProperties": false + "properties": + "delegatedResource": + "type": "array" + "items": + "$ref": "#/components/schemas/DelegatedResource" + "x-proto-message": "DelegatedResourceList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" + "PricesResponseMessage": + "type": "object" + "additionalProperties": false + "properties": + "prices": + "type": "string" + "x-proto-message": "PricesResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" + "Proposal": + "type": "object" + "additionalProperties": false + "properties": + "proposal_id": + "type": "integer" + "format": "int64" + "description": "Proposal id." + "proposer_address": + "type": "string" + "expiration_time": + "type": "integer" + "format": "int64" + "create_time": + "type": "integer" + "format": "int64" + "approvals": + "type": "array" + "items": + "type": "string" + "state": + "type": "string" + "enum": + - "PENDING" + - "DISAPPROVED" + - "APPROVED" + - "CANCELED" + "parameters": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "description": "Proposal parameter map." + "x-proto-message": "Proposal" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "Proposal rendered by java-tron JSON printer" + "ProposalList": + "type": "object" + "additionalProperties": false + "properties": + "proposals": + "type": "array" + "items": + "$ref": "#/components/schemas/Proposal" + "x-proto-message": "ProposalList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "ProposalList rendered by java-tron JSON printer" + "SmartContractABIEntryParam": + "type": "object" + "additionalProperties": false + "properties": + "indexed": + "type": "boolean" + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "type": + "type": "string" + "description": "Account, contract, or resource type." + "x-proto-message": "SmartContract.ABI.Entry.Param" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "SmartContractABIEntry": + "type": "object" + "additionalProperties": false + "properties": + "anonymous": + "type": "boolean" + "constant": + "type": "boolean" + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "inputs": + "type": "array" + "items": + "$ref": "#/components/schemas/SmartContractABIEntryParam" + "outputs": + "type": "array" + "items": + "$ref": "#/components/schemas/SmartContractABIEntryParam" + "type": + "type": "string" + "enum": + - "UnknownEntryType" + - "Constructor" + - "Function" + - "Event" + - "Fallback" + - "Receive" + - "Error" + "description": "Account, contract, or resource type." + "payable": + "type": "boolean" + "stateMutability": + "type": "string" + "enum": + - "UnknownMutabilityType" + - "Pure" + - "View" + - "Nonpayable" + - "Payable" + "x-proto-message": "SmartContract.ABI.Entry" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "SmartContractABI": + "type": "object" + "additionalProperties": false + "properties": + "entrys": + "type": "array" + "items": + "$ref": "#/components/schemas/SmartContractABIEntry" + "x-proto-message": "SmartContract.ABI" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "description": "Smart contract ABI definition." + "SmartContract": + "type": "object" + "additionalProperties": false + "properties": + "origin_address": + "type": "string" + "contract_address": + "type": "string" + "description": "Smart contract address." + "abi": + "$ref": "#/components/schemas/SmartContractABI" + "bytecode": + "type": "string" + "description": "Compiled smart contract bytecode." + "call_value": + "type": "integer" + "format": "int64" + "description": "TRX amount in sun transferred with the smart contract call." + "consume_user_resource_percent": + "type": "integer" + "format": "int64" + "description": "Percentage of contract execution resource cost paid by the user." + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "origin_energy_limit": + "type": "integer" + "format": "int64" + "description": "Origin energy limit for a deployed smart contract." + "code_hash": + "type": "string" + "trx_hash": + "type": "string" + "version": + "type": "integer" + "format": "int32" + "x-proto-message": "SmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response": "SmartContract rendered by java-tron JSON printer" + "ResourceReceipt": + "type": "object" + "additionalProperties": false + "properties": + "energy_usage": + "type": "integer" + "format": "int64" + "energy_fee": + "type": "integer" + "format": "int64" + "origin_energy_usage": + "type": "integer" + "format": "int64" + "energy_usage_total": + "type": "integer" + "format": "int64" + "net_usage": + "type": "integer" + "format": "int64" + "net_fee": + "type": "integer" + "format": "int64" + "result": + "type": "string" + "enum": + - "DEFAULT" + - "SUCCESS" + - "REVERT" + - "BAD_JUMP_DESTINATION" + - "OUT_OF_MEMORY" + - "PRECOMPILED_CONTRACT" + - "STACK_TOO_SMALL" + - "STACK_TOO_LARGE" + - "ILLEGAL_OPERATION" + - "STACK_OVERFLOW" + - "OUT_OF_ENERGY" + - "OUT_OF_TIME" + - "JVM_STACK_OVER_FLOW" + - "UNKNOWN" + - "TRANSFER_FAILED" + - "INVALID_CODE" + "energy_penalty_total": + "type": "integer" + "format": "int64" + "x-proto-message": "ResourceReceipt" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "MarketOrderDetail": + "type": "object" + "additionalProperties": false + "properties": + "makerOrderId": + "type": "string" + "takerOrderId": + "type": "string" + "fillSellQuantity": + "type": "integer" + "format": "int64" + "fillBuyQuantity": + "type": "integer" + "format": "int64" + "x-proto-message": "MarketOrderDetail" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "TransactionInfo": + "type": "object" + "additionalProperties": false + "properties": + "id": + "type": "string" + "description": "Identifier used by this query." + "fee": + "type": "integer" + "format": "int64" + "blockNumber": + "type": "integer" + "format": "int64" + "description": "Hex-encoded block number." + "blockTimeStamp": + "type": "integer" + "format": "int64" + "contractResult": + "type": "array" + "items": + "type": "string" + "contract_address": + "type": "string" + "description": "Smart contract address." + "receipt": + "$ref": "#/components/schemas/ResourceReceipt" + "log": + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionInfoLog" + "result": + "type": "string" + "enum": + - "SUCESS" + - "FAILED" + "resMessage": + "type": "string" + "assetIssueID": + "type": "string" + "withdraw_amount": + "type": "integer" + "format": "int64" + "unfreeze_amount": + "type": "integer" + "format": "int64" + "internal_transactions": + "type": "array" + "items": + "$ref": "#/components/schemas/InternalTransaction" + "exchange_received_amount": + "type": "integer" + "format": "int64" + "exchange_inject_another_amount": + "type": "integer" + "format": "int64" + "exchange_withdraw_another_amount": + "type": "integer" + "format": "int64" + "exchange_id": + "type": "integer" + "format": "int64" + "shielded_transaction_fee": + "type": "integer" + "format": "int64" + "orderId": + "type": "string" + "orderDetails": + "type": "array" + "items": + "$ref": "#/components/schemas/MarketOrderDetail" + "packingFee": + "type": "integer" + "format": "int64" + "withdraw_expire_amount": + "type": "integer" + "format": "int64" + "cancel_unfreezeV2_amount": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "x-proto-message": "TransactionInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "TransactionInfo rendered by java-tron JSON printer" + "Witness": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "voteCount": + "type": "integer" + "format": "int64" + "pubKey": + "type": "string" + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "totalProduced": + "type": "integer" + "format": "int64" + "totalMissed": + "type": "integer" + "format": "int64" + "latestBlockNum": + "type": "integer" + "format": "int64" + "latestSlotNum": + "type": "integer" + "format": "int64" + "isJobs": + "type": "boolean" + "x-proto-message": "Witness" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "WitnessList": + "type": "object" + "additionalProperties": false + "properties": + "witnesses": + "type": "array" + "items": + "$ref": "#/components/schemas/Witness" + "x-proto-message": "WitnessList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response": "WitnessList rendered by java-tron JSON printer" + "AccountRequest": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-source-shape": "servlet-effective-input" + "x-java-request-type": "org.tron.protos.Protocol.Account" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "address" + "BlockBalanceTraceBlockIdentifier": + "type": "object" + "additionalProperties": false + "properties": + "hash": + "type": "string" + "description": "Block or transaction hash." + "number": + "type": "integer" + "format": "int64" + "description": "Block number or numeric query value." + "x-proto-message": "BlockBalanceTrace.BlockIdentifier" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "description": "Block identifier used by the query." + "AccountBalanceResponse": + "type": "object" + "additionalProperties": false + "properties": + "balance": + "type": "integer" + "format": "int64" + "description": "Resource amount in sun, where 1 TRX equals 1,000,000 sun." + "block_identifier": + "$ref": "#/components/schemas/BlockBalanceTraceBlockIdentifier" + "x-proto-message": "AccountBalanceResponse" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-java-response-type": "BalanceContract.AccountBalanceResponse" + "x-java-response": "AccountBalanceResponse rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "AccountIdentifier": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-proto-message": "AccountIdentifier" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "description": "Account identifier used by the query." + "AccountBalanceRequestRequest": + "type": "object" + "additionalProperties": false + "properties": + "account_identifier": + "$ref": "#/components/schemas/AccountIdentifier" + "block_identifier": + "$ref": "#/components/schemas/BlockBalanceTraceBlockIdentifier" + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "AccountBalanceRequest" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "AccountBalanceRequest" + "x-java-unknown-fields": "ignored-by-jsonformat" + "AccountCreateContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "account_address": + "type": "string" + "description": "Address of the account to create." + "type": + "type": "string" + "enum": + - "Normal" + - "AssetIssue" + - "Contract" + "description": "Account, contract, or resource type." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "AccountCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountCreateContract" + "required": + - "owner_address" + - "account_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "AccountUpdateContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "account_name": + "type": "string" + "description": "New account name encoded as expected by java-tron." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "AccountUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountUpdateContract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "AccountPermissionUpdateContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "owner": + "$ref": "#/components/schemas/Permission" + "witness": + "$ref": "#/components/schemas/Permission" + "actives": + "type": "array" + "items": + "$ref": "#/components/schemas/Permission" + "description": "Active permission definitions for account permission update." + "minItems": 1 + "maxItems": 8 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "AccountPermissionUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountPermissionUpdateContract" + "required": + - "owner_address" + - "owner" + - "actives" + "x-java-unknown-fields": "ignored-by-jsonformat" + "BlockReqRequest": + "type": "object" + "additionalProperties": false + "properties": + "id_or_num": + "type": "string" + "description": "Block id or block number." + "detail": + "type": "boolean" + "description": "Whether to return detailed block information." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "BlockReq" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BlockReq" + "x-java-unknown-fields": "ignored-by-jsonformat" + "NumberMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "num": + "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "BytesMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "value": + "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "BytesMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "BlockLimitRequest": + "type": "object" + "additionalProperties": false + "properties": + "startNum": + "type": "integer" + "format": "int64" + "description": "Starting block number for the query range." + "endNum": + "type": "integer" + "format": "int64" + "description": "Ending block number for the query range." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "BlockLimit" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.BlockLimit" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "endNum" + - "startNum" + "TransactionBalanceTraceOperation": + "type": "object" + "additionalProperties": false + "properties": + "operation_identifier": + "type": "integer" + "format": "int64" + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "x-proto-message": "TransactionBalanceTrace.Operation" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "TransactionBalanceTrace": + "type": "object" + "additionalProperties": false + "properties": + "transaction_identifier": + "type": "string" + "operation": + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionBalanceTraceOperation" + "type": + "type": "string" + "description": "Account, contract, or resource type." + "status": + "type": "string" + "x-proto-message": "TransactionBalanceTrace" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "BlockBalanceTrace": + "type": "object" + "additionalProperties": false + "properties": + "block_identifier": + "$ref": "#/components/schemas/BlockBalanceTraceBlockIdentifier" + "timestamp": + "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." + "transaction_balance_trace": + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionBalanceTrace" + "x-proto-message": "BlockBalanceTrace" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-java-response-type": "org.tron.protos.contract.BalanceContract.BlockBalanceTrace" + "x-java-response": "BlockBalanceTrace rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "BlockIdentifierRequest": + "type": "object" + "additionalProperties": false + "properties": + "hash": + "type": "string" + "description": "Block or transaction hash." + "number": + "type": "integer" + "format": "int64" + "description": "Block number or numeric query value." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "BlockBalanceTrace.BlockIdentifier" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "BlockIdentifier" + "x-java-unknown-fields": "ignored-by-jsonformat" + "TransactionIdList": + "type": "object" + "additionalProperties": false + "properties": + "txId": + "type": "array" + "items": + "type": "string" + "x-proto-message": "TransactionIdList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" + "x-java-response": "TransactionIdList rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "TransferContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "to_address": + "type": "string" + "description": "Destination account address." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "extra_data": + "type": "string" + "description": "Extra transaction data encoded as expected by java-tron." + "x-proto-message": "TransferContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.TransferContract" + "required": + - "owner_address" + - "to_address" + - "amount" + "x-java-unknown-fields": "ignored-by-jsonformat" + "TransactionRequest": + "type": "object" + "additionalProperties": false + "properties": + "raw_data": + "$ref": "#/components/schemas/TransactionRaw" + "raw_data_hex": + "type": "string" + "description": "Hex-encoded transaction raw data." + "signature": + "type": "array" + "items": + "type": "string" + "description": "Transaction signatures." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-source-shape": "pack-transaction-json" + "required": + - "raw_data" + "x-java-required-by": "Util.packTransaction reads raw_data.contract" + "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "x-java-unknown-fields": "ignored-by-jsonformat" + "AssetIssueContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "id": + "type": "string" + "description": "Identifier used by this query." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "abbr": + "type": "string" + "description": "Asset abbreviation." + "total_supply": + "type": "integer" + "format": "int64" + "description": "Total asset supply." + "minimum": 1 + "frozen_supply": + "type": "array" + "items": + "allOf": + - + "$ref": "#/components/schemas/AssetIssueContractFrozenSupply" + "required": + - "frozen_amount" + - "frozen_days" + "description": "Frozen supply schedules for an asset issue." + "trx_num": + "type": "integer" + "format": "int32" + "description": "TRX amount used in the asset issue exchange ratio." + "minimum": 1 + "precision": + "type": "integer" + "format": "int32" + "description": "Asset precision." + "num": + "type": "integer" + "format": "int32" + "description": "Number of items or blocks to return." + "minimum": 1 + "start_time": + "type": "integer" + "format": "int64" + "description": "Start timestamp in milliseconds." + "minimum": 1 + "end_time": + "type": "integer" + "format": "int64" + "description": "End timestamp in milliseconds." + "minimum": 1 + "order": + "type": "integer" + "format": "int64" + "description": "Sort order." + "vote_score": + "type": "integer" + "format": "int32" + "description": "Vote count or vote weight." + "description": + "type": "string" + "description": "Human-readable description for this object." + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "free_asset_net_limit": + "type": "integer" + "format": "int64" + "description": "Free asset bandwidth limit for each account." + "minimum": 0 + "public_free_asset_net_limit": + "type": "integer" + "format": "int64" + "description": "Public free asset bandwidth limit." + "minimum": 0 + "public_free_asset_net_usage": + "type": "integer" + "format": "int64" + "description": "Public free asset bandwidth usage." + "const": 0 + "public_latest_free_net_time": + "type": "integer" + "format": "int64" + "description": "Latest public free bandwidth usage timestamp." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "AssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "required": + - "owner_address" + - "name" + - "total_supply" + - "trx_num" + - "num" + - "start_time" + - "end_time" + - "url" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UpdateAssetContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "description": + "type": "string" + "description": "Human-readable description for this object." + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "new_limit": + "type": "integer" + "format": "int64" + "description": "New account resource limit." + "minimum": 0 + "new_public_limit": + "type": "integer" + "format": "int64" + "description": "New public resource limit." + "minimum": 0 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UpdateAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UpdateAssetContract" + "required": + - "owner_address" + - "url" + "x-java-unknown-fields": "ignored-by-jsonformat" + "TransferAssetContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "asset_name": + "type": "string" + "description": "Asset name or token identifier encoded as expected by java-tron." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "to_address": + "type": "string" + "description": "Destination account address." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "extra_data": + "type": "string" + "description": "Extra transaction data encoded as expected by java-tron." + "x-proto-message": "TransferAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.TransferAssetContract" + "required": + - "asset_name" + - "owner_address" + - "to_address" + - "amount" + "x-java-unknown-fields": "ignored-by-jsonformat" + "ParticipateAssetIssueContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "to_address": + "type": "string" + "description": "Destination account address." + "asset_name": + "type": "string" + "description": "Asset name or token identifier encoded as expected by java-tron." + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "ParticipateAssetIssueContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.ParticipateAssetIssueContract" + "required": + - "owner_address" + - "to_address" + - "asset_name" + - "amount" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UnfreezeAssetContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UnfreezeAssetContract" + "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UnfreezeAssetContract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "PaginatedMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "offset": + "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." + "limit": + "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "PaginatedMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "limit" + - "offset" + "CreateSmartContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "call_token_value": + "type": "integer" + "format": "int64" + "description": "TRC10 token amount transferred with the smart contract call." + "token_id": + "type": "integer" + "format": "int64" + "description": "TRC10 token id." + "abi": + "type": "array" + "description": "Smart contract ABI definition." + "items": + "type": "object" + "additionalProperties": false + "properties": + "anonymous": + "type": "boolean" + "constant": + "type": "boolean" + "name": + "type": "string" + "inputs": + "type": "array" + "items": + "type": "object" + "additionalProperties": false + "properties": + "indexed": + "type": "boolean" + "name": + "type": "string" + "type": + "type": "string" + "outputs": + "type": "array" + "items": + "type": "object" + "additionalProperties": false + "properties": + "indexed": + "type": "boolean" + "name": + "type": "string" + "type": + "type": "string" + "type": + "type": "string" + "enum": + - "UnknownEntryType" + - "Constructor" + - "Function" + - "Event" + - "Fallback" + - "Receive" + - "Error" + "payable": + "type": "boolean" + "stateMutability": + "type": "string" + "enum": + - "UnknownMutabilityType" + - "Pure" + - "View" + - "Nonpayable" + - "Payable" + "bytecode": + "type": "string" + "description": "Compiled smart contract bytecode." + "parameter": + "type": "string" + "description": "Contract parameter payload." + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "call_value": + "type": "integer" + "format": "int64" + "description": "TRX amount in sun transferred with the smart contract call." + "consume_user_resource_percent": + "type": "integer" + "format": "int64" + "description": "Percentage of contract execution resource cost paid by the user." + "origin_energy_limit": + "type": "integer" + "format": "int64" + "description": "Origin energy limit for a deployed smart contract." + "fee_limit": + "type": "integer" + "format": "int64" + "description": "Maximum fee in sun for smart contract execution." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "CreateSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.CreateSmartContract" + "required": + - "owner_address" + - "bytecode" + "x-java-unknown-fields": "ignored-by-jsonformat" + "TriggerSmartContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "call_value": + "type": "integer" + "format": "int64" + "description": "TRX amount in sun transferred with the smart contract call." + "data": + "type": "string" + "description": "Hex-encoded contract call data or transaction data." + "call_token_value": + "type": "integer" + "format": "int64" + "description": "TRC10 token amount transferred with the smart contract call." + "token_id": + "type": "integer" + "format": "int64" + "description": "TRC10 token id." + "fee_limit": + "type": "integer" + "format": "int64" + "description": "Maximum fee in sun for smart contract execution." + "function_selector": + "type": "string" + "description": "Smart contract function selector, for example transfer(address,uint256)." + "parameter": + "type": "string" + "description": "Contract parameter payload." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "TriggerSmartContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "required": + - "owner_address" + - "contract_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "ContractState": + "type": "object" + "additionalProperties": false + "properties": + "energy_usage": + "type": "integer" + "format": "int64" + "energy_factor": + "type": "integer" + "format": "int64" + "update_cycle": + "type": "integer" + "format": "int64" + "x-proto-message": "ContractState" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "SmartContractDataWrapper": + "type": "object" + "additionalProperties": false + "properties": + "smart_contract": + "$ref": "#/components/schemas/SmartContract" + "runtimecode": + "type": "string" + "contract_state": + "$ref": "#/components/schemas/ContractState" + "x-proto-message": "SmartContractDataWrapper" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" + "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "ClearABIContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "ClearABIContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.ClearABIContract" + "required": + - "owner_address" + - "contract_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UpdateSettingContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "consume_user_resource_percent": + "type": "integer" + "format": "int64" + "description": "Percentage of contract execution resource cost paid by the user." + "minimum": 0 + "maximum": 100 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UpdateSettingContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateSettingContract" + "required": + - "owner_address" + - "contract_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UpdateEnergyLimitContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "contract_address": + "type": "string" + "description": "Smart contract address." + "origin_energy_limit": + "type": "integer" + "format": "int64" + "description": "Origin energy limit for a deployed smart contract." + "minimum": 1 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UpdateEnergyLimitContract" + "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateEnergyLimitContract" + "required": + - "owner_address" + - "contract_address" + - "origin_energy_limit" + "x-java-unknown-fields": "ignored-by-jsonformat" + "WitnessCreateContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "url": + "type": "string" + "description": "URL encoded as expected by java-tron." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "WitnessCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessCreateContract" + "required": + - "owner_address" + - "url" + "x-java-unknown-fields": "ignored-by-jsonformat" + "WitnessUpdateContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "update_url": + "type": "string" + "description": "Updated URL encoded as expected by java-tron." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "WitnessUpdateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessUpdateContract" + "required": + - "owner_address" + - "update_url" + "x-java-unknown-fields": "ignored-by-jsonformat" + "VoteWitnessContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "votes": + "type": "array" + "items": + "$ref": "#/components/schemas/VoteWitnessContractVote" + "description": "Witness vote entries." + "minItems": 1 + "support": + "type": "boolean" + "description": "Proposal support flag." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "VoteWitnessContract" + "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.WitnessContract.VoteWitnessContract" + "required": + - "owner_address" + - "votes" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UpdateBrokerageContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "brokerage": + "type": "integer" + "format": "int32" + "description": "Witness brokerage percentage, from 0 to 100." + "minimum": 0 + "maximum": 100 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UpdateBrokerageContract" + "x-proto-file": "protocol/src/main/protos/core/contract/storage_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.StorageContract.UpdateBrokerageContract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "WithdrawBalanceContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "WithdrawBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawBalanceContract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "ProposalCreateContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "parameters": + "type": "object" + "additionalProperties": + "type": "integer" + "format": "int64" + "description": "Proposal parameter map." + "minProperties": 1 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "ProposalCreateContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalCreateContract" + "required": + - "owner_address" + - "parameters" + "x-java-unknown-fields": "ignored-by-jsonformat" + "ProposalApproveContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "proposal_id": + "type": "integer" + "format": "int64" + "description": "Proposal id." + "minimum": 1 + "is_add_approval": + "type": "boolean" + "description": "Whether to add approval for the proposal." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "ProposalApproveContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalApproveContract" + "required": + - "owner_address" + - "proposal_id" + "x-java-unknown-fields": "ignored-by-jsonformat" + "ProposalDeleteContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "proposal_id": + "type": "integer" + "format": "int64" + "description": "Proposal id." + "minimum": 1 + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "ProposalDeleteContract" + "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalDeleteContract" + "required": + - "owner_address" + - "proposal_id" + "x-java-unknown-fields": "ignored-by-jsonformat" + "ChainParametersChainParameter": + "type": "object" + "additionalProperties": false + "properties": + "key": + "type": "string" + "value": + "type": "integer" + "format": "int64" + "description": "Hex string, amount, or value field accepted by this endpoint." + "x-proto-message": "ChainParameters.ChainParameter" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "ChainParameters": + "type": "object" + "additionalProperties": false + "properties": + "chainParameter": + "type": "array" + "items": + "$ref": "#/components/schemas/ChainParametersChainParameter" + "x-proto-message": "ChainParameters" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response": "ChainParameters rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "NumberMessage": + "type": "object" + "additionalProperties": false + "properties": + "num": + "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." + "x-proto-message": "NumberMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" + "x-java-response": "NumberMessage rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "FreezeBalanceContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "frozen_balance": + "type": "integer" + "format": "int64" + "description": "Amount to freeze in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1000000 + "frozen_duration": + "type": "integer" + "format": "int64" + "description": "Freeze duration in days." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type to freeze. TRON_POWER is accepted only when the chain supports the new resource model (`supportAllowNewResourceModel()`)." + "x-chain-condition": + "TRON_POWER": "Requires DynamicPropertiesStore.supportAllowNewResourceModel()" + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "FreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceContract" + "required": + - "owner_address" + - "frozen_balance" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UnfreezeBalanceContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type to unfreeze. TRON_POWER is accepted only when the chain supports the new resource model (`supportAllowNewResourceModel()`)." + "x-chain-condition": + "TRON_POWER": "Requires DynamicPropertiesStore.supportAllowNewResourceModel()" + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UnfreezeBalanceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceContract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "DelegatedResourceMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "fromAddress": + "type": "string" + "description": "Source account address." + "toAddress": + "type": "string" + "description": "Destination account address." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "DelegatedResourceMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "fromAddress" + - "toAddress" + "FreezeBalanceV2ContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "frozen_balance": + "type": "integer" + "format": "int64" + "description": "Amount to freeze in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1000000 + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type to freeze. TRON_POWER is accepted only when the chain supports the new resource model (`supportAllowNewResourceModel()`)." + "x-chain-condition": + "TRON_POWER": "Requires DynamicPropertiesStore.supportAllowNewResourceModel()" + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "FreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceV2Contract" + "required": + - "owner_address" + - "frozen_balance" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UnfreezeBalanceV2ContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "unfreeze_balance": + "type": "integer" + "format": "int64" + "description": "Amount to unfreeze in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1 + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + - "TRON_POWER" + "description": "Resource type to unfreeze. TRON_POWER is accepted only when the chain supports the new resource model (`supportAllowNewResourceModel()`)." + "x-chain-condition": + "TRON_POWER": "Requires DynamicPropertiesStore.supportAllowNewResourceModel()" + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UnfreezeBalanceV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceV2Contract" + "required": + - "owner_address" + - "unfreeze_balance" + "x-java-unknown-fields": "ignored-by-jsonformat" + "WithdrawExpireUnfreezeContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "WithdrawExpireUnfreezeContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawExpireUnfreezeContract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "CancelAllUnfreezeV2ContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "CancelAllUnfreezeV2Contract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.CancelAllUnfreezeV2Contract" + "required": + - "owner_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "DelegateResourceContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + "description": "Resource type." + "balance": + "type": "integer" + "format": "int64" + "description": "Resource amount in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1000000 + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "lock": + "type": "boolean" + "description": "Whether delegated resources are locked." + "lock_period": + "type": "integer" + "format": "int64" + "description": "Resource delegation lock period." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "DelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.DelegateResourceContract" + "required": + - "owner_address" + - "balance" + - "receiver_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "UnDelegateResourceContractRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "resource": + "type": "string" + "enum": + - "BANDWIDTH" + - "ENERGY" + "description": "Resource type." + "balance": + "type": "integer" + "format": "int64" + "description": "Resource amount in sun, where 1 TRX equals 1,000,000 sun." + "minimum": 1 + "receiver_address": + "type": "string" + "description": "Address of the account receiving resources or funds." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "Permission_id": + "type": "integer" + "format": "int32" + "description": "Permission id used to sign the transaction with a non-owner account permission." + "x-proto-message": "UnDelegateResourceContract" + "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnDelegateResourceContract" + "required": + - "owner_address" + - "balance" + - "receiver_address" + "x-java-unknown-fields": "ignored-by-jsonformat" + "CanDelegatedMaxSizeResponseMessage": + "type": "object" + "additionalProperties": false + "properties": + "max_size": + "type": "integer" + "format": "int64" + "x-proto-message": "CanDelegatedMaxSizeResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" + "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "CanDelegatedMaxSizeRequestMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "type": + "type": "integer" + "format": "int32" + "description": "Account, contract, or resource type." + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "CanDelegatedMaxSizeRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "CanDelegatedMaxSizeRequestMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "owner_address" + "GetAvailableUnfreezeCountResponseMessage": + "type": "object" + "additionalProperties": false + "properties": + "count": + "type": "integer" + "format": "int64" + "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" + "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "GetAvailableUnfreezeCountRequestMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "GetAvailableUnfreezeCountRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "GetAvailableUnfreezeCountRequestMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "CanWithdrawUnfreezeAmountResponseMessage": + "type": "object" + "additionalProperties": false + "properties": + "amount": + "type": "integer" + "format": "int64" + "description": "Amount in sun, where 1 TRX equals 1,000,000 sun." + "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" + "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" + "not": + "required": + - "Error" + "CanWithdrawUnfreezeAmountRequestMessageRequest": + "type": "object" + "additionalProperties": false + "properties": + "owner_address": + "type": "string" + "description": "Address of the account that owns or initiates the request." + "timestamp": + "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." + "visible": + "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + "x-proto-message": "CanWithdrawUnfreezeAmountRequestMessage" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-source-shape": "protobuf-json-plus-servlet-fields" + "x-java-request-type": "CanWithdrawUnfreezeAmountRequestMessage" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "owner_address" + "NodeInfoConfigNodeInfo": + "type": "object" + "additionalProperties": false + "properties": + "codeVersion": + "type": "string" + "p2pVersion": + "type": "string" + "listenPort": + "type": "integer" + "format": "int32" + "discoverEnable": + "type": "boolean" + "activeNodeSize": + "type": "integer" + "format": "int32" + "passiveNodeSize": + "type": "integer" + "format": "int32" + "sendNodeSize": + "type": "integer" + "format": "int32" + "maxConnectCount": + "type": "integer" + "format": "int32" + "sameIpMaxConnectCount": + "type": "integer" + "format": "int32" + "backupListenPort": + "type": "integer" + "format": "int32" + "backupMemberSize": + "type": "integer" + "format": "int32" + "backupPriority": + "type": "integer" + "format": "int32" + "dbVersion": + "type": "integer" + "format": "int32" + "minParticipationRate": + "type": "integer" + "format": "int32" + "supportConstant": + "type": "boolean" + "minTimeRatio": + "type": "number" + "maxTimeRatio": + "type": "number" + "allowCreationOfContracts": + "type": "integer" + "format": "int64" + "allowAdaptiveEnergy": + "type": "integer" + "format": "int64" + "versionNum": + "type": "string" + "x-proto-message": "NodeInfo.ConfigNodeInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "NodeInfoMachineInfoMemoryDescInfo": + "type": "object" + "additionalProperties": false + "properties": + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "initSize": + "type": "integer" + "format": "int64" + "useSize": + "type": "integer" + "format": "int64" + "maxSize": + "type": "integer" + "format": "int64" + "useRate": + "type": "number" + "x-proto-message": "NodeInfo.MachineInfo.MemoryDescInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "NodeInfoMachineInfoDeadLockThreadInfo": + "type": "object" + "additionalProperties": false + "properties": + "name": + "type": "string" + "description": "Name encoded as expected by java-tron." + "lockName": + "type": "string" + "lockOwner": + "type": "string" + "state": + "type": "string" + "blockTime": + "type": "integer" + "format": "int64" + "waitTime": + "type": "integer" + "format": "int64" + "stackTrace": + "type": "string" + "x-proto-message": "NodeInfo.MachineInfo.DeadLockThreadInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "NodeInfoMachineInfo": + "type": "object" + "additionalProperties": false + "properties": + "threadCount": + "type": "integer" + "format": "int32" + "deadLockThreadCount": + "type": "integer" + "format": "int32" + "cpuCount": + "type": "integer" + "format": "int32" + "totalMemory": + "type": "integer" + "format": "int64" + "freeMemory": + "type": "integer" + "format": "int64" + "cpuRate": + "type": "number" + "javaVersion": + "type": "string" + "osName": + "type": "string" + "jvmTotalMemory": + "type": "integer" + "format": "int64" + "jvmFreeMemory": + "type": "integer" + "format": "int64" + "processCpuRate": + "type": "number" + "memoryDescInfoList": + "type": "array" + "items": + "$ref": "#/components/schemas/NodeInfoMachineInfoMemoryDescInfo" + "deadLockThreadInfoList": + "type": "array" + "items": + "$ref": "#/components/schemas/NodeInfoMachineInfoDeadLockThreadInfo" + "x-proto-message": "NodeInfo.MachineInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "NodeInfoPeerInfo": + "type": "object" + "additionalProperties": false + "properties": + "lastSyncBlock": + "type": "string" + "remainNum": + "type": "integer" + "format": "int64" + "lastBlockUpdateTime": + "type": "integer" + "format": "int64" + "syncFlag": + "type": "boolean" + "headBlockTimeWeBothHave": + "type": "integer" + "format": "int64" + "needSyncFromPeer": + "type": "boolean" + "needSyncFromUs": + "type": "boolean" + "host": + "type": "string" + "port": + "type": "integer" + "format": "int32" + "nodeId": + "type": "string" + "connectTime": + "type": "integer" + "format": "int64" + "avgLatency": + "type": "number" + "syncToFetchSize": + "type": "integer" + "format": "int32" + "syncToFetchSizePeekNum": + "type": "integer" + "format": "int64" + "syncBlockRequestedSize": + "type": "integer" + "format": "int32" + "unFetchSynNum": + "type": "integer" + "format": "int64" + "blockInPorcSize": + "type": "integer" + "format": "int32" + "headBlockWeBothHave": + "type": "string" + "score": + "type": "integer" + "format": "int32" + "nodeCount": + "type": "integer" + "format": "int32" + "inFlow": + "type": "integer" + "format": "int64" + "disconnectTimes": + "type": "integer" + "format": "int32" + "localDisconnectReason": + "type": "string" + "remoteDisconnectReason": + "type": "string" + "active": + "type": "boolean" + "x-proto-message": "NodeInfo.PeerInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "NodeInfo": + "type": "object" + "additionalProperties": false + "properties": + "beginSyncNum": + "type": "integer" + "format": "int64" + "block": + "type": "string" + "solidityBlock": + "type": "string" + "currentConnectCount": + "type": "integer" + "format": "int32" + "activeConnectCount": + "type": "integer" + "format": "int32" + "passiveConnectCount": + "type": "integer" + "format": "int32" + "totalFlow": + "type": "integer" + "format": "int64" + "configNodeInfo": + "$ref": "#/components/schemas/NodeInfoConfigNodeInfo" + "machineInfo": + "$ref": "#/components/schemas/NodeInfoMachineInfo" + "cheatWitnessInfoMap": + "type": "object" + "additionalProperties": + "type": "string" + "peerList": + "type": "array" + "items": + "$ref": "#/components/schemas/NodeInfoPeerInfo" + "x-proto-message": "NodeInfo" + "x-proto-file": "protocol/src/main/protos/core/Tron.proto" + "x-java-response-type": "org.tron.common.entity.NodeInfo" + "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" + "x-java-response": "NodeInfo rendered by JSON.toJSONString(NodeInfo)" + "not": + "required": + - "Error" + "Address": + "type": "object" + "additionalProperties": false + "properties": + "host": + "type": "string" + "port": + "type": "integer" + "format": "int32" + "x-proto-message": "Address" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "description": "Account or contract address accepted by this endpoint." + "Node": + "type": "object" + "additionalProperties": false + "properties": + "address": + "$ref": "#/components/schemas/Address" + "x-proto-message": "Node" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "NodeList": + "type": "object" + "additionalProperties": false + "properties": + "nodes": + "type": "array" + "items": + "$ref": "#/components/schemas/Node" + "x-proto-message": "NodeList" + "x-proto-file": "protocol/src/main/protos/api/api.proto" + "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" + "x-java-response": "NodeList rendered by java-tron JSON printer" + "not": + "required": + - "Error" +"x-tron-rate-limiting": + "source": "framework/src/main/java/org/tron/core/services/http/RateLimiterServlet.java" + "appliesTo": + - "HTTP" + - "JSON-RPC servlet" + "httpStatus": 200 + "errorShape": "JavaTronError for HTTP APIs; servlet-level error body for JSON-RPC" + "message": "lack of computing resources" + "description": "java-tron applies configurable servlet-level rate limiting. When a request is rejected by the rate limiter, RateLimiterServlet writes an error body without setting HTTP 429." diff --git a/docs/api/openrpc.json b/docs/api/openrpc.json index 7d212ece..ed57102f 100644 --- a/docs/api/openrpc.json +++ b/docs/api/openrpc.json @@ -3,7 +3,12 @@ "info": { "title": "java-tron JSON-RPC API", "version": "1.0.0", - "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation." + "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation.", + "x-java-tron-source": { + "repo": "tronprotocol/java-tron", + "commit": "a79693e4508c05650cc474f23e7f97451d2861ec", + "version": "GreatVoyage-v4.8.1.1" + } }, "servers": [ { @@ -29,6 +34,7 @@ ], "summary": "Client version string", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_clientVersion.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -39,12 +45,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/web3_clientVersion.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/web3_clientVersion.md" }, "x-source-derived": true, "x-java-method": "web3ClientVersion", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#web3_clientVersion", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#web3ClientVersion" + ] }, { "name": "web3_sha3", @@ -55,10 +66,12 @@ ], "summary": "Keccak-256 hash", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_sha3.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "data", "required": true, + "description": "Hex-encoded input data.", "schema": { "type": "string" }, @@ -76,17 +89,21 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/node/web3_sha3.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/web3_sha3.md" }, "x-source-derived": true, "x-java-method": "web3Sha3", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#web3_sha3", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#web3Sha3" + ] }, { "name": "net_version", @@ -97,6 +114,7 @@ ], "summary": "Network ID (same as eth_chainId)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_version.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -105,14 +123,24 @@ "x-java-type": "String" } }, - "errors": [], + "errors": [ + { + "code": -32000, + "message": "JsonRpcInternalException" + } + ], "externalDocs": { - "url": "docs/api/json-rpc/node/net_version.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/net_version.md" }, "x-source-derived": true, "x-java-method": "getNetVersion", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#net_version", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getNetVersion" + ] }, { "name": "net_listening", @@ -123,6 +151,7 @@ ], "summary": "Whether listening on P2P", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_listening.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -133,12 +162,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/net_listening.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/net_listening.md" }, "x-source-derived": true, "x-java-method": "isListening", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#net_listening", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#isListening" + ] }, { "name": "net_peerCount", @@ -149,6 +183,7 @@ ], "summary": "Number of peers", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_peerCount.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -159,12 +194,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/net_peerCount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/net_peerCount.md" }, "x-source-derived": true, "x-java-method": "getPeerCount", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#net_peerCount", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getPeerCount" + ] }, { "name": "eth_chainId", @@ -175,6 +215,7 @@ ], "summary": "chainId (last 4 bytes of the genesis block hash)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_chainId.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -183,14 +224,24 @@ "x-java-type": "String" } }, - "errors": [], + "errors": [ + { + "code": -32000, + "message": "JsonRpcInternalException" + } + ], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_chainId.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_chainId.md" }, "x-source-derived": true, "x-java-method": "ethChainId", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_chainId", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethChainId" + ] }, { "name": "eth_protocolVersion", @@ -201,6 +252,7 @@ ], "summary": "Protocol version of the current block header", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_protocolVersion.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -211,12 +263,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_protocolVersion.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_protocolVersion.md" }, "x-source-derived": true, "x-java-method": "getProtocolVersion", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_protocolVersion", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getProtocolVersion" + ] }, { "name": "eth_syncing", @@ -227,21 +284,56 @@ ], "summary": "Sync status", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_syncing.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", "schema": { - "x-java-type": "Object" + "x-java-type": "Object", + "oneOf": [ + { + "type": "boolean", + "const": false, + "title": "EthSyncingResultFalse1" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "startingBlock": { + "type": "string" + }, + "currentBlock": { + "type": "string" + }, + "highestBlock": { + "type": "string" + } + }, + "required": [ + "startingBlock", + "currentBlock", + "highestBlock" + ], + "title": "EthSyncingResultRequiresStartingBlockCurrentBlockHighestBlock2" + } + ] } }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_syncing.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_syncing.md" }, "x-source-derived": true, "x-java-method": "getSyncingStatus", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_syncing", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getSyncingStatus", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class SyncingResult" + ] }, { "name": "eth_blockNumber", @@ -252,6 +344,7 @@ ], "summary": "Latest block height", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_blockNumber.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -262,12 +355,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_blockNumber.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_blockNumber.md" }, "x-source-derived": true, "x-java-method": "getLatestBlockNum", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_blockNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getLatestBlockNum" + ] }, { "name": "eth_gasPrice", @@ -278,6 +376,7 @@ ], "summary": "Current energy unit price (sun)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_gasPrice.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -288,12 +387,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_gasPrice.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_gasPrice.md" }, "x-source-derived": true, "x-java-method": "gasPrice", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_gasPrice", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#gasPrice" + ] }, { "name": "eth_getBlockByHash", @@ -304,15 +408,18 @@ ], "summary": "Query a block by hash", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockHash", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte block hash, with or without the 0x prefix." }, { "name": "fullTransactionObjects", @@ -321,31 +428,44 @@ "type": "boolean" }, "x-java-type": "Boolean", - "x-position": 1 + "x-position": 1, + "description": "Whether to return full transaction objects instead of transaction hashes." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "BlockResult" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockResult" + }, + { + "type": "null", + "title": "EthGetBlockByHashResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockByHash", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/BlockResult.java#class BlockResult", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] }, { "name": "eth_getBlockByNumber", @@ -356,15 +476,33 @@ ], "summary": "Query a block by height / tag", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "bnOrId", "required": true, "schema": { - "type": "string" + "oneOf": [ + { + "type": "string", + "enum": [ + "", + "latest", + "earliest", + "finalized" + ], + "title": "EthGetBlockByNumberParamString1" + }, + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "title": "EthGetBlockByNumberParamString2" + } + ] }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Hex block number or supported block tag." }, { "name": "fullTransactionObjects", @@ -373,31 +511,45 @@ "type": "boolean" }, "x-java-type": "Boolean", - "x-position": 1 + "x-position": 1, + "description": "Whether to return full transaction objects instead of transaction hashes." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "BlockResult" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockResult" + }, + { + "type": "null", + "title": "EthGetBlockByNumberResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockByNumber", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockByNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockByNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/JsonRpcApiUtil.java#getByJsonBlockId", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/BlockResult.java#class BlockResult", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] }, { "name": "eth_getBlockTransactionCountByHash", @@ -408,10 +560,12 @@ ], "summary": "Block transaction count (by hash)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockHash", "required": true, + "description": "32-byte block hash, with or without the 0x prefix.", "schema": { "type": "string" }, @@ -422,24 +576,37 @@ "result": { "name": "result", "schema": { - "type": "string", - "x-java-type": "String" + "oneOf": [ + { + "type": "string", + "x-java-type": "String", + "title": "EthGetBlockTransactionCountByHashResultString1" + }, + { + "type": "null", + "title": "EthGetBlockTransactionCountByHashResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockTransactionCountByHash", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockTransactionCountByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockTransactionCountByHash" + ] }, { "name": "eth_getBlockTransactionCountByNumber", @@ -450,10 +617,12 @@ ], "summary": "Block transaction count (by height)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "bnOrId", "required": true, + "description": "Hex block number or supported block tag.", "schema": { "type": "string" }, @@ -464,24 +633,37 @@ "result": { "name": "result", "schema": { - "type": "string", - "x-java-type": "String" + "oneOf": [ + { + "type": "string", + "x-java-type": "String", + "title": "EthGetBlockTransactionCountByNumberResultString1" + }, + { + "type": "null", + "title": "EthGetBlockTransactionCountByNumberResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockTransactionCountByNumber", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockTransactionCountByNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockTransactionCountByNumber" + ] }, { "name": "eth_getTransactionByHash", @@ -492,39 +674,53 @@ ], "summary": "Query a transaction by txid", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "txId", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte transaction id, with or without the 0x prefix." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionResult" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + }, + { + "type": "null", + "title": "EthGetTransactionByHashResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md" }, "x-source-derived": true, "x-java-method": "getTransactionByHash", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] }, { "name": "eth_getTransactionByBlockHashAndIndex", @@ -535,48 +731,64 @@ ], "summary": "Query a transaction by block hash + index", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockHash", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte block hash, with or without the 0x prefix." }, { "name": "index", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$" }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex-encoded transaction index within the block." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionResult" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + }, + { + "type": "null", + "title": "EthGetTransactionByBlockHashAndIndexResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md" }, "x-source-derived": true, "x-java-method": "getTransactionByBlockHashAndIndex", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionByBlockHashAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionByBlockHashAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] }, { "name": "eth_getTransactionByBlockNumberAndIndex", @@ -587,48 +799,79 @@ ], "summary": "Query a transaction by block height + index", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockNumOrTag", "required": true, "schema": { - "type": "string" + "oneOf": [ + { + "type": "string", + "enum": [ + "", + "latest", + "earliest", + "finalized" + ], + "title": "EthGetTransactionByBlockNumberAndIndexParamString1" + }, + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "title": "EthGetTransactionByBlockNumberAndIndexParamString2" + } + ] }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Hex block number or supported block tag." }, { "name": "index", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$" }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex-encoded transaction index within the block." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionResult" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + }, + { + "type": "null", + "title": "EthGetTransactionByBlockNumberAndIndexResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md" }, "x-source-derived": true, "x-java-method": "getTransactionByBlockNumberAndIndex", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionByBlockNumberAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionByBlockNumberAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] }, { "name": "eth_getTransactionReceipt", @@ -639,39 +882,53 @@ ], "summary": "Query a receipt by txid", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "txid", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte transaction id, with or without the 0x prefix." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionReceipt" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionReceipt" + }, + { + "type": "null", + "title": "EthGetTransactionReceiptResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md" }, "x-source-derived": true, "x-java-method": "getTransactionReceipt", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionReceipt", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionReceipt", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionReceipt.java#class TransactionReceipt" + ] }, { "name": "eth_getBlockReceipts", @@ -682,47 +939,86 @@ ], "summary": "Receipt list for an entire block", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockNumOrHashOrTag", "required": true, "schema": { - "type": "string" + "oneOf": [ + { + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$", + "title": "EthGetBlockReceiptsParamString1" + }, + { + "oneOf": [ + { + "type": "string", + "enum": [ + "", + "latest", + "earliest", + "finalized" + ], + "title": "EthGetBlockReceiptsParamNested1String1" + }, + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "title": "EthGetBlockReceiptsParamNested1String2" + } + ], + "title": "EthGetBlockReceiptsParamVariant2" + } + ] }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Block hash, hex block number, or supported block tag." } ], "result": { "name": "result", "schema": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - }, - "x-java-type": "List" + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionReceipt" + }, + "title": "EthGetBlockReceiptsResultArray1" + }, + { + "type": "null", + "title": "EthGetBlockReceiptsResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md" }, "x-source-derived": true, "x-java-method": "getBlockReceipts", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockReceipts", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getBlockReceipts", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionReceipt.java#class TransactionReceipt" + ] }, { "name": "eth_getBalance", @@ -733,6 +1029,7 @@ ], "summary": "Account TRX balance (sun)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getBalance.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "address", @@ -741,16 +1038,21 @@ "type": "string" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Account or contract address." }, { "name": "blockNumOrTag", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "latest" + ] }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex block number or supported block tag." } ], "result": { @@ -763,17 +1065,21 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/account/eth_getBalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/account/eth_getBalance.md" }, "x-source-derived": true, "x-java-method": "getTrxBalance", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBalance", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTrxBalance" + ] }, { "name": "eth_getStorageAt", @@ -784,6 +1090,7 @@ ], "summary": "Contract storage slot", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getStorageAt.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "address", @@ -792,7 +1099,8 @@ "type": "string" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Account or contract address." }, { "name": "storageIdx", @@ -801,16 +1109,21 @@ "type": "string" }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Storage slot index." }, { "name": "blockNumOrTag", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "latest" + ] }, "x-java-type": "String", - "x-position": 2 + "x-position": 2, + "description": "Hex block number or supported block tag." } ], "result": { @@ -823,17 +1136,21 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/account/eth_getStorageAt.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/account/eth_getStorageAt.md" }, "x-source-derived": true, "x-java-method": "getStorageAt", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getStorageAt", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getStorageAt" + ] }, { "name": "eth_getCode", @@ -844,6 +1161,7 @@ ], "summary": "Contract runtime bytecode", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getCode.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "contractAddress", @@ -852,16 +1170,21 @@ "type": "string" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Contract address." }, { "name": "bnOrId", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "latest" + ] }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex block number or supported block tag." } ], "result": { @@ -874,17 +1197,21 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/account/eth_getCode.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/account/eth_getCode.md" }, "x-source-derived": true, "x-java-method": "getABIOfSmartContract", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getCode", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getABIOfSmartContract" + ] }, { "name": "eth_call", @@ -895,23 +1222,65 @@ ], "summary": "Read-only contract call", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_call.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "transactionCall", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/TransactionCall" }, "x-java-type": "CallArguments", - "x-position": 0 + "x-position": 0, + "description": "Transaction call arguments." }, { "name": "blockNumOrTag", "required": true, - "schema": {}, + "schema": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ], + "title": "EthCallParamString1" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "blockNumber": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "description": "Hex-encoded block number." + } + }, + "required": [ + "blockNumber" + ], + "title": "EthCallParamRequiresBlockNumber2" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "blockHash": { + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$", + "description": "32-byte block hash, with or without the 0x prefix." + } + }, + "required": [ + "blockHash" + ], + "title": "EthCallParamRequiresBlockHash3" + } + ] + }, "x-java-type": "Object", - "x-position": 1 + "x-position": 1, + "description": "Hex block number or supported block tag." } ], "result": { @@ -924,27 +1293,29 @@ "errors": [ { "code": -32600, - "message": "JsonRpcInvalidRequestException", - "x-java-exception": "JsonRpcInvalidRequestException" + "message": "JsonRpcInvalidRequestException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/smart-contract/eth_call.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/smart-contract/eth_call.md" }, "x-source-derived": true, "x-java-method": "getCall", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_call", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getCall" + ] }, { "name": "eth_estimateGas", @@ -955,16 +1326,17 @@ ], "summary": "Estimate energy consumption", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_estimateGas.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "args", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/TransactionCall" }, "x-java-type": "CallArguments", - "x-position": 0 + "x-position": 0, + "description": "Transaction call arguments." } ], "result": { @@ -977,27 +1349,30 @@ "errors": [ { "code": -32600, - "message": "JsonRpcInvalidRequestException", - "x-java-exception": "JsonRpcInvalidRequestException" + "message": "JsonRpcInvalidRequestException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/smart-contract/eth_estimateGas.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/smart-contract/eth_estimateGas.md" }, "x-source-derived": true, "x-java-method": "estimateGas", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_estimateGas", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#estimateGas", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/CallArguments.java#class CallArguments" + ] }, { "name": "eth_getLogs", @@ -1008,16 +1383,17 @@ ], "summary": "One-shot log query", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getLogs.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "fr", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/LogFilter" }, "x-java-type": "FilterRequest", - "x-position": 0 + "x-position": 0, + "description": "Log filter request." } ], "result": { @@ -1025,8 +1401,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/Log" }, "x-java-type": "LogFilterElement[]" } @@ -1034,47 +1409,47 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32005, - "message": "JsonRpcTooManyResultException", - "x-java-exception": "JsonRpcTooManyResultException" + "message": "JsonRpcTooManyResultException" }, { "code": -32000, - "message": "BadItemException", - "x-java-exception": "BadItemException" + "message": "BadItemException" }, { "code": -32000, - "message": "ExecutionException", - "x-java-exception": "ExecutionException" + "message": "ExecutionException" }, { "code": -32000, - "message": "InterruptedException", - "x-java-exception": "InterruptedException" + "message": "InterruptedException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_getLogs.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_getLogs.md" }, "x-source-derived": true, "x-java-method": "getLogs", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class FilterRequest", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class LogFilterElement" + ] }, { "name": "eth_newFilter", @@ -1085,16 +1460,17 @@ ], "summary": "Register a log filter", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newFilter.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "fr", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/LogFilter" }, "x-java-type": "FilterRequest", - "x-position": 0 + "x-position": 0, + "description": "Log filter request." } ], "result": { @@ -1107,22 +1483,26 @@ "errors": [ { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_newFilter.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_newFilter.md" }, "x-source-derived": true, "x-java-method": "newFilter", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_newFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#newFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class FilterRequest" + ] }, { "name": "eth_newBlockFilter", @@ -1133,6 +1513,7 @@ ], "summary": "Register a new-block filter", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newBlockFilter.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -1144,22 +1525,25 @@ "errors": [ { "code": -32005, - "message": "JsonRpcExceedLimitException", - "x-java-exception": "JsonRpcExceedLimitException" + "message": "JsonRpcExceedLimitException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_newBlockFilter.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_newBlockFilter.md" }, "x-source-derived": true, "x-java-method": "newBlockFilter", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_newBlockFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#newBlockFilter" + ] }, { "name": "eth_uninstallFilter", @@ -1170,10 +1554,12 @@ ], "summary": "Uninstall a filter", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_uninstallFilter.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "filterId", "required": true, + "description": "Filter id returned by eth_newFilter or eth_newBlockFilter.", "schema": { "type": "string" }, @@ -1191,27 +1577,29 @@ "errors": [ { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_uninstallFilter.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_uninstallFilter.md" }, "x-source-derived": true, "x-java-method": "uninstallFilter", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_uninstallFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#uninstallFilter" + ] }, { "name": "eth_getFilterChanges", @@ -1222,10 +1610,12 @@ ], "summary": "Pull and drain filter increments", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterChanges.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "filterId", "required": true, + "description": "Filter id returned by eth_newFilter or eth_newBlockFilter.", "schema": { "type": "string" }, @@ -1237,34 +1627,38 @@ "name": "result", "schema": { "type": "array", - "items": {}, + "items": { + "type": "string" + }, "x-java-type": "Object[]" } }, "errors": [ { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_getFilterChanges.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_getFilterChanges.md" }, "x-source-derived": true, "x-java-method": "getFilterChanges", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getFilterChanges", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getFilterChanges" + ] }, { "name": "eth_getFilterLogs", @@ -1275,10 +1669,12 @@ ], "summary": "Pull a log filter's full set (without draining)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterLogs.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "filterId", "required": true, + "description": "Filter id returned by eth_newFilter or eth_newBlockFilter.", "schema": { "type": "string" }, @@ -1291,8 +1687,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/Log" }, "x-java-type": "LogFilterElement[]" } @@ -1300,47 +1695,46 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32005, - "message": "JsonRpcTooManyResultException", - "x-java-exception": "JsonRpcTooManyResultException" + "message": "JsonRpcTooManyResultException" }, { "code": -32000, - "message": "BadItemException", - "x-java-exception": "BadItemException" + "message": "BadItemException" }, { "code": -32000, - "message": "ExecutionException", - "x-java-exception": "ExecutionException" + "message": "ExecutionException" }, { "code": -32000, - "message": "InterruptedException", - "x-java-exception": "InterruptedException" + "message": "InterruptedException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_getFilterLogs.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_getFilterLogs.md" }, "x-source-derived": true, "x-java-method": "getFilterLogs", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getFilterLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getFilterLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class LogFilterElement" + ] }, { "name": "buildTransaction", @@ -1351,55 +1745,142 @@ ], "summary": "Build an unsigned transaction (FullNode only; TRX transfer / TRC10 transfer / contract deploy / contract trigger)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/tx-build/buildTransaction.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "args", "required": true, "schema": { "type": "object", - "additionalProperties": true + "additionalProperties": false, + "properties": { + "from": { + "type": "string", + "description": "Sender account address." + }, + "to": { + "type": "string", + "description": "Recipient account or contract address." + }, + "gas": { + "type": "string", + "description": "Gas limit encoded as a hex quantity." + }, + "gasPrice": { + "type": "string", + "description": "Gas price encoded as a hex quantity." + }, + "value": { + "type": "string", + "description": "Hex string, amount, or value field accepted by this endpoint." + }, + "data": { + "type": "string", + "description": "Hex-encoded contract call data or transaction data." + }, + "nonce": { + "type": "string", + "description": "Transaction nonce encoded as a hex quantity." + }, + "tokenId": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "TRC10 token id." + }, + "tokenValue": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "TRC10 token amount." + }, + "abi": { + "type": "string", + "description": "Smart contract ABI definition." + }, + "consumeUserResourcePercent": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Percentage of contract execution resource cost paid by the user." + }, + "originEnergyLimit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Origin energy limit for a deployed smart contract." + }, + "name": { + "type": "string", + "description": "Name encoded as expected by java-tron." + }, + "permissionId": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Permission id used to sign the transaction with a non-owner account permission." + }, + "extraData": { + "type": "string", + "description": "Extra transaction data encoded as expected by java-tron." + }, + "visible": { + "type": "boolean", + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + } + } }, "x-java-type": "BuildArguments", - "x-position": 0 + "x-position": 0, + "description": "Transaction call arguments." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionJson" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionJson" + }, + { + "type": "null", + "title": "BuildTransactionResultNull2" + } + ] } }, "errors": [ { "code": -32600, - "message": "JsonRpcInvalidRequestException", - "x-java-exception": "JsonRpcInvalidRequestException" + "message": "JsonRpcInvalidRequestException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/tx-build/buildTransaction.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/tx-build/buildTransaction.md" }, "x-source-derived": true, "x-java-method": "buildTransaction", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 only (the Solidity port throws -32601)" + "x-ports": "FullNode 8545 only (the Solidity port throws -32601)", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#buildTransaction", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#buildTransaction", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class TransactionJson", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/BuildArguments.java#class BuildArguments" + ] }, { "name": "eth_coinbase", @@ -1410,6 +1891,7 @@ ], "summary": "The configured etherbase address", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_coinbase.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -1421,17 +1903,21 @@ "errors": [ { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/stub/eth_coinbase.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/stub/eth_coinbase.md" }, "x-source-derived": true, "x-java-method": "getCoinbase", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_coinbase", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getCoinbase" + ] }, { "name": "eth_accounts", @@ -1442,6 +1928,7 @@ ], "summary": "[]", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_accounts.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -1455,12 +1942,17 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/stub/eth_accounts.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/stub/eth_accounts.md" }, "x-source-derived": true, "x-java-method": "getAccounts", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_accounts", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getAccounts" + ] }, { "name": "eth_getWork", @@ -1471,23 +1963,710 @@ ], "summary": "[blockHash, null, null]", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_getWork.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", "schema": { "type": "array", - "items": {}, + "items": { + "type": "string" + }, "x-java-type": "List" } }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/stub/eth_getWork.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/stub/eth_getWork.md" }, "x-source-derived": true, "x-java-method": "ethGetWork", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getWork", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetWork" + ] + } + ], + "x-tron-rate-limiting": { + "source": "framework/src/main/java/org/tron/core/services/http/RateLimiterServlet.java", + "appliesTo": [ + "HTTP", + "JSON-RPC servlet" + ], + "httpStatus": 200, + "errorShape": "JavaTronError for HTTP APIs; servlet-level error body for JSON-RPC", + "message": "lack of computing resources", + "description": "java-tron applies configurable servlet-level rate limiting. When a request is rejected by the rate limiter, RateLimiterServlet writes an error body without setting HTTP 429." + }, + "components": { + "schemas": { + "TransactionResult": { + "type": "object", + "additionalProperties": false, + "x-java-type": "TransactionResult", + "properties": { + "blockHash": { + "type": "string" + }, + "blockNumber": { + "type": "string" + }, + "from": { + "type": "string" + }, + "gas": { + "type": "string" + }, + "gasPrice": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "input": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "r": { + "type": "string" + }, + "s": { + "type": "string" + }, + "to": { + "type": "string" + }, + "transactionIndex": { + "type": "string" + }, + "type": { + "type": "string" + }, + "v": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "blockHash", + "blockNumber", + "from", + "gas", + "gasPrice", + "hash", + "input", + "nonce", + "r", + "s", + "to", + "transactionIndex", + "type", + "v", + "value" + ] + }, + "BlockResult": { + "type": "object", + "additionalProperties": false, + "x-java-type": "BlockResult", + "properties": { + "baseFeePerGas": { + "type": "string" + }, + "difficulty": { + "type": "string" + }, + "extraData": { + "type": "string" + }, + "gasLimit": { + "type": "string" + }, + "gasUsed": { + "type": "string" + }, + "hash": { + "type": "string" + }, + "logsBloom": { + "type": "string" + }, + "miner": { + "type": "string" + }, + "mixHash": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "number": { + "type": "string" + }, + "parentHash": { + "type": "string" + }, + "receiptsRoot": { + "type": "string" + }, + "sha3Uncles": { + "type": "string" + }, + "size": { + "type": "string" + }, + "stateRoot": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "totalDifficulty": { + "type": "string" + }, + "transactions": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "BlockResultTransactionsString1" + }, + { + "$ref": "#/components/schemas/TransactionResult" + } + ] + } + }, + "transactionsRoot": { + "type": "string" + }, + "uncles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "baseFeePerGas", + "difficulty", + "extraData", + "gasLimit", + "gasUsed", + "hash", + "logsBloom", + "miner", + "mixHash", + "nonce", + "number", + "parentHash", + "receiptsRoot", + "sha3Uncles", + "size", + "stateRoot", + "timestamp", + "totalDifficulty", + "transactions", + "transactionsRoot", + "uncles" + ] + }, + "Log": { + "type": "object", + "additionalProperties": false, + "x-java-type": "TransactionReceipt.TransactionLog", + "properties": { + "address": { + "type": "string" + }, + "blockHash": { + "type": "string" + }, + "blockNumber": { + "type": "string" + }, + "data": { + "type": "string" + }, + "logIndex": { + "type": "string" + }, + "removed": { + "type": "boolean" + }, + "topics": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Hash32" + }, + { + "type": "null", + "title": "LogTopicsNull2" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Hash32" + }, + "title": "LogTopicsArray3" + } + ] + } + }, + "transactionHash": { + "type": "string" + }, + "transactionIndex": { + "type": "string" + } + }, + "required": [ + "address", + "blockHash", + "blockNumber", + "data", + "logIndex", + "removed", + "topics", + "transactionHash", + "transactionIndex" + ] + }, + "TransactionReceipt": { + "type": "object", + "additionalProperties": false, + "x-java-type": "TransactionReceipt", + "properties": { + "blockHash": { + "type": "string" + }, + "blockNumber": { + "type": "string" + }, + "contractAddress": { + "oneOf": [ + { + "type": "string", + "title": "TransactionReceiptContractAddressString1" + }, + { + "type": "null", + "title": "TransactionReceiptContractAddressNull2" + } + ] + }, + "cumulativeGasUsed": { + "type": "string" + }, + "effectiveGasPrice": { + "type": "string" + }, + "from": { + "oneOf": [ + { + "type": "string", + "title": "TransactionReceiptFromString1" + }, + { + "type": "null", + "title": "TransactionReceiptFromNull2" + } + ] + }, + "gasUsed": { + "type": "string" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "logsBloom": { + "type": "string" + }, + "root": { + "type": "string" + }, + "status": { + "type": "string" + }, + "to": { + "oneOf": [ + { + "type": "string", + "title": "TransactionReceiptToString1" + }, + { + "type": "null", + "title": "TransactionReceiptToNull2" + } + ] + }, + "transactionHash": { + "type": "string" + }, + "transactionIndex": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "blockHash", + "blockNumber", + "cumulativeGasUsed", + "effectiveGasPrice", + "gasUsed", + "logs", + "logsBloom", + "transactionHash", + "transactionIndex", + "type" + ] + }, + "TransactionCall": { + "type": "object", + "additionalProperties": false, + "properties": { + "from": { + "type": "string", + "description": "Sender account address." + }, + "to": { + "type": "string", + "description": "Recipient account or contract address." + }, + "gas": { + "type": "string", + "description": "Gas limit encoded as a hex quantity." + }, + "gasPrice": { + "type": "string", + "description": "Gas price encoded as a hex quantity." + }, + "value": { + "type": "string", + "description": "Hex string, amount, or value field accepted by this endpoint." + }, + "data": { + "type": "string", + "description": "Hex-encoded contract call data or transaction data." + }, + "nonce": { + "type": "string", + "description": "Transaction nonce encoded as a hex quantity." + } + }, + "x-java-type": "CallArguments" + }, + "LogFilter": { + "type": "object", + "additionalProperties": false, + "properties": { + "fromBlock": { + "type": "string", + "description": "Start block for a log filter." + }, + "toBlock": { + "type": "string", + "description": "End block for a log filter." + }, + "address": { + "oneOf": [ + { + "type": "string", + "title": "LogFilterAddressString1" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "title": "LogFilterAddressArray2" + } + ], + "description": "Account or contract address accepted by this endpoint." + }, + "topics": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Hash32" + }, + { + "type": "null", + "title": "LogFilterTopicsNull2" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Hash32" + }, + "title": "LogFilterTopicsArray3" + } + ] + }, + "description": "Log topics filter." + }, + "blockHash": { + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$", + "description": "32-byte block hash, with or without the 0x prefix." + } + }, + "x-java-type": "FilterRequest" + }, + "TransactionJson": { + "type": "object", + "additionalProperties": false, + "x-java-type": "TransactionJson", + "properties": { + "transaction": { + "type": "object", + "additionalProperties": false, + "properties": { + "txID": { + "type": "string" + }, + "raw_data": { + "type": "object", + "additionalProperties": false, + "properties": { + "contract": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string" + }, + "Permission_id": { + "type": "integer", + "format": "int32" + }, + "parameter": { + "type": "object", + "additionalProperties": false, + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "owner_address": { + "type": "string" + }, + "to_address": { + "type": "string" + }, + "amount": { + "type": "integer", + "format": "int64" + }, + "asset_name": { + "type": "string" + }, + "contract_address": { + "type": "string" + }, + "data": { + "type": "string" + }, + "call_value": { + "type": "integer", + "format": "int64" + }, + "call_token_value": { + "type": "integer", + "format": "int64" + }, + "token_id": { + "type": "integer", + "format": "int64" + }, + "new_contract": { + "type": "object", + "additionalProperties": false, + "properties": { + "origin_address": { + "type": "string" + }, + "contract_address": { + "type": "string" + }, + "abi": { + "type": "object", + "additionalProperties": false, + "properties": { + "entrys": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "anonymous": { + "type": "boolean" + }, + "constant": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "indexed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "indexed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "bytecode": { + "type": "string" + }, + "call_value": { + "type": "integer", + "format": "int64" + }, + "consume_user_resource_percent": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "origin_energy_limit": { + "type": "integer", + "format": "int64" + } + } + } + } + } + }, + "required": [ + "type_url", + "value" + ] + } + } + } + }, + "data": { + "type": "string" + }, + "expiration": { + "type": "integer", + "format": "int64" + }, + "fee_limit": { + "type": "integer", + "format": "int64" + }, + "ref_block_bytes": { + "type": "string" + }, + "ref_block_hash": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "contract", + "expiration", + "ref_block_bytes", + "ref_block_hash", + "timestamp" + ] + }, + "raw_data_hex": { + "type": "string" + }, + "visible": { + "type": "boolean" + } + }, + "required": [ + "raw_data", + "raw_data_hex", + "txID" + ] + } + }, + "required": [ + "transaction" + ] + }, + "Hash32": { + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" + }, + "HexQuantity": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$" + }, + "HexData": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]*$" + } } - ] + } } diff --git a/docs/api/specs/http/accountpermissionupdate.yaml b/docs/api/specs/http/accountpermissionupdate.yaml index bd352dd7..f87a2b67 100644 --- a/docs/api/specs/http/accountpermissionupdate.yaml +++ b/docs/api/specs/http/accountpermissionupdate.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/accountpermissionupdate": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/accountpermissionupdate.md` for examples and detailed behavior." "operationId": "wallet_accountpermissionupdate_post" "externalDocs": - "url": "docs/api/http/account/accountpermissionupdate.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/accountpermissionupdate.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,27 +33,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "owner": - "type": "object" - "additionalProperties": true - "witness": - "type": "object" - "additionalProperties": true - "actives": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AccountPermissionUpdateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountPermissionUpdateContract" + "allOf": + - + "$ref": "#/components/schemas/AccountPermissionUpdateContractRequest" + "required": + - "owner_address" + - "owner" + - "actives" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/AccountPermissionUpdateActuator.java#validate" + - "protocol/src/main/protos/core/contract/account_contract.proto#AccountPermissionUpdateContract" diff --git a/docs/api/specs/http/broadcasthex.yaml b/docs/api/specs/http/broadcasthex.yaml index 8034b58a..d3a75db0 100644 --- a/docs/api/specs/http/broadcasthex.yaml +++ b/docs/api/specs/http/broadcasthex.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/broadcasthex": "post": "tags": @@ -7,30 +6,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasthex.md` for examples and detailed behavior." "operationId": "wallet_broadcasthex_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/broadcasthex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/broadcasthex.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "txid": - "type": "string" - "transaction": - "type": "string" - "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "transaction": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "not": + "required": + - "Error" + "title": "BroadcasthexPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -43,10 +51,16 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "transaction": "type": "string" + "description": "Transaction object." "required": - "transaction" "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/BroadcastHexServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" diff --git a/docs/api/specs/http/broadcasttransaction.yaml b/docs/api/specs/http/broadcasttransaction.yaml index 7588fa41..c3edde4c 100644 --- a/docs/api/specs/http/broadcasttransaction.yaml +++ b/docs/api/specs/http/broadcasttransaction.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/broadcasttransaction": "post": "tags": @@ -7,28 +6,37 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/broadcasttransaction.md` for examples and detailed behavior." "operationId": "wallet_broadcasttransaction_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/broadcasttransaction.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/broadcasttransaction.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "txid": - "type": "string" - "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "result": + "type": "boolean" + "code": + "type": "string" + "message": + "type": "string" + "txid": + "type": "string" + "x-java-response": "Return/GrpcAPI.Return plus transaction id fields" + "not": + "required": + - "Error" + "title": "BroadcasttransactionPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -40,26 +48,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "oneOf": - - - "required": - - "raw_data" + "allOf": - - "required": - - "raw_data_hex" - "x-source-shape": "transaction-json" - "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "$ref": "#/components/schemas/TransactionRequest" + "required": + - "raw_data" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/BroadcastServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" + - "protocol/src/main/protos/core/Tron.proto#Transaction" diff --git a/docs/api/specs/http/cancelallunfreezev2.yaml b/docs/api/specs/http/cancelallunfreezev2.yaml index 9d9732e9..1d60a5a6 100644 --- a/docs/api/specs/http/cancelallunfreezev2.yaml +++ b/docs/api/specs/http/cancelallunfreezev2.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/cancelallunfreezev2": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/cancelallunfreezev2.md` for examples and detailed behavior." "operationId": "wallet_cancelallunfreezev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/cancelallunfreezev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/cancelallunfreezev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,16 +33,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "CancelAllUnfreezeV2Contract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.CancelAllUnfreezeV2Contract" + "allOf": + - + "$ref": "#/components/schemas/CancelAllUnfreezeV2ContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/CancelAllUnfreezeV2Actuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#CancelAllUnfreezeV2Contract" diff --git a/docs/api/specs/http/clearabi.yaml b/docs/api/specs/http/clearabi.yaml index d6265773..a02e36a5 100644 --- a/docs/api/specs/http/clearabi.yaml +++ b/docs/api/specs/http/clearabi.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/clearabi": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/clearabi.md` for examples and detailed behavior." "operationId": "wallet_clearabi_post" "externalDocs": - "url": "docs/api/http/smart-contract/clearabi.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/clearabi.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,18 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ClearABIContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.ClearABIContract" + "allOf": + - + "$ref": "#/components/schemas/ClearABIContractRequest" + "required": + - "owner_address" + - "contract_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ClearABIContractActuator.java#validate" + - "protocol/src/main/protos/core/contract/smart_contract.proto#ClearABIContract" diff --git a/docs/api/specs/http/createaccount.yaml b/docs/api/specs/http/createaccount.yaml index fa879e1b..d7e1d535 100644 --- a/docs/api/specs/http/createaccount.yaml +++ b/docs/api/specs/http/createaccount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/createaccount": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/createaccount.md` for examples and detailed behavior." "operationId": "wallet_createaccount_post" "externalDocs": - "url": "docs/api/http/account/createaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/createaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,21 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "account_address": - "type": "string" - "type": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AccountCreateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountCreateContract" + "allOf": + - + "$ref": "#/components/schemas/AccountCreateContractRequest" + "required": + - "owner_address" + - "account_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/CreateAccountActuator.java#validate" + - "protocol/src/main/protos/core/contract/account_contract.proto#AccountCreateContract" diff --git a/docs/api/specs/http/createassetissue.yaml b/docs/api/specs/http/createassetissue.yaml index d05e338f..110cd2a9 100644 --- a/docs/api/specs/http/createassetissue.yaml +++ b/docs/api/specs/http/createassetissue.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/createassetissue": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/createassetissue.md` for examples and detailed behavior." "operationId": "wallet_createassetissue_post" "externalDocs": - "url": "docs/api/http/asset/createassetissue.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/createassetissue.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,55 +33,19 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" + "allOf": + - + "$ref": "#/components/schemas/AssetIssueContractRequest" + "required": + - "owner_address" + - "name" + - "total_supply" + - "trx_num" + - "num" + - "start_time" + - "end_time" + - "url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/AssetIssueActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#AssetIssueContract" diff --git a/docs/api/specs/http/createtransaction.yaml b/docs/api/specs/http/createtransaction.yaml index 0a51c421..a3bf267a 100644 --- a/docs/api/specs/http/createtransaction.yaml +++ b/docs/api/specs/http/createtransaction.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/createtransaction": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/createtransaction.md` for examples and detailed behavior." "operationId": "wallet_createtransaction_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/createtransaction.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/createtransaction.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,22 +33,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "to_address": - "type": "string" - "amount": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "extra_data": - "type": "string" - "x-proto-message": "TransferContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.TransferContract" + "allOf": + - + "$ref": "#/components/schemas/TransferContractRequest" + "required": + - "owner_address" + - "to_address" + - "amount" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/TransferActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#TransferContract" diff --git a/docs/api/specs/http/createwitness.yaml b/docs/api/specs/http/createwitness.yaml index 979a806e..7d3d830d 100644 --- a/docs/api/specs/http/createwitness.yaml +++ b/docs/api/specs/http/createwitness.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/createwitness": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/createwitness.md` for examples and detailed behavior." "operationId": "wallet_createwitness_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/createwitness.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/createwitness.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,18 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "url": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WitnessCreateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessCreateContract" + "allOf": + - + "$ref": "#/components/schemas/WitnessCreateContractRequest" + "required": + - "owner_address" + - "url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WitnessCreateActuator.java#validate" + - "protocol/src/main/protos/core/contract/witness_contract.proto#WitnessCreateContract" diff --git a/docs/api/specs/http/delegateresource.yaml b/docs/api/specs/http/delegateresource.yaml index ce4a4322..a863e728 100644 --- a/docs/api/specs/http/delegateresource.yaml +++ b/docs/api/specs/http/delegateresource.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/delegateresource": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/delegateresource.md` for examples and detailed behavior." "operationId": "wallet_delegateresource_post" "externalDocs": - "url": "docs/api/http/stake-v2/delegateresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/delegateresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,27 +33,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "resource": - "type": "object" - "additionalProperties": true - "balance": - "type": "integer" - "receiver_address": - "type": "string" - "lock": - "type": "boolean" - "lock_period": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "DelegateResourceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.DelegateResourceContract" + "allOf": + - + "$ref": "#/components/schemas/DelegateResourceContractRequest" + "required": + - "owner_address" + - "balance" + - "receiver_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/DelegateResourceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#DelegateResourceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" diff --git a/docs/api/specs/http/deploycontract.yaml b/docs/api/specs/http/deploycontract.yaml index 10797325..15f85043 100644 --- a/docs/api/specs/http/deploycontract.yaml +++ b/docs/api/specs/http/deploycontract.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/deploycontract": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/deploycontract.md` for examples and detailed behavior." "operationId": "wallet_deploycontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/deploycontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/deploycontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,40 +33,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "new_contract": - "type": "object" - "additionalProperties": true - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "abi": - "type": "object" - "additionalProperties": true - "bytecode": - "type": "string" - "parameter": - "type": "string" - "name": - "type": "string" - "call_value": - "type": "integer" - "consume_user_resource_percent": - "type": "integer" - "origin_energy_limit": - "type": "integer" - "fee_limit": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "CreateSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.CreateSmartContract" + "allOf": + - + "$ref": "#/components/schemas/CreateSmartContractRequest" + "required": + - "owner_address" + - "bytecode" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/VMActuator.java#validate" + - "framework/src/main/java/org/tron/core/services/http/DeployContractServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#CreateSmartContract" + - "protocol/src/main/protos/core/contract/smart_contract.proto#message ABI" diff --git a/docs/api/specs/http/estimateenergy.yaml b/docs/api/specs/http/estimateenergy.yaml index 1800ccdc..fddc41b7 100644 --- a/docs/api/specs/http/estimateenergy.yaml +++ b/docs/api/specs/http/estimateenergy.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/estimateenergy": "post": "tags": @@ -7,7 +6,7 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/estimateenergy.md` for examples and detailed behavior." "operationId": "wallet_estimateenergy_post" "externalDocs": - "url": "docs/api/http/smart-contract/estimateenergy.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/estimateenergy.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." @@ -15,11 +14,11 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "boolean" @@ -29,45 +28,40 @@ "type": "string" "energy_required": "type": "integer" + "format": "int64" "x-java-response": "EstimateEnergyMessage rendered by Util.printEstimateEnergyMessage" - "text/plain": - "schema": - "type": "string" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "EstimateEnergyServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/estimateenergy" - "x-solidity-servlet": "EstimateEnergyOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/estimateenergy" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "EstimateEnergyOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "call_value": - "type": "integer" - "data": - "type": "string" - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "function_selector": - "type": "string" - "parameter": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "TriggerSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "allOf": + - + "$ref": "#/components/schemas/TriggerSmartContractRequest" + "required": + - "owner_address" + "anyOf": + - + "required": + - "contract_address" + "title": "EstimateenergyPostRequestRequiresContractAddress1" + - + "required": + - "data" + "title": "EstimateenergyPostRequestRequiresData2" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/EstimateEnergyServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#TriggerSmartContract" diff --git a/docs/api/specs/http/freezebalance.yaml b/docs/api/specs/http/freezebalance.yaml index d17f9e0d..83e9ed98 100644 --- a/docs/api/specs/http/freezebalance.yaml +++ b/docs/api/specs/http/freezebalance.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/freezebalance": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/freezebalance.md` for examples and detailed behavior." "operationId": "wallet_freezebalance_post" "externalDocs": - "url": "docs/api/http/stake-v1/freezebalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/freezebalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,25 +33,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "frozen_balance": - "type": "integer" - "frozen_duration": - "type": "integer" - "resource": - "type": "object" - "additionalProperties": true - "receiver_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "FreezeBalanceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceContract" + "allOf": + - + "$ref": "#/components/schemas/FreezeBalanceContractRequest" + "required": + - "owner_address" + - "frozen_balance" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/FreezeBalanceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#FreezeBalanceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" diff --git a/docs/api/specs/http/freezebalancev2.yaml b/docs/api/specs/http/freezebalancev2.yaml index db2f325c..1cae3614 100644 --- a/docs/api/specs/http/freezebalancev2.yaml +++ b/docs/api/specs/http/freezebalancev2.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/freezebalancev2": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/freezebalancev2.md` for examples and detailed behavior." "operationId": "wallet_freezebalancev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/freezebalancev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/freezebalancev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,21 +33,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "frozen_balance": - "type": "integer" - "resource": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "FreezeBalanceV2Contract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.FreezeBalanceV2Contract" + "allOf": + - + "$ref": "#/components/schemas/FreezeBalanceV2ContractRequest" + "required": + - "owner_address" + - "frozen_balance" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/FreezeBalanceV2Actuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#FreezeBalanceV2Contract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" diff --git a/docs/api/specs/http/getBrokerage.yaml b/docs/api/specs/http/getBrokerage.yaml index 52376b38..14b9d800 100644 --- a/docs/api/specs/http/getBrokerage.yaml +++ b/docs/api/specs/http/getBrokerage.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getBrokerage": "get": "tags": @@ -7,31 +6,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." "operationId": "wallet_getBrokerage_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getBrokerage.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "brokerage": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "brokerage": + "type": "integer" + "format": "int32" + "description": "Witness brokerage percentage, from 0 to 100." + "Error": + "type": "string" + "not": + "required": + - "Error" + "title": "GetBrokerageGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBrokerageServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getBrokerage" - "x-solidity-servlet": "GetBrokerageOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getBrokerage" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBrokerageOnSolidityServlet" "parameters": - "name": "address" @@ -39,7 +53,11 @@ "required": false "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBrokerageServlet.java" "post": "tags": - "Witness / governance" @@ -47,36 +65,68 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getBrokerage.md` for examples and detailed behavior." "operationId": "wallet_getBrokerage_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getBrokerage.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getBrokerage.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "brokerage": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "brokerage": + "type": "integer" + "format": "int32" + "description": "Witness brokerage percentage, from 0 to 100." + "Error": + "type": "string" + "not": + "required": + - "Error" + "title": "GetBrokeragePostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBrokerageServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getBrokerage" - "x-solidity-servlet": "GetBrokerageOnSolidityServlet" - "parameters": + "x-tron-alternate-endpoints": - - "name": "address" - "in": "query" - "required": false - "schema": - "type": "string" - "x-source-derived": true + "path": "/walletsolidity/getBrokerage" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBrokerageOnSolidityServlet" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBrokerageServlet.java" + "requestBody": + "required": false + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-json-body" + "x-java-unknown-fields": "ignored-by-servlet-helper" + "application/x-www-form-urlencoded": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-form-body" diff --git a/docs/api/specs/http/getReward.yaml b/docs/api/specs/http/getReward.yaml index f083148b..d8e8049b 100644 --- a/docs/api/specs/http/getReward.yaml +++ b/docs/api/specs/http/getReward.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getReward": "get": "tags": @@ -7,31 +6,47 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." "operationId": "wallet_getReward_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getReward.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getReward.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "reward": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "reward": + "type": "integer" + "format": "int64" + "Error": + "type": "string" + "required": + - "reward" + "not": + "required": + - "Error" + "title": "GetRewardGetResultRequiresReward1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetRewardServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getReward" - "x-solidity-servlet": "GetRewardOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getReward" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetRewardOnSolidityServlet" "parameters": - "name": "address" @@ -39,7 +54,11 @@ "required": false "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetRewardServlet.java" "post": "tags": - "Witness / governance" @@ -47,36 +66,69 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getReward.md` for examples and detailed behavior." "operationId": "wallet_getReward_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getReward.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getReward.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "reward": - "type": "integer" - "Error": - "type": "string" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "reward": + "type": "integer" + "format": "int64" + "Error": + "type": "string" + "required": + - "reward" + "not": + "required": + - "Error" + "title": "GetRewardPostResultRequiresReward1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetRewardServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getReward" - "x-solidity-servlet": "GetRewardOnSolidityServlet" - "parameters": + "x-tron-alternate-endpoints": - - "name": "address" - "in": "query" - "required": false - "schema": - "type": "string" - "x-source-derived": true + "path": "/walletsolidity/getReward" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetRewardOnSolidityServlet" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetRewardServlet.java" + "requestBody": + "required": false + "content": + "application/json": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-json-body" + "x-java-unknown-fields": "ignored-by-servlet-helper" + "application/x-www-form-urlencoded": + "schema": + "type": "object" + "additionalProperties": false + "properties": + "address": + "type": "string" + "description": "Account or contract address accepted by this endpoint." + "x-source-shape": "servlet-form-body" diff --git a/docs/api/specs/http/getaccount.yaml b/docs/api/specs/http/getaccount.yaml index b4029b6c..ab349542 100644 --- a/docs/api/specs/http/getaccount.yaml +++ b/docs/api/specs/http/getaccount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getaccount": "get": "tags": @@ -7,135 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." "operationId": "wallet_getaccount_get" "externalDocs": - "url": "docs/api/http/account/getaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_name": - "type": "string" - "type": - "type": "object" - "additionalProperties": true - "address": - "type": "string" - "balance": - "type": "integer" - "votes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozen": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "net_usage": - "type": "integer" - "acquired_delegated_frozen_balance_for_bandwidth": - "type": "integer" - "delegated_frozen_balance_for_bandwidth": - "type": "integer" - "old_tron_power": - "type": "integer" - "tron_power": - "type": "object" - "additionalProperties": true - "asset_optimized": - "type": "boolean" - "create_time": - "type": "integer" - "latest_opration_time": - "type": "integer" - "allowance": - "type": "integer" - "latest_withdraw_time": - "type": "integer" - "code": - "type": "string" - "is_witness": - "type": "boolean" - "is_committee": - "type": "boolean" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "asset_issued_name": - "type": "string" - "asset_issued_ID": - "type": "string" - "free_net_usage": - "type": "integer" - "latest_consume_time": - "type": "integer" - "latest_consume_free_time": - "type": "integer" - "account_id": - "type": "string" - "net_window_size": - "type": "integer" - "net_window_optimized": - "type": "boolean" - "account_resource": - "type": "object" - "additionalProperties": true - "codeHash": - "type": "string" - "owner_permission": - "type": "object" - "additionalProperties": true - "witness_permission": - "type": "object" - "additionalProperties": true - "active_permission": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "unfrozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "acquired_delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "x-proto-message": "Account" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Account" - "x-java-response": "Account rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Account" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAccountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getaccount" - "x-solidity-servlet": "GetAccountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getaccount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAccountOnSolidityServlet" "parameters": - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -143,7 +49,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "post": "tags": - "Account" @@ -151,139 +62,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccount.md` for examples and detailed behavior." "operationId": "wallet_getaccount_post" "externalDocs": - "url": "docs/api/http/account/getaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_name": - "type": "string" - "type": - "type": "object" - "additionalProperties": true - "address": - "type": "string" - "balance": - "type": "integer" - "votes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozen": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "net_usage": - "type": "integer" - "acquired_delegated_frozen_balance_for_bandwidth": - "type": "integer" - "delegated_frozen_balance_for_bandwidth": - "type": "integer" - "old_tron_power": - "type": "integer" - "tron_power": - "type": "object" - "additionalProperties": true - "asset_optimized": - "type": "boolean" - "create_time": - "type": "integer" - "latest_opration_time": - "type": "integer" - "allowance": - "type": "integer" - "latest_withdraw_time": - "type": "integer" - "code": - "type": "string" - "is_witness": - "type": "boolean" - "is_committee": - "type": "boolean" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "asset_issued_name": - "type": "string" - "asset_issued_ID": - "type": "string" - "free_net_usage": - "type": "integer" - "latest_consume_time": - "type": "integer" - "latest_consume_free_time": - "type": "integer" - "account_id": - "type": "string" - "net_window_size": - "type": "integer" - "net_window_optimized": - "type": "boolean" - "account_resource": - "type": "object" - "additionalProperties": true - "codeHash": - "type": "string" - "owner_permission": - "type": "object" - "additionalProperties": true - "witness_permission": - "type": "object" - "additionalProperties": true - "active_permission": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "frozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "unfrozenV2": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "acquired_delegated_frozenV2_balance_for_bandwidth": - "type": "integer" - "x-proto-message": "Account" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Account" - "x-java-response": "Account rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Account" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAccountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getaccount" - "x-solidity-servlet": "GetAccountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getaccount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAccountOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "address": - "type": "string" - "visible": - "type": "boolean" - "x-source-shape": "servlet-effective-input" - "x-java-request-type": "org.tron.protos.Protocol.Account" + "allOf": + - + "$ref": "#/components/schemas/AccountRequest" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" diff --git a/docs/api/specs/http/getaccountbalance.yaml b/docs/api/specs/http/getaccountbalance.yaml index d9d29b0e..e0459120 100644 --- a/docs/api/specs/http/getaccountbalance.yaml +++ b/docs/api/specs/http/getaccountbalance.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getaccountbalance": "post": "tags": @@ -7,28 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountbalance.md` for examples and detailed behavior." "operationId": "wallet_getaccountbalance_post" "externalDocs": - "url": "docs/api/http/account/getaccountbalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountbalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "balance": - "type": "integer" - "block_identifier": - "type": "object" - "additionalProperties": true - "x-proto-message": "AccountBalanceResponse" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-java-response-type": "BalanceContract.AccountBalanceResponse" - "x-java-response": "AccountBalanceResponse rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountBalanceResponse" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -40,18 +33,8 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_identifier": - "type": "object" - "additionalProperties": true - "block_identifier": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "x-proto-message": "AccountBalanceRequest" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "AccountBalanceRequest" + "$ref": "#/components/schemas/AccountBalanceRequestRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountBalanceServlet.java" + - "protocol/src/main/protos/core/contract/balance_contract.proto#AccountBalanceRequest" diff --git a/docs/api/specs/http/getaccountnet.yaml b/docs/api/specs/http/getaccountnet.yaml index c363f355..1f27dc46 100644 --- a/docs/api/specs/http/getaccountnet.yaml +++ b/docs/api/specs/http/getaccountnet.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getaccountnet": "get": "tags": @@ -7,35 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." "operationId": "wallet_getaccountnet_get" "externalDocs": - "url": "docs/api/http/account/getaccountnet.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountnet.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "x-proto-message": "AccountNetMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" - "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountNetMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -46,9 +32,10 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -56,7 +43,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountNetServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "post": "tags": - "Account" @@ -64,35 +56,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountnet.md` for examples and detailed behavior." "operationId": "wallet_getaccountnet_post" "externalDocs": - "url": "docs/api/http/account/getaccountnet.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountnet.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "x-proto-message": "AccountNetMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountNetMessage" - "x-java-response": "AccountNetMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountNetMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -104,12 +83,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "address": - "type": "string" - "visible": - "type": "boolean" - "x-source-shape": "servlet-effective-input" - "x-java-request-type": "org.tron.protos.Protocol.Account" + "allOf": + - + "$ref": "#/components/schemas/AccountRequest" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountNetServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" diff --git a/docs/api/specs/http/getaccountresource.yaml b/docs/api/specs/http/getaccountresource.yaml index 9f01a221..bde6dc0a 100644 --- a/docs/api/specs/http/getaccountresource.yaml +++ b/docs/api/specs/http/getaccountresource.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getaccountresource": "get": "tags": @@ -7,53 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." "operationId": "wallet_getaccountresource_get" "externalDocs": - "url": "docs/api/http/account/getaccountresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "TotalTronPowerWeight": - "type": "integer" - "tronPowerUsed": - "type": "integer" - "tronPowerLimit": - "type": "integer" - "EnergyUsed": - "type": "integer" - "EnergyLimit": - "type": "integer" - "TotalEnergyLimit": - "type": "integer" - "TotalEnergyWeight": - "type": "integer" - "storageUsed": - "type": "integer" - "storageLimit": - "type": "integer" - "x-proto-message": "AccountResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" - "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountResourceMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -64,9 +32,10 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -74,6 +43,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -82,53 +52,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/getaccountresource.md` for examples and detailed behavior." "operationId": "wallet_getaccountresource_post" "externalDocs": - "url": "docs/api/http/account/getaccountresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/getaccountresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "freeNetUsed": - "type": "integer" - "freeNetLimit": - "type": "integer" - "NetUsed": - "type": "integer" - "NetLimit": - "type": "integer" - "TotalNetLimit": - "type": "integer" - "TotalNetWeight": - "type": "integer" - "TotalTronPowerWeight": - "type": "integer" - "tronPowerUsed": - "type": "integer" - "tronPowerLimit": - "type": "integer" - "EnergyUsed": - "type": "integer" - "EnergyLimit": - "type": "integer" - "TotalEnergyLimit": - "type": "integer" - "TotalEnergyWeight": - "type": "integer" - "storageUsed": - "type": "integer" - "storageLimit": - "type": "integer" - "x-proto-message": "AccountResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AccountResourceMessage" - "x-java-response": "AccountResourceMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AccountResourceMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -141,10 +80,18 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "address": "type": "string" + "description": "Account or contract address accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAccountResourceServlet.java" diff --git a/docs/api/specs/http/getapprovedlist.yaml b/docs/api/specs/http/getapprovedlist.yaml index 0eebbe46..17542f93 100644 --- a/docs/api/specs/http/getapprovedlist.yaml +++ b/docs/api/specs/http/getapprovedlist.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getapprovedlist": "post": "tags": @@ -7,48 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getapprovedlist.md` for examples and detailed behavior." "operationId": "wallet_getapprovedlist_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/getapprovedlist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/getapprovedlist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "object" - "additionalProperties": true - "approved_list": - "type": "array" - "items": - "type": "string" - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionApprovedList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -60,26 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "oneOf": - - - "required": - - "raw_data" + "allOf": - - "required": - - "raw_data_hex" - "x-source-shape": "transaction-json" - "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "$ref": "#/components/schemas/TransactionRequest" + "required": + - "raw_data" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionApprovedListServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" + - "protocol/src/main/protos/core/Tron.proto#Transaction" diff --git a/docs/api/specs/http/getassetissuebyaccount.yaml b/docs/api/specs/http/getassetissuebyaccount.yaml index e41bed4f..566ca546 100644 --- a/docs/api/specs/http/getassetissuebyaccount.yaml +++ b/docs/api/specs/http/getassetissuebyaccount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getassetissuebyaccount": "get": "tags": @@ -7,28 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyaccount_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -39,9 +32,10 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -49,7 +43,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" "post": "tags": - "TRC10 asset" @@ -57,28 +56,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyaccount.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyaccount_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -90,12 +83,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "address": - "type": "string" - "visible": - "type": "boolean" - "x-source-shape": "servlet-effective-input" - "x-java-request-type": "org.tron.protos.Protocol.Account" + "allOf": + - + "$ref": "#/components/schemas/AccountRequest" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByAccountServlet.java" + - "protocol/src/main/protos/core/Tron.proto#Account" diff --git a/docs/api/specs/http/getassetissuebyid.yaml b/docs/api/specs/http/getassetissuebyid.yaml index 69521df7..42aae967 100644 --- a/docs/api/specs/http/getassetissuebyid.yaml +++ b/docs/api/specs/http/getassetissuebyid.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getassetissuebyid": "get": "tags": @@ -7,79 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyid_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" - "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -87,7 +49,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByIdServlet.java" "post": "tags": - "TRC10 asset" @@ -95,82 +61,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyid.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyid_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyid" - "x-solidity-servlet": "GetAssetIssueByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "value": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByIdServlet.java" diff --git a/docs/api/specs/http/getassetissuebyname.yaml b/docs/api/specs/http/getassetissuebyname.yaml index f389e994..6674720c 100644 --- a/docs/api/specs/http/getassetissuebyname.yaml +++ b/docs/api/specs/http/getassetissuebyname.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getassetissuebyname": "get": "tags": @@ -7,79 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyname_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" - "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByNameOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -87,7 +49,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByNameServlet.java" "post": "tags": - "TRC10 asset" @@ -95,82 +61,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuebyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuebyname_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuebyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuebyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "owner_address": - "type": "string" - "name": - "type": "string" - "abbr": - "type": "string" - "total_supply": - "type": "integer" - "frozen_supply": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "trx_num": - "type": "integer" - "precision": - "type": "integer" - "num": - "type": "integer" - "start_time": - "type": "integer" - "end_time": - "type": "integer" - "order": - "type": "integer" - "vote_score": - "type": "integer" - "description": - "type": "string" - "url": - "type": "string" - "free_asset_net_limit": - "type": "integer" - "public_free_asset_net_limit": - "type": "integer" - "public_free_asset_net_usage": - "type": "integer" - "public_latest_free_net_time": - "type": "integer" - "x-proto-message": "AssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-java-response-type": "org.tron.protos.contract.AssetIssueContractOuterClass.AssetIssueContract" - "x-java-response": "AssetIssueContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuebyname" - "x-solidity-servlet": "GetAssetIssueByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuebyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueByNameOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "value": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueByNameServlet.java" diff --git a/docs/api/specs/http/getassetissuelist.yaml b/docs/api/specs/http/getassetissuelist.yaml index 91783924..10962e52 100644 --- a/docs/api/specs/http/getassetissuelist.yaml +++ b/docs/api/specs/http/getassetissuelist.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getassetissuelist": "get": "tags": @@ -7,36 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelist_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelist" - "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListOnSolidityServlet" "parameters": - "name": "visible" @@ -44,7 +41,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListServlet.java" "post": "tags": - "TRC10 asset" @@ -52,36 +53,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelist_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelist" - "x-solidity-servlet": "GetAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListOnSolidityServlet" "parameters": - "name": "visible" @@ -89,4 +88,8 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListServlet.java" diff --git a/docs/api/specs/http/getassetissuelistbyname.yaml b/docs/api/specs/http/getassetissuelistbyname.yaml index 48e98a12..9981919e 100644 --- a/docs/api/specs/http/getassetissuelistbyname.yaml +++ b/docs/api/specs/http/getassetissuelistbyname.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getassetissuelistbyname": "get": "tags": @@ -7,43 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelistbyname_get" "externalDocs": - "url": "docs/api/http/asset/getassetissuelistbyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelistbyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" - "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelistbyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListByNameOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -51,7 +49,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListByNameServlet.java" "post": "tags": - "TRC10 asset" @@ -59,46 +61,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getassetissuelistbyname.md` for examples and detailed behavior." "operationId": "wallet_getassetissuelistbyname_post" "externalDocs": - "url": "docs/api/http/asset/getassetissuelistbyname.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getassetissuelistbyname.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAssetIssueListByNameServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getassetissuelistbyname" - "x-solidity-servlet": "GetAssetIssueListByNameOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getassetissuelistbyname" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAssetIssueListByNameOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "value": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAssetIssueListByNameServlet.java" diff --git a/docs/api/specs/http/getavailableunfreezecount.yaml b/docs/api/specs/http/getavailableunfreezecount.yaml index 679a6e8a..4a6edb9e 100644 --- a/docs/api/specs/http/getavailableunfreezecount.yaml +++ b/docs/api/specs/http/getavailableunfreezecount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getavailableunfreezecount": "get": "tags": @@ -7,33 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." "operationId": "wallet_getavailableunfreezecount_get" "externalDocs": - "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getavailableunfreezecount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" - "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/GetAvailableUnfreezeCountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAvailableUnfreezeCountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" - "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getavailableunfreezecount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" "parameters": - "name": "ownerAddress" @@ -41,6 +41,7 @@ "required": false "schema": "type": "string" + "description": "Alias for owner_address. At least one of ownerAddress or owner_address must be provided." "x-source-derived": true - "name": "owner_address" @@ -48,6 +49,7 @@ "required": false "schema": "type": "string" + "description": "Address of the account that owns or initiates the request. At least one of ownerAddress or owner_address must be provided." "x-source-derived": true - "name": "visible" @@ -55,7 +57,16 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAvailableUnfreezeCountServlet.java" + "x-query-required-anyOf": + - + - "ownerAddress" + - + - "owner_address" "post": "tags": - "Stake 2.0" @@ -63,46 +74,41 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getavailableunfreezecount.md` for examples and detailed behavior." "operationId": "wallet_getavailableunfreezecount_post" "externalDocs": - "url": "docs/api/http/stake-v2/getavailableunfreezecount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getavailableunfreezecount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "x-proto-message": "GetAvailableUnfreezeCountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.GetAvailableUnfreezeCountResponseMessage" - "x-java-response": "GetAvailableUnfreezeCountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/GetAvailableUnfreezeCountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetAvailableUnfreezeCountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getavailableunfreezecount" - "x-solidity-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getavailableunfreezecount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetAvailableUnfreezeCountOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "GetAvailableUnfreezeCountRequestMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "GetAvailableUnfreezeCountRequestMessage" + "$ref": "#/components/schemas/GetAvailableUnfreezeCountRequestMessageRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetAvailableUnfreezeCountServlet.java" + - "protocol/src/main/protos/api/api.proto#GetAvailableUnfreezeCountRequestMessage" diff --git a/docs/api/specs/http/getbandwidthprices.yaml b/docs/api/specs/http/getbandwidthprices.yaml index d6e1a8a7..a2673c09 100644 --- a/docs/api/specs/http/getbandwidthprices.yaml +++ b/docs/api/specs/http/getbandwidthprices.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getbandwidthprices": "get": "tags": @@ -7,35 +6,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." "operationId": "wallet_getbandwidthprices_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getbandwidthprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBandwidthPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" - "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getbandwidthprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBandwidthPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBandwidthPricesServlet.java" "post": "tags": - "Node / pricing / tools" @@ -43,32 +46,36 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getbandwidthprices.md` for examples and detailed behavior." "operationId": "wallet_getbandwidthprices_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getbandwidthprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getbandwidthprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBandwidthPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getbandwidthprices" - "x-solidity-servlet": "GetBandwidthPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getbandwidthprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBandwidthPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBandwidthPricesServlet.java" diff --git a/docs/api/specs/http/getblock.yaml b/docs/api/specs/http/getblock.yaml index 6390e265..2ac1b400 100644 --- a/docs/api/specs/http/getblock.yaml +++ b/docs/api/specs/http/getblock.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getblock": "get": "tags": @@ -7,39 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." "operationId": "wallet_getblock_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblock" - "x-solidity-servlet": "GetBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockOnSolidityServlet" "parameters": - "name": "id_or_num" @@ -47,6 +41,7 @@ "required": false "schema": "type": "string" + "description": "Block id or block number." "x-source-derived": true - "name": "detail" @@ -54,6 +49,7 @@ "required": false "schema": "type": "boolean" + "description": "Whether to return detailed block information." "x-source-derived": true - "name": "visible" @@ -61,7 +57,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockServlet.java" + - "protocol/src/main/protos/api/api.proto#BlockReq" "post": "tags": - "Block / transaction query" @@ -69,52 +70,41 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblock.md` for examples and detailed behavior." "operationId": "wallet_getblock_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblock" - "x-solidity-servlet": "GetBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id_or_num": - "type": "string" - "detail": - "type": "boolean" - "x-proto-message": "BlockReq" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BlockReq" + "$ref": "#/components/schemas/BlockReqRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockServlet.java" + - "protocol/src/main/protos/api/api.proto#BlockReq" diff --git a/docs/api/specs/http/getblockbalance.yaml b/docs/api/specs/http/getblockbalance.yaml index 379f10b4..5d4429be 100644 --- a/docs/api/specs/http/getblockbalance.yaml +++ b/docs/api/specs/http/getblockbalance.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getblockbalance": "post": "tags": @@ -7,33 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbalance.md` for examples and detailed behavior." "operationId": "wallet_getblockbalance_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block_identifier": - "type": "object" - "additionalProperties": true - "timestamp": - "type": "integer" - "transaction_balance_trace": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockBalanceTrace" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-java-response-type": "org.tron.protos.contract.BalanceContract.BlockBalanceTrace" - "x-java-response": "BlockBalanceTrace rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockBalanceTrace" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -45,16 +33,8 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "hash": - "type": "string" - "number": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "BlockIdentifier" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "BlockIdentifier" + "$ref": "#/components/schemas/BlockIdentifierRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockBalanceServlet.java" + - "protocol/src/main/protos/core/contract/balance_contract.proto#BlockIdentifier" diff --git a/docs/api/specs/http/getblockbyid.yaml b/docs/api/specs/http/getblockbyid.yaml index 5409ff44..9cf7a631 100644 --- a/docs/api/specs/http/getblockbyid.yaml +++ b/docs/api/specs/http/getblockbyid.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getblockbyid": "get": "tags": @@ -7,46 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." "operationId": "wallet_getblockbyid_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbyid" - "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -54,7 +49,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Block / transaction query" @@ -62,52 +62,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbyid.md` for examples and detailed behavior." "operationId": "wallet_getblockbyid_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbyid" - "x-solidity-servlet": "GetBlockByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/getblockbylatestnum.yaml b/docs/api/specs/http/getblockbylatestnum.yaml index e4b105c8..3a45c627 100644 --- a/docs/api/specs/http/getblockbylatestnum.yaml +++ b/docs/api/specs/http/getblockbylatestnum.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getblockbylatestnum": "get": "tags": @@ -7,43 +6,43 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." "operationId": "wallet_getblockbylatestnum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylatestnum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLatestNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" - "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylatestnum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLatestNumOnSolidityServlet" "parameters": - "name": "num" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true - "name": "visible" @@ -51,6 +50,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -59,49 +59,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylatestnum.md` for examples and detailed behavior." "operationId": "wallet_getblockbylatestnum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylatestnum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylatestnum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLatestNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylatestnum" - "x-solidity-servlet": "GetBlockByLatestNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylatestnum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLatestNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "allOf": + - + "$ref": "#/components/schemas/NumberMessageRequest" + "required": + - "num" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByLatestNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" diff --git a/docs/api/specs/http/getblockbylimitnext.yaml b/docs/api/specs/http/getblockbylimitnext.yaml index 37f6f6b6..5564b7d7 100644 --- a/docs/api/specs/http/getblockbylimitnext.yaml +++ b/docs/api/specs/http/getblockbylimitnext.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getblockbylimitnext": "get": "tags": @@ -7,50 +6,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." "operationId": "wallet_getblockbylimitnext_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylimitnext.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLimitNextServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" - "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylimitnext" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLimitNextOnSolidityServlet" "parameters": - "name": "startNum" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Starting block number for the query range." "x-source-derived": true - "name": "endNum" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Ending block number for the query range." "x-source-derived": true - "name": "visible" @@ -58,6 +59,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -66,51 +68,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbylimitnext.md` for examples and detailed behavior." "operationId": "wallet_getblockbylimitnext_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbylimitnext.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbylimitnext.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "block": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "BlockList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.BlockList" - "x-java-response": "BlockList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/BlockList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByLimitNextServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbylimitnext" - "x-solidity-servlet": "GetBlockByLimitNextOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbylimitnext" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByLimitNextOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "startNum": - "type": "integer" - "endNum": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "BlockLimit" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BlockLimit" + "allOf": + - + "$ref": "#/components/schemas/BlockLimitRequest" + "required": + - "endNum" + - "startNum" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByLimitNextServlet.java" + - "protocol/src/main/protos/api/api.proto#BlockLimit" diff --git a/docs/api/specs/http/getblockbynum.yaml b/docs/api/specs/http/getblockbynum.yaml index 06b68090..5ce76826 100644 --- a/docs/api/specs/http/getblockbynum.yaml +++ b/docs/api/specs/http/getblockbynum.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getblockbynum": "get": "tags": @@ -7,39 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." "operationId": "wallet_getblockbynum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbynum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbynum" - "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbynum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByNumOnSolidityServlet" "parameters": - "name": "num" @@ -47,6 +41,8 @@ "required": false "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true - "name": "visible" @@ -54,7 +50,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "post": "tags": - "Block / transaction query" @@ -62,52 +63,41 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getblockbynum.md` for examples and detailed behavior." "operationId": "wallet_getblockbynum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getblockbynum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getblockbynum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBlockByNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getblockbynum" - "x-solidity-servlet": "GetBlockByNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getblockbynum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBlockByNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "$ref": "#/components/schemas/NumberMessageRequest" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBlockByNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" diff --git a/docs/api/specs/http/getburntrx.yaml b/docs/api/specs/http/getburntrx.yaml index 75fbe741..1dc808ee 100644 --- a/docs/api/specs/http/getburntrx.yaml +++ b/docs/api/specs/http/getburntrx.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getburntrx": "get": "tags": @@ -7,31 +6,48 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." "operationId": "wallet_getburntrx_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getburntrx.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getburntrx.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "burnTrxAmount": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "burnTrxAmount": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetburntrxGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBurnTrxServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getburntrx" - "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getburntrx" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBurnTrxOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBurnTrxServlet.java" "post": "tags": - "Node / pricing / tools" @@ -39,28 +55,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getburntrx.md` for examples and detailed behavior." "operationId": "wallet_getburntrx_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getburntrx.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getburntrx.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "burnTrxAmount": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "burnTrxAmount": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetburntrxPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetBurnTrxServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getburntrx" - "x-solidity-servlet": "GetBurnTrxOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getburntrx" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetBurnTrxOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetBurnTrxServlet.java" diff --git a/docs/api/specs/http/getcandelegatedmaxsize.yaml b/docs/api/specs/http/getcandelegatedmaxsize.yaml index 68e96919..f699b63e 100644 --- a/docs/api/specs/http/getcandelegatedmaxsize.yaml +++ b/docs/api/specs/http/getcandelegatedmaxsize.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getcandelegatedmaxsize": "get": "tags": @@ -7,33 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." "operationId": "wallet_getcandelegatedmaxsize_get" "externalDocs": - "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcandelegatedmaxsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "max_size": - "type": "integer" - "x-proto-message": "CanDelegatedMaxSizeResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" - "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanDelegatedMaxSizeResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanDelegatedMaxSizeServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" - "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcandelegatedmaxsize" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" "parameters": - "name": "type" @@ -41,13 +41,16 @@ "required": false "schema": "type": "integer" + "format": "int32" + "description": "Account, contract, or resource type." "x-source-derived": true - "name": "owner_address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Address of the account that owns or initiates the request." "x-source-derived": true - "name": "visible" @@ -55,6 +58,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -63,48 +67,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcandelegatedmaxsize.md` for examples and detailed behavior." "operationId": "wallet_getcandelegatedmaxsize_post" "externalDocs": - "url": "docs/api/http/stake-v2/getcandelegatedmaxsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcandelegatedmaxsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "max_size": - "type": "integer" - "x-proto-message": "CanDelegatedMaxSizeResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanDelegatedMaxSizeResponseMessage" - "x-java-response": "CanDelegatedMaxSizeResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanDelegatedMaxSizeResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanDelegatedMaxSizeServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcandelegatedmaxsize" - "x-solidity-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcandelegatedmaxsize" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanDelegatedMaxSizeOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "type": - "type": "integer" - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "CanDelegatedMaxSizeRequestMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "CanDelegatedMaxSizeRequestMessage" + "allOf": + - + "$ref": "#/components/schemas/CanDelegatedMaxSizeRequestMessageRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetCanDelegatedMaxSizeServlet.java" + - "protocol/src/main/protos/api/api.proto#CanDelegatedMaxSizeRequestMessage" diff --git a/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml b/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml index cd90774e..347a208c 100644 --- a/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml +++ b/docs/api/specs/http/getcanwithdrawunfreezeamount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getcanwithdrawunfreezeamount": "get": "tags": @@ -7,40 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." "operationId": "wallet_getcanwithdrawunfreezeamount_get" "externalDocs": - "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "amount": - "type": "integer" - "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" - "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanWithdrawUnfreezeAmountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" - "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcanwithdrawunfreezeamount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" "parameters": - "name": "owner_address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Address of the account that owns or initiates the request." "x-source-derived": true - "name": "timestamp" @@ -48,6 +49,8 @@ "required": false "schema": "type": "integer" + "format": "int64" + "description": "Timestamp in milliseconds." "x-source-derived": true - "name": "visible" @@ -55,6 +58,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -63,48 +67,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md` for examples and detailed behavior." "operationId": "wallet_getcanwithdrawunfreezeamount_post" "externalDocs": - "url": "docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getcanwithdrawunfreezeamount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "amount": - "type": "integer" - "x-proto-message": "CanWithdrawUnfreezeAmountResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.CanWithdrawUnfreezeAmountResponseMessage" - "x-java-response": "CanWithdrawUnfreezeAmountResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/CanWithdrawUnfreezeAmountResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetCanWithdrawUnfreezeAmountServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getcanwithdrawunfreezeamount" - "x-solidity-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getcanwithdrawunfreezeamount" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetCanWithdrawUnfreezeAmountOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "timestamp": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "CanWithdrawUnfreezeAmountRequestMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "CanWithdrawUnfreezeAmountRequestMessage" + "allOf": + - + "$ref": "#/components/schemas/CanWithdrawUnfreezeAmountRequestMessageRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetCanWithdrawUnfreezeAmountServlet.java" + - "protocol/src/main/protos/api/api.proto#CanWithdrawUnfreezeAmountRequestMessage" diff --git a/docs/api/specs/http/getchainparameters.yaml b/docs/api/specs/http/getchainparameters.yaml index 22d931c5..79f7e0ad 100644 --- a/docs/api/specs/http/getchainparameters.yaml +++ b/docs/api/specs/http/getchainparameters.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getchainparameters": "get": "tags": @@ -7,27 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." "operationId": "wallet_getchainparameters_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getchainparameters.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "chainParameter": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ChainParameters" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "ChainParameters rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ChainParameters" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -41,7 +35,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetChainParametersServlet.java" "post": "tags": - "Witness / governance" @@ -49,30 +47,28 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getchainparameters.md` for examples and detailed behavior." "operationId": "wallet_getchainparameters_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getchainparameters.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getchainparameters.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "chainParameter": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ChainParameters" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "ChainParameters rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ChainParameters" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetChainParametersServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetChainParametersServlet.java" diff --git a/docs/api/specs/http/getcontract.yaml b/docs/api/specs/http/getcontract.yaml index 50ac3c26..4cd241ac 100644 --- a/docs/api/specs/http/getcontract.yaml +++ b/docs/api/specs/http/getcontract.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getcontract": "get": "tags": @@ -7,46 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." "operationId": "wallet_getcontract_get" "externalDocs": - "url": "docs/api/http/smart-contract/getcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "origin_address": - "type": "string" - "contract_address": - "type": "string" - "abi": - "type": "object" - "additionalProperties": true - "bytecode": - "type": "string" - "call_value": - "type": "integer" - "consume_user_resource_percent": - "type": "integer" - "name": - "type": "string" - "origin_energy_limit": - "type": "integer" - "code_hash": - "type": "string" - "trx_hash": - "type": "string" - "version": - "type": "integer" - "x-proto-message": "SmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" - "x-java-response": "SmartContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -57,9 +32,10 @@ - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -67,7 +43,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Smart contract" @@ -75,46 +56,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontract.md` for examples and detailed behavior." "operationId": "wallet_getcontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/getcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "origin_address": - "type": "string" - "contract_address": - "type": "string" - "abi": - "type": "object" - "additionalProperties": true - "bytecode": - "type": "string" - "call_value": - "type": "integer" - "consume_user_resource_percent": - "type": "integer" - "name": - "type": "string" - "origin_energy_limit": - "type": "integer" - "code_hash": - "type": "string" - "trx_hash": - "type": "string" - "version": - "type": "integer" - "x-proto-message": "SmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContract" - "x-java-response": "SmartContract rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContract" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -126,14 +83,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/getcontractinfo.yaml b/docs/api/specs/http/getcontractinfo.yaml index e360e0be..92c7b1c8 100644 --- a/docs/api/specs/http/getcontractinfo.yaml +++ b/docs/api/specs/http/getcontractinfo.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getcontractinfo": "get": "tags": @@ -7,31 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." "operationId": "wallet_getcontractinfo_get" "externalDocs": - "url": "docs/api/http/smart-contract/getcontractinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontractinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "smart_contract": - "type": "object" - "additionalProperties": true - "runtimecode": - "type": "string" - "contract_state": - "type": "object" - "additionalProperties": true - "x-proto-message": "SmartContractDataWrapper" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" - "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContractDataWrapper" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -42,9 +32,10 @@ - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -52,7 +43,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractInfoServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Smart contract" @@ -60,31 +56,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/getcontractinfo.md` for examples and detailed behavior." "operationId": "wallet_getcontractinfo_post" "externalDocs": - "url": "docs/api/http/smart-contract/getcontractinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/getcontractinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "smart_contract": - "type": "object" - "additionalProperties": true - "runtimecode": - "type": "string" - "contract_state": - "type": "object" - "additionalProperties": true - "x-proto-message": "SmartContractDataWrapper" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-java-response-type": "org.tron.protos.contract.SmartContractOuterClass.SmartContractDataWrapper" - "x-java-response": "SmartContractDataWrapper rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/SmartContractDataWrapper" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -96,14 +83,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetContractInfoServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/getdelegatedresource.yaml b/docs/api/specs/http/getdelegatedresource.yaml index 3f90a849..34b17c58 100644 --- a/docs/api/specs/http/getdelegatedresource.yaml +++ b/docs/api/specs/http/getdelegatedresource.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getdelegatedresource": "get": "tags": @@ -7,50 +6,50 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresource_get" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" - "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresource" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceOnSolidityServlet" "parameters": - "name": "fromAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Source account address." "x-source-derived": true - "name": "toAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Destination account address." "x-source-derived": true - "name": "visible" @@ -58,6 +57,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -66,51 +66,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresource.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresource_post" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresource" - "x-solidity-servlet": "GetDelegatedResourceOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresource" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "fromAddress": - "type": "string" - "toAddress": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "DelegatedResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "allOf": + - + "$ref": "#/components/schemas/DelegatedResourceMessageRequest" + "required": + - "fromAddress" + - "toAddress" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceServlet.java" + - "protocol/src/main/protos/api/api.proto#DelegatedResourceMessage" diff --git a/docs/api/specs/http/getdelegatedresourceaccountindex.yaml b/docs/api/specs/http/getdelegatedresourceaccountindex.yaml index 8ccb80b9..fe43d570 100644 --- a/docs/api/specs/http/getdelegatedresourceaccountindex.yaml +++ b/docs/api/specs/http/getdelegatedresourceaccountindex.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getdelegatedresourceaccountindex": "get": "tags": @@ -7,50 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindex_get" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindex" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -58,6 +49,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -66,56 +58,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/getdelegatedresourceaccountindex.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindex_post" "externalDocs": - "url": "docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/getdelegatedresourceaccountindex.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindex" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindex" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceAccountIndexServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml b/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml index 88bc32e6..0cbb11b3 100644 --- a/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml +++ b/docs/api/specs/http/getdelegatedresourceaccountindexv2.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getdelegatedresourceaccountindexv2": "get": "tags": @@ -7,50 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindexv2_get" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindexv2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -58,6 +49,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -66,56 +58,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourceaccountindexv2_post" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourceaccountindexv2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account": - "type": "string" - "fromAccounts": - "type": "array" - "items": - "type": "string" - "toAccounts": - "type": "array" - "items": - "type": "string" - "timestamp": - "type": "integer" - "x-proto-message": "DelegatedResourceAccountIndex" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.DelegatedResourceAccountIndex" - "x-java-response": "DelegatedResourceAccountIndex rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceAccountIndex" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceAccountIndexV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourceaccountindexv2" - "x-solidity-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourceaccountindexv2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceAccountIndexV2OnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceAccountIndexV2Servlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/getdelegatedresourcev2.yaml b/docs/api/specs/http/getdelegatedresourcev2.yaml index ae307558..8bb541e3 100644 --- a/docs/api/specs/http/getdelegatedresourcev2.yaml +++ b/docs/api/specs/http/getdelegatedresourcev2.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getdelegatedresourcev2": "get": "tags": @@ -7,50 +6,50 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourcev2_get" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourcev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" - "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourcev2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceV2OnSolidityServlet" "parameters": - "name": "fromAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Source account address." "x-source-derived": true - "name": "toAddress" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Destination account address." "x-source-derived": true - "name": "visible" @@ -58,6 +57,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -66,51 +66,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/getdelegatedresourcev2.md` for examples and detailed behavior." "operationId": "wallet_getdelegatedresourcev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/getdelegatedresourcev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/getdelegatedresourcev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "delegatedResource": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "DelegatedResourceList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.DelegatedResourceList" - "x-java-response": "DelegatedResourceList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/DelegatedResourceList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetDelegatedResourceV2Servlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getdelegatedresourcev2" - "x-solidity-servlet": "GetDelegatedResourceV2OnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getdelegatedresourcev2" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetDelegatedResourceV2OnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "fromAddress": - "type": "string" - "toAddress": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "DelegatedResourceMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.DelegatedResourceMessage" + "allOf": + - + "$ref": "#/components/schemas/DelegatedResourceMessageRequest" + "required": + - "fromAddress" + - "toAddress" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetDelegatedResourceV2Servlet.java" + - "protocol/src/main/protos/api/api.proto#DelegatedResourceMessage" diff --git a/docs/api/specs/http/getenergyprices.yaml b/docs/api/specs/http/getenergyprices.yaml index b51ac2aa..dcce6fb9 100644 --- a/docs/api/specs/http/getenergyprices.yaml +++ b/docs/api/specs/http/getenergyprices.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getenergyprices": "get": "tags": @@ -7,35 +6,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." "operationId": "wallet_getenergyprices_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getenergyprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getenergyprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetEnergyPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getenergyprices" - "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getenergyprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetEnergyPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetEnergyPricesServlet.java" "post": "tags": - "Node / pricing / tools" @@ -43,32 +46,36 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getenergyprices.md` for examples and detailed behavior." "operationId": "wallet_getenergyprices_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getenergyprices.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getenergyprices.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "prices": - "type": "string" - "x-proto-message": "PricesResponseMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.PricesResponseMessage" - "x-java-response": "PricesResponseMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/PricesResponseMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetEnergyPricesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getenergyprices" - "x-solidity-servlet": "GetEnergyPricesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getenergyprices" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetEnergyPricesOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetEnergyPricesServlet.java" diff --git a/docs/api/specs/http/getnextmaintenancetime.yaml b/docs/api/specs/http/getnextmaintenancetime.yaml index 58d42e44..24608c86 100644 --- a/docs/api/specs/http/getnextmaintenancetime.yaml +++ b/docs/api/specs/http/getnextmaintenancetime.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getnextmaintenancetime": "get": "tags": @@ -7,25 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." "operationId": "wallet_getnextmaintenancetime_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getnextmaintenancetime.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" - "x-java-response": "NumberMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NumberMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -39,7 +35,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNextMaintenanceTimeServlet.java" "post": "tags": - "Witness / governance" @@ -47,25 +47,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getnextmaintenancetime.md` for examples and detailed behavior." "operationId": "wallet_getnextmaintenancetime_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getnextmaintenancetime.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getnextmaintenancetime.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NumberMessage" - "x-java-response": "NumberMessage rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NumberMessage" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -79,4 +76,8 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNextMaintenanceTimeServlet.java" diff --git a/docs/api/specs/http/getnodeinfo.yaml b/docs/api/specs/http/getnodeinfo.yaml index eeb26d33..ec7bf183 100644 --- a/docs/api/specs/http/getnodeinfo.yaml +++ b/docs/api/specs/http/getnodeinfo.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getnodeinfo": "get": "tags": @@ -7,59 +6,39 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." "operationId": "wallet_getnodeinfo_get" "externalDocs": - "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getnodeinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "beginSyncNum": - "type": "integer" - "block": - "type": "string" - "solidityBlock": - "type": "string" - "currentConnectCount": - "type": "integer" - "activeConnectCount": - "type": "integer" - "passiveConnectCount": - "type": "integer" - "totalFlow": - "type": "integer" - "peerList": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "configNodeInfo": - "type": "object" - "additionalProperties": true - "machineInfo": - "type": "object" - "additionalProperties": true - "cheatWitnessInfoMap": - "type": "object" - "additionalProperties": true - "x-java-response-type": "org.tron.common.entity.NodeInfo" - "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNodeInfoServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnodeinfo" - "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnodeinfo" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNodeInfoOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNodeInfoServlet.java" "post": "tags": - "Node / pricing / tools" @@ -67,56 +46,36 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/getnodeinfo.md` for examples and detailed behavior." "operationId": "wallet_getnodeinfo_post" "externalDocs": - "url": "docs/api/http/node-and-tools/getnodeinfo.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/getnodeinfo.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "beginSyncNum": - "type": "integer" - "block": - "type": "string" - "solidityBlock": - "type": "string" - "currentConnectCount": - "type": "integer" - "activeConnectCount": - "type": "integer" - "passiveConnectCount": - "type": "integer" - "totalFlow": - "type": "integer" - "peerList": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "configNodeInfo": - "type": "object" - "additionalProperties": true - "machineInfo": - "type": "object" - "additionalProperties": true - "cheatWitnessInfoMap": - "type": "object" - "additionalProperties": true - "x-java-response-type": "org.tron.common.entity.NodeInfo" - "x-java-response-source": "common/src/main/java/org/tron/common/entity/NodeInfo.java" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNodeInfoServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnodeinfo" - "x-solidity-servlet": "GetNodeInfoOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnodeinfo" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNodeInfoOnSolidityServlet" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNodeInfoServlet.java" diff --git a/docs/api/specs/http/getnowblock.yaml b/docs/api/specs/http/getnowblock.yaml index 56bbaa0e..511901ff 100644 --- a/docs/api/specs/http/getnowblock.yaml +++ b/docs/api/specs/http/getnowblock.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getnowblock": "get": "tags": @@ -7,39 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." "operationId": "wallet_getnowblock_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getnowblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNowBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnowblock" - "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnowblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNowBlockOnSolidityServlet" "parameters": - "name": "visible" @@ -47,7 +41,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNowBlockServlet.java" "post": "tags": - "Block / transaction query" @@ -55,39 +53,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getnowblock.md` for examples and detailed behavior." "operationId": "wallet_getnowblock_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getnowblock.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getnowblock.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "block_header": - "type": "object" - "additionalProperties": true - "x-proto-message": "Block" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Block" - "x-java-response": "Block rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Block" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetNowBlockServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getnowblock" - "x-solidity-servlet": "GetNowBlockOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getnowblock" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetNowBlockOnSolidityServlet" "parameters": - "name": "visible" @@ -95,4 +88,8 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetNowBlockServlet.java" diff --git a/docs/api/specs/http/getpaginatedassetissuelist.yaml b/docs/api/specs/http/getpaginatedassetissuelist.yaml index afdadd61..82460eb8 100644 --- a/docs/api/specs/http/getpaginatedassetissuelist.yaml +++ b/docs/api/specs/http/getpaginatedassetissuelist.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getpaginatedassetissuelist": "get": "tags": @@ -7,50 +6,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedassetissuelist_get" "externalDocs": - "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getpaginatedassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" - "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatedassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" "parameters": - "name": "offset" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." "x-source-derived": true - "name": "limit" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." "x-source-derived": true - "name": "visible" @@ -58,7 +59,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedAssetIssueListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "post": "tags": - "TRC10 asset" @@ -66,51 +72,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/getpaginatedassetissuelist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedassetissuelist_post" "externalDocs": - "url": "docs/api/http/asset/getpaginatedassetissuelist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/getpaginatedassetissuelist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "assetIssue": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "AssetIssueList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.AssetIssueList" - "x-java-response": "AssetIssueList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/AssetIssueList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedAssetIssueListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatedassetissuelist" - "x-solidity-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatedassetissuelist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedAssetIssueListOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "offset": - "type": "integer" - "limit": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "PaginatedMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "allOf": + - + "$ref": "#/components/schemas/PaginatedMessageRequest" + "required": + - "limit" + - "offset" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedAssetIssueListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" diff --git a/docs/api/specs/http/getpaginatednowwitnesslist.yaml b/docs/api/specs/http/getpaginatednowwitnesslist.yaml index bf29e006..03b3cbe0 100644 --- a/docs/api/specs/http/getpaginatednowwitnesslist.yaml +++ b/docs/api/specs/http/getpaginatednowwitnesslist.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getpaginatednowwitnesslist": "get": "tags": @@ -7,50 +6,52 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatednowwitnesslist_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedNowWitnessListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" - "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatednowwitnesslist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" "parameters": - "name": "offset" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." "x-source-derived": true - "name": "limit" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." "x-source-derived": true - "name": "visible" @@ -58,7 +59,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedNowWitnessListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "post": "tags": - "Witness / governance" @@ -66,51 +72,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatednowwitnesslist_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatednowwitnesslist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetPaginatedNowWitnessListServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/getpaginatednowwitnesslist" - "x-solidity-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/getpaginatednowwitnesslist" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetPaginatedNowWitnessListOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "offset": - "type": "integer" - "limit": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "PaginatedMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "PaginatedMessage" + "allOf": + - + "$ref": "#/components/schemas/PaginatedMessageRequest" + "required": + - "limit" + - "offset" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedNowWitnessListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" diff --git a/docs/api/specs/http/getpaginatedproposallist.yaml b/docs/api/specs/http/getpaginatedproposallist.yaml index 51834e08..595f90ca 100644 --- a/docs/api/specs/http/getpaginatedproposallist.yaml +++ b/docs/api/specs/http/getpaginatedproposallist.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getpaginatedproposallist": "get": "tags": @@ -7,28 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedproposallist_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatedproposallist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -39,16 +32,20 @@ - "name": "offset" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Zero-based pagination offset." "x-source-derived": true - "name": "limit" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Maximum number of items to return." "x-source-derived": true - "name": "visible" @@ -56,7 +53,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedProposalListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" "post": "tags": - "Witness / governance" @@ -64,28 +66,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getpaginatedproposallist.md` for examples and detailed behavior." "operationId": "wallet_getpaginatedproposallist_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getpaginatedproposallist.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getpaginatedproposallist.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -97,16 +93,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "offset": - "type": "integer" - "limit": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "PaginatedMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.PaginatedMessage" + "allOf": + - + "$ref": "#/components/schemas/PaginatedMessageRequest" + "required": + - "limit" + - "offset" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPaginatedProposalListServlet.java" + - "protocol/src/main/protos/api/api.proto#PaginatedMessage" diff --git a/docs/api/specs/http/getpendingsize.yaml b/docs/api/specs/http/getpendingsize.yaml index bbc33ba8..fd26c780 100644 --- a/docs/api/specs/http/getpendingsize.yaml +++ b/docs/api/specs/http/getpendingsize.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getpendingsize": "get": "tags": @@ -7,21 +6,31 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." "operationId": "wallet_getpendingsize_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getpendingsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "pendingSize": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "pendingSize": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetpendingsizeGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -30,6 +39,9 @@ "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPendingSizeServlet.java" "post": "tags": - "Block / transaction query" @@ -37,21 +49,31 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/getpendingsize.md` for examples and detailed behavior." "operationId": "wallet_getpendingsize_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/getpendingsize.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/getpendingsize.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "pendingSize": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "pendingSize": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GetpendingsizePostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -60,3 +82,6 @@ "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" "parameters": [] + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetPendingSizeServlet.java" diff --git a/docs/api/specs/http/getproposalbyid.yaml b/docs/api/specs/http/getproposalbyid.yaml index e9a2e2e0..a97d7032 100644 --- a/docs/api/specs/http/getproposalbyid.yaml +++ b/docs/api/specs/http/getproposalbyid.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getproposalbyid": "get": "tags": @@ -7,38 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." "operationId": "wallet_getproposalbyid_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getproposalbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposal_id": - "type": "integer" - "proposer_address": - "type": "string" - "expiration_time": - "type": "integer" - "create_time": - "type": "integer" - "approvals": - "type": "array" - "items": - "type": "string" - "state": - "type": "object" - "additionalProperties": true - "x-proto-message": "Proposal" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Proposal" - "x-java-response": "Proposal rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Proposal" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -49,9 +32,11 @@ - "name": "id" "in": "query" - "required": false + "required": true "schema": - "type": "string" + "type": "integer" + "format": "int64" + "description": "Proposal id." "x-source-derived": true - "name": "visible" @@ -59,7 +44,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetProposalByIdServlet.java" "post": "tags": - "Witness / governance" @@ -67,38 +56,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/getproposalbyid.md` for examples and detailed behavior." "operationId": "wallet_getproposalbyid_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/getproposalbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/getproposalbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposal_id": - "type": "integer" - "proposer_address": - "type": "string" - "expiration_time": - "type": "integer" - "create_time": - "type": "integer" - "approvals": - "type": "array" - "items": - "type": "string" - "state": - "type": "object" - "additionalProperties": true - "x-proto-message": "Proposal" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Proposal" - "x-java-response": "Proposal rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Proposal" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -111,10 +84,19 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "id": - "type": "string" + "type": "integer" + "description": "Proposal id." + "format": "int64" "visible": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-shape": "servlet-json-fields" + "required": + - "id" + "x-java-unknown-fields": "ignored-by-jsonformat" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetProposalByIdServlet.java" diff --git a/docs/api/specs/http/getsignweight.yaml b/docs/api/specs/http/getsignweight.yaml index a147ecc9..7fc91913 100644 --- a/docs/api/specs/http/getsignweight.yaml +++ b/docs/api/specs/http/getsignweight.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/getsignweight": "post": "tags": @@ -7,53 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/tx-build-and-broadcast/getsignweight.md` for examples and detailed behavior." "operationId": "wallet_getsignweight_post" "externalDocs": - "url": "docs/api/http/tx-build-and-broadcast/getsignweight.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/tx-build-and-broadcast/getsignweight.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "object" - "additionalProperties": true - "approved_list": - "type": "array" - "items": - "type": "string" - "current_weight": - "type": "integer" - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "permission": - "type": "object" - "additionalProperties": true - "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionSignWeight" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -65,26 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "oneOf": - - - "required": - - "raw_data" + "allOf": - - "required": - - "raw_data_hex" - "x-source-shape": "transaction-json" - "x-java-request-type": "org.tron.protos.Protocol.Transaction" + "$ref": "#/components/schemas/TransactionRequest" + "required": + - "raw_data" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionSignWeightServlet.java" + - "framework/src/main/java/org/tron/core/services/http/Util.java" + - "protocol/src/main/protos/core/Tron.proto#Transaction" diff --git a/docs/api/specs/http/gettransactionbyid.yaml b/docs/api/specs/http/gettransactionbyid.yaml index fa4d7e10..4432b9e8 100644 --- a/docs/api/specs/http/gettransactionbyid.yaml +++ b/docs/api/specs/http/gettransactionbyid.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/gettransactionbyid": "get": "tags": @@ -7,50 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactionbyid_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "signature": - "type": "array" - "items": - "type": "string" - "ret": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "Transaction" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Transaction" - "x-java-response": "Transaction rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" - "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactionbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -58,7 +49,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Block / transaction query" @@ -66,56 +62,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionbyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactionbyid_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionbyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionbyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "raw_data": - "type": "object" - "additionalProperties": true - "signature": - "type": "array" - "items": - "type": "string" - "ret": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "Transaction" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response-type": "org.tron.protos.Protocol.Transaction" - "x-java-response": "Transaction rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactionbyid" - "x-solidity-servlet": "GetTransactionByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactionbyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/gettransactioncountbyblocknum.yaml b/docs/api/specs/http/gettransactioncountbyblocknum.yaml index b1bfac8d..81719aa0 100644 --- a/docs/api/specs/http/gettransactioncountbyblocknum.yaml +++ b/docs/api/specs/http/gettransactioncountbyblocknum.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/gettransactioncountbyblocknum": "get": "tags": @@ -7,37 +6,57 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioncountbyblocknum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "count": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GettransactioncountbyblocknumGetResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionCountByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" - "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioncountbyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" "parameters": - "name": "num" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionCountByBlockNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "post": "tags": - "Block / transaction query" @@ -45,42 +64,50 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioncountbyblocknum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioncountbyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "count": - "type": "integer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "object" + "additionalProperties": false + "properties": + "count": + "type": "integer" + "format": "int64" + "not": + "required": + - "Error" + "title": "GettransactioncountbyblocknumPostResultObject1" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionCountByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioncountbyblocknum" - "x-solidity-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioncountbyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionCountByBlockNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "allOf": + - + "$ref": "#/components/schemas/NumberMessageRequest" + "required": + - "num" diff --git a/docs/api/specs/http/gettransactionfrompending.yaml b/docs/api/specs/http/gettransactionfrompending.yaml index f3126341..97b32702 100644 --- a/docs/api/specs/http/gettransactionfrompending.yaml +++ b/docs/api/specs/http/gettransactionfrompending.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/gettransactionfrompending": "get": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionfrompending_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -47,9 +32,10 @@ - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -57,6 +43,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -65,36 +52,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionfrompending_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -106,14 +79,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionFromPendingServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/gettransactioninfobyblocknum.yaml b/docs/api/specs/http/gettransactioninfobyblocknum.yaml index a8b6c443..d56ca92d 100644 --- a/docs/api/specs/http/gettransactioninfobyblocknum.yaml +++ b/docs/api/specs/http/gettransactioninfobyblocknum.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/gettransactioninfobyblocknum": "get": "tags": @@ -7,99 +6,53 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyblocknum_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionInfo" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "title": "GettransactioninfobyblocknumGetResultArray1" + - + "type": "object" + "additionalProperties": false + "maxProperties": 0 + "x-java-response": "Empty object returned when num is not positive" + "title": "GettransactioninfobyblocknumGetResultEmpty2" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" - "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" "parameters": - "name": "num" "in": "query" - "required": false + "required": true "schema": "type": "integer" + "format": "int64" + "description": "Number of items or blocks to return." "x-source-derived": true - "name": "visible" @@ -107,7 +60,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByBlockNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" "post": "tags": - "Block / transaction query" @@ -115,105 +73,55 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyblocknum_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyblocknum.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "type": "array" + "items": + "$ref": "#/components/schemas/TransactionInfo" + "x-java-response": "Array of TransactionInfo rendered by printTransactionInfoList" + "title": "GettransactioninfobyblocknumPostResultArray1" + - + "type": "object" + "additionalProperties": false + "maxProperties": 0 + "x-java-response": "Empty object returned when num is not positive" + "title": "GettransactioninfobyblocknumPostResultEmpty2" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByBlockNumServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyblocknum" - "x-solidity-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyblocknum" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByBlockNumOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "num": - "type": "integer" - "visible": - "type": "boolean" - "x-proto-message": "NumberMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.NumberMessage" + "allOf": + - + "$ref": "#/components/schemas/NumberMessageRequest" + "required": + - "num" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByBlockNumServlet.java" + - "protocol/src/main/protos/api/api.proto#NumberMessage" diff --git a/docs/api/specs/http/gettransactioninfobyid.yaml b/docs/api/specs/http/gettransactioninfobyid.yaml index 5d48d9eb..e26de685 100644 --- a/docs/api/specs/http/gettransactioninfobyid.yaml +++ b/docs/api/specs/http/gettransactioninfobyid.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/gettransactioninfobyid": "get": "tags": @@ -7,96 +6,42 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyid_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" - "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByIdOnSolidityServlet" "parameters": - "name": "value" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Hex string, amount, or value field accepted by this endpoint." "x-source-derived": true - "name": "visible" @@ -104,7 +49,12 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" "post": "tags": - "Block / transaction query" @@ -112,102 +62,45 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactioninfobyid.md` for examples and detailed behavior." "operationId": "wallet_gettransactioninfobyid_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactioninfobyid.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactioninfobyid.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "id": - "type": "string" - "fee": - "type": "integer" - "blockNumber": - "type": "integer" - "blockTimeStamp": - "type": "integer" - "contractResult": - "type": "array" - "items": - "type": "string" - "contract_address": - "type": "string" - "receipt": - "type": "object" - "additionalProperties": true - "log": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "result": - "type": "object" - "additionalProperties": true - "resMessage": - "type": "string" - "assetIssueID": - "type": "string" - "withdraw_amount": - "type": "integer" - "unfreeze_amount": - "type": "integer" - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "exchange_received_amount": - "type": "integer" - "exchange_inject_another_amount": - "type": "integer" - "exchange_withdraw_another_amount": - "type": "integer" - "exchange_id": - "type": "integer" - "shielded_transaction_fee": - "type": "integer" - "orderId": - "type": "string" - "orderDetails": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "packingFee": - "type": "integer" - "withdraw_expire_amount": - "type": "integer" - "x-proto-message": "TransactionInfo" - "x-proto-file": "protocol/src/main/protos/core/Tron.proto" - "x-java-response": "TransactionInfo rendered through convertLogAddressToTronAddress" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionInfo" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "GetTransactionInfoByIdServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/gettransactioninfobyid" - "x-solidity-servlet": "GetTransactionInfoByIdOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/gettransactioninfobyid" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "GetTransactionInfoByIdOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "value": - "type": "string" - "visible": - "type": "boolean" - "x-proto-message": "BytesMessage" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.api.GrpcAPI.BytesMessage" + "allOf": + - + "$ref": "#/components/schemas/BytesMessageRequest" + "required": + - "value" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionInfoByIdServlet.java" + - "protocol/src/main/protos/api/api.proto#BytesMessage" diff --git a/docs/api/specs/http/gettransactionlistfrompending.yaml b/docs/api/specs/http/gettransactionlistfrompending.yaml index c40596e0..5edbaa63 100644 --- a/docs/api/specs/http/gettransactionlistfrompending.yaml +++ b/docs/api/specs/http/gettransactionlistfrompending.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/gettransactionlistfrompending": "get": "tags": @@ -7,27 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionlistfrompending_get" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txId": - "type": "array" - "items": - "type": "string" - "x-proto-message": "TransactionIdList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" - "x-java-response": "TransactionIdList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionIdList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -41,6 +35,7 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true "post": "tags": @@ -49,27 +44,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/block-and-tx-query/gettransactionlistfrompending.md` for examples and detailed behavior." "operationId": "wallet_gettransactionlistfrompending_post" "externalDocs": - "url": "docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/block-and-tx-query/gettransactionlistfrompending.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txId": - "type": "array" - "items": - "type": "string" - "x-proto-message": "TransactionIdList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.TransactionIdList" - "x-java-response": "TransactionIdList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/TransactionIdList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -83,4 +73,9 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/GetTransactionListFromPendingServlet.java" + - "protocol/src/main/protos/api/api.proto#TransactionIdList" diff --git a/docs/api/specs/http/listnodes.yaml b/docs/api/specs/http/listnodes.yaml index 8518c34c..a30130fa 100644 --- a/docs/api/specs/http/listnodes.yaml +++ b/docs/api/specs/http/listnodes.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/listnodes": "get": "tags": @@ -7,28 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." "operationId": "wallet_listnodes_get" "externalDocs": - "url": "docs/api/http/node-and-tools/listnodes.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/listnodes.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "nodes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "NodeList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" - "x-java-response": "NodeList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -42,7 +35,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListNodesServlet.java" "post": "tags": - "Node / pricing / tools" @@ -50,28 +47,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/node-and-tools/listnodes.md` for examples and detailed behavior." "operationId": "wallet_listnodes_post" "externalDocs": - "url": "docs/api/http/node-and-tools/listnodes.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/node-and-tools/listnodes.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "nodes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "NodeList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.NodeList" - "x-java-response": "NodeList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/NodeList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -85,4 +76,5 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true diff --git a/docs/api/specs/http/listproposals.yaml b/docs/api/specs/http/listproposals.yaml index 42c9377e..8722cb19 100644 --- a/docs/api/specs/http/listproposals.yaml +++ b/docs/api/specs/http/listproposals.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/listproposals": "get": "tags": @@ -7,28 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." "operationId": "wallet_listproposals_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/listproposals.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listproposals.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -42,7 +35,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListProposalsServlet.java" "post": "tags": - "Witness / governance" @@ -50,28 +47,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listproposals.md` for examples and detailed behavior." "operationId": "wallet_listproposals_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/listproposals.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listproposals.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "proposals": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "ProposalList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.ProposalList" - "x-java-response": "ProposalList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/ProposalList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -85,4 +76,8 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListProposalsServlet.java" diff --git a/docs/api/specs/http/listwitnesses.yaml b/docs/api/specs/http/listwitnesses.yaml index 18fd0110..606ea2d7 100644 --- a/docs/api/specs/http/listwitnesses.yaml +++ b/docs/api/specs/http/listwitnesses.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/listwitnesses": "get": "tags": @@ -7,36 +6,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." "operationId": "wallet_listwitnesses_get" "externalDocs": - "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listwitnesses.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "ListWitnessesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/listwitnesses" - "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/listwitnesses" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "ListWitnessesOnSolidityServlet" "parameters": - "name": "visible" @@ -44,7 +41,11 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListWitnessesServlet.java" "post": "tags": - "Witness / governance" @@ -52,36 +53,34 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/listwitnesses.md` for examples and detailed behavior." "operationId": "wallet_listwitnesses_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/listwitnesses.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/listwitnesses.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "witnesses": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "x-proto-message": "WitnessList" - "x-proto-file": "protocol/src/main/protos/api/api.proto" - "x-java-response-type": "org.tron.api.GrpcAPI.WitnessList" - "x-java-response": "WitnessList rendered by java-tron JSON printer" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/WitnessList" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "ListWitnessesServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/listwitnesses" - "x-solidity-servlet": "ListWitnessesOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/listwitnesses" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "ListWitnessesOnSolidityServlet" "parameters": - "name": "visible" @@ -89,4 +88,8 @@ "required": false "schema": "type": "boolean" + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ListWitnessesServlet.java" diff --git a/docs/api/specs/http/participateassetissue.yaml b/docs/api/specs/http/participateassetissue.yaml index 464ac6a8..4190fa28 100644 --- a/docs/api/specs/http/participateassetissue.yaml +++ b/docs/api/specs/http/participateassetissue.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/participateassetissue": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/participateassetissue.md` for examples and detailed behavior." "operationId": "wallet_participateassetissue_post" "externalDocs": - "url": "docs/api/http/asset/participateassetissue.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/participateassetissue.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,22 +33,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "to_address": - "type": "string" - "asset_name": - "type": "string" - "amount": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ParticipateAssetIssueContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.ParticipateAssetIssueContract" + "allOf": + - + "$ref": "#/components/schemas/ParticipateAssetIssueContractRequest" + "required": + - "owner_address" + - "to_address" + - "asset_name" + - "amount" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ParticipateAssetIssueActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#ParticipateAssetIssueContract" diff --git a/docs/api/specs/http/proposalapprove.yaml b/docs/api/specs/http/proposalapprove.yaml index 614ea21c..6d1a71ff 100644 --- a/docs/api/specs/http/proposalapprove.yaml +++ b/docs/api/specs/http/proposalapprove.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/proposalapprove": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalapprove.md` for examples and detailed behavior." "operationId": "wallet_proposalapprove_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/proposalapprove.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/proposalapprove.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,20 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "proposal_id": - "type": "integer" - "is_add_approval": - "type": "boolean" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ProposalApproveContract" - "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalApproveContract" + "allOf": + - + "$ref": "#/components/schemas/ProposalApproveContractRequest" + "required": + - "owner_address" + - "proposal_id" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ProposalApproveActuator.java#validate" + - "protocol/src/main/protos/core/contract/proposal_contract.proto#ProposalApproveContract" diff --git a/docs/api/specs/http/proposalcreate.yaml b/docs/api/specs/http/proposalcreate.yaml index dde41c17..029a51cf 100644 --- a/docs/api/specs/http/proposalcreate.yaml +++ b/docs/api/specs/http/proposalcreate.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/proposalcreate": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposalcreate.md` for examples and detailed behavior." "operationId": "wallet_proposalcreate_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/proposalcreate.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/proposalcreate.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,16 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ProposalCreateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalCreateContract" + "allOf": + - + "$ref": "#/components/schemas/ProposalCreateContractRequest" + "required": + - "owner_address" + - "parameters" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ProposalCreateActuator.java#validate" + - "protocol/src/main/protos/core/contract/proposal_contract.proto#ProposalCreateContract" diff --git a/docs/api/specs/http/proposaldelete.yaml b/docs/api/specs/http/proposaldelete.yaml index 997e87aa..e4941330 100644 --- a/docs/api/specs/http/proposaldelete.yaml +++ b/docs/api/specs/http/proposaldelete.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/proposaldelete": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/proposaldelete.md` for examples and detailed behavior." "operationId": "wallet_proposaldelete_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/proposaldelete.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/proposaldelete.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,18 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "proposal_id": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "ProposalDeleteContract" - "x-proto-file": "protocol/src/main/protos/core/contract/proposal_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.ProposalContract.ProposalDeleteContract" + "allOf": + - + "$ref": "#/components/schemas/ProposalDeleteContractRequest" + "required": + - "owner_address" + - "proposal_id" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/ProposalDeleteActuator.java#validate" + - "protocol/src/main/protos/core/contract/proposal_contract.proto#ProposalDeleteContract" diff --git a/docs/api/specs/http/transferasset.yaml b/docs/api/specs/http/transferasset.yaml index bb7e58ea..dd5c7df1 100644 --- a/docs/api/specs/http/transferasset.yaml +++ b/docs/api/specs/http/transferasset.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/transferasset": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/transferasset.md` for examples and detailed behavior." "operationId": "wallet_transferasset_post" "externalDocs": - "url": "docs/api/http/asset/transferasset.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/transferasset.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,24 +33,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "asset_name": - "type": "string" - "owner_address": - "type": "string" - "to_address": - "type": "string" - "amount": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "extra_data": - "type": "string" - "x-proto-message": "TransferAssetContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.TransferAssetContract" + "allOf": + - + "$ref": "#/components/schemas/TransferAssetContractRequest" + "required": + - "asset_name" + - "owner_address" + - "to_address" + - "amount" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/TransferAssetActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#TransferAssetContract" diff --git a/docs/api/specs/http/triggerconstantcontract.yaml b/docs/api/specs/http/triggerconstantcontract.yaml index ea29fb2e..4a1145f1 100644 --- a/docs/api/specs/http/triggerconstantcontract.yaml +++ b/docs/api/specs/http/triggerconstantcontract.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/triggerconstantcontract": "post": "tags": @@ -7,110 +6,46 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggerconstantcontract.md` for examples and detailed behavior." "operationId": "wallet_triggerconstantcontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/triggerconstantcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/triggerconstantcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "txid": - "type": "string" - "constant_result": - "type": "array" - "items": - "type": "string" - "result": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "energy_used": - "type": "integer" - "logs": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "energy_penalty": - "type": "integer" - "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" - "text/plain": - "schema": - "type": "string" + "$ref": "#/components/schemas/TransactionExtention" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true "x-java-service": "FullNode HTTP" "x-java-servlet": "TriggerConstantContractServlet" "x-java-source": "framework/src/main/java/org/tron/core/services/http/FullNodeHttpApiService.java" - "x-solidity-endpoint": "/walletsolidity/triggerconstantcontract" - "x-solidity-servlet": "TriggerConstantContractOnSolidityServlet" + "x-tron-alternate-endpoints": + - + "path": "/walletsolidity/triggerconstantcontract" + "service": "HTTP OnSolidity" + "consistency": "solidified" + "x-java-servlet": "TriggerConstantContractOnSolidityServlet" "requestBody": "required": true "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "call_value": - "type": "integer" - "data": - "type": "string" - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "function_selector": - "type": "string" - "parameter": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "extra_data": - "type": "string" - "x-proto-message": "TriggerSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "allOf": + - + "$ref": "#/components/schemas/TriggerSmartContractRequest" + "required": + - "owner_address" + "anyOf": + - + "required": + - "contract_address" + "title": "TriggerconstantcontractPostRequestRequiresContractAddress1" + - + "required": + - "data" + "title": "TriggerconstantcontractPostRequestRequiresData2" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/TriggerConstantContractServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#TriggerSmartContract" diff --git a/docs/api/specs/http/triggersmartcontract.yaml b/docs/api/specs/http/triggersmartcontract.yaml index b87e12c7..33453ebd 100644 --- a/docs/api/specs/http/triggersmartcontract.yaml +++ b/docs/api/specs/http/triggersmartcontract.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/triggersmartcontract": "post": "tags": @@ -7,71 +6,14 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/triggersmartcontract.md` for examples and detailed behavior." "operationId": "wallet_triggersmartcontract_post" "externalDocs": - "url": "docs/api/http/smart-contract/triggersmartcontract.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/triggersmartcontract.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "transaction": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "nested-transaction-json" - "txid": - "type": "string" - "constant_result": - "type": "array" - "items": - "type": "string" - "result": - "type": "object" - "additionalProperties": true - "properties": - "result": - "type": "boolean" - "code": - "type": "string" - "message": - "type": "string" - "energy_used": - "type": "integer" - "logs": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "internal_transactions": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "energy_penalty": - "type": "integer" - "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention" - "text/plain": - "schema": - "type": "string" + "$ref": "#/components/schemas/TransactionExtention" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -83,32 +25,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "call_value": - "type": "integer" - "data": - "type": "string" - "call_token_value": - "type": "integer" - "token_id": - "type": "integer" - "fee_limit": - "type": "integer" - "function_selector": - "type": "string" - "parameter": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "TriggerSmartContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.TriggerSmartContract" + "allOf": + - + "$ref": "#/components/schemas/TriggerSmartContractRequest" + "required": + - "owner_address" + - "contract_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/VMActuator.java#validate" + - "framework/src/main/java/org/tron/core/services/http/TriggerSmartContractServlet.java" + - "protocol/src/main/protos/core/contract/smart_contract.proto#TriggerSmartContract" diff --git a/docs/api/specs/http/undelegateresource.yaml b/docs/api/specs/http/undelegateresource.yaml index f0321f16..3ee64013 100644 --- a/docs/api/specs/http/undelegateresource.yaml +++ b/docs/api/specs/http/undelegateresource.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/undelegateresource": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/undelegateresource.md` for examples and detailed behavior." "operationId": "wallet_undelegateresource_post" "externalDocs": - "url": "docs/api/http/stake-v2/undelegateresource.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/undelegateresource.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,23 +33,15 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "resource": - "type": "object" - "additionalProperties": true - "balance": - "type": "integer" - "receiver_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnDelegateResourceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnDelegateResourceContract" + "allOf": + - + "$ref": "#/components/schemas/UnDelegateResourceContractRequest" + "required": + - "owner_address" + - "balance" + - "receiver_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnDelegateResourceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#UnDelegateResourceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" diff --git a/docs/api/specs/http/unfreezeasset.yaml b/docs/api/specs/http/unfreezeasset.yaml index 477a3127..f7ebe0d8 100644 --- a/docs/api/specs/http/unfreezeasset.yaml +++ b/docs/api/specs/http/unfreezeasset.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/unfreezeasset": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/unfreezeasset.md` for examples and detailed behavior." "operationId": "wallet_unfreezeasset_post" "externalDocs": - "url": "docs/api/http/asset/unfreezeasset.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/unfreezeasset.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,16 +33,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnfreezeAssetContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UnfreezeAssetContract" + "allOf": + - + "$ref": "#/components/schemas/UnfreezeAssetContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnfreezeAssetActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#UnfreezeAssetContract" diff --git a/docs/api/specs/http/unfreezebalance.yaml b/docs/api/specs/http/unfreezebalance.yaml index edf5fc03..2af575b9 100644 --- a/docs/api/specs/http/unfreezebalance.yaml +++ b/docs/api/specs/http/unfreezebalance.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/unfreezebalance": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v1/unfreezebalance.md` for examples and detailed behavior." "operationId": "wallet_unfreezebalance_post" "externalDocs": - "url": "docs/api/http/stake-v1/unfreezebalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v1/unfreezebalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,21 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "resource": - "type": "object" - "additionalProperties": true - "receiver_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnfreezeBalanceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceContract" + "allOf": + - + "$ref": "#/components/schemas/UnfreezeBalanceContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnfreezeBalanceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#UnfreezeBalanceContract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" diff --git a/docs/api/specs/http/unfreezebalancev2.yaml b/docs/api/specs/http/unfreezebalancev2.yaml index ec5360a4..7def287c 100644 --- a/docs/api/specs/http/unfreezebalancev2.yaml +++ b/docs/api/specs/http/unfreezebalancev2.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/unfreezebalancev2": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/unfreezebalancev2.md` for examples and detailed behavior." "operationId": "wallet_unfreezebalancev2_post" "externalDocs": - "url": "docs/api/http/stake-v2/unfreezebalancev2.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/unfreezebalancev2.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,21 +33,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "unfreeze_balance": - "type": "integer" - "resource": - "type": "object" - "additionalProperties": true - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UnfreezeBalanceV2Contract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.UnfreezeBalanceV2Contract" + "allOf": + - + "$ref": "#/components/schemas/UnfreezeBalanceV2ContractRequest" + "required": + - "owner_address" + - "unfreeze_balance" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UnfreezeBalanceV2Actuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#UnfreezeBalanceV2Contract" + - "protocol/src/main/protos/core/contract/common.proto#ResourceCode" diff --git a/docs/api/specs/http/updateBrokerage.yaml b/docs/api/specs/http/updateBrokerage.yaml index 8f6b5244..a7fb1928 100644 --- a/docs/api/specs/http/updateBrokerage.yaml +++ b/docs/api/specs/http/updateBrokerage.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/updateBrokerage": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updateBrokerage.md` for examples and detailed behavior." "operationId": "wallet_updateBrokerage_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/updateBrokerage.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/updateBrokerage.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,18 +33,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "brokerage": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateBrokerageContract" - "x-proto-file": "protocol/src/main/protos/core/contract/storage_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.StorageContract.UpdateBrokerageContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateBrokerageContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateBrokerageActuator.java#validate" + - "protocol/src/main/protos/core/contract/storage_contract.proto#UpdateBrokerageContract" diff --git a/docs/api/specs/http/updateaccount.yaml b/docs/api/specs/http/updateaccount.yaml index e45eccd3..f8ff9df0 100644 --- a/docs/api/specs/http/updateaccount.yaml +++ b/docs/api/specs/http/updateaccount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/updateaccount": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/updateaccount.md` for examples and detailed behavior." "operationId": "wallet_updateaccount_post" "externalDocs": - "url": "docs/api/http/account/updateaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/updateaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,18 +33,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "account_name": - "type": "string" - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "AccountUpdateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/account_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AccountContract.AccountUpdateContract" + "allOf": + - + "$ref": "#/components/schemas/AccountUpdateContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateAccountActuator.java#validate" + - "protocol/src/main/protos/core/contract/account_contract.proto#AccountUpdateContract" diff --git a/docs/api/specs/http/updateasset.yaml b/docs/api/specs/http/updateasset.yaml index 66b1895d..268ed2f5 100644 --- a/docs/api/specs/http/updateasset.yaml +++ b/docs/api/specs/http/updateasset.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/updateasset": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/asset/updateasset.md` for examples and detailed behavior." "operationId": "wallet_updateasset_post" "externalDocs": - "url": "docs/api/http/asset/updateasset.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/asset/updateasset.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,24 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "description": - "type": "string" - "url": - "type": "string" - "new_limit": - "type": "integer" - "new_public_limit": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateAssetContract" - "x-proto-file": "protocol/src/main/protos/core/contract/asset_issue_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.AssetIssueContractOuterClass.UpdateAssetContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateAssetContractRequest" + "required": + - "owner_address" + - "url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateAssetActuator.java#validate" + - "protocol/src/main/protos/core/contract/asset_issue_contract.proto#UpdateAssetContract" diff --git a/docs/api/specs/http/updateenergylimit.yaml b/docs/api/specs/http/updateenergylimit.yaml index c74d480b..4004d56c 100644 --- a/docs/api/specs/http/updateenergylimit.yaml +++ b/docs/api/specs/http/updateenergylimit.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/updateenergylimit": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updateenergylimit.md` for examples and detailed behavior." "operationId": "wallet_updateenergylimit_post" "externalDocs": - "url": "docs/api/http/smart-contract/updateenergylimit.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/updateenergylimit.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,20 +33,14 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "origin_energy_limit": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateEnergyLimitContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateEnergyLimitContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateEnergyLimitContractRequest" + "required": + - "owner_address" + - "contract_address" + - "origin_energy_limit" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateEnergyLimitContractActuator.java#validate" + - "protocol/src/main/protos/core/contract/smart_contract.proto#UpdateEnergyLimitContract" diff --git a/docs/api/specs/http/updatesetting.yaml b/docs/api/specs/http/updatesetting.yaml index fb2e1bfb..64a1fb72 100644 --- a/docs/api/specs/http/updatesetting.yaml +++ b/docs/api/specs/http/updatesetting.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/updatesetting": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/smart-contract/updatesetting.md` for examples and detailed behavior." "operationId": "wallet_updatesetting_post" "externalDocs": - "url": "docs/api/http/smart-contract/updatesetting.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/smart-contract/updatesetting.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,20 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "contract_address": - "type": "string" - "consume_user_resource_percent": - "type": "integer" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "UpdateSettingContract" - "x-proto-file": "protocol/src/main/protos/core/contract/smart_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.SmartContractOuterClass.UpdateSettingContract" + "allOf": + - + "$ref": "#/components/schemas/UpdateSettingContractRequest" + "required": + - "owner_address" + - "contract_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/UpdateSettingContractActuator.java#validate" + - "protocol/src/main/protos/core/contract/smart_contract.proto#UpdateSettingContract" diff --git a/docs/api/specs/http/updatewitness.yaml b/docs/api/specs/http/updatewitness.yaml index d00bfcad..36326446 100644 --- a/docs/api/specs/http/updatewitness.yaml +++ b/docs/api/specs/http/updatewitness.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/updatewitness": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/updatewitness.md` for examples and detailed behavior." "operationId": "wallet_updatewitness_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/updatewitness.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/updatewitness.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,18 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "update_url": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WitnessUpdateContract" - "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.WitnessContract.WitnessUpdateContract" + "allOf": + - + "$ref": "#/components/schemas/WitnessUpdateContractRequest" + "required": + - "owner_address" + - "update_url" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WitnessUpdateActuator.java#validate" + - "protocol/src/main/protos/core/contract/witness_contract.proto#WitnessUpdateContract" diff --git a/docs/api/specs/http/validateaddress.yaml b/docs/api/specs/http/validateaddress.yaml index 17f6b372..17cddd21 100644 --- a/docs/api/specs/http/validateaddress.yaml +++ b/docs/api/specs/http/validateaddress.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/validateaddress": "get": "tags": @@ -7,7 +6,7 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." "operationId": "wallet_validateaddress_get" "externalDocs": - "url": "docs/api/http/account/validateaddress.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/validateaddress.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." @@ -15,15 +14,12 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "boolean" "message": "type": "string" - "text/plain": - "schema": - "type": "string" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -34,10 +30,14 @@ - "name": "address" "in": "query" - "required": false + "required": true "schema": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-derived": true + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ValidateAddressServlet.java" "post": "tags": - "Account" @@ -45,7 +45,7 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/account/validateaddress.md` for examples and detailed behavior." "operationId": "wallet_validateaddress_post" "externalDocs": - "url": "docs/api/http/account/validateaddress.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/account/validateaddress.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." @@ -53,15 +53,12 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "result": "type": "boolean" "message": "type": "string" - "text/plain": - "schema": - "type": "string" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -74,8 +71,15 @@ "application/json": "schema": "type": "object" - "additionalProperties": true + "additionalProperties": false "properties": "address": "type": "string" + "description": "Account or contract address accepted by this endpoint." "x-source-shape": "servlet-json-fields" + "x-java-unknown-fields": "ignored-by-jsonformat" + "required": + - "address" + "x-overlay-derived": true + "x-source-refs": + - "framework/src/main/java/org/tron/core/services/http/ValidateAddressServlet.java" diff --git a/docs/api/specs/http/votewitnessaccount.yaml b/docs/api/specs/http/votewitnessaccount.yaml index 3f6a6dbc..f8fcadd7 100644 --- a/docs/api/specs/http/votewitnessaccount.yaml +++ b/docs/api/specs/http/votewitnessaccount.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/votewitnessaccount": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/votewitnessaccount.md` for examples and detailed behavior." "operationId": "wallet_votewitnessaccount_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/votewitnessaccount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/votewitnessaccount.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,23 +33,13 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "votes": - "type": "array" - "items": - "type": "object" - "additionalProperties": true - "support": - "type": "boolean" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "VoteWitnessContract" - "x-proto-file": "protocol/src/main/protos/core/contract/witness_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.WitnessContract.VoteWitnessContract" + "allOf": + - + "$ref": "#/components/schemas/VoteWitnessContractRequest" + "required": + - "owner_address" + - "votes" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/VoteWitnessActuator.java#validate" + - "protocol/src/main/protos/core/contract/witness_contract.proto#VoteWitnessContract" diff --git a/docs/api/specs/http/withdrawbalance.yaml b/docs/api/specs/http/withdrawbalance.yaml index 69176156..20beb216 100644 --- a/docs/api/specs/http/withdrawbalance.yaml +++ b/docs/api/specs/http/withdrawbalance.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/withdrawbalance": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/witness-and-governance/withdrawbalance.md` for examples and detailed behavior." "operationId": "wallet_withdrawbalance_post" "externalDocs": - "url": "docs/api/http/witness-and-governance/withdrawbalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/witness-and-governance/withdrawbalance.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,16 +33,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WithdrawBalanceContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawBalanceContract" + "allOf": + - + "$ref": "#/components/schemas/WithdrawBalanceContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WithdrawBalanceActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#WithdrawBalanceContract" diff --git a/docs/api/specs/http/withdrawexpireunfreeze.yaml b/docs/api/specs/http/withdrawexpireunfreeze.yaml index 62e7b3c0..b5ff19f8 100644 --- a/docs/api/specs/http/withdrawexpireunfreeze.yaml +++ b/docs/api/specs/http/withdrawexpireunfreeze.yaml @@ -1,4 +1,3 @@ -# This file is generated by scripts/generate_api_specs.py. Do not edit by hand. "/wallet/withdrawexpireunfreeze": "post": "tags": @@ -7,36 +6,22 @@ "description": "Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `docs/api/http/stake-v2/withdrawexpireunfreeze.md` for examples and detailed behavior." "operationId": "wallet_withdrawexpireunfreeze_post" "externalDocs": - "url": "docs/api/http/stake-v2/withdrawexpireunfreeze.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/http/stake-v2/withdrawexpireunfreeze.md" "responses": "200": "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body." "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "txID": - "type": "string" - "raw_data": - "type": "object" - "additionalProperties": true - "raw_data_hex": - "type": "string" - "signature": - "type": "array" - "items": - "type": "string" - "visible": - "type": "boolean" - "contract_address": - "type": "string" - "x-java-response": "protocol.Transaction rendered by Util.printCreateTransaction" - "x-source-shape": "transaction-json" - "text/plain": - "schema": - "type": "string" + "oneOf": + - + "$ref": "#/components/schemas/Transaction" + - + "$ref": "#/components/schemas/JavaTronError" + "x-tron-business-error": + "httpStatus": 200 + "errorSchema": "#/components/schemas/JavaTronError" + "discriminatorField": "Error" "404": "description": "Endpoint disabled by node configuration." "x-source-derived": true @@ -48,16 +33,12 @@ "content": "application/json": "schema": - "type": "object" - "additionalProperties": true - "properties": - "owner_address": - "type": "string" - "visible": - "type": "boolean" - "Permission_id": - "type": "integer" - "x-proto-message": "WithdrawExpireUnfreezeContract" - "x-proto-file": "protocol/src/main/protos/core/contract/balance_contract.proto" - "x-source-shape": "protobuf-json-plus-servlet-fields" - "x-java-request-type": "org.tron.protos.contract.BalanceContract.WithdrawExpireUnfreezeContract" + "allOf": + - + "$ref": "#/components/schemas/WithdrawExpireUnfreezeContractRequest" + "required": + - "owner_address" + "x-overlay-derived": true + "x-source-refs": + - "actuator/src/main/java/org/tron/core/actuator/WithdrawExpireUnfreezeActuator.java#validate" + - "protocol/src/main/protos/core/contract/balance_contract.proto#WithdrawExpireUnfreezeContract" diff --git a/docs/api/specs/json-rpc/buildTransaction.json b/docs/api/specs/json-rpc/buildTransaction.json index 6540bd6f..c7bab576 100644 --- a/docs/api/specs/json-rpc/buildTransaction.json +++ b/docs/api/specs/json-rpc/buildTransaction.json @@ -7,53 +7,140 @@ ], "summary": "Build an unsigned transaction (FullNode only; TRX transfer / TRC10 transfer / contract deploy / contract trigger)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/tx-build/buildTransaction.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "args", "required": true, "schema": { "type": "object", - "additionalProperties": true + "additionalProperties": false, + "properties": { + "from": { + "type": "string", + "description": "Sender account address." + }, + "to": { + "type": "string", + "description": "Recipient account or contract address." + }, + "gas": { + "type": "string", + "description": "Gas limit encoded as a hex quantity." + }, + "gasPrice": { + "type": "string", + "description": "Gas price encoded as a hex quantity." + }, + "value": { + "type": "string", + "description": "Hex string, amount, or value field accepted by this endpoint." + }, + "data": { + "type": "string", + "description": "Hex-encoded contract call data or transaction data." + }, + "nonce": { + "type": "string", + "description": "Transaction nonce encoded as a hex quantity." + }, + "tokenId": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "TRC10 token id." + }, + "tokenValue": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "TRC10 token amount." + }, + "abi": { + "type": "string", + "description": "Smart contract ABI definition." + }, + "consumeUserResourcePercent": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Percentage of contract execution resource cost paid by the user." + }, + "originEnergyLimit": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "Origin energy limit for a deployed smart contract." + }, + "name": { + "type": "string", + "description": "Name encoded as expected by java-tron." + }, + "permissionId": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Permission id used to sign the transaction with a non-owner account permission." + }, + "extraData": { + "type": "string", + "description": "Extra transaction data encoded as expected by java-tron." + }, + "visible": { + "type": "boolean", + "description": "When true, addresses are encoded in base58check; when false or omitted, addresses are hex-encoded." + } + } }, "x-java-type": "BuildArguments", - "x-position": 0 + "x-position": 0, + "description": "Transaction call arguments." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionJson" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionJson" + }, + { + "type": "null", + "title": "BuildTransactionResultNull2" + } + ] } }, "errors": [ { "code": -32600, - "message": "JsonRpcInvalidRequestException", - "x-java-exception": "JsonRpcInvalidRequestException" + "message": "JsonRpcInvalidRequestException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/tx-build/buildTransaction.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/tx-build/buildTransaction.md" }, "x-source-derived": true, "x-java-method": "buildTransaction", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 only (the Solidity port throws -32601)" + "x-ports": "FullNode 8545 only (the Solidity port throws -32601)", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#buildTransaction", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#buildTransaction", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class TransactionJson", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/BuildArguments.java#class BuildArguments" + ] } diff --git a/docs/api/specs/json-rpc/eth_accounts.json b/docs/api/specs/json-rpc/eth_accounts.json index 4d6d9024..0e136d2e 100644 --- a/docs/api/specs/json-rpc/eth_accounts.json +++ b/docs/api/specs/json-rpc/eth_accounts.json @@ -7,6 +7,7 @@ ], "summary": "[]", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_accounts.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -20,10 +21,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/stub/eth_accounts.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/stub/eth_accounts.md" }, "x-source-derived": true, "x-java-method": "getAccounts", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_accounts", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getAccounts" + ] } diff --git a/docs/api/specs/json-rpc/eth_blockNumber.json b/docs/api/specs/json-rpc/eth_blockNumber.json index badc852d..246de0cc 100644 --- a/docs/api/specs/json-rpc/eth_blockNumber.json +++ b/docs/api/specs/json-rpc/eth_blockNumber.json @@ -7,6 +7,7 @@ ], "summary": "Latest block height", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_blockNumber.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -17,10 +18,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_blockNumber.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_blockNumber.md" }, "x-source-derived": true, "x-java-method": "getLatestBlockNum", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_blockNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getLatestBlockNum" + ] } diff --git a/docs/api/specs/json-rpc/eth_call.json b/docs/api/specs/json-rpc/eth_call.json index ee84ace4..c55643bb 100644 --- a/docs/api/specs/json-rpc/eth_call.json +++ b/docs/api/specs/json-rpc/eth_call.json @@ -7,23 +7,65 @@ ], "summary": "Read-only contract call", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_call.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "transactionCall", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/TransactionCall" }, "x-java-type": "CallArguments", - "x-position": 0 + "x-position": 0, + "description": "Transaction call arguments." }, { "name": "blockNumOrTag", "required": true, - "schema": {}, + "schema": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ], + "title": "EthCallParamString1" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "blockNumber": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "description": "Hex-encoded block number." + } + }, + "required": [ + "blockNumber" + ], + "title": "EthCallParamRequiresBlockNumber2" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "blockHash": { + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$", + "description": "32-byte block hash, with or without the 0x prefix." + } + }, + "required": [ + "blockHash" + ], + "title": "EthCallParamRequiresBlockHash3" + } + ] + }, "x-java-type": "Object", - "x-position": 1 + "x-position": 1, + "description": "Hex block number or supported block tag." } ], "result": { @@ -36,25 +78,27 @@ "errors": [ { "code": -32600, - "message": "JsonRpcInvalidRequestException", - "x-java-exception": "JsonRpcInvalidRequestException" + "message": "JsonRpcInvalidRequestException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/smart-contract/eth_call.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/smart-contract/eth_call.md" }, "x-source-derived": true, "x-java-method": "getCall", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_call", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getCall" + ] } diff --git a/docs/api/specs/json-rpc/eth_chainId.json b/docs/api/specs/json-rpc/eth_chainId.json index abcc858c..037a1c26 100644 --- a/docs/api/specs/json-rpc/eth_chainId.json +++ b/docs/api/specs/json-rpc/eth_chainId.json @@ -7,6 +7,7 @@ ], "summary": "chainId (last 4 bytes of the genesis block hash)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_chainId.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -15,12 +16,22 @@ "x-java-type": "String" } }, - "errors": [], + "errors": [ + { + "code": -32000, + "message": "JsonRpcInternalException" + } + ], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_chainId.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_chainId.md" }, "x-source-derived": true, "x-java-method": "ethChainId", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_chainId", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethChainId" + ] } diff --git a/docs/api/specs/json-rpc/eth_coinbase.json b/docs/api/specs/json-rpc/eth_coinbase.json index 05067011..750ba5e0 100644 --- a/docs/api/specs/json-rpc/eth_coinbase.json +++ b/docs/api/specs/json-rpc/eth_coinbase.json @@ -7,6 +7,7 @@ ], "summary": "The configured etherbase address", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_coinbase.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -18,15 +19,19 @@ "errors": [ { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/stub/eth_coinbase.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/stub/eth_coinbase.md" }, "x-source-derived": true, "x-java-method": "getCoinbase", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_coinbase", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getCoinbase" + ] } diff --git a/docs/api/specs/json-rpc/eth_estimateGas.json b/docs/api/specs/json-rpc/eth_estimateGas.json index ed6352b1..6864081d 100644 --- a/docs/api/specs/json-rpc/eth_estimateGas.json +++ b/docs/api/specs/json-rpc/eth_estimateGas.json @@ -7,16 +7,17 @@ ], "summary": "Estimate energy consumption", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/smart-contract/eth_estimateGas.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "args", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/TransactionCall" }, "x-java-type": "CallArguments", - "x-position": 0 + "x-position": 0, + "description": "Transaction call arguments." } ], "result": { @@ -29,25 +30,28 @@ "errors": [ { "code": -32600, - "message": "JsonRpcInvalidRequestException", - "x-java-exception": "JsonRpcInvalidRequestException" + "message": "JsonRpcInvalidRequestException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/smart-contract/eth_estimateGas.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/smart-contract/eth_estimateGas.md" }, "x-source-derived": true, "x-java-method": "estimateGas", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_estimateGas", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#estimateGas", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/CallArguments.java#class CallArguments" + ] } diff --git a/docs/api/specs/json-rpc/eth_gasPrice.json b/docs/api/specs/json-rpc/eth_gasPrice.json index eebd5b2a..9fc5660e 100644 --- a/docs/api/specs/json-rpc/eth_gasPrice.json +++ b/docs/api/specs/json-rpc/eth_gasPrice.json @@ -7,6 +7,7 @@ ], "summary": "Current energy unit price (sun)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_gasPrice.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -17,10 +18,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_gasPrice.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_gasPrice.md" }, "x-source-derived": true, "x-java-method": "gasPrice", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_gasPrice", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#gasPrice" + ] } diff --git a/docs/api/specs/json-rpc/eth_getBalance.json b/docs/api/specs/json-rpc/eth_getBalance.json index bab019d3..e0b949a0 100644 --- a/docs/api/specs/json-rpc/eth_getBalance.json +++ b/docs/api/specs/json-rpc/eth_getBalance.json @@ -7,6 +7,7 @@ ], "summary": "Account TRX balance (sun)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getBalance.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "address", @@ -15,16 +16,21 @@ "type": "string" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Account or contract address." }, { "name": "blockNumOrTag", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "latest" + ] }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex block number or supported block tag." } ], "result": { @@ -37,15 +43,19 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/account/eth_getBalance.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/account/eth_getBalance.md" }, "x-source-derived": true, "x-java-method": "getTrxBalance", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBalance", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTrxBalance" + ] } diff --git a/docs/api/specs/json-rpc/eth_getBlockByHash.json b/docs/api/specs/json-rpc/eth_getBlockByHash.json index 93b453bd..e1bb0823 100644 --- a/docs/api/specs/json-rpc/eth_getBlockByHash.json +++ b/docs/api/specs/json-rpc/eth_getBlockByHash.json @@ -7,15 +7,18 @@ ], "summary": "Query a block by hash", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockHash", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte block hash, with or without the 0x prefix." }, { "name": "fullTransactionObjects", @@ -24,29 +27,42 @@ "type": "boolean" }, "x-java-type": "Boolean", - "x-position": 1 + "x-position": 1, + "description": "Whether to return full transaction objects instead of transaction hashes." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "BlockResult" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockResult" + }, + { + "type": "null", + "title": "EthGetBlockByHashResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockByHash.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockByHash", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/BlockResult.java#class BlockResult", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] } diff --git a/docs/api/specs/json-rpc/eth_getBlockByNumber.json b/docs/api/specs/json-rpc/eth_getBlockByNumber.json index c59a7862..e4e9ab3b 100644 --- a/docs/api/specs/json-rpc/eth_getBlockByNumber.json +++ b/docs/api/specs/json-rpc/eth_getBlockByNumber.json @@ -7,15 +7,33 @@ ], "summary": "Query a block by height / tag", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "bnOrId", "required": true, "schema": { - "type": "string" + "oneOf": [ + { + "type": "string", + "enum": [ + "", + "latest", + "earliest", + "finalized" + ], + "title": "EthGetBlockByNumberParamString1" + }, + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "title": "EthGetBlockByNumberParamString2" + } + ] }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Hex block number or supported block tag." }, { "name": "fullTransactionObjects", @@ -24,29 +42,43 @@ "type": "boolean" }, "x-java-type": "Boolean", - "x-position": 1 + "x-position": 1, + "description": "Whether to return full transaction objects instead of transaction hashes." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "BlockResult" + "oneOf": [ + { + "$ref": "#/components/schemas/BlockResult" + }, + { + "type": "null", + "title": "EthGetBlockByNumberResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockByNumber.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockByNumber", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockByNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockByNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/JsonRpcApiUtil.java#getByJsonBlockId", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/BlockResult.java#class BlockResult", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] } diff --git a/docs/api/specs/json-rpc/eth_getBlockReceipts.json b/docs/api/specs/json-rpc/eth_getBlockReceipts.json index 93b80890..f7b725eb 100644 --- a/docs/api/specs/json-rpc/eth_getBlockReceipts.json +++ b/docs/api/specs/json-rpc/eth_getBlockReceipts.json @@ -7,45 +7,84 @@ ], "summary": "Receipt list for an entire block", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockNumOrHashOrTag", "required": true, "schema": { - "type": "string" + "oneOf": [ + { + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$", + "title": "EthGetBlockReceiptsParamString1" + }, + { + "oneOf": [ + { + "type": "string", + "enum": [ + "", + "latest", + "earliest", + "finalized" + ], + "title": "EthGetBlockReceiptsParamNested1String1" + }, + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "title": "EthGetBlockReceiptsParamNested1String2" + } + ], + "title": "EthGetBlockReceiptsParamVariant2" + } + ] }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Block hash, hex block number, or supported block tag." } ], "result": { "name": "result", "schema": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": true - }, - "x-java-type": "List" + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionReceipt" + }, + "title": "EthGetBlockReceiptsResultArray1" + }, + { + "type": "null", + "title": "EthGetBlockReceiptsResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "JsonRpcInternalException", - "x-java-exception": "JsonRpcInternalException" + "message": "JsonRpcInternalException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockReceipts.md" }, "x-source-derived": true, "x-java-method": "getBlockReceipts", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockReceipts", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getBlockReceipts", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionReceipt.java#class TransactionReceipt" + ] } diff --git a/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json index 7f3c1477..7898da1d 100644 --- a/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json +++ b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByHash.json @@ -7,10 +7,12 @@ ], "summary": "Block transaction count (by hash)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockHash", "required": true, + "description": "32-byte block hash, with or without the 0x prefix.", "schema": { "type": "string" }, @@ -21,22 +23,35 @@ "result": { "name": "result", "schema": { - "type": "string", - "x-java-type": "String" + "oneOf": [ + { + "type": "string", + "x-java-type": "String", + "title": "EthGetBlockTransactionCountByHashResultString1" + }, + { + "type": "null", + "title": "EthGetBlockTransactionCountByHashResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByHash.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockTransactionCountByHash", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockTransactionCountByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockTransactionCountByHash" + ] } diff --git a/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json index 2ad526b0..72b814c5 100644 --- a/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json +++ b/docs/api/specs/json-rpc/eth_getBlockTransactionCountByNumber.json @@ -7,10 +7,12 @@ ], "summary": "Block transaction count (by height)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "bnOrId", "required": true, + "description": "Hex block number or supported block tag.", "schema": { "type": "string" }, @@ -21,22 +23,35 @@ "result": { "name": "result", "schema": { - "type": "string", - "x-java-type": "String" + "oneOf": [ + { + "type": "string", + "x-java-type": "String", + "title": "EthGetBlockTransactionCountByNumberResultString1" + }, + { + "type": "null", + "title": "EthGetBlockTransactionCountByNumberResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getBlockTransactionCountByNumber.md" }, "x-source-derived": true, "x-java-method": "ethGetBlockTransactionCountByNumber", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getBlockTransactionCountByNumber", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetBlockTransactionCountByNumber" + ] } diff --git a/docs/api/specs/json-rpc/eth_getCode.json b/docs/api/specs/json-rpc/eth_getCode.json index 3f981b03..0aa0290b 100644 --- a/docs/api/specs/json-rpc/eth_getCode.json +++ b/docs/api/specs/json-rpc/eth_getCode.json @@ -7,6 +7,7 @@ ], "summary": "Contract runtime bytecode", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getCode.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "contractAddress", @@ -15,16 +16,21 @@ "type": "string" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Contract address." }, { "name": "bnOrId", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "latest" + ] }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex block number or supported block tag." } ], "result": { @@ -37,15 +43,19 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/account/eth_getCode.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/account/eth_getCode.md" }, "x-source-derived": true, "x-java-method": "getABIOfSmartContract", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getCode", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getABIOfSmartContract" + ] } diff --git a/docs/api/specs/json-rpc/eth_getFilterChanges.json b/docs/api/specs/json-rpc/eth_getFilterChanges.json index 5906541c..9f3e7077 100644 --- a/docs/api/specs/json-rpc/eth_getFilterChanges.json +++ b/docs/api/specs/json-rpc/eth_getFilterChanges.json @@ -7,10 +7,12 @@ ], "summary": "Pull and drain filter increments", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterChanges.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "filterId", "required": true, + "description": "Filter id returned by eth_newFilter or eth_newBlockFilter.", "schema": { "type": "string" }, @@ -22,32 +24,36 @@ "name": "result", "schema": { "type": "array", - "items": {}, + "items": { + "type": "string" + }, "x-java-type": "Object[]" } }, "errors": [ { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_getFilterChanges.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_getFilterChanges.md" }, "x-source-derived": true, "x-java-method": "getFilterChanges", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getFilterChanges", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getFilterChanges" + ] } diff --git a/docs/api/specs/json-rpc/eth_getFilterLogs.json b/docs/api/specs/json-rpc/eth_getFilterLogs.json index f8261c87..15842965 100644 --- a/docs/api/specs/json-rpc/eth_getFilterLogs.json +++ b/docs/api/specs/json-rpc/eth_getFilterLogs.json @@ -7,10 +7,12 @@ ], "summary": "Pull a log filter's full set (without draining)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getFilterLogs.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "filterId", "required": true, + "description": "Filter id returned by eth_newFilter or eth_newBlockFilter.", "schema": { "type": "string" }, @@ -23,8 +25,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/Log" }, "x-java-type": "LogFilterElement[]" } @@ -32,45 +33,44 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32005, - "message": "JsonRpcTooManyResultException", - "x-java-exception": "JsonRpcTooManyResultException" + "message": "JsonRpcTooManyResultException" }, { "code": -32000, - "message": "BadItemException", - "x-java-exception": "BadItemException" + "message": "BadItemException" }, { "code": -32000, - "message": "ExecutionException", - "x-java-exception": "ExecutionException" + "message": "ExecutionException" }, { "code": -32000, - "message": "InterruptedException", - "x-java-exception": "InterruptedException" + "message": "InterruptedException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_getFilterLogs.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_getFilterLogs.md" }, "x-source-derived": true, "x-java-method": "getFilterLogs", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getFilterLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getFilterLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class LogFilterElement" + ] } diff --git a/docs/api/specs/json-rpc/eth_getLogs.json b/docs/api/specs/json-rpc/eth_getLogs.json index c05a792b..988dbc28 100644 --- a/docs/api/specs/json-rpc/eth_getLogs.json +++ b/docs/api/specs/json-rpc/eth_getLogs.json @@ -7,16 +7,17 @@ ], "summary": "One-shot log query", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_getLogs.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "fr", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/LogFilter" }, "x-java-type": "FilterRequest", - "x-position": 0 + "x-position": 0, + "description": "Log filter request." } ], "result": { @@ -24,8 +25,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/Log" }, "x-java-type": "LogFilterElement[]" } @@ -33,45 +33,45 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32005, - "message": "JsonRpcTooManyResultException", - "x-java-exception": "JsonRpcTooManyResultException" + "message": "JsonRpcTooManyResultException" }, { "code": -32000, - "message": "BadItemException", - "x-java-exception": "BadItemException" + "message": "BadItemException" }, { "code": -32000, - "message": "ExecutionException", - "x-java-exception": "ExecutionException" + "message": "ExecutionException" }, { "code": -32000, - "message": "InterruptedException", - "x-java-exception": "InterruptedException" + "message": "InterruptedException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_getLogs.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_getLogs.md" }, "x-source-derived": true, "x-java-method": "getLogs", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getLogs", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class FilterRequest", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class LogFilterElement" + ] } diff --git a/docs/api/specs/json-rpc/eth_getStorageAt.json b/docs/api/specs/json-rpc/eth_getStorageAt.json index b30faa31..1b38e6f6 100644 --- a/docs/api/specs/json-rpc/eth_getStorageAt.json +++ b/docs/api/specs/json-rpc/eth_getStorageAt.json @@ -7,6 +7,7 @@ ], "summary": "Contract storage slot", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/account/eth_getStorageAt.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "address", @@ -15,7 +16,8 @@ "type": "string" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Account or contract address." }, { "name": "storageIdx", @@ -24,16 +26,21 @@ "type": "string" }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Storage slot index." }, { "name": "blockNumOrTag", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "latest" + ] }, "x-java-type": "String", - "x-position": 2 + "x-position": 2, + "description": "Hex block number or supported block tag." } ], "result": { @@ -46,15 +53,19 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/account/eth_getStorageAt.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/account/eth_getStorageAt.md" }, "x-source-derived": true, "x-java-method": "getStorageAt", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getStorageAt", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getStorageAt" + ] } diff --git a/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json b/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json index 5d11c8ca..de47de40 100644 --- a/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json +++ b/docs/api/specs/json-rpc/eth_getTransactionByBlockHashAndIndex.json @@ -7,46 +7,62 @@ ], "summary": "Query a transaction by block hash + index", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockHash", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte block hash, with or without the 0x prefix." }, { "name": "index", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$" }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex-encoded transaction index within the block." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionResult" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + }, + { + "type": "null", + "title": "EthGetTransactionByBlockHashAndIndexResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockHashAndIndex.md" }, "x-source-derived": true, "x-java-method": "getTransactionByBlockHashAndIndex", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionByBlockHashAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionByBlockHashAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] } diff --git a/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json b/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json index e973700b..04037c2c 100644 --- a/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json +++ b/docs/api/specs/json-rpc/eth_getTransactionByBlockNumberAndIndex.json @@ -7,46 +7,77 @@ ], "summary": "Query a transaction by block height + index", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "blockNumOrTag", "required": true, "schema": { - "type": "string" + "oneOf": [ + { + "type": "string", + "enum": [ + "", + "latest", + "earliest", + "finalized" + ], + "title": "EthGetTransactionByBlockNumberAndIndexParamString1" + }, + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$", + "title": "EthGetTransactionByBlockNumberAndIndexParamString2" + } + ] }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "Hex block number or supported block tag." }, { "name": "index", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^0x[0-9a-fA-F]+$" }, "x-java-type": "String", - "x-position": 1 + "x-position": 1, + "description": "Hex-encoded transaction index within the block." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionResult" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + }, + { + "type": "null", + "title": "EthGetTransactionByBlockNumberAndIndexResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionByBlockNumberAndIndex.md" }, "x-source-derived": true, "x-java-method": "getTransactionByBlockNumberAndIndex", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionByBlockNumberAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionByBlockNumberAndIndex", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] } diff --git a/docs/api/specs/json-rpc/eth_getTransactionByHash.json b/docs/api/specs/json-rpc/eth_getTransactionByHash.json index d8ac6f70..8a795892 100644 --- a/docs/api/specs/json-rpc/eth_getTransactionByHash.json +++ b/docs/api/specs/json-rpc/eth_getTransactionByHash.json @@ -7,37 +7,51 @@ ], "summary": "Query a transaction by txid", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "txId", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte transaction id, with or without the 0x prefix." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionResult" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionResult" + }, + { + "type": "null", + "title": "EthGetTransactionByHashResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionByHash.md" }, "x-source-derived": true, "x-java-method": "getTransactionByHash", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionByHash", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionResult.java#class TransactionResult" + ] } diff --git a/docs/api/specs/json-rpc/eth_getTransactionReceipt.json b/docs/api/specs/json-rpc/eth_getTransactionReceipt.json index b69df01e..9c238b8b 100644 --- a/docs/api/specs/json-rpc/eth_getTransactionReceipt.json +++ b/docs/api/specs/json-rpc/eth_getTransactionReceipt.json @@ -7,37 +7,51 @@ ], "summary": "Query a receipt by txid", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "txid", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^(0x)?[a-zA-Z0-9]{64}$" }, "x-java-type": "String", - "x-position": 0 + "x-position": 0, + "description": "32-byte transaction id, with or without the 0x prefix." } ], "result": { "name": "result", "schema": { - "type": "object", - "additionalProperties": true, - "x-java-type": "TransactionReceipt" + "oneOf": [ + { + "$ref": "#/components/schemas/TransactionReceipt" + }, + { + "type": "null", + "title": "EthGetTransactionReceiptResultNull2" + } + ] } }, "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/block-and-tx-query/eth_getTransactionReceipt.md" }, "x-source-derived": true, "x-java-method": "getTransactionReceipt", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getTransactionReceipt", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getTransactionReceipt", + "framework/src/main/java/org/tron/core/services/jsonrpc/types/TransactionReceipt.java#class TransactionReceipt" + ] } diff --git a/docs/api/specs/json-rpc/eth_getWork.json b/docs/api/specs/json-rpc/eth_getWork.json index e8b5551c..93150600 100644 --- a/docs/api/specs/json-rpc/eth_getWork.json +++ b/docs/api/specs/json-rpc/eth_getWork.json @@ -7,21 +7,29 @@ ], "summary": "[blockHash, null, null]", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/stub/eth_getWork.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", "schema": { "type": "array", - "items": {}, + "items": { + "type": "string" + }, "x-java-type": "List" } }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/stub/eth_getWork.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/stub/eth_getWork.md" }, "x-source-derived": true, "x-java-method": "ethGetWork", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_getWork", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#ethGetWork" + ] } diff --git a/docs/api/specs/json-rpc/eth_newBlockFilter.json b/docs/api/specs/json-rpc/eth_newBlockFilter.json index 84e0bacf..8a4ce5e1 100644 --- a/docs/api/specs/json-rpc/eth_newBlockFilter.json +++ b/docs/api/specs/json-rpc/eth_newBlockFilter.json @@ -7,6 +7,7 @@ ], "summary": "Register a new-block filter", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newBlockFilter.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -18,20 +19,23 @@ "errors": [ { "code": -32005, - "message": "JsonRpcExceedLimitException", - "x-java-exception": "JsonRpcExceedLimitException" + "message": "JsonRpcExceedLimitException" }, { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_newBlockFilter.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_newBlockFilter.md" }, "x-source-derived": true, "x-java-method": "newBlockFilter", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_newBlockFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#newBlockFilter" + ] } diff --git a/docs/api/specs/json-rpc/eth_newFilter.json b/docs/api/specs/json-rpc/eth_newFilter.json index f6e62a46..3b38c849 100644 --- a/docs/api/specs/json-rpc/eth_newFilter.json +++ b/docs/api/specs/json-rpc/eth_newFilter.json @@ -7,16 +7,17 @@ ], "summary": "Register a log filter", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_newFilter.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "fr", "required": true, "schema": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/LogFilter" }, "x-java-type": "FilterRequest", - "x-position": 0 + "x-position": 0, + "description": "Log filter request." } ], "result": { @@ -29,20 +30,24 @@ "errors": [ { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_newFilter.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_newFilter.md" }, "x-source-derived": true, "x-java-method": "newFilter", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_newFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#newFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class FilterRequest" + ] } diff --git a/docs/api/specs/json-rpc/eth_protocolVersion.json b/docs/api/specs/json-rpc/eth_protocolVersion.json index 6ecfb17c..4d2c6ec2 100644 --- a/docs/api/specs/json-rpc/eth_protocolVersion.json +++ b/docs/api/specs/json-rpc/eth_protocolVersion.json @@ -7,6 +7,7 @@ ], "summary": "Protocol version of the current block header", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_protocolVersion.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -17,10 +18,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_protocolVersion.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_protocolVersion.md" }, "x-source-derived": true, "x-java-method": "getProtocolVersion", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_protocolVersion", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getProtocolVersion" + ] } diff --git a/docs/api/specs/json-rpc/eth_syncing.json b/docs/api/specs/json-rpc/eth_syncing.json index 49156fe0..2bfd13f7 100644 --- a/docs/api/specs/json-rpc/eth_syncing.json +++ b/docs/api/specs/json-rpc/eth_syncing.json @@ -7,19 +7,54 @@ ], "summary": "Sync status", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/eth_syncing.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", "schema": { - "x-java-type": "Object" + "x-java-type": "Object", + "oneOf": [ + { + "type": "boolean", + "const": false, + "title": "EthSyncingResultFalse1" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "startingBlock": { + "type": "string" + }, + "currentBlock": { + "type": "string" + }, + "highestBlock": { + "type": "string" + } + }, + "required": [ + "startingBlock", + "currentBlock", + "highestBlock" + ], + "title": "EthSyncingResultRequiresStartingBlockCurrentBlockHighestBlock2" + } + ] } }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/eth_syncing.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/eth_syncing.md" }, "x-source-derived": true, "x-java-method": "getSyncingStatus", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_syncing", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getSyncingStatus", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#class SyncingResult" + ] } diff --git a/docs/api/specs/json-rpc/eth_uninstallFilter.json b/docs/api/specs/json-rpc/eth_uninstallFilter.json index 0d1a2ff6..a94eb21b 100644 --- a/docs/api/specs/json-rpc/eth_uninstallFilter.json +++ b/docs/api/specs/json-rpc/eth_uninstallFilter.json @@ -7,10 +7,12 @@ ], "summary": "Uninstall a filter", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/filter/eth_uninstallFilter.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "filterId", "required": true, + "description": "Filter id returned by eth_newFilter or eth_newBlockFilter.", "schema": { "type": "string" }, @@ -28,25 +30,27 @@ "errors": [ { "code": -32601, - "message": "JsonRpcMethodNotFoundException", - "x-java-exception": "JsonRpcMethodNotFoundException" + "message": "JsonRpcMethodNotFoundException" }, { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" }, { "code": -32000, - "message": "ItemNotFoundException", - "x-java-exception": "ItemNotFoundException" + "message": "ItemNotFoundException" } ], "externalDocs": { - "url": "docs/api/json-rpc/filter/eth_uninstallFilter.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/filter/eth_uninstallFilter.md" }, "x-source-derived": true, "x-java-method": "uninstallFilter", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#eth_uninstallFilter", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#uninstallFilter" + ] } diff --git a/docs/api/specs/json-rpc/net_listening.json b/docs/api/specs/json-rpc/net_listening.json index 947ce216..7d998561 100644 --- a/docs/api/specs/json-rpc/net_listening.json +++ b/docs/api/specs/json-rpc/net_listening.json @@ -7,6 +7,7 @@ ], "summary": "Whether listening on P2P", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_listening.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -17,10 +18,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/net_listening.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/net_listening.md" }, "x-source-derived": true, "x-java-method": "isListening", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#net_listening", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#isListening" + ] } diff --git a/docs/api/specs/json-rpc/net_peerCount.json b/docs/api/specs/json-rpc/net_peerCount.json index a5453225..6929b95b 100644 --- a/docs/api/specs/json-rpc/net_peerCount.json +++ b/docs/api/specs/json-rpc/net_peerCount.json @@ -7,6 +7,7 @@ ], "summary": "Number of peers", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_peerCount.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -17,10 +18,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/net_peerCount.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/net_peerCount.md" }, "x-source-derived": true, "x-java-method": "getPeerCount", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#net_peerCount", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getPeerCount" + ] } diff --git a/docs/api/specs/json-rpc/net_version.json b/docs/api/specs/json-rpc/net_version.json index 42535281..740e2e52 100644 --- a/docs/api/specs/json-rpc/net_version.json +++ b/docs/api/specs/json-rpc/net_version.json @@ -7,6 +7,7 @@ ], "summary": "Network ID (same as eth_chainId)", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/net_version.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -15,12 +16,22 @@ "x-java-type": "String" } }, - "errors": [], + "errors": [ + { + "code": -32000, + "message": "JsonRpcInternalException" + } + ], "externalDocs": { - "url": "docs/api/json-rpc/node/net_version.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/net_version.md" }, "x-source-derived": true, "x-java-method": "getNetVersion", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#net_version", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#getNetVersion" + ] } diff --git a/docs/api/specs/json-rpc/web3_clientVersion.json b/docs/api/specs/json-rpc/web3_clientVersion.json index 2b5c3679..c23429ad 100644 --- a/docs/api/specs/json-rpc/web3_clientVersion.json +++ b/docs/api/specs/json-rpc/web3_clientVersion.json @@ -7,6 +7,7 @@ ], "summary": "Client version string", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_clientVersion.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [], "result": { "name": "result", @@ -17,10 +18,15 @@ }, "errors": [], "externalDocs": { - "url": "docs/api/json-rpc/node/web3_clientVersion.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/web3_clientVersion.md" }, "x-source-derived": true, "x-java-method": "web3ClientVersion", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#web3_clientVersion", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#web3ClientVersion" + ] } diff --git a/docs/api/specs/json-rpc/web3_sha3.json b/docs/api/specs/json-rpc/web3_sha3.json index 31e83ee1..702811ed 100644 --- a/docs/api/specs/json-rpc/web3_sha3.json +++ b/docs/api/specs/json-rpc/web3_sha3.json @@ -7,10 +7,12 @@ ], "summary": "Keccak-256 hash", "description": "Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `docs/api/json-rpc/node/web3_sha3.md` for examples and detailed behavior.", + "paramStructure": "by-position", "params": [ { "name": "data", "required": true, + "description": "Hex-encoded input data.", "schema": { "type": "string" }, @@ -28,15 +30,19 @@ "errors": [ { "code": -32602, - "message": "JsonRpcInvalidParamsException", - "x-java-exception": "JsonRpcInvalidParamsException" + "message": "JsonRpcInvalidParamsException" } ], "externalDocs": { - "url": "docs/api/json-rpc/node/web3_sha3.md" + "url": "https://github.com/tronprotocol/documentation-en/blob/master/docs/api/json-rpc/node/web3_sha3.md" }, "x-source-derived": true, "x-java-method": "web3Sha3", "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "x-ports": "FullNode 8545 / Solidity 8555" + "x-ports": "FullNode 8545 / Solidity 8555", + "x-overlay-derived": true, + "x-source-refs": [ + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java#web3_sha3", + "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java#web3Sha3" + ] } diff --git a/scripts/generate_api_specs.py b/scripts/generate_api_specs.py deleted file mode 100644 index d06b41b5..00000000 --- a/scripts/generate_api_specs.py +++ /dev/null @@ -1,1289 +0,0 @@ -#!/usr/bin/env python3 -"""Generate machine-readable API specs from java-tron source plus docs metadata.""" - -from __future__ import annotations - -import json -import os -import re -from pathlib import Path -from typing import Any - - -ROOT = Path(__file__).resolve().parents[1] -DOCS = ROOT / "docs" -HTTP_INDEX = DOCS / "api" / "http" / "index.md" -JSON_RPC_INDEX = DOCS / "api" / "json-rpc" / "index.md" -OPENAPI_OUT = DOCS / "api" / "openapi.yaml" -OPENRPC_OUT = DOCS / "api" / "openrpc.json" -HTTP_SPECS_DIR = DOCS / "api" / "specs" / "http" -JSON_RPC_SPECS_DIR = DOCS / "api" / "specs" / "json-rpc" - - -def find_java_tron_root() -> Path: - candidates = [ - Path(os.environ["JAVA_TRON_SOURCE"]) if os.environ.get("JAVA_TRON_SOURCE") else None, - ROOT.parent / "java-tron", - ] - for candidate in candidates: - if candidate and (candidate / "framework/src/main/java").is_dir(): - return candidate - raise FileNotFoundError( - "java-tron source tree not found. Set JAVA_TRON_SOURCE to the java-tron checkout." - ) - - -JAVA_TRON = find_java_tron_root() -JAVA_MAIN = JAVA_TRON / "framework/src/main/java" -JAVA_SOURCE_ROOTS = [path for path in JAVA_TRON.glob("*/src/main/java") if path.is_dir()] -PROTO_ROOTS = [ - JAVA_TRON / "protocol/src/main/protos", - JAVA_TRON / "framework/src/main/protos", -] - - -TYPE_MAP = { - "bool": "boolean", - "boolean": "boolean", - "int": "integer", - "int32": "integer", - "int64": "integer", - "long": "integer", - "number": "number", - "object": "object", - "json object": "object", - "array": "array", - "string[]": "array", - "object[]": "array", -} - - -def slug(value: str) -> str: - return re.sub(r"[^A-Za-z0-9]+", "_", value).strip("_") - - -def clean_inline(value: str) -> str: - value = value.replace("\\|", "|") - value = re.sub(r"\[([^\]]+)\]\([^)]+\)", r"\1", value) - value = value.replace("**", "") - value = value.replace("`", "") - return value.strip() - - -def read(path: Path) -> str: - return path.read_text(encoding="utf-8") - - -def strip_java_comments(text: str) -> str: - text = re.sub(r"/\*.*?\*/", "", text, flags=re.S) - return "\n".join(line for line in text.splitlines() if not line.strip().startswith("//")) - - -def extract_index_entries(index_path: Path, base_dir: Path, link_pattern: str) -> list[dict[str, str]]: - entries: list[dict[str, str]] = [] - current_section = "" - for line in read(index_path).splitlines(): - heading = re.match(r"^##\s+(.+)", line) - if heading: - current_section = clean_inline(heading.group(1)) - continue - match = re.match(rf"^\|\s*\[`?({link_pattern})`?\]\(([^)]+)\)\s*\|\s*(.*?)\s*\|", line) - if not match: - continue - name, rel, description = match.groups() - entries.append( - { - "name": clean_inline(name), - "description": clean_inline(description), - "section": current_section, - "doc": str((base_dir / rel).resolve().relative_to(ROOT)), - } - ) - return entries - - -def extract_bullet(markdown: str, label: str) -> str | None: - match = re.search(rf"^- {re.escape(label)}:\s*(.+)$", markdown, flags=re.MULTILINE) - return clean_inline(match.group(1)) if match else None - - -def doc_entry_map(entries: list[dict[str, str]]) -> dict[str, dict[str, str]]: - return {entry["name"]: entry for entry in entries} - - -def servlet_class_files() -> dict[str, Path]: - files: dict[str, Path] = {} - for root in JAVA_SOURCE_ROOTS: - for path in root.rglob("*.java"): - files.setdefault(path.stem, path) - return files - - -CLASS_FILES = servlet_class_files() - - -def parse_autowired_fields(java_text: str) -> dict[str, str]: - fields: dict[str, str] = {} - for match in re.finditer(r"private\s+([A-Za-z0-9_]+)\s+([A-Za-z0-9_]+)\s*;", java_text): - class_name, field_name = match.groups() - fields[field_name] = class_name - return fields - - -def extract_servlet_registrations(service_file: Path) -> list[dict[str, str]]: - java = strip_java_comments(read(service_file)) - fields = parse_autowired_fields(java) - registrations: list[dict[str, str]] = [] - pattern = re.compile( - r"\.?\s*addServlet\s*\(\s*new\s+ServletHolder\s*\(\s*([A-Za-z0-9_]+)\s*\)" - r"\s*,\s*\"([^\"]+)\"\s*\)", - re.S, - ) - for match in pattern.finditer(java): - field_name, path = match.groups() - servlet_class = fields.get(field_name, field_name) - registrations.append( - { - "path": path, - "servlet": servlet_class, - "field": field_name, - "source": str(service_file.relative_to(JAVA_TRON)), - } - ) - return registrations - - -def source_http_registrations() -> dict[str, dict[str, Any]]: - fullnode_file = JAVA_MAIN / "org/tron/core/services/http/FullNodeHttpApiService.java" - solidity_file = ( - JAVA_MAIN - / "org/tron/core/services/interfaceOnSolidity/http/solidity/HttpApiOnSolidityService.java" - ) - registrations: dict[str, dict[str, Any]] = {} - for item in extract_servlet_registrations(fullnode_file): - if not item["path"].startswith("/wallet/"): - continue - registrations[item["path"]] = {**item, "service": "FullNode HTTP"} - for item in extract_servlet_registrations(solidity_file): - if not item["path"].startswith("/walletsolidity/"): - continue - wallet_path = "/wallet/" + item["path"].removeprefix("/walletsolidity/") - if wallet_path in registrations: - registrations[wallet_path]["solidityEndpoint"] = item["path"] - registrations[wallet_path]["solidityServlet"] = item["servlet"] - return registrations - - -def java_class_text(class_name: str) -> str: - path = CLASS_FILES.get(class_name) - return read(path) if path else "" - - -def class_extends(java: str) -> str | None: - match = re.search(r"\bclass\s+[A-Za-z0-9_]+\s+extends\s+([A-Za-z0-9_]+)", java) - return match.group(1) if match else None - - -def java_method_body(java: str, method_name: str) -> str | None: - match = re.search(rf"\b{method_name}\s*\([^)]*\)\s*(?:throws\s+[^\{{]+)?\{{", java) - if not match: - return None - start = match.end() - depth = 1 - idx = start - while idx < len(java) and depth: - if java[idx] == "{": - depth += 1 - elif java[idx] == "}": - depth -= 1 - idx += 1 - return java[start : idx - 1] - - -def java_class_body(java: str, class_name: str | None = None) -> str: - if class_name: - match = re.search(rf"\bclass\s+{re.escape(class_name)}\b[^\{{]*\{{", java) - else: - match = re.search(r"\bclass\s+[A-Za-z0-9_]+\b[^\{]*\{", java) - if not match: - return java - start = match.end() - depth = 1 - idx = start - while idx < len(java) and depth: - if java[idx] == "{": - depth += 1 - elif java[idx] == "}": - depth -= 1 - idx += 1 - return java[start : idx - 1] - - -def remove_nested_class_bodies(java_body: str) -> str: - result = [] - idx = 0 - nested = re.compile(r"\b(?:public|private|protected|static|\s)*class\s+[A-Za-z0-9_]+\b[^\{]*\{") - while idx < len(java_body): - match = nested.search(java_body, idx) - if not match: - result.append(java_body[idx:]) - break - result.append(java_body[idx : match.start()]) - depth = 1 - pos = match.end() - while pos < len(java_body) and depth: - if java_body[pos] == "{": - depth += 1 - elif java_body[pos] == "}": - depth -= 1 - pos += 1 - idx = pos - return "".join(result) - - -def servlet_http_methods(class_name: str, seen: set[str] | None = None) -> list[str]: - seen = seen or set() - if class_name in seen: - return ["post"] - seen.add(class_name) - java = strip_java_comments(java_class_text(class_name)) - methods = [] - do_get = java_method_body(java, "doGet") - do_post = java_method_body(java, "doPost") - if do_get and do_get.strip(): - methods.append("get") - if do_post and do_post.strip(): - methods.append("post") - if methods: - return methods - parent = class_extends(java) - return servlet_http_methods(parent, seen) if parent else ["post"] - - -def method_delegates_to(class_name: str, method_name: str, target_method: str) -> bool: - java = strip_java_comments(java_class_text(class_name)) - body = java_method_body(java, method_name) or "" - return bool( - re.fullmatch( - rf"\s*{re.escape(target_method)}\s*\(\s*request\s*,\s*response\s*\)\s*;?\s*", - body, - re.S, - ) - ) - - -def imports_by_simple_name(java: str) -> dict[str, str]: - imports: dict[str, str] = {} - for match in re.finditer(r"^import\s+([A-Za-z0-9_.]+)\.([A-Za-z0-9_]+);", java, re.M): - package, simple = match.groups() - imports[simple] = f"{package}.{simple}" - return imports - - -def servlet_request_type(class_name: str, seen: set[str] | None = None) -> tuple[str | None, str | None]: - seen = seen or set() - if class_name in seen: - return None, None - seen.add(class_name) - java = strip_java_comments(java_class_text(class_name)) - imports = imports_by_simple_name(java) - match = re.search(r"\b([A-Za-z0-9_]+)\.Builder\s+[A-Za-z0-9_]+\s*=", java) - if not match: - match = re.search(r"\b([A-Za-z0-9_]+)\.newBuilder\s*\(", java) - if match: - simple = match.group(1) - return simple, imports.get(simple) - if "Util.packTransaction" in java: - return "Transaction", imports.get("Transaction", "org.tron.protos.Protocol.Transaction") - parent = class_extends(java) - return servlet_request_type(parent, seen) if parent else (None, None) - - -def source_field_schema(name: str) -> dict[str, Any]: - integer_names = { - "fee_limit", - "call_value", - "consume_user_resource_percent", - "origin_energy_limit", - "call_token_value", - "token_id", - "timestamp", - "num", - "offset", - "limit", - "Permission_id", - "count", - "burnTrxAmount", - "brokerage", - "reward", - } - boolean_names = {"visible", "approved", "result"} - array_names = {"signature", "votes"} - object_names = {"raw_data", "abi", "new_contract", "transaction"} - if name in integer_names or name.endswith("_count") or name.endswith("_amount") or name.endswith("Size"): - return {"type": "integer"} - if name in boolean_names: - return {"type": "boolean"} - if name in array_names: - return {"type": "array", "items": {"type": "object"}} - if name in object_names: - return {"type": "object", "additionalProperties": True} - return {"type": "string"} - - -def transaction_json_request_schema(source_shape: str = "transaction-json") -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "raw_data": {"type": "object", "additionalProperties": True}, - "raw_data_hex": {"type": "string"}, - "signature": {"type": "array", "items": {"type": "string"}}, - "visible": {"type": "boolean"}, - }, - "oneOf": [ - {"required": ["raw_data"]}, - {"required": ["raw_data_hex"]}, - ], - "x-source-shape": source_shape, - } - - -def transaction_response_schema( - source_shape: str = "transaction-json", - java_response: str = "protocol.Transaction rendered by Util.printCreateTransaction", -) -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "txID": {"type": "string"}, - "raw_data": {"type": "object", "additionalProperties": True}, - "raw_data_hex": {"type": "string"}, - "signature": {"type": "array", "items": {"type": "string"}}, - "visible": {"type": "boolean"}, - "contract_address": {"type": "string"}, - }, - "x-java-response": java_response, - "x-source-shape": source_shape, - } - - -def proto_response_schema(message_name: str, description: str | None = None) -> dict[str, Any]: - schema = proto_message_schema(message_name) or { - "type": "object", - "additionalProperties": True, - "properties": {}, - } - schema["x-java-response"] = description or f"{message_name} rendered by java-tron JSON printer" - return schema - - -def array_response_schema(item_schema: dict[str, Any], description: str) -> dict[str, Any]: - return { - "type": "array", - "items": item_schema, - "x-java-response": description, - } - - -def address_visible_request_schema(source_shape: str = "servlet-effective-input") -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "address": {"type": "string"}, - "visible": {"type": "boolean"}, - }, - "x-source-shape": source_shape, - } - - -def transaction_sign_weight_response_schema() -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "result": {"type": "object", "additionalProperties": True}, - "approved_list": {"type": "array", "items": {"type": "string"}}, - "current_weight": {"type": "integer"}, - "transaction": transaction_response_schema("nested-transaction-json"), - "permission": {"type": "object", "additionalProperties": True}, - }, - "x-java-response": "TransactionSignWeight rendered by Util.printTransactionSignWeight", - } - - -def transaction_approved_list_response_schema() -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "result": {"type": "object", "additionalProperties": True}, - "approved_list": {"type": "array", "items": {"type": "string"}}, - "transaction": transaction_response_schema("nested-transaction-json"), - }, - "x-java-response": "TransactionApprovedList rendered by Util.printTransactionApprovedList", - } - - -def broadcast_response_schema(include_transaction: bool = False) -> dict[str, Any]: - properties: dict[str, Any] = { - "result": {"type": "boolean"}, - "code": {"type": "string"}, - "message": {"type": "string"}, - "txid": {"type": "string"}, - } - if include_transaction: - properties["transaction"] = {"type": "string"} - return { - "type": "object", - "additionalProperties": True, - "properties": properties, - "x-java-response": "Return/GrpcAPI.Return plus transaction id fields", - } - - -def return_result_schema() -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "result": {"type": "boolean"}, - "code": {"type": "string"}, - "message": {"type": "string"}, - }, - } - - -def transaction_extention_response_schema() -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "transaction": transaction_response_schema("nested-transaction-json"), - "txid": {"type": "string"}, - "constant_result": {"type": "array", "items": {"type": "string"}}, - "result": return_result_schema(), - "energy_used": {"type": "integer"}, - "logs": {"type": "array", "items": {"type": "object", "additionalProperties": True}}, - "internal_transactions": { - "type": "array", - "items": {"type": "object", "additionalProperties": True}, - }, - "energy_penalty": {"type": "integer"}, - }, - "x-java-response": "TransactionExtention rendered by Util.printTransactionExtention", - } - - -def estimate_energy_response_schema() -> dict[str, Any]: - return { - "type": "object", - "additionalProperties": True, - "properties": { - "result": return_result_schema(), - "energy_required": {"type": "integer"}, - }, - "x-java-response": "EstimateEnergyMessage rendered by Util.printEstimateEnergyMessage", - } - - -UTIL_CONSTANTS = { - "PERMISSION_ID": "Permission_id", - "S_VALUE": "value", - "VISIBLE": "visible", - "TRANSACTION": "transaction", - "VALUE": "value", - "VALUE_FIELD_NAME": "value", - "CONTRACT_TYPE": "contractType", - "EXTRA_DATA": "extra_data", - "OWNER_ADDRESS": "owner_address", - "CONTRACT_ADDRESS": "contract_address", - "FUNCTION_SELECTOR": "function_selector", - "FUNCTION_PARAMETER": "parameter", - "CALL_DATA": "data", -} - - -def java_string_constants(java: str) -> dict[str, str]: - constants = dict(UTIL_CONSTANTS) - for match in re.finditer( - r"\b(?:public|private|protected)?\s*(?:static\s+)?final\s+String\s+([A-Za-z0-9_]+)\s*=\s*\"([^\"]+)\"", - java, - ): - name, value = match.groups() - constants[name] = value - return constants - - -def literal_json_fields(java: str) -> list[str]: - fields: list[str] = [] - patterns = [ - r"\.getString\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", - r"\.getInteger\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", - r"\.getBoolean\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", - r"\.getLong\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", - r"\.getBigDecimal\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", - r"\.containsKey\s*\(\s*\"([A-Za-z0-9_]+)\"\s*\)", - r"Util\.getJsonLongValue\s*\([^,]+,\s*\"([A-Za-z0-9_]+)\"", - ] - for pattern in patterns: - fields.extend(re.findall(pattern, java)) - for constant, field_name in UTIL_CONSTANTS.items(): - if re.search(rf"\bUtil\.{constant}\b|\b{constant}\b", java): - fields.append(field_name) - return list(dict.fromkeys(fields)) - - -def source_post_fields(class_name: str, seen: set[str] | None = None) -> list[str]: - seen = seen or set() - if class_name in seen: - return [] - seen.add(class_name) - java = strip_java_comments(java_class_text(class_name)) - body = java_method_body(java, "doPost") or "" - fields = literal_json_fields(body) - if "Util.getVisiblePost" in body or "params.isVisible()" in body: - fields.append("visible") - if "setTransactionPermissionId" in body: - fields.append("Permission_id") - if "setTransactionExtraData" in body: - fields.append("extra_data") - if "Util.packTransaction" in body: - fields.extend(["raw_data", "raw_data_hex", "signature"]) - parent = class_extends(java) - if parent: - fields.extend(source_post_fields(parent, seen)) - return list(dict.fromkeys(fields)) - - -def post_body_uses_direct_json(class_name: str) -> bool: - java = strip_java_comments(java_class_text(class_name)) - body = java_method_body(java, "doPost") or "" - if "JsonFormat.merge" not in body: - return bool(literal_json_fields(body)) - return False - - -def servlet_get_parameters(class_name: str, seen: set[str] | None = None) -> list[str]: - seen = seen or set() - if class_name in seen: - return [] - seen.add(class_name) - java = strip_java_comments(java_class_text(class_name)) - if class_name == "GetBlockServlet": - return ["id_or_num", "detail", "visible"] - body = java_method_body(java, "doGet") or "" - if method_delegates_to(class_name, "doGet", "doPost"): - body += "\n" + (java_method_body(java, "doPost") or "") - constants = java_string_constants(java) - params = [] - for match in re.finditer(r"\.getParameter\s*\(\s*(?:\"([A-Za-z0-9_]+)\"|([A-Za-z0-9_]+))\s*\)", body): - literal, identifier = match.groups() - if literal: - params.append(literal) - elif identifier in constants: - params.append(constants[identifier]) - if "Util.getAddress(request)" in body: - params.append("address") - suppress_visible = { - "GetBrokerageServlet", - "GetRewardServlet", - "GetTransactionCountByBlockNumServlet", - "ValidateAddressServlet", - } - if "Util.getVisible(request)" in body or (params and class_name not in suppress_visible): - params.append("visible") - if params: - return list(dict.fromkeys(params)) - parent = class_extends(java) - return servlet_get_parameters(parent, seen) if parent else [] - - -def proto_type_to_schema(proto_type: str, repeated: bool) -> dict[str, Any]: - mapping = { - "string": {"type": "string"}, - "bytes": {"type": "string"}, - "bool": {"type": "boolean"}, - "double": {"type": "number"}, - "float": {"type": "number"}, - "int32": {"type": "integer"}, - "int64": {"type": "integer"}, - "uint32": {"type": "integer"}, - "uint64": {"type": "integer"}, - "sint32": {"type": "integer"}, - "sint64": {"type": "integer"}, - "fixed32": {"type": "integer"}, - "fixed64": {"type": "integer"}, - } - schema = mapping.get(proto_type.lstrip("."), {"type": "object", "additionalProperties": True}) - if repeated: - return {"type": "array", "items": schema} - return schema - - -def remove_proto_nested_blocks(body: str) -> str: - result = [] - idx = 0 - nested = re.compile(r"^\s*(?:message|enum)\s+[A-Za-z0-9_]+\s*\{", re.M) - while idx < len(body): - match = nested.search(body, idx) - if not match: - result.append(body[idx:]) - break - result.append(body[idx : match.start()]) - depth = 1 - pos = match.end() - while pos < len(body) and depth: - if body[pos] == "{": - depth += 1 - elif body[pos] == "}": - depth -= 1 - pos += 1 - idx = pos - return "".join(result) - - -def proto_message_schema(message_name: str | None) -> dict[str, Any] | None: - if not message_name: - return None - for root in PROTO_ROOTS: - if not root.exists(): - continue - for path in root.rglob("*.proto"): - text = read(path) - match = re.search(rf"\bmessage\s+{re.escape(message_name)}\s*\{{", text) - if not match: - continue - start = match.end() - depth = 1 - idx = start - while idx < len(text) and depth: - if text[idx] == "{": - depth += 1 - elif text[idx] == "}": - depth -= 1 - idx += 1 - body = remove_proto_nested_blocks(re.sub(r"//.*", "", text[start : idx - 1])) - properties: dict[str, Any] = {} - for field in re.finditer( - r"^\s*(?:(optional|required|repeated)\s+)?([.\w]+)\s+([A-Za-z0-9_]+)\s*=", - body, - re.M, - ): - label, proto_type, name = field.groups() - properties[name] = proto_type_to_schema(proto_type, label == "repeated") - return { - "type": "object", - "additionalProperties": True, - "properties": properties, - "x-proto-message": message_name, - "x-proto-file": str(path.relative_to(JAVA_TRON)), - } - return None - - -def java_path_for_fqn(fqn: str) -> Path | None: - rel = Path(*fqn.split(".")).with_suffix(".java") - for root in JAVA_SOURCE_ROOTS: - path = root / rel - if path.exists(): - return path - return None - - -def java_field_schema(java_type: str) -> dict[str, Any]: - java_type = java_type.strip() - if java_type.startswith("List<"): - inner = java_type.removeprefix("List<").removesuffix(">") - return {"type": "array", "items": java_field_schema(inner)} - if java_type.startswith("Map<"): - return {"type": "object", "additionalProperties": True} - return java_type_schema(java_type) - - -def java_pojo_schema(fqn: str) -> dict[str, Any] | None: - path = java_path_for_fqn(fqn) - if not path: - return None - text = remove_nested_class_bodies(java_class_body(strip_java_comments(read(path)), path.stem)) - properties: dict[str, Any] = {} - for match in re.finditer( - r"private\s+(?:final\s+)?([A-Za-z0-9_<>, ?\[\]]+)\s+([A-Za-z0-9_]+)\s*(?:=|;)", - text, - ): - java_type, name = match.groups() - properties[name] = java_field_schema(java_type) - if not properties: - return None - return { - "type": "object", - "additionalProperties": True, - "properties": properties, - "x-java-response-type": fqn, - "x-java-response-source": str(path.relative_to(JAVA_TRON)), - } - - -def schema_for_printed_proto(body: str, imports: dict[str, str]) -> dict[str, Any] | None: - printed_vars = re.findall( - r"(?:JsonFormat\.printToString|Util\.print[A-Za-z0-9_]*)\s*\(\s*([A-Za-z0-9_]+)\b", - body, - ) - for var_name in printed_vars: - declaration = re.search( - rf"\b([A-Za-z0-9_.]+(?:\.Builder)?)\s+{re.escape(var_name)}\s*(?:=|;)", - body, - ) - if not declaration: - continue - java_type = declaration.group(1).removesuffix(".Builder") - simple_type = java_type.split(".")[-1] - schema = proto_message_schema(simple_type) - if schema: - schema["x-java-response-type"] = imports.get(simple_type, java_type) - schema["x-java-response"] = f"{simple_type} rendered by java-tron JSON printer" - return schema - return None - - -def source_request_schema(class_name: str, request_type: str | None, request_fqn: str | None) -> dict[str, Any]: - explicit_fields = source_post_fields(class_name) - java = strip_java_comments(java_class_text(class_name)) - post_body = java_method_body(java, "doPost") or "" - if class_name in { - "GetAccountServlet", - "GetAccountNetServlet", - "GetAssetIssueByAccountServlet", - }: - schema = address_visible_request_schema() - if request_type: - schema["x-java-request-type"] = request_fqn or request_type - return schema - if class_name == "BroadcastHexServlet": - return { - "type": "object", - "additionalProperties": True, - "properties": {"transaction": {"type": "string"}}, - "required": ["transaction"], - "x-source-shape": "servlet-json-fields", - } - if "Util.packTransaction" in post_body: - schema = transaction_json_request_schema() - if request_type: - schema["x-java-request-type"] = request_fqn or request_type - return schema - if re.search(r"\bdoGet\s*\(\s*request\s*,\s*response\s*\)", post_body): - explicit_fields.extend(servlet_get_parameters(class_name)) - request_type = request_type if request_type != "Transaction" else request_type - proto_schema = proto_message_schema(request_type) - if post_body_uses_direct_json(class_name): - schema: dict[str, Any] = { - "type": "object", - "additionalProperties": True, - "properties": {name: source_field_schema(name) for name in explicit_fields}, - "x-source-shape": "servlet-json-fields", - } - else: - schema = proto_schema or { - "type": "object", - "additionalProperties": True, - "properties": {}, - } - schema.setdefault("properties", {}) - for name in explicit_fields: - schema["properties"].setdefault(name, source_field_schema(name)) - schema["x-source-shape"] = "protobuf-json-plus-servlet-fields" if proto_schema else "servlet-json-fields" - if request_type: - schema["x-java-request-type"] = request_fqn or request_type - return schema - - -def source_response_schema(class_name: str, seen: set[str] | None = None) -> dict[str, Any]: - seen = seen or set() - if class_name in seen: - return {"type": "object", "additionalProperties": True} - seen.add(class_name) - java = strip_java_comments(java_class_text(class_name)) - imports = imports_by_simple_name(java) - body = java_class_body(java, class_name) - if class_name == "BroadcastServlet": - return broadcast_response_schema() - if class_name == "BroadcastHexServlet": - return broadcast_response_schema(include_transaction=True) - if "Util.printCreateTransaction" in body: - return transaction_response_schema() - if "Util.printTransactionExtention" in body: - return transaction_extention_response_schema() - if "Util.printEstimateEnergyMessage" in body: - return estimate_energy_response_schema() - if "Util.printTransactionSignWeight" in body: - return transaction_sign_weight_response_schema() - if "Util.printTransactionApprovedList" in body: - return transaction_approved_list_response_schema() - if "convertLogAddressToTronAddress(reply" in body: - return proto_response_schema( - "TransactionInfo", - "TransactionInfo rendered through convertLogAddressToTronAddress", - ) - if "printTransactionInfoList(reply" in body: - return array_response_schema( - proto_response_schema( - "TransactionInfo", - "TransactionInfo rendered through convertLogAddressToTronAddress", - ), - "Array of TransactionInfo rendered by printTransactionInfoList", - ) - if "Util.printTransaction(reply.getInstance()" in body: - return transaction_response_schema( - java_response="protocol.Transaction rendered by Util.printTransaction" - ) - if "wallet.getChainParameters()" in body: - return proto_response_schema("ChainParameters") - json_response = re.search( - r"\b([A-Za-z0-9_]+)\s+([A-Za-z0-9_]+)\s*=.*?;\s*.*?JSON\.toJSONString\s*\(\s*\2\s*\)", - body, - re.S, - ) - if json_response: - simple_type = json_response.group(1) - pojo = java_pojo_schema(imports.get(simple_type, simple_type)) - if pojo: - return pojo - proto_print = schema_for_printed_proto(body, imports) - if proto_print: - return proto_print - properties: dict[str, Any] = {} - for field in re.findall(r'\{\s*\\?"([A-Za-z0-9_]+)\\?"\s*:', body): - properties[field] = source_field_schema(field) - for field in re.findall(r"\.put\s*\(\s*\"([A-Za-z0-9_]+)\"", body): - properties[field] = source_field_schema(field) - for constant, field_name in UTIL_CONSTANTS.items(): - if re.search(rf"\.put\s*\(\s*(?:Util\.)?{constant}\b", body): - properties[field_name] = source_field_schema(field_name) - util_prints = { - "Util.printCreateTransaction": "protocol.Transaction plus txID/raw_data_hex/visible", - "Util.printTransactionExtention": "TransactionExtention with expanded transaction", - "Util.printEstimateEnergyMessage": "EstimateEnergyMessage", - "Util.printTransactionSignWeight": "TransactionSignWeight", - "Util.printTransactionApprovedList": "TransactionApprovedList", - "JsonFormat.printToString": "protobuf JSON", - } - schema: dict[str, Any] = {"type": "object", "additionalProperties": True} - if properties: - schema["properties"] = properties - for marker, description in util_prints.items(): - if marker in body: - schema["x-java-response"] = description - break - parent = class_extends(java) - if not properties and parent: - return source_response_schema(parent, seen) - return schema - - -def documented_http_entries() -> dict[str, dict[str, str]]: - return doc_entry_map(extract_index_entries(HTTP_INDEX, HTTP_INDEX.parent, r"/wallet/[A-Za-z0-9/_-]+")) - - -def split_table_row(line: str) -> list[str]: - stripped = line.strip().strip("|") - return [clean_inline(part) for part in re.split(r"(? list[dict[str, str]]: - marker = re.search(r"^## Request parameters\s*$", markdown, flags=re.MULTILINE) - if not marker: - return [] - lines = markdown[marker.end() :].splitlines() - table: list[str] = [] - in_table = False - for line in lines: - if line.startswith("|"): - table.append(line) - in_table = True - elif in_table: - break - if len(table) < 3: - return [] - headers = [h.lower() for h in split_table_row(table[0])] - rows = [] - for line in table[2:]: - cells = split_table_row(line) - if len(cells) < len(headers): - continue - item = dict(zip(headers, cells)) - rows.append(item) - return rows - - -def schema_for_type(type_text: str) -> dict[str, Any]: - lowered = type_text.lower().replace(" ", "") - if lowered.endswith("[]") or "array" in lowered or lowered.startswith("repeated"): - return {"type": "array", "items": {"type": "object"}} - if lowered in TYPE_MAP: - schema_type = TYPE_MAP[lowered] - if schema_type == "array": - return {"type": "array", "items": {"type": "object"}} - return {"type": schema_type} - if any(token in lowered for token in ["int", "uint", "long"]): - return {"type": "integer"} - if any(token in lowered for token in ["bool"]): - return {"type": "boolean"} - if any(token in lowered for token in ["object", "map", "json"]): - return {"type": "object", "additionalProperties": True} - return {"type": "string"} - - -def required_value(value: str) -> bool: - return value.strip().lower() in {"yes", "true", "required"} - - -def http_request_schema(rows: list[dict[str, str]]) -> dict[str, Any]: - properties: dict[str, Any] = {} - required: list[str] = [] - for row in rows: - field = row.get("field", "") - if not field: - continue - name = field.split("/")[0].strip() - schema = schema_for_type(row.get("type", "string")) - description = row.get("description") - if description: - schema["description"] = description - properties[name] = schema - if required_value(row.get("required", "")): - required.append(name) - schema: dict[str, Any] = {"type": "object", "additionalProperties": True} - if properties: - schema["properties"] = properties - if required: - schema["required"] = required - return schema - - -def build_openapi() -> dict[str, Any]: - entries = documented_http_entries() - source_paths = source_http_registrations() - missing_in_source = sorted(set(entries) - set(source_paths)) - if missing_in_source: - raise RuntimeError( - "Documented HTTP endpoints are not registered in java-tron source: " - + ", ".join(missing_in_source) - ) - paths: dict[str, Any] = {} - for endpoint, entry in entries.items(): - source = source_paths[endpoint] - markdown = read(ROOT / entry["doc"]) - method_names = servlet_http_methods(source["servlet"]) - request_type, request_fqn = servlet_request_type(source["servlet"]) - request_schema = source_request_schema(source["servlet"], request_type, request_fqn) - response_schema = source_response_schema(source["servlet"]) - operation_base = { - "tags": [entry["section"]], - "summary": entry["description"], - "description": f"Endpoint registration, HTTP method, servlet, and request type are derived from java-tron source. See `{entry['doc']}` for examples and detailed behavior.", - "operationId": slug(entry["name"]), - "externalDocs": {"url": entry["doc"]}, - "responses": { - "200": { - "description": "java-tron response. Most business errors are returned with HTTP 200 and an error object in the body.", - "content": { - "application/json": { - "schema": response_schema, - }, - "text/plain": {"schema": {"type": "string"}}, - }, - }, - "404": {"description": "Endpoint disabled by node configuration."}, - }, - "x-source-derived": True, - "x-java-service": source["service"], - "x-java-servlet": source["servlet"], - "x-java-source": source["source"], - } - if source.get("solidityEndpoint"): - operation_base["x-solidity-endpoint"] = source["solidityEndpoint"] - operation_base["x-solidity-servlet"] = source.get("solidityServlet") - - path_item: dict[str, Any] = {} - for method in method_names: - operation = json.loads(json.dumps(operation_base)) - operation["operationId"] = f"{slug(entry['name'])}_{method}" - if method == "get": - get_params = servlet_get_parameters(source["servlet"]) - operation["parameters"] = [ - { - "name": name, - "in": "query", - "required": False, - "schema": request_schema.get("properties", {}).get(name, source_field_schema(name)), - "x-source-derived": True, - } - for name in get_params - ] - else: - if method_delegates_to(source["servlet"], "doPost", "doGet") or source[ - "servlet" - ] == "GetTransactionListFromPendingServlet": - post_params = servlet_get_parameters(source["servlet"]) - operation["parameters"] = [ - { - "name": name, - "in": "query", - "required": False, - "schema": source_field_schema(name), - "x-source-derived": True, - } - for name in post_params - ] - elif request_schema.get("properties") or request_schema.get("x-java-request-type"): - operation["requestBody"] = { - "required": method == "post", - "content": { - "application/json": { - "schema": request_schema, - } - }, - } - path_item[method] = operation - paths[endpoint] = path_item - return { - "openapi": "3.1.0", - "info": { - "title": "java-tron HTTP API", - "version": "1.0.0", - "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation.", - }, - "servers": [ - {"url": "https://nile.trongrid.io", "description": "Nile testnet TronGrid"}, - {"url": "http://127.0.0.1:8090", "description": "Local FullNode HTTP API"}, - ], - "paths": paths, - "components": { - "schemas": { - "JavaTronError": { - "type": "object", - "additionalProperties": True, - "properties": {"Error": {"type": "string"}}, - } - } - }, - } - - -def http_fragment_name(endpoint: str) -> str: - return endpoint.removeprefix("/wallet/").replace("/", "-") + ".yaml" - - -def json_rpc_fragment_name(method: str) -> str: - return method + ".json" - - -def clean_generated_files(directory: Path, suffix: str) -> None: - directory.mkdir(parents=True, exist_ok=True) - for path in directory.glob(f"*{suffix}"): - path.unlink() - - -def write_http_fragments(paths: dict[str, Any]) -> None: - clean_generated_files(HTTP_SPECS_DIR, ".yaml") - for endpoint, path_item in paths.items(): - out = HTTP_SPECS_DIR / http_fragment_name(endpoint) - out.write_text( - "# This file is generated by scripts/generate_api_specs.py. Do not edit by hand.\n" - + dump_yaml({endpoint: path_item}) - + "\n", - encoding="utf-8", - ) - - -def write_json_rpc_fragments(methods: list[dict[str, Any]]) -> None: - clean_generated_files(JSON_RPC_SPECS_DIR, ".json") - for method in methods: - out = JSON_RPC_SPECS_DIR / json_rpc_fragment_name(method["name"]) - out.write_text(json.dumps(method, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") - - -def java_type_schema(java_type: str) -> dict[str, Any]: - cleaned = java_type.strip() - if cleaned.endswith("[]"): - return {"type": "array", "items": java_type_schema(cleaned[:-2])} - if cleaned.startswith("List<"): - inner = cleaned.removeprefix("List<").removesuffix(">") - return {"type": "array", "items": java_type_schema(inner)} - mapping = { - "String": {"type": "string"}, - "Object": {}, - "Boolean": {"type": "boolean"}, - "boolean": {"type": "boolean"}, - "int": {"type": "integer"}, - "Integer": {"type": "integer"}, - "long": {"type": "integer"}, - "Long": {"type": "integer"}, - } - return mapping.get(cleaned, {"type": "object", "additionalProperties": True}) - - -def extract_source_jsonrpc_methods() -> dict[str, dict[str, Any]]: - java = strip_java_comments(read(JAVA_MAIN / "org/tron/core/services/jsonrpc/TronJsonRpc.java")) - methods: dict[str, dict[str, Any]] = {} - pattern = re.compile( - r"@JsonRpcMethod\(\"([^\"]+)\"\)(?P.*?);", - re.S, - ) - signature_re = re.compile( - r"(?:public\s+)?([A-Za-z0-9_<>, ?\[\]]+)\s+([A-Za-z0-9_]+)\s*\((.*?)\)" - ) - for match in pattern.finditer(java): - rpc_name = match.group(1) - body = match.group("body") - signature = signature_re.search(body) - if not signature: - continue - return_type, java_method, params_text = signature.groups() - params = [] - if params_text.strip(): - for idx, param in enumerate(re.split(r"\s*,\s*", params_text.strip())): - pieces = param.rsplit(" ", 1) - if len(pieces) != 2: - continue - java_type, name = pieces - params.append( - { - "name": name, - "required": True, - "schema": java_type_schema(java_type), - "x-java-type": java_type, - "x-position": idx, - } - ) - errors = [] - for error in re.finditer( - r"@JsonRpcError\(exception\s*=\s*([A-Za-z0-9_]+)\.class,\s*code\s*=\s*(-?\d+)", - body, - ): - exception, code = error.groups() - errors.append({"code": int(code), "message": exception, "x-java-exception": exception}) - methods[rpc_name] = { - "name": rpc_name, - "x-java-method": java_method, - "x-java-source": "framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpc.java", - "params": params, - "result": { - "name": "result", - "schema": { - **java_type_schema(return_type), - "x-java-type": return_type.strip(), - }, - }, - "errors": errors, - } - return methods - - -def openrpc_params(rows: list[dict[str, str]]) -> list[dict[str, Any]]: - params = [] - for row in rows: - position = row.get("position", "") - name = position.replace("params[", "param").replace("]", "") - params.append( - { - "name": name, - "required": required_value(row.get("required", "")), - "description": row.get("description", ""), - "schema": schema_for_type(row.get("type", "string")), - } - ) - return params - - -def build_openrpc() -> dict[str, Any]: - entries = extract_index_entries(JSON_RPC_INDEX, JSON_RPC_INDEX.parent, r"[A-Za-z0-9_]+") - source_methods = extract_source_jsonrpc_methods() - missing_in_source = sorted(entry["name"] for entry in entries if entry["name"] not in source_methods) - if missing_in_source: - raise RuntimeError( - "Documented JSON-RPC methods are not declared in java-tron source: " - + ", ".join(missing_in_source) - ) - methods = [] - for entry in entries: - markdown = read(ROOT / entry["doc"]) - ports = extract_bullet(markdown, "Ports") - source = source_methods[entry["name"]] - method: dict[str, Any] = { - "name": entry["name"], - "tags": [{"name": entry["section"]}], - "summary": entry["description"], - "description": f"Method name, Java signature, parameters, return type, and declared errors are derived from java-tron source. See `{entry['doc']}` for examples and detailed behavior.", - "params": source["params"], - "result": source["result"], - "errors": source["errors"], - "externalDocs": {"url": entry["doc"]}, - "x-source-derived": True, - "x-java-method": source["x-java-method"], - "x-java-source": source["x-java-source"], - } - if ports: - method["x-ports"] = ports - methods.append(method) - return { - "openrpc": "1.2.6", - "info": { - "title": "java-tron JSON-RPC API", - "version": "1.0.0", - "description": "Machine-readable definition generated from java-tron source code, with human-facing metadata linked to the markdown API documentation.", - }, - "servers": [ - {"name": "Nile testnet", "url": "https://nile.trongrid.io/jsonrpc"}, - {"name": "Local FullNode", "url": "http://127.0.0.1:8545/jsonrpc"}, - {"name": "Local Solidity", "url": "http://127.0.0.1:8555/jsonrpc"}, - ], - "methods": methods, - } - - -def dump_yaml(value: Any, indent: int = 0) -> str: - space = " " * indent - if isinstance(value, dict): - lines = [] - for key, item in value.items(): - yaml_key = json.dumps(str(key)) - if isinstance(item, (dict, list)): - lines.append(f"{space}{yaml_key}:") - lines.append(dump_yaml(item, indent + 1)) - else: - lines.append(f"{space}{yaml_key}: {json.dumps(item)}") - return "\n".join(lines) - if isinstance(value, list): - if not value: - return f"{space}[]" - lines = [] - for item in value: - if isinstance(item, (dict, list)): - lines.append(f"{space}-") - lines.append(dump_yaml(item, indent + 1)) - else: - lines.append(f"{space}- {json.dumps(item)}") - return "\n".join(lines) - return f"{space}{json.dumps(value)}" - - -def main() -> None: - openapi = build_openapi() - openrpc = build_openrpc() - write_http_fragments(openapi["paths"]) - write_json_rpc_fragments(openrpc["methods"]) - OPENAPI_OUT.write_text( - "# This file is generated by scripts/generate_api_specs.py. Do not edit by hand.\n" - + dump_yaml(openapi) - + "\n", - encoding="utf-8", - ) - OPENRPC_OUT.write_text(json.dumps(openrpc, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") - - -if __name__ == "__main__": - main()