Transaction Signing Parameters
This endpoint is used to obtain the transaction parameters needed to start and fund allocations on-chain. After starting and funding transactions, trigger indexing on the Magna platform.
Example request:
curl -X POST <https://app.magna.so/api/external/v1/transactions/params> \\
-H 'Content-Type: application/json' \\
-H 'x-magna-api-token: magna_project_api_token' \\
-d '{
"tokenId": "your_token_id",
"cursor": "cursor",
"limit": 100
}'
magna_project_api_token
(required) - replace with your actual Magna API tokenyour_tokenId_id
(required) - with your project's token idcursor
(optional) - is specifically designed for pagination and represents the last allocation id in the list.limit
(optional) - is the maximum number of items in the query, with a maximum of 100 items per query.
Solana Response example:
{
"isProcessed": true,
"result": {
"items": [
{
"transactionGroupId": "8fccd856-ebd2-466b-be1c-e76fbb6963ee",
"parameters": [
{
"instructions": [],
"transactionId": "9f7beee1-00c7-41df-a1ba-0654a98a9a06"
}
]
}
],
"total": 1
}
}
EVM Response example:
{
"isProcessed": true,
"result": {
"items": [
{
"transactionGroupId": "8fccd856-ebd2-466b-be1c-e76fbb6963ee",
"parameters": [
{
"instructions": [],
"transactionId": "9f7beee1-00c7-41df-a1ba-0654a98a9a06"
}
]
}
],
"total": 1
}
}
Next, you'll use the returned parameters and include them in the a transaction to be signed and submitted on-chain. Parameters include the contract address to send the transaction to along with data to submit. For example:
const executedTransactionHash = await signerWallet.sendTransaction({
chain: connectedChain,
to: parameters.to,
data: parameters.data,
});
You can find additional examples of submitting transactions here if using Viem TypeScript Interface for Ethereum.
Note: Be sure to use the same admin wallet that you selected during creation of allocations. You can find the wallet by going to settings in the app: https://app.magna.so/[your-project]/settings/wallets Once the transaction is successfully submitted, use the returned transaction hash in the next step to trigger indexing so that the correct state can be reflected in the app.
Last updated
Was this helpful?