Bidders
Bid on flow and get exclusive transactions by following these steps:
(1) Create an account
(2) Connect to the websocket
Connect to the following websocket:
wss://flow.merkle.io/<private key>
Then, subscribe to the new transaction with the following rpc message:
{"jsonrpc": "2.0", "method": "eth_subsribe", "params": ["mkl_transactions"]}
The RPC server will respond with a subscription confirmation:
{
"jsonrpc": "2.0",
"method": "eth_subscription"
"params": {
"subscription": "<subscription id>",
"result": {
"hash": string, // the hash of the transaction
"unsignedTx": "0x..." // hex-encoded unsigned transaction
"unsignedTxFrom": "0x...." // the transaction sender
}
}
}
(3) Make a bid
Bids are made on a list of transactions, lists can be 1 or more transactions. Make a bid by sending the following RPC message to the flow server:
{
"jsonrpc": "2.0",
"method": "mkl_bid",
"params": [
[
// list of transcation hashes to bid on
"0x.....",
"0x.....",
],
10.3, // bid in ETH
]
}
Flow will respond with a bid id:
{
"jsonrpc": "2.0",
"result": "3647542a-02d3-4259-80e3-bcd481691d75",
}
(4) Delivery
Flow will deliver transactions exactly 2s before the next block. Subscribe to deliveries using the following rpc subscription:
{"jsonrpc": "2.0", "method": "eth_subsribe", "params": ["mkl_delivery"]}
The delivery message will have the following format:
{
"jsonrpc": "2.0",
"method": "eth_subscription"
"params": {
"subscription": "<subscription id>",
"result": {
"bidId": string, // the bid id
"signedTxs": string[] // list of signed transactions
}
}
}
Last modified 5d ago