curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"type": "evm-message",
"params": {
"message": "Hello, world!",
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"chain": "polygon"
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures"
payload = {
"type": "evm-message",
"params": {
"message": "Hello, world!",
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"chain": "polygon"
}
}
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({
type: 'evm-message',
params: {
message: 'Hello, world!',
signer: 'evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E',
chain: 'polygon'
}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures', 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}/signatures",
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([
'type' => 'evm-message',
'params' => [
'message' => 'Hello, world!',
'signer' => 'evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E',
'chain' => 'polygon'
]
]),
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}/signatures"
payload := strings.NewReader("{\n \"type\": \"evm-message\",\n \"params\": {\n \"message\": \"Hello, world!\",\n \"signer\": \"evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E\",\n \"chain\": \"polygon\"\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}/signatures")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"evm-message\",\n \"params\": {\n \"message\": \"Hello, world!\",\n \"signer\": \"evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E\",\n \"chain\": \"polygon\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures")
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 \"type\": \"evm-message\",\n \"params\": {\n \"message\": \"Hello, world!\",\n \"signer\": \"evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E\",\n \"chain\": \"polygon\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "tx-b984491a-5785-43c0-8811-45d46fe6e520",
"walletType": "evm-smart-wallet",
"type": "evm-message",
"status": "awaiting-approval",
"params": {
"message": "Hello, world!",
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"chain": "polygon"
},
"approvals": {
"pending": [
{
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"message": "Hello world!"
}
],
"submitted": []
},
"createdAt": "2024-01-01T00:00:00Z"
}{
"error": true,
"message": "<error message>"
}{
"error": true,
"message": "<error message>"
}Create Signature
Creates a new signature for signing messages or typed data.
API scope required: wallets:signatures.create
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"type": "evm-message",
"params": {
"message": "Hello, world!",
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"chain": "polygon"
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures"
payload = {
"type": "evm-message",
"params": {
"message": "Hello, world!",
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"chain": "polygon"
}
}
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({
type: 'evm-message',
params: {
message: 'Hello, world!',
signer: 'evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E',
chain: 'polygon'
}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures', 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}/signatures",
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([
'type' => 'evm-message',
'params' => [
'message' => 'Hello, world!',
'signer' => 'evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E',
'chain' => 'polygon'
]
]),
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}/signatures"
payload := strings.NewReader("{\n \"type\": \"evm-message\",\n \"params\": {\n \"message\": \"Hello, world!\",\n \"signer\": \"evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E\",\n \"chain\": \"polygon\"\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}/signatures")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"evm-message\",\n \"params\": {\n \"message\": \"Hello, world!\",\n \"signer\": \"evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E\",\n \"chain\": \"polygon\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/wallets/{walletLocator}/signatures")
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 \"type\": \"evm-message\",\n \"params\": {\n \"message\": \"Hello, world!\",\n \"signer\": \"evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E\",\n \"chain\": \"polygon\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "tx-b984491a-5785-43c0-8811-45d46fe6e520",
"walletType": "evm-smart-wallet",
"type": "evm-message",
"status": "awaiting-approval",
"params": {
"message": "Hello, world!",
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"chain": "polygon"
},
"approvals": {
"pending": [
{
"signer": "evm-keypair:0xB17Ea8d34078424B9d7D126E444d5F2C3CC5c81E",
"message": "Hello world!"
}
],
"submitted": []
},
"createdAt": "2024-01-01T00:00:00Z"
}{
"error": true,
"message": "<error message>"
}{
"error": true,
"message": "<error message>"
}Headers
API key required for authentication
Unique key to prevent duplicate signature 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
Response
The signature has been successfully created.
Complete signature response including status, signing requirements, and wallet type specific data
Unique identifier for the signature
The type of signature
evm-message, solana-message, evm-typed-data, aptos-message, cardano-message, sui-message Current status of the signature
awaiting-approval, pending, failed, success Type-specific signature parameters
- EVM message signature parameters
- Solana message signature parameters
- EVM typed data signature parameters
Show child attributes
Show child attributes
ISO timestamp when the signature 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 signature fails
The wallet's output signature of the request
Was this page helpful?

