Phương thức RPC getTransaction
Trả về chi tiết giao dịch cho một giao dịch đã được xác nhận
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getTransaction",> "params": [> "5Pj5fCupXLUePYn18JkY8SrRaWFiUctuDTRwvUy2ML9yvkENLb1QMYbcBGcBXRrSVDjp7RjUwk9a3rLC6gpvtYpZ",> {> "commitment": "confirmed",> "maxSupportedTransactionVersion": 0,> "encoding": "json"> }> ]> }> '
params
stringrequired
Chữ ký giao dịch, dưới dạng chuỗi mã hóa base-58
objectoptional
Đối tượng cấu hình chứa các trường sau:
result
Response
{"jsonrpc": "2.0","result": {"blockTime": 1746479684,}
object | null
Trả về null
nếu không tìm thấy giao dịch hoặc giao dịch chưa được xác nhận,
ngược lại trả về một đối tượng chứa:
Is this page helpful?