merkle
Search
K

RPC Reference

The reference of every RPC method supported by flow:
eth_sendRawTransaction - Auction transactions
Send a transaction to the Flow service.
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendRawTransaction",
"params": [
"0x...", // signed transaction
]
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..." // hash of transaction
}
mkl_bid - Bid on transactions
Create a bid on a list of transactions.
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "mkl_bid",
"params": [
[ // list of hashes
"0x...",
"0x....",
],
0.001 // bid in ETH
]
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "e84410d1-8da1-4659-9db7-75113f3e4d7f",
}
mkl_cancelBid - Cancel a bid
Cancel a pending bid.
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "mkl_cancelBid",
"params": [
"<bid id>", // id of the bid
]
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "e84410d1-8da1-4659-9db7-75113f3e4d7f",
}
Subscriptions supported by the Flow service:
mkl_bids - Stream incoming bids
Stream every incoming bids on Flow.
Request:
{"jsonrpc": "2.0", "method": "eth_subscribe", "params": ["mkl_bids"]}
Stream:
{
"jsonrpc": "2.0",
"method": "eth_subscription"
"params": {
"subscription": "<subscription id>",
"result": {
"amount": 0.2, // eth amount
"txs": string[], // transaction hash
}
}
}
mkl_transactions - Stream incoming transactions
Stream every incoming transaction on Flow.
Request:
{"jsonrpc": "2.0", "method": "eth_subscribe", "params": ["mkl_transactions"]}
Stream:
{
"jsonrpc": "2.0",
"method": "eth_subscription"
"params": {
"subscription": "<subscription id>",
"result": {
"hash": string,
"unsignedTx": "0x" // hex-encoded unsigned transaction
"unsignedTxFrom": "0x" // the transaction sender
}
}
}
mkl_delivery - Stream delivery for winning bids
Receive transaction from winning bids.
Request:
{"jsonrpc": "2.0", "method": "eth_subscribe", "params": ["mkl_delivery"]}
Stream:
{
"jsonrpc": "2.0",
"method": "eth_subscription"
"params": {
"subscription": "<subscription id>",
"result": {
"bidId": string, // id of the winning bid
"signedTxs": string[] // the signed transactions
}
}
}