跳转到主要内容
POST
/
v1
/
wallets
/
{id}
/
addresses
/
{addressId}
/
signing
/
typed-data
Child Address Typed data
curl --request POST \
  --url https://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "domain": {
    "chainId": 11155111,
    "name": "USD Coin",
    "verifyingContract": "0xa0b86a33e6441b8c4c8c0c077bcdd28571685701",
    "version": "2"
  },
  "message": {
    "deadline": "1641081600",
    "nonce": "0",
    "owner": "0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6",
    "spender": "0x8ba1f109551bd432803012645aac136c4c8c8c0c",
    "value": "1000000000"
  },
  "types": {
    "Permit": [
      {
        "name": "owner",
        "type": "address"
      },
      {
        "name": "spender",
        "type": "address"
      },
      {
        "name": "value",
        "type": "uint256"
      },
      {
        "name": "nonce",
        "type": "uint256"
      },
      {
        "name": "deadline",
        "type": "uint256"
      }
    ]
  }
}
'
import requests

url = "https://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data"

payload = {
    "domain": {
        "chainId": 11155111,
        "name": "USD Coin",
        "verifyingContract": "0xa0b86a33e6441b8c4c8c0c077bcdd28571685701",
        "version": "2"
    },
    "message": {
        "deadline": "1641081600",
        "nonce": "0",
        "owner": "0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6",
        "spender": "0x8ba1f109551bd432803012645aac136c4c8c8c0c",
        "value": "1000000000"
    },
    "types": { "Permit": [
            {
                "name": "owner",
                "type": "address"
            },
            {
                "name": "spender",
                "type": "address"
            },
            {
                "name": "value",
                "type": "uint256"
            },
            {
                "name": "nonce",
                "type": "uint256"
            },
            {
                "name": "deadline",
                "type": "uint256"
            }
        ] }
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    domain: {
      chainId: 11155111,
      name: 'USD Coin',
      verifyingContract: '0xa0b86a33e6441b8c4c8c0c077bcdd28571685701',
      version: '2'
    },
    message: {
      deadline: '1641081600',
      nonce: '0',
      owner: '0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6',
      spender: '0x8ba1f109551bd432803012645aac136c4c8c8c0c',
      value: '1000000000'
    },
    types: {
      Permit: [
        {name: 'owner', type: 'address'},
        {name: 'spender', type: 'address'},
        {name: 'value', type: 'uint256'},
        {name: 'nonce', type: 'uint256'},
        {name: 'deadline', type: 'uint256'}
      ]
    }
  })
};

fetch('https://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data', 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://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data",
  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([
    'domain' => [
        'chainId' => 11155111,
        'name' => 'USD Coin',
        'verifyingContract' => '0xa0b86a33e6441b8c4c8c0c077bcdd28571685701',
        'version' => '2'
    ],
    'message' => [
        'deadline' => '1641081600',
        'nonce' => '0',
        'owner' => '0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6',
        'spender' => '0x8ba1f109551bd432803012645aac136c4c8c8c0c',
        'value' => '1000000000'
    ],
    'types' => [
        'Permit' => [
                [
                                'name' => 'owner',
                                'type' => 'address'
                ],
                [
                                'name' => 'spender',
                                'type' => 'address'
                ],
                [
                                'name' => 'value',
                                'type' => 'uint256'
                ],
                [
                                'name' => 'nonce',
                                'type' => 'uint256'
                ],
                [
                                'name' => 'deadline',
                                'type' => 'uint256'
                ]
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "x-api-key: <api-key>"
  ],
]);

$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://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data"

	payload := strings.NewReader("{\n  \"domain\": {\n    \"chainId\": 11155111,\n    \"name\": \"USD Coin\",\n    \"verifyingContract\": \"0xa0b86a33e6441b8c4c8c0c077bcdd28571685701\",\n    \"version\": \"2\"\n  },\n  \"message\": {\n    \"deadline\": \"1641081600\",\n    \"nonce\": \"0\",\n    \"owner\": \"0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6\",\n    \"spender\": \"0x8ba1f109551bd432803012645aac136c4c8c8c0c\",\n    \"value\": \"1000000000\"\n  },\n  \"types\": {\n    \"Permit\": [\n      {\n        \"name\": \"owner\",\n        \"type\": \"address\"\n      },\n      {\n        \"name\": \"spender\",\n        \"type\": \"address\"\n      },\n      {\n        \"name\": \"value\",\n        \"type\": \"uint256\"\n      },\n      {\n        \"name\": \"nonce\",\n        \"type\": \"uint256\"\n      },\n      {\n        \"name\": \"deadline\",\n        \"type\": \"uint256\"\n      }\n    ]\n  }\n}")

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

	req.Header.Add("x-api-key", "<api-key>")
	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://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data")
  .header("x-api-key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"domain\": {\n    \"chainId\": 11155111,\n    \"name\": \"USD Coin\",\n    \"verifyingContract\": \"0xa0b86a33e6441b8c4c8c0c077bcdd28571685701\",\n    \"version\": \"2\"\n  },\n  \"message\": {\n    \"deadline\": \"1641081600\",\n    \"nonce\": \"0\",\n    \"owner\": \"0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6\",\n    \"spender\": \"0x8ba1f109551bd432803012645aac136c4c8c8c0c\",\n    \"value\": \"1000000000\"\n  },\n  \"types\": {\n    \"Permit\": [\n      {\n        \"name\": \"owner\",\n        \"type\": \"address\"\n      },\n      {\n        \"name\": \"spender\",\n        \"type\": \"address\"\n      },\n      {\n        \"name\": \"value\",\n        \"type\": \"uint256\"\n      },\n      {\n        \"name\": \"nonce\",\n        \"type\": \"uint256\"\n      },\n      {\n        \"name\": \"deadline\",\n        \"type\": \"uint256\"\n      }\n    ]\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.blockradar.co/v1/wallets/{id}/addresses/{addressId}/signing/typed-data")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"domain\": {\n    \"chainId\": 11155111,\n    \"name\": \"USD Coin\",\n    \"verifyingContract\": \"0xa0b86a33e6441b8c4c8c0c077bcdd28571685701\",\n    \"version\": \"2\"\n  },\n  \"message\": {\n    \"deadline\": \"1641081600\",\n    \"nonce\": \"0\",\n    \"owner\": \"0x742d35cc6634c0532925a3b8d4c9db96c4b4d8b6\",\n    \"spender\": \"0x8ba1f109551bd432803012645aac136c4c8c8c0c\",\n    \"value\": \"1000000000\"\n  },\n  \"types\": {\n    \"Permit\": [\n      {\n        \"name\": \"owner\",\n        \"type\": \"address\"\n      },\n      {\n        \"name\": \"spender\",\n        \"type\": \"address\"\n      },\n      {\n        \"name\": \"value\",\n        \"type\": \"uint256\"\n      },\n      {\n        \"name\": \"nonce\",\n        \"type\": \"uint256\"\n      },\n      {\n        \"name\": \"deadline\",\n        \"type\": \"uint256\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
{ "data": { "amlScreening": {}, "amount": null, "amountPaid": null, "amountUSD": "0.00", "asset": null, "assetSwept": null, "assetSweptAmount": null, "assetSweptAt": null, "assetSweptGasFee": null, "assetSweptHash": null, "assetSweptRecipientAddress": null, "assetSweptSenderAddress": null, "blockHash": null, "blockNumber": null, "blockchain": { "createdAt": "2024-05-14T21:53:33.095Z", "derivationPath": "m/44'/60'/0'/0", "id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf", "isActive": true, "isEvmCompatible": true, "isL2": false, "name": "ethereum", "slug": "ethereum", "symbol": "eth", "tokenStandard": "ERC20", "updatedAt": "2024-11-26T23:04:13.936Z" }, "chainId": null, "confirmations": null, "confirmed": true, "createdAt": "2025-10-07T22:58:08.766Z", "createdChannel": "dashboard", "currency": "USD", "fee": null, "feeHash": null, "gasFee": null, "gasPrice": null, "gasUsed": null, "hash": "0xdb095e6cbf235d630cee43e0953e60c351e46897bc4e65abfce3e975810e21335aa3918399dac1e01badb2dc8c59c171e65d0c328c92737de702da9d76b889b31b", "id": "770f9100-7338-4823-b1ce-3658fc67db09", "metadata": null, "network": "testnet", "note": null, "rate": null, "rateUSD": "0.00", "reason": null, "recipientAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a", "reference": "OznFZsh1SMlTBgUaEpM", "senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a", "signedTransaction": { "r": "0xdb095e6cbf235d630cee43e0953e60c351e46897bc4e65abfce3e975810e2133", "s": "0x5aa3918399dac1e01badb2dc8c59c171e65d0c328c92737de702da9d76b889b3", "signature": "0xdb095e6cbf235d630cee43e0953e60c351e46897bc4e65abfce3e975810e21335aa3918399dac1e01badb2dc8c59c171e65d0c328c92737de702da9d76b889b31b", "v": 27 }, "status": "SUCCESS", "toAmount": null, "toCurrency": null, "tokenAddress": null, "type": "SIGNED", "updatedAt": "2025-10-07T22:58:08.766Z", "wallet": { "address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a", "configurations": { "addresses": { "isActive": true, "prefunding": { "isActive": true, "rules": [] } }, "autoSettlement": { "isActive": true, "rules": [ { "createdAt": "2025-09-10T14:41:12.126Z", "destination": { "address": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22", "asset": "USDC", "blockchain": "ethereum" }, "id": "fb841522-ac48-41f5-ab77-9744571b9c46", "isActive": true, "isGateway": false, "name": "Settle to an external address ", "order": "RECOMMENDED", "slippageTolerance": "5", "source": { "assets": [ "USDC" ], "blockchain": "ethereum", "maxAmount": "10000", "minAmount": "1" }, "updatedAt": "2025-09-10T14:41:12.126Z" } ] } }, "createdAt": "2024-08-22T19:48:56.322Z", "derivationPath": "m/44'/60'/0'/0/0", "description": "This is ethereum testnet master wallet", "id": "d236a191-c1d4-423c-a439-54ce6542ca41", "isActive": true, "name": "Ethereum Master Wallet", "network": "testnet", "status": "ACTIVE", "updatedAt": "2025-09-15T23:06:08.009Z" } }, "message": "Typed data signed successfully", "statusCode": 200 }

授权

x-api-key
string
header
必填

路径参数

id
string
必填
示例:

"YOUR_WALLET_ID"

addressId
string
必填
示例:

"ADDRESS_OR_ID"

请求体

application/json
domain
object
message
object
types
object

响应

200 - application/json

EIP-712 / EIP-3009 / EIP-2612

data
object
message
string
示例:

"Typed data signed successfully"

statusCode
number
示例:

200