Transaction APIs
Prepare Transaction
Create a new transaction session.
POST
/dapp/prepare-transaction
Headers
Header | Value | Description |
---|---|---|
client_id | YOUR_CLIENT_ID | Your unique client ID |
client_secret | YOUR_SECRET_KEY | Your secret key |
content-type | application/json | Content type of the request |
Body
The request accepts a transaction session schema with transaction details. The schema includes necessary information to prepare the transaction for signing.
{
"walletAddress": "0x...", // Ethereum address of the wallet (required)
"contractAddress": "0x...", // Ethereum address of the contract (required)
"functionName": "transfer", // Name of the function to call (required)
"functionArgs": ["0x...", "1000000000000000000"], // Array of function arguments as strings (required)
"redirectUrl": "https://..." // Optional URL to redirect after transaction (optional)
}
Field | Type | Required | Description |
---|---|---|---|
walletAddress | string | Yes | Ethereum address of the wallet initiating the transaction |
contractAddress | string | Yes | Ethereum address of the contract to interact with |
functionName | string | Yes | Name of the function to call on the contract |
functionArgs | array | Yes | Array of function arguments as strings |
redirectUrl | string | No | URL to redirect after transaction completion |
Response
Returns the prepared transaction session details.
{
"sessionId": "clq...",
"transactionObject": {
"transaction": {
"chainId": 1,
"gasLimit": 21000,
"gasPrice": 20000000000,
"nonce": 5,
"to": "0x...",
"value": "0",
"data": "0x..."
},
"fee": {
"chainId": 1,
"gasLimit": 21000,
"gasPrice": 20000000000,
"nonce": 5,
"to": "0x...",
"value": "0",
"data": "0x..."
}
},
"signingUrl": "https://example.com/sign/transaction/clq..."
}
Get Transaction Session
Retrieve details about a specific transaction session.
GET
/dapp/transaction-session/{transactionId}
Headers
Header | Value | Description |
---|---|---|
client_id | YOUR_CLIENT_ID | Your unique client ID |
client_secret | YOUR_SECRET_KEY | Your secret key |
URL Parameters
Name | Type | Required | Description |
---|---|---|---|
transactionId | string | Yes | ID of the transaction session to retrieve |
Response Status Codes
Status | Description |
---|---|
200 | Returns the transaction session details |
404 | Transaction session not found |