curl --request POST \
--url https://gateway-api-testnet.circle.com/v1/transfer \
--header 'Content-Type: application/json' \
--data '
[
{
"burnIntent": {
"maxBlockHeight": "1000000000000000000",
"maxFee": "1000000000000000000",
"spec": {
"version": 1,
"sourceDomain": 0,
"destinationDomain": 4,
"sourceContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceDepositor": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationRecipient": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceSigner": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationCaller": "0x1234567890123456789012345678901234567890123456789012345678901234",
"value": "1000000000000000000",
"salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
"hookData": "0x1a2b3c4d"
}
},
"signature": "<string>"
}
]
'import requests
url = "https://gateway-api-testnet.circle.com/v1/transfer"
payload = [
{
"burnIntent": {
"maxBlockHeight": "1000000000000000000",
"maxFee": "1000000000000000000",
"spec": {
"version": 1,
"sourceDomain": 0,
"destinationDomain": 4,
"sourceContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceDepositor": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationRecipient": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceSigner": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationCaller": "0x1234567890123456789012345678901234567890123456789012345678901234",
"value": "1000000000000000000",
"salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
"hookData": "0x1a2b3c4d"
}
},
"signature": "<string>"
}
]
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([
{
burnIntent: {
maxBlockHeight: '1000000000000000000',
maxFee: '1000000000000000000',
spec: {
version: 1,
sourceDomain: 0,
destinationDomain: 4,
sourceContract: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationContract: '0x1234567890123456789012345678901234567890123456789012345678901234',
sourceToken: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationToken: '0x1234567890123456789012345678901234567890123456789012345678901234',
sourceDepositor: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationRecipient: '0x1234567890123456789012345678901234567890123456789012345678901234',
sourceSigner: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationCaller: '0x1234567890123456789012345678901234567890123456789012345678901234',
value: '1000000000000000000',
salt: '0x1234567890123456789012345678901234567890123456789012345678901234',
hookData: '0x1a2b3c4d'
}
},
signature: '<string>'
}
])
};
fetch('https://gateway-api-testnet.circle.com/v1/transfer', 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://gateway-api-testnet.circle.com/v1/transfer",
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([
[
'burnIntent' => [
'maxBlockHeight' => '1000000000000000000',
'maxFee' => '1000000000000000000',
'spec' => [
'version' => 1,
'sourceDomain' => 0,
'destinationDomain' => 4,
'sourceContract' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationContract' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'sourceToken' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationToken' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'sourceDepositor' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationRecipient' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'sourceSigner' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationCaller' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'value' => '1000000000000000000',
'salt' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'hookData' => '0x1a2b3c4d'
]
],
'signature' => '<string>'
]
]),
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://gateway-api-testnet.circle.com/v1/transfer"
payload := strings.NewReader("[\n {\n \"burnIntent\": {\n \"maxBlockHeight\": \"1000000000000000000\",\n \"maxFee\": \"1000000000000000000\",\n \"spec\": {\n \"version\": 1,\n \"sourceDomain\": 0,\n \"destinationDomain\": 4,\n \"sourceContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceDepositor\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationRecipient\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceSigner\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationCaller\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"value\": \"1000000000000000000\",\n \"salt\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"hookData\": \"0x1a2b3c4d\"\n }\n },\n \"signature\": \"<string>\"\n }\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://gateway-api-testnet.circle.com/v1/transfer")
.header("Content-Type", "application/json")
.body("[\n {\n \"burnIntent\": {\n \"maxBlockHeight\": \"1000000000000000000\",\n \"maxFee\": \"1000000000000000000\",\n \"spec\": {\n \"version\": 1,\n \"sourceDomain\": 0,\n \"destinationDomain\": 4,\n \"sourceContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceDepositor\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationRecipient\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceSigner\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationCaller\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"value\": \"1000000000000000000\",\n \"salt\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"hookData\": \"0x1a2b3c4d\"\n }\n },\n \"signature\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway-api-testnet.circle.com/v1/transfer")
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 {\n \"burnIntent\": {\n \"maxBlockHeight\": \"1000000000000000000\",\n \"maxFee\": \"1000000000000000000\",\n \"spec\": {\n \"version\": 1,\n \"sourceDomain\": 0,\n \"destinationDomain\": 4,\n \"sourceContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceDepositor\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationRecipient\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceSigner\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationCaller\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"value\": \"1000000000000000000\",\n \"salt\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"hookData\": \"0x1a2b3c4d\"\n }\n },\n \"signature\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"transferId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestation": "<string>",
"signature": "<string>",
"fees": {
"total": "1.178",
"token": "USDC",
"perIntent": [
{
"transferSpecHash": "0x1234567890123456789012345678901234567890123456789012345678901234",
"baseFee": "2",
"transferFee": "0.125"
}
],
"forwardingFee": "0.210000"
},
"expirationBlock": "<string>"
}Generates a transfer attestation and operator signature for transferring tokens between domains
curl --request POST \
--url https://gateway-api-testnet.circle.com/v1/transfer \
--header 'Content-Type: application/json' \
--data '
[
{
"burnIntent": {
"maxBlockHeight": "1000000000000000000",
"maxFee": "1000000000000000000",
"spec": {
"version": 1,
"sourceDomain": 0,
"destinationDomain": 4,
"sourceContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceDepositor": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationRecipient": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceSigner": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationCaller": "0x1234567890123456789012345678901234567890123456789012345678901234",
"value": "1000000000000000000",
"salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
"hookData": "0x1a2b3c4d"
}
},
"signature": "<string>"
}
]
'import requests
url = "https://gateway-api-testnet.circle.com/v1/transfer"
payload = [
{
"burnIntent": {
"maxBlockHeight": "1000000000000000000",
"maxFee": "1000000000000000000",
"spec": {
"version": 1,
"sourceDomain": 0,
"destinationDomain": 4,
"sourceContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationContract": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationToken": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceDepositor": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationRecipient": "0x1234567890123456789012345678901234567890123456789012345678901234",
"sourceSigner": "0x1234567890123456789012345678901234567890123456789012345678901234",
"destinationCaller": "0x1234567890123456789012345678901234567890123456789012345678901234",
"value": "1000000000000000000",
"salt": "0x1234567890123456789012345678901234567890123456789012345678901234",
"hookData": "0x1a2b3c4d"
}
},
"signature": "<string>"
}
]
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([
{
burnIntent: {
maxBlockHeight: '1000000000000000000',
maxFee: '1000000000000000000',
spec: {
version: 1,
sourceDomain: 0,
destinationDomain: 4,
sourceContract: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationContract: '0x1234567890123456789012345678901234567890123456789012345678901234',
sourceToken: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationToken: '0x1234567890123456789012345678901234567890123456789012345678901234',
sourceDepositor: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationRecipient: '0x1234567890123456789012345678901234567890123456789012345678901234',
sourceSigner: '0x1234567890123456789012345678901234567890123456789012345678901234',
destinationCaller: '0x1234567890123456789012345678901234567890123456789012345678901234',
value: '1000000000000000000',
salt: '0x1234567890123456789012345678901234567890123456789012345678901234',
hookData: '0x1a2b3c4d'
}
},
signature: '<string>'
}
])
};
fetch('https://gateway-api-testnet.circle.com/v1/transfer', 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://gateway-api-testnet.circle.com/v1/transfer",
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([
[
'burnIntent' => [
'maxBlockHeight' => '1000000000000000000',
'maxFee' => '1000000000000000000',
'spec' => [
'version' => 1,
'sourceDomain' => 0,
'destinationDomain' => 4,
'sourceContract' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationContract' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'sourceToken' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationToken' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'sourceDepositor' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationRecipient' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'sourceSigner' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'destinationCaller' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'value' => '1000000000000000000',
'salt' => '0x1234567890123456789012345678901234567890123456789012345678901234',
'hookData' => '0x1a2b3c4d'
]
],
'signature' => '<string>'
]
]),
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://gateway-api-testnet.circle.com/v1/transfer"
payload := strings.NewReader("[\n {\n \"burnIntent\": {\n \"maxBlockHeight\": \"1000000000000000000\",\n \"maxFee\": \"1000000000000000000\",\n \"spec\": {\n \"version\": 1,\n \"sourceDomain\": 0,\n \"destinationDomain\": 4,\n \"sourceContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceDepositor\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationRecipient\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceSigner\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationCaller\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"value\": \"1000000000000000000\",\n \"salt\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"hookData\": \"0x1a2b3c4d\"\n }\n },\n \"signature\": \"<string>\"\n }\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://gateway-api-testnet.circle.com/v1/transfer")
.header("Content-Type", "application/json")
.body("[\n {\n \"burnIntent\": {\n \"maxBlockHeight\": \"1000000000000000000\",\n \"maxFee\": \"1000000000000000000\",\n \"spec\": {\n \"version\": 1,\n \"sourceDomain\": 0,\n \"destinationDomain\": 4,\n \"sourceContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceDepositor\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationRecipient\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceSigner\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationCaller\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"value\": \"1000000000000000000\",\n \"salt\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"hookData\": \"0x1a2b3c4d\"\n }\n },\n \"signature\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway-api-testnet.circle.com/v1/transfer")
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 {\n \"burnIntent\": {\n \"maxBlockHeight\": \"1000000000000000000\",\n \"maxFee\": \"1000000000000000000\",\n \"spec\": {\n \"version\": 1,\n \"sourceDomain\": 0,\n \"destinationDomain\": 4,\n \"sourceContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationContract\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationToken\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceDepositor\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationRecipient\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"sourceSigner\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"destinationCaller\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"value\": \"1000000000000000000\",\n \"salt\": \"0x1234567890123456789012345678901234567890123456789012345678901234\",\n \"hookData\": \"0x1a2b3c4d\"\n }\n },\n \"signature\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"transferId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestation": "<string>",
"signature": "<string>",
"fees": {
"total": "1.178",
"token": "USDC",
"perIntent": [
{
"transferSpecHash": "0x1234567890123456789012345678901234567890123456789012345678901234",
"baseFee": "2",
"transferFee": "0.125"
}
],
"forwardingFee": "0.210000"
},
"expirationBlock": "<string>"
}Query Parameters
Maximum allowed size (in bytes) for the encoded attestation. If the attestation exceeds this size, the request will be rejected with a 400 error.
x >= 1Whether to enable the forwarding service for automatic mint submission.
Body
Response
Successfully created transfer attestation or attestation set
Response containing a transfer attestation or attestation set and operator signature
The unique identifier of the transfer.
The byte-encoded transfer attestation or attestation set that should be passed to the minter contract
^0x[a-fA-F0-9]+$The signature of the operator on the byte-encoded transfer attestation or attestation set
^0x[a-fA-F0-9]+$Information on the transfer fees to be charged.
Show child attributes
Show child attributes
The block number on the destination chain after which this attestation expires.
Was this page helpful?