TRON
protocol.Wallet/BroadcastTransaction25クレジット
Broadcasts a signed transaction (gRPC).
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
| raw_data | Object | Transaction.raw: ref_block_bytes, ref_block_num, ref_block_hash, expiration, contract[], timestamp, fee_limit, ... |
| signature | string[] | Signatures (bytes; base64 in the JSON form of the message). |
戻り値
型
Object
Return message: result (true when accepted into the pending pool), code (SUCCESS, SIGERROR, CONTRACT_VALIDATE_ERROR, CONTRACT_EXE_ERROR, BANDWITH_ERROR, DUP_TRANSACTION_ERROR, TAPOS_ERROR, TOO_BIG_TRANSACTION_ERROR, TRANSACTION_EXPIRATION_ERROR, SERVER_BUSY, ...) and message (bytes with error details).
コード例
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"raw_data": {},
"signature": [
"<base64 signature>"
]
}' \
grpc-holy-burned-sky-tron-mainnet.rpcnode.dev:443 \
protocol.Wallet/BroadcastTransaction