Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
获取网络对特定消息收取的手续费
显示 result fields
curl http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 1, "method": "getFeeForMessage", "params": [ "AQABAyRn/PA8jzJtN6oAyB3VR0nfOF0xnfkYaKwY4Ir3nrHFJGqhAQICAAEDAgABDAIAAAAEAAAAAAAA", {"commitment": "processed"} ] }'
import { Connection } from '@solana/web3.js'; const connection = new Connection('http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY'); const message = 'AQABAyRn/PA8jzJtN6oAyB3VR0nfOF0xnfkYaKwY4Ir3nrHFJGqhAQICAAEDAgABDAIAAAAEAAAAAAAA'; const fee = await connection.getFeeForMessage(message); console.log(fee);
from solana.rpc.api import Client client = Client("http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY") message = "AQABAyRn/PA8jzJtN6oAyB3VR0nfOF0xnfkYaKwY4Ir3nrHFJGqhAQICAAEDAgABDAIAAAAEAAAAAAAA" response = client.get_fee_for_message(message) print(response)
此页面对您有帮助吗?