curl --request POST \
--url https://api.platform.dakota.xyz/wallets/{wallet_id}/sign \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"signatures": [
"LS0tLS1CRUdJ...0tLS0tCg=="
],
"intent": {
"wallet_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"caip2": "eip155:8453",
"typed_data": "{\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"version\",\"type\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\"}],\"Order\":[{\"name\":\"maker\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}]},\"primaryType\":\"Order\",\"domain\":{\"name\":\"Example Exchange\",\"version\":\"1\",\"chainId\":8453,\"verifyingContract\":\"0xabcdef0123456789abcdef0123456789abcdef01\"},\"message\":{\"maker\":\"0x1234567890abcdef1234567890abcdef12345678\",\"amount\":\"1000000\"}}",
"idempotency_key": "4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b"
}
}
'const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
signatures: ['LS0tLS1CRUdJ...0tLS0tCg=='],
intent: {
wallet_id: '1NFHrqBHb3cTfLVkFSGmHZqdDPi',
caip2: 'eip155:8453',
typed_data: '{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Order":[{"name":"maker","type":"address"},{"name":"amount","type":"uint256"}]},"primaryType":"Order","domain":{"name":"Example Exchange","version":"1","chainId":8453,"verifyingContract":"0xabcdef0123456789abcdef0123456789abcdef01"},"message":{"maker":"0x1234567890abcdef1234567890abcdef12345678","amount":"1000000"}}',
idempotency_key: '4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b'
}
})
};
fetch('https://api.platform.dakota.xyz/wallets/{wallet_id}/sign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/wallets/{wallet_id}/sign"
payload = {
"signatures": ["LS0tLS1CRUdJ...0tLS0tCg=="],
"intent": {
"wallet_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"caip2": "eip155:8453",
"typed_data": "{\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"version\",\"type\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\"}],\"Order\":[{\"name\":\"maker\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}]},\"primaryType\":\"Order\",\"domain\":{\"name\":\"Example Exchange\",\"version\":\"1\",\"chainId\":8453,\"verifyingContract\":\"0xabcdef0123456789abcdef0123456789abcdef01\"},\"message\":{\"maker\":\"0x1234567890abcdef1234567890abcdef12345678\",\"amount\":\"1000000\"}}",
"idempotency_key": "4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b"
}
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/wallets/{wallet_id}/sign"
payload := strings.NewReader("{\n \"signatures\": [\n \"LS0tLS1CRUdJ...0tLS0tCg==\"\n ],\n \"intent\": {\n \"wallet_id\": \"1NFHrqBHb3cTfLVkFSGmHZqdDPi\",\n \"caip2\": \"eip155:8453\",\n \"typed_data\": \"{\\\"types\\\":{\\\"EIP712Domain\\\":[{\\\"name\\\":\\\"name\\\",\\\"type\\\":\\\"string\\\"},{\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"string\\\"},{\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"name\\\":\\\"verifyingContract\\\",\\\"type\\\":\\\"address\\\"}],\\\"Order\\\":[{\\\"name\\\":\\\"maker\\\",\\\"type\\\":\\\"address\\\"},{\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}]},\\\"primaryType\\\":\\\"Order\\\",\\\"domain\\\":{\\\"name\\\":\\\"Example Exchange\\\",\\\"version\\\":\\\"1\\\",\\\"chainId\\\":8453,\\\"verifyingContract\\\":\\\"0xabcdef0123456789abcdef0123456789abcdef01\\\"},\\\"message\\\":{\\\"maker\\\":\\\"0x1234567890abcdef1234567890abcdef12345678\\\",\\\"amount\\\":\\\"1000000\\\"}}\",\n \"idempotency_key\": \"4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
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))
}{
"id": "2NFHrqBHb3cTfLVkFSGmHZqdDPj",
"wallet_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"caip2": "eip155:8453",
"signature": "0x8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f1b",
"created_at": 1781181600
}{
"type": "https://docs.dakota.xyz/api-reference/errors#invalid-request",
"title": "Bad request",
"status": 400,
"detail": "invalid intent: typed_data: domain.chainId must equal the chain of caip2 \"eip155:8453\"",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#authentication-error",
"title": "Unauthorized",
"status": 401,
"detail": "Unauthorized",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#forbidden",
"title": "Forbidden",
"status": 403,
"detail": "typed-data signatures are not available on an x402 payer wallet",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Not Found",
"status": 404,
"detail": "Not Found",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#conflict",
"title": "Typed-data signature Conflict",
"status": 409,
"detail": "This idempotency key was already used for a different typed-data sign intent on this wallet.",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#internal-error",
"title": "Internal server error",
"status": 500,
"detail": "Internal server error",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#provider-error",
"title": "Provider Error",
"status": 502,
"detail": "The wallet provider answered without a signature. Nothing was stored. It gives the same answer to this idempotency_key for 24 hours, so send the intent again with a new idempotency_key and new approver signatures.",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#service-unavailable",
"title": "Service unavailable",
"status": 503,
"detail": "Service unavailable",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}Sign typed data with a wallet
Returns the wallet’s typed-data signature: its EIP-712 signature over structured data that a contract later verifies, such as an order. Nothing is sent on chain.
The wallet must be an EVM wallet. A policy on the wallet needs a typed_data_allowlist rule whose entry names the document’s chain, domain.verifyingContract and primaryType, and the request needs as many approver signatures as that rule’s threshold. Typed-data signatures are not available on an x402 payer wallet, on a wallet with a mandate or an agent signer, or for a document whose domain.verifyingContract is the contract of an asset Dakota supports on that chain. The verifying contract is screened like a transaction destination.
X-Idempotency-Key is required, as on other POST endpoints, but a response is never replayed for it, because the response is a signature that can authorize a spend. A repeat is decided by the signed intent.idempotency_key: the same key and the same intent return the same signature, even when the customer can no longer move money. Once a signature is stored, the same key with a different intent returns 409. Before a signature is stored, a different request under the same key returns 400: another document, or the same intent with other approver signatures. A key is tied to your client for 24 hours, not to one wallet. Two identical requests sent at the same moment may get 502 or 503 for one of them; a repeat then returns the stored signature.
curl --request POST \
--url https://api.platform.dakota.xyz/wallets/{wallet_id}/sign \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"signatures": [
"LS0tLS1CRUdJ...0tLS0tCg=="
],
"intent": {
"wallet_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"caip2": "eip155:8453",
"typed_data": "{\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"version\",\"type\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\"}],\"Order\":[{\"name\":\"maker\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}]},\"primaryType\":\"Order\",\"domain\":{\"name\":\"Example Exchange\",\"version\":\"1\",\"chainId\":8453,\"verifyingContract\":\"0xabcdef0123456789abcdef0123456789abcdef01\"},\"message\":{\"maker\":\"0x1234567890abcdef1234567890abcdef12345678\",\"amount\":\"1000000\"}}",
"idempotency_key": "4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b"
}
}
'const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
signatures: ['LS0tLS1CRUdJ...0tLS0tCg=='],
intent: {
wallet_id: '1NFHrqBHb3cTfLVkFSGmHZqdDPi',
caip2: 'eip155:8453',
typed_data: '{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Order":[{"name":"maker","type":"address"},{"name":"amount","type":"uint256"}]},"primaryType":"Order","domain":{"name":"Example Exchange","version":"1","chainId":8453,"verifyingContract":"0xabcdef0123456789abcdef0123456789abcdef01"},"message":{"maker":"0x1234567890abcdef1234567890abcdef12345678","amount":"1000000"}}',
idempotency_key: '4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b'
}
})
};
fetch('https://api.platform.dakota.xyz/wallets/{wallet_id}/sign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/wallets/{wallet_id}/sign"
payload = {
"signatures": ["LS0tLS1CRUdJ...0tLS0tCg=="],
"intent": {
"wallet_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"caip2": "eip155:8453",
"typed_data": "{\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"version\",\"type\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\"},{\"name\":\"verifyingContract\",\"type\":\"address\"}],\"Order\":[{\"name\":\"maker\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}]},\"primaryType\":\"Order\",\"domain\":{\"name\":\"Example Exchange\",\"version\":\"1\",\"chainId\":8453,\"verifyingContract\":\"0xabcdef0123456789abcdef0123456789abcdef01\"},\"message\":{\"maker\":\"0x1234567890abcdef1234567890abcdef12345678\",\"amount\":\"1000000\"}}",
"idempotency_key": "4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b"
}
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/wallets/{wallet_id}/sign"
payload := strings.NewReader("{\n \"signatures\": [\n \"LS0tLS1CRUdJ...0tLS0tCg==\"\n ],\n \"intent\": {\n \"wallet_id\": \"1NFHrqBHb3cTfLVkFSGmHZqdDPi\",\n \"caip2\": \"eip155:8453\",\n \"typed_data\": \"{\\\"types\\\":{\\\"EIP712Domain\\\":[{\\\"name\\\":\\\"name\\\",\\\"type\\\":\\\"string\\\"},{\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"string\\\"},{\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"name\\\":\\\"verifyingContract\\\",\\\"type\\\":\\\"address\\\"}],\\\"Order\\\":[{\\\"name\\\":\\\"maker\\\",\\\"type\\\":\\\"address\\\"},{\\\"name\\\":\\\"amount\\\",\\\"type\\\":\\\"uint256\\\"}]},\\\"primaryType\\\":\\\"Order\\\",\\\"domain\\\":{\\\"name\\\":\\\"Example Exchange\\\",\\\"version\\\":\\\"1\\\",\\\"chainId\\\":8453,\\\"verifyingContract\\\":\\\"0xabcdef0123456789abcdef0123456789abcdef01\\\"},\\\"message\\\":{\\\"maker\\\":\\\"0x1234567890abcdef1234567890abcdef12345678\\\",\\\"amount\\\":\\\"1000000\\\"}}\",\n \"idempotency_key\": \"4f1c2b8e-7a3d-4e5f-9b6a-1c2d3e4f5a6b\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
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))
}{
"id": "2NFHrqBHb3cTfLVkFSGmHZqdDPj",
"wallet_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
"caip2": "eip155:8453",
"signature": "0x8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f8e3f0a6c1d2b4e5f1b",
"created_at": 1781181600
}{
"type": "https://docs.dakota.xyz/api-reference/errors#invalid-request",
"title": "Bad request",
"status": 400,
"detail": "invalid intent: typed_data: domain.chainId must equal the chain of caip2 \"eip155:8453\"",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#authentication-error",
"title": "Unauthorized",
"status": 401,
"detail": "Unauthorized",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#forbidden",
"title": "Forbidden",
"status": 403,
"detail": "typed-data signatures are not available on an x402 payer wallet",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#not-found",
"title": "Not Found",
"status": 404,
"detail": "Not Found",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#conflict",
"title": "Typed-data signature Conflict",
"status": 409,
"detail": "This idempotency key was already used for a different typed-data sign intent on this wallet.",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#internal-error",
"title": "Internal server error",
"status": 500,
"detail": "Internal server error",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#provider-error",
"title": "Provider Error",
"status": 502,
"detail": "The wallet provider answered without a signature. Nothing was stored. It gives the same answer to this idempotency_key for 24 hours, so send the intent again with a new idempotency_key and new approver signatures.",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}{
"type": "https://docs.dakota.xyz/api-reference/errors#service-unavailable",
"title": "Service unavailable",
"status": 503,
"detail": "Service unavailable",
"instance": "https://api.platform.dakota.xyz/wallets/example-id/sign",
"request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}Headers
Unique key (UUID) to ensure request idempotency on POST, PUT and PATCH requests.
A key is scoped to your client, the HTTP method and the path, and is remembered for 24 hours after a
successful (below 400) response. Repeating the same request (same JSON body, whatever the key order or
whitespace) with the same key within that window returns the original response with
X-Idempotent-Replayed: true instead of executing the request again. Using the same key on the same
endpoint with a different body returns 422 with problem type idempotency-key-reused; the request is
not executed. Error responses (4xx and 5xx) are not remembered, so a request refused for a fixable reason
can be corrected and retried under the same key. Request bodies that are not JSON (for example file
uploads) are not compared.
Path Parameters
Body
A request for a wallet's EIP-712 signature over a typed-data document, endorsed by the approvers' signatures over the intent.
List of signatures over the intent
Cryptographic signature over the intent, base64-encoded. For an ES256 signer this is the ASN.1 DER ECDSA signature over the SHA-256 of the canonical intent. For a WEBAUTHN signer this is the base64 of the WebAuthn assertion JSON (id, rawId, type, and response.authenticatorData / clientDataJSON / signature). See the WebAuthn & Passkey Signing guide.
Response
The wallet's signature over the document. A repeat with the same idempotency_key and the same intent returns the stored signature.
An EIP-712 signature a wallet gave over a typed-data document.
Was this page helpful?

