curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"params": {
"calls": [
{
"to": "0x1234567890123456789012345678901234567890",
"value": "1000000000000000000",
"data": "0x"
}
],
"chain": "base",
"signer": "evm-keypair:0xdeadbeef"
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions"
payload = { "params": {
"calls": [
{
"to": "0x1234567890123456789012345678901234567890",
"value": "1000000000000000000",
"data": "0x"
}
],
"chain": "base",
"signer": "evm-keypair:0xdeadbeef"
} }
headers = {
"X-API-KEY": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
params: {
calls: [
{
to: '0x1234567890123456789012345678901234567890',
value: '1000000000000000000',
data: '0x'
}
],
chain: 'base',
signer: 'evm-keypair:0xdeadbeef'
}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions', 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://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions",
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([
'params' => [
'calls' => [
[
'to' => '0x1234567890123456789012345678901234567890',
'value' => '1000000000000000000',
'data' => '0x'
]
],
'chain' => 'base',
'signer' => 'evm-keypair:0xdeadbeef'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-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://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions"
payload := strings.NewReader("{\n \"params\": {\n \"calls\": [\n {\n \"to\": \"0x1234567890123456789012345678901234567890\",\n \"value\": \"1000000000000000000\",\n \"data\": \"0x\"\n }\n ],\n \"chain\": \"base\",\n \"signer\": \"evm-keypair:0xdeadbeef\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-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://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"params\": {\n \"calls\": [\n {\n \"to\": \"0x1234567890123456789012345678901234567890\",\n \"value\": \"1000000000000000000\",\n \"data\": \"0x\"\n }\n ],\n \"chain\": \"base\",\n \"signer\": \"evm-keypair:0xdeadbeef\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {\n \"calls\": [\n {\n \"to\": \"0x1234567890123456789012345678901234567890\",\n \"value\": \"1000000000000000000\",\n \"data\": \"0x\"\n }\n ],\n \"chain\": \"base\",\n \"signer\": \"evm-keypair:0xdeadbeef\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "tx-b984491a-5785-43c0-8811-45d46fe6e520",
"walletType": "evm-smart-wallet",
"status": "awaiting-approval",
"approvals": {
"pending": [
{
"signer": "evm-keypair:0xdeadbeef",
"message": "Please sign this transaction"
}
],
"submitted": []
},
"params": {
"calls": [
{
"to": "0x1234567890123456789012345678901234567890",
"value": "1000000000000000000",
"data": "0x"
}
],
"chain": "base",
"signer": "evm-keypair:0xdeadbeef"
},
"onChain": {
"userOperation": "... full user operation object",
"userOperationHash": "0xf719f9570671c6eb016f1f4a95ada4278b8e91f55bc384d70c69fd756919a41c"
},
"createdAt": "2024-01-01T00:00:00Z"
}{
"error": true,
"message": "<error message>"
}{
"error": true,
"message": "<error message>"
}{
"error": {
"reason": "execution_reverted",
"message": "Execution reverted, see 'revert' for details",
"revert": {
"type": "contract_call",
"reason": "ERC20: transfer amount exceeds balance",
"reasonData": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002645524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63650000000000000000000000000000000000000000000000000000",
"simulationLink": "https://www.tdly.co/shared/simulation/185311d1-d174-4805-babe-771da4e5b40f"
}
},
"message": "Transaction reverted during execution. Please check 'error' for more information."
}Create Transaction
Creates a new transaction for the specified wallet. Transaction will be automatically broadcast once it has all necessary approvals.
API scope required: wallets:transactions.create
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"params": {
"calls": [
{
"to": "0x1234567890123456789012345678901234567890",
"value": "1000000000000000000",
"data": "0x"
}
],
"chain": "base",
"signer": "evm-keypair:0xdeadbeef"
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions"
payload = { "params": {
"calls": [
{
"to": "0x1234567890123456789012345678901234567890",
"value": "1000000000000000000",
"data": "0x"
}
],
"chain": "base",
"signer": "evm-keypair:0xdeadbeef"
} }
headers = {
"X-API-KEY": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
params: {
calls: [
{
to: '0x1234567890123456789012345678901234567890',
value: '1000000000000000000',
data: '0x'
}
],
chain: 'base',
signer: 'evm-keypair:0xdeadbeef'
}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions', 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://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions",
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([
'params' => [
'calls' => [
[
'to' => '0x1234567890123456789012345678901234567890',
'value' => '1000000000000000000',
'data' => '0x'
]
],
'chain' => 'base',
'signer' => 'evm-keypair:0xdeadbeef'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-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://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions"
payload := strings.NewReader("{\n \"params\": {\n \"calls\": [\n {\n \"to\": \"0x1234567890123456789012345678901234567890\",\n \"value\": \"1000000000000000000\",\n \"data\": \"0x\"\n }\n ],\n \"chain\": \"base\",\n \"signer\": \"evm-keypair:0xdeadbeef\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-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://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"params\": {\n \"calls\": [\n {\n \"to\": \"0x1234567890123456789012345678901234567890\",\n \"value\": \"1000000000000000000\",\n \"data\": \"0x\"\n }\n ],\n \"chain\": \"base\",\n \"signer\": \"evm-keypair:0xdeadbeef\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {\n \"calls\": [\n {\n \"to\": \"0x1234567890123456789012345678901234567890\",\n \"value\": \"1000000000000000000\",\n \"data\": \"0x\"\n }\n ],\n \"chain\": \"base\",\n \"signer\": \"evm-keypair:0xdeadbeef\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "tx-b984491a-5785-43c0-8811-45d46fe6e520",
"walletType": "evm-smart-wallet",
"status": "awaiting-approval",
"approvals": {
"pending": [
{
"signer": "evm-keypair:0xdeadbeef",
"message": "Please sign this transaction"
}
],
"submitted": []
},
"params": {
"calls": [
{
"to": "0x1234567890123456789012345678901234567890",
"value": "1000000000000000000",
"data": "0x"
}
],
"chain": "base",
"signer": "evm-keypair:0xdeadbeef"
},
"onChain": {
"userOperation": "... full user operation object",
"userOperationHash": "0xf719f9570671c6eb016f1f4a95ada4278b8e91f55bc384d70c69fd756919a41c"
},
"createdAt": "2024-01-01T00:00:00Z"
}{
"error": true,
"message": "<error message>"
}{
"error": true,
"message": "<error message>"
}{
"error": {
"reason": "execution_reverted",
"message": "Execution reverted, see 'revert' for details",
"revert": {
"type": "contract_call",
"reason": "ERC20: transfer amount exceeds balance",
"reasonData": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002645524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63650000000000000000000000000000000000000000000000000000",
"simulationLink": "https://www.tdly.co/shared/simulation/185311d1-d174-4805-babe-771da4e5b40f"
}
},
"message": "Transaction reverted during execution. Please check 'error' for more information."
}Headers
API key required for authentication
Unique key to prevent duplicate transaction creation
Path Parameters
A wallet locator can be of the format:
<walletAddress>email:<email>:<walletType>userId:<userId>:<walletType>userId:<userId>:<walletType>(white label user example)phoneNumber:<phoneNumber>:<walletType>twitter:<handle>:<walletType>x:<handle>:<walletType>
Body
- Option 1
- Option 2
- Option 3
- Option 4
Input schema for creating a new transaction. The parameters vary based on the wallet type (EVM vs Solana).
Parameters for a transaction from a Solana Smart Wallet
Show child attributes
Show child attributes
{
"transaction": "4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT",
"signer": "solana-keypair:123i9Q9H9iVFQ5ctG8Sjb95RKPxBTKSTjqgbRWNp8Ge7"
}
Response
The transaction has been successfully created.
- EVM transaction response
- Solana transaction response
- EVM MPC transaction response
- Solana smart wallet transaction response
Complete transaction response including status, signing requirements, and wallet type specific data
The type of wallet that created this transaction
evm-smart-wallet EVM smart wallet transaction parameters
Show child attributes
Show child attributes
EVM smart wallet transaction data including input parameters and chain specific details
Show child attributes
Show child attributes
Unique identifier for the transaction
Current status of the transaction
awaiting-approval, pending, failed, success ISO timestamp when the transaction was created
"2024-01-01T00:00:00.000Z"
Complete approval data including requirements, pending and submitted signatures
Show child attributes
Show child attributes
ISO timestamp when the transaction reached finality
"2024-01-01T00:00:00.000Z"
Error message if the transaction fails after submission
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

