• 官网
  • 中文
  • English
  • Russian
  • More language
Show / Hide Table of Contents
  • NEO 基础知识
    • 关于 NEO
    • NEO 白皮书
    • NEO Contract白皮书
    • 共识机制
      • 共识机制白皮书
      • 共识机制图解
  • NEO 节点
    • NEO 节点介绍
    • NEO-GUI
      • 下载客户端
      • 钱包
      • 交易
      • 注册与分发资产
      • 与智能合约交互
      • 选举与投票
      • 其它功能
    • NEO-CLI
      • 发布
      • 安装
      • 节点列表
      • NEO-CLI 命令参考
      • API 参考
        • v2.9.0(或以上版本)
          • dumpprivkey
          • getaccountstate
          • getassetstate
          • getbalance
          • getbestblockhash
          • getblock
          • getblock
          • getblockcount
          • getblockheader
          • getblockhash
          • getblocksysfee
          • getconnectioncount
          • getcontractstate
          • getnewaddress
          • getrawmempool
          • getrawtransaction
          • getstorage
          • gettxout
          • getpeers
          • getvalidators
          • getversion
          • getwalletheight
          • invoke
          • invokefunction
          • invokescript
          • listaddress
          • sendfrom
          • sendrawtransaction
          • sendtoaddress
          • sendmany
          • validateaddress
        • v2.8.0
          • dumpprivkey
          • getaccountstate
          • getapplicationlog
          • getassetstate
          • getbalance
          • getbestblockhash
          • getblock
          • getblock
          • getblockcount
          • getblockhash
          • getblocksysfee
          • getconnectioncount
          • getcontractstate
          • getnewaddress
          • getrawmempool
          • getrawtransaction
          • getstorage
          • gettxout
          • getpeers
          • getvalidators
          • getversion
          • invoke
          • invokefunction
          • invokescript
          • listaddress
          • sendfrom
          • sendrawtransaction
          • sendtoaddress
          • sendmany
          • validateaddress
        • v2.7.6
          • dumpprivkey
          • getaccountstate
          • getapplicationlog
          • getassetstate
          • getbalance
          • getbestblockhash
          • getblock
          • getblock
          • getblockcount
          • getblockhash
          • getblocksysfee
          • getconnectioncount
          • getcontractstate
          • getnewaddress
          • getrawmempool
          • getrawtransaction
          • getstorage
          • gettxout
          • getpeers
          • getvalidators
          • getversion
          • invoke
          • invokefunction
          • invokescript
          • listaddress
          • sendfrom
          • sendrawtransaction
          • sendtoaddress
          • sendmany
          • validateaddress
    • NEO 客户端插件
    • NEO-Python
      • 概述
      • 安装 (Ubuntu/OSX)
      • 安装 (Windows)
      • NEO-Python SeedList
      • 基本用法
      • Prompt
      • 设置和日志
      • neo.Core.TX.Transaction
      • 与智能合约交互
      • Application vs. Verification
      • 数据类型
      • 测试
      • 测试装置
  • NEO 网络
    • 测试网
    • 搭建私有链
      • 搭建私有链
      • 快速搭建私有链
    • 快速搭建本地网络
    • 快速同步区块
    • 网络协议
  • NEO 工具
    • NEO SDK
      • 欢迎使用 NEO SDK
      • 常见数据类型转换
      • 账户
      • 钱包
      • 交易
    • 区块链浏览器
  • 智能合约
    • 智能合约介绍
    • 快速入门
      • 如何开始
        • 使用C# (Windows)
        • 使用C# (macOS)
        • 使用C# (ubuntu)
        • 使用 Java
        • 使用 Python
      • 合约编写须知
      • 测试
      • 部署和调用合约
    • 开发参考
      • API 参考
        • NEO
        • System
      • 框架
        • .net 框架
          • NEO
            • Account
            • Asset
            • Block
            • Blockchain
            • Contract
            • Enrollment
            • Header
            • Runtime
            • Storage
            • StorageContext
            • Transaction
            • TransactionAttribute
            • TransactionInput
            • TransactionOutput
            • TriggerType
            • Validator
          • System
            • ExecutionEngine
    • 合约示例与教程
      • Hello World
      • Lock(锁仓合约)
      • Domain(域名系统)
      • 鉴权合约示例教程
      • 锁仓合约示例教程
    • 参数和返回值
    • 智能合约触发器
    • 系统使用费
  • 常见问题
  • 交易所对接指南
    • v2.9.4
    • v2.9.3
    • v2.9.2
    • v2.9.1
    • v2.9.0
    • v2.8.0
    • v2.7.6

getrawtransaction 方法

根据指定的散列值,返回对应的交易信息。

参数说明

txid:交易 ID。

verbose:可选参数,verbose 默认值为 0,verbose 为 0 时返回的是交易的序列化后的信息,用 16 进制字符串表示,如果从中获取详细信息需要调用 SDK 来进行反序列化。verbose 为 1 时返回的是对应交易的详细信息,用 Json 格式字符串表示。

调用示例

请求正文:

{
  "jsonrpc": "2.0",
  "method": "getrawtransaction",
  "params": ["f4250dab094c38d8265acc15c366dc508d2e14bf5699e12d9df26577ed74d657"],
  "id": 1
}

响应正文:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "80000001195876cb34364dc38b730077156c6bc3a7fc570044a66fbfeeea56f71327e8ab0000029b7cffdaa674beae0f930ebe6085af9093e5fe56b34a5c220ccdcf6efc336fc500c65eaf440000000f9a23e06f74cf86b8827a9108ec2e0f89ad956c9b7cffdaa674beae0f930ebe6085af9093e5fe56b34a5c220ccdcf6efc336fc50092e14b5e00000030aab52ad93f6ce17ca07fa88fc191828c58cb71014140915467ecd359684b2dc358024ca750609591aa731a0b309c7fb3cab5cd0836ad3992aa0a24da431f43b68883ea5651d548feb6bd3c8e16376e6e426f91f84c58232103322f35c7819267e721335948d385fae5be66e7ba8c748ac15467dcca0693692dac"
}

请求正文:

verbose = 1,返回 JSON 格式的结果。

{
  "jsonrpc": "2.0",
  "method": "getrawtransaction",
  "params": ["f4250dab094c38d8265acc15c366dc508d2e14bf5699e12d9df26577ed74d657", 1],
  "id": 1
}

响应正文:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "txid": "oxf4250dab094c38d8265acc15c366dc508d2e14bf5699e12d9df26577ed74d657",
    "size": 262,
    "type": "ContractTransaction",
    "version": 0,
    "attributes": [],
    "vin": [
      {
        "txid": "oxabe82713f756eaeebf6fa6440057fca7c36b6c157700738bc34d3634cb765819",
        "vout": 0
      }
    ],
    "vout": [
      {
        "n": 0,
        "asset": "oxc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",
        "value": "2950",
        "address": "AHCNSDkh2Xs66SzmyKGdoDKY752uyeXDrt"
      },
      {
        "n": 1,
        "asset": "oxc56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",
        "value": "4050",
        "address": "ALDCagdWUVV4wYoEzCcJ4dtHqtWhsNEEaR"
      }
    ],
    "sys_fee": "0",
    "net_fee": "0",
    "scripts": [
      {
        "invocation": "40915467ecd359684b2dc358024ca750609591aa731a0b309c7fb3cab5cd0836ad3992aa0a24da431f43b68883ea5651d548feb6bd3c8e16376e6e426f91f84c58",
        "verification": "2103322f35c7819267e721335948d385fae5be66e7ba8c748ac15467dcca0693692dac"
      }
    ],
    "blockhash": "ox9c814276156d33f5dbd4e1bd4e279bb4da4ca73ea7b7f9f0833231854648a72c",
    "confirmations": 144,
    "blocktime": 1496719422
  }
}
  • Improve this Doc
Back to top Copyright © 2014-2018 NEO