# 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:

```sh
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",
  "sender": "0xYourWalletAddress",
  "allocationId": "optional_allocation_id",
  "type": "admin",
  "cursor": "cursor",
  "limit": 100
}'
```

* `magna_project_api_token` (required) - replace with your actual Magna API token
* `tokenId` (required) - your project's token id
* `sender` (required) - the wallet address that will sign and submit the transaction
* `allocationId` (optional) - filter to a specific allocation
* `type` (optional) - filter by transaction type: "stakeholder" (withdrawals) or "admin" (non-withdrawal operations like start/fund)
* `cursor` (optional) - the last transactionGroupId for pagination
* `limit` (optional) - is the maximum number of items in the query, with a maximum of 100 items per query.

Solana Response example:

```jsx
{
  "isProcessed": true,
  "result": {
    "items": [
      {
        "transactionGroupId": "8fccd856-ebd2-466b-be1c-e76fbb6963ee",
        "parameters": [
          {
            "instructions": [...],
            "transactionId": "9f7beee1-00c7-41df-a1ba-0654a98a9a06"
          }
        ]
      }
    ],
    "cursor": "8fccd856-ebd2-466b-be1c-e76fbb6963ee",
    "total": 1
  }
}
```

EVM Response example:

```jsx
{
  "isProcessed": true,
  "result": {
    "items": [
      {
        "transactionGroupId": "8fccd856-ebd2-466b-be1c-e76fbb6963ee",
        "parameters": [
          {
            "to": "0xContractAddress",
            "data": "0x...",
            "value": "0"
          }
        ]
      }
    ],
    "cursor": "8fccd856-ebd2-466b-be1c-e76fbb6963ee",
    "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:<br>

```jsx
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](https://viem.sh/docs/actions/wallet/sendTransaction.html).

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.magna.so/magna-api-documentation/transactions/transaction-signing-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
