Sign Transactions
This feature is only available for EVM blockchains.
Endpoint
POST /api/v1-alpha1/wallets/<chain>:<address>/transactions/signatures
Required Scope
wallets:transactions.sign
This API is in alpha. Contact us to get the scope added to your API key.
Signing a transaction
Server Side APIs
All of our APIs should be run from a server and NOT in the browser. Using these APIs in the client exposes your client secret, which WILL result in unauthorized access to your project.
Here's an example curl snippet to show how to send the request:
curl "https://staging.crossmint.com/api/v1-alpha1/wallets/ethereum:0x7e3c09cB46A351Db7834c0E0Bc0CB0cD79A/transactions/signatures" \
-H "X-PROJECT-ID: your_project_id" \
-H "X-CLIENT-SECRET: your_client_secret" \
-H 'Content-Type: application/json' \
--data '
{
"transaction": {
"nonce": 5,
"gasPrice": "34329341655",
"gasLimit": 21000,
"to": "0x4675c7e5baafbffbca748158becba61ef3b03",
"value": "0",
"data": "",
"from": "0x199d5ed7f45f4ee35960cf22eade205b253f"
}
}
'
Transaction parameters explained:
Parameter | Type | Description |
---|---|---|
to | string | The destination address. |
value | string | The amount of Ether to send, in wei. (This MUST be set to 0 ) |
gasLimit | number | The maximum amount of gas to be used. |
gasPrice | string | The price of gas in Gwei. |
nonce | number | The transaction nonce. |
chainId | string | The ID of the chain (e.g., 1 for the Ethereum mainnet). |
data | string | Any additional data to be included in the transaction. |
Updated 24 days ago