跳转到主要内容
POST
/
txpool_contentFrom
curl --request POST \
  --url https://rpc.quai.network/cyprus1/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "txpool_contentFrom",
  "params": [
    "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7"
  ],
  "id": 1
}
'
import requests

url = "https://rpc.quai.network/cyprus1/"

payload = {
    "jsonrpc": "2.0",
    "method": "txpool_contentFrom",
    "params": ["0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7"],
    "id": 1
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'txpool_contentFrom',
    params: ['0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7'],
    id: 1
  })
};

fetch('https://rpc.quai.network/cyprus1/', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://rpc.quai.network/cyprus1/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'jsonrpc' => '2.0',
    'method' => 'txpool_contentFrom',
    'params' => [
        '0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7'
    ],
    'id' => 1
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rpc.quai.network/cyprus1/"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"txpool_contentFrom\",\n  \"params\": [\n    \"0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7\"\n  ],\n  \"id\": 1\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://rpc.quai.network/cyprus1/")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"txpool_contentFrom\",\n  \"params\": [\n    \"0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7\"\n  ],\n  \"id\": 1\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://rpc.quai.network/cyprus1/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"txpool_contentFrom\",\n  \"params\": [\n    \"0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7\"\n  ],\n  \"id\": 1\n}"

response = http.request(request)
puts response.read_body
{
  "jsonrpc": "2.0",
  "result": {
    "pending": {
      "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7": {
        "855": {
          "blockHash": null,
          "blockNumber": null,
          "from": "0x0004754b0bda885565558ad25b5015bbbb1b16fa",
          "gas": "0xa410",
          "gasPrice": "0x77359404",
          "hash": "0x60185d6a221b9192c673a6ba72c1f25578a007e9252528484f772375d7e7feb6",
          "input": "0x",
          "nonce": "0x357",
          "to": "0x144876b258060cc918d5424f8ca5e496b6f64e3e",
          "transactionIndex": null,
          "value": "0x2c",
          "type": "0x0",
          "accessList": [],
          "chainId": "0x2328",
          "v": "0x1",
          "r": "0xa2e91b62889191bb5bc0760cb166225372ac05b6ec0db9d11bc8cf621fc47183",
          "s": "0x96bf297045e6e9439947bc8f1b30abe4bc5db1e11a044acb4e6660926ae11b7"
        }
      }
    },
    "queued": {
      "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7": {
        "856": {
          "blockHash": null,
          "blockNumber": null,
          "from": "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7",
          "gas": "0xa410",
          "gasPrice": "0x77359404",
          "hash": "0x00ada01e75ff2f7dee4902190e244c187860c7f4c2f245f825b662c0ab37c322",
          "input": "0x",
          "nonce": "0x2d",
          "to": "0x14c74e8f1ed32f591f5c99d7a8477c6ca15e5563",
          "transactionIndex": null,
          "value": "0x4e",
          "type": "0x0",
          "accessList": [],
          "chainId": "0x2328",
          "v": "0x1",
          "r": "0x5525b0d23626b63093a0fcdb060d1caccae856141e412bee39c5baae366d7e2",
          "s": "0x6353efaf28c4cc86de452e9e2269ace1da411bf9ced003373f69223be0153fe4"
        }
      }
    }
  },
  "id": 1
}

请求体

application/json
jsonrpc
enum<string>
必填
可用选项:
2.0
示例:

"2.0"

method
enum<string>
必填

The name of the method to be invoked.

可用选项:
txpool_contentFrom
示例:

"txpool_contentFrom"

params
array
必填

The address to query transaction pool content for.

Required array length: 1 element
示例:
[
  "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7"
]
id
integer
必填

A unique identifier for the request.

示例:

1

响应

200 - application/json

Successful response

jsonrpc
object
示例:

"2.0"

result
string

The current transaction pool for the address sorted by nonce and status.

示例:
{
  "pending": {
    "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7": {
      "855": {
        "blockHash": null,
        "blockNumber": null,
        "from": "0x0004754b0bda885565558ad25b5015bbbb1b16fa",
        "gas": "0xa410",
        "gasPrice": "0x77359404",
        "hash": "0x60185d6a221b9192c673a6ba72c1f25578a007e9252528484f772375d7e7feb6",
        "input": "0x",
        "nonce": "0x357",
        "to": "0x144876b258060cc918d5424f8ca5e496b6f64e3e",
        "transactionIndex": null,
        "value": "0x2c",
        "type": "0x0",
        "accessList": [],
        "chainId": "0x2328",
        "v": "0x1",
        "r": "0xa2e91b62889191bb5bc0760cb166225372ac05b6ec0db9d11bc8cf621fc47183",
        "s": "0x96bf297045e6e9439947bc8f1b30abe4bc5db1e11a044acb4e6660926ae11b7"
      }
    }
  },
  "queued": {
    "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7": {
      "856": {
        "blockHash": null,
        "blockNumber": null,
        "from": "0x1dbbB54b402E725aD96fEc342AF5150a1560D4c7",
        "gas": "0xa410",
        "gasPrice": "0x77359404",
        "hash": "0x00ada01e75ff2f7dee4902190e244c187860c7f4c2f245f825b662c0ab37c322",
        "input": "0x",
        "nonce": "0x2d",
        "to": "0x14c74e8f1ed32f591f5c99d7a8477c6ca15e5563",
        "transactionIndex": null,
        "value": "0x4e",
        "type": "0x0",
        "accessList": [],
        "chainId": "0x2328",
        "v": "0x1",
        "r": "0x5525b0d23626b63093a0fcdb060d1caccae856141e412bee39c5baae366d7e2",
        "s": "0x6353efaf28c4cc86de452e9e2269ace1da411bf9ced003373f69223be0153fe4"
      }
    }
  }
}
id
integer
示例:

1