> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> API reference for Starton: every `starton.api.*` operation with input and output types.

Every `starton.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

<Info>
  **New to Corsair?** See [API access](/concepts/api), [authentication](/concepts/auth), and [error handling](/concepts/error-handling).
</Info>

## Ipfs

### uploadFile

`ipfs.uploadFile`

Upload a file to the project's IPFS storage and pin it

**Risk:** `write`

```ts theme={null}
await corsair.starton.api.ipfs.uploadFile({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | Yes | File contents, base64-encoded (standard alphabet, padded). |
| `filename` | `string` | Yes | File name stored on the pin, e.g. `metadata.json`. |
| `contentType` | `string` | No | MIME type of the file. Defaults to application/octet-stream. |
| `metadata` | `object` | No | Arbitrary JSON stored alongside the pin. |

<AccordionGroup>
  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `cid` | `string` | No | — |
| `origins` | `string[]` | No | — |
| `metadata` | `object` | No | — |
| `status` | `queued \| pinning \| pinned \| failed \| deleted` | Yes | — |
| `delegates` | `string[]` | No | — |
| `size` | `number` | No | — |
| `type` | `directory \| file` | No | — |
| `directoryContent` | `object[]` | No | — |
| `projectId` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>

  <Accordion title="directoryContent full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>[]
    ```
  </Accordion>
</AccordionGroup>

***

## Smart Contract

### call

`smartContract.call`

Execute a state-changing function on a deployed smart contract

**Risk:** `write`

```ts theme={null}
await corsair.starton.api.smartContract.call({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Network of the smart contract, e.g. `polygon-mumbai`. List via GET /v3/network. |
| `address` | `string` | Yes | Address of the deployed smart contract. |
| `functionName` | `string` | Yes | Name of the contract function to execute. Must be state-changing; use smartContract.read for view functions. |
| `params` | `object[]` | Yes | Function arguments, in the order the ABI declares them. |
| `signerWallet` | `string` | Yes | Address of the KMS wallet that signs and pays for the transaction. |
| `speed` | `low \| average \| fast \| fastest \| custom` | No | Gas speed. Defaults to `average`; use `custom` to supply customGas. |
| `customGas` | `object` | No | Custom gas settings. Only used when speed is set to `custom`. |
| `gasLimit` | `string` | No | Optional gas limit. |
| `nonce` | `number` | No | Manual nonce. If set, the Starton relayer will not assign one automatically. |
| `value` | `string` | No | Native-currency value sent with the call, in wei. |
| `simulate` | `boolean` | No | Simulate only: estimates gas and does NOT broadcast a transaction. |

<AccordionGroup>
  <Accordion title="params full type">
    ```ts theme={null}
    (
      string | number | boolean | Record<string, object | string | number | boolean | null>
    )[]
    ```
  </Accordion>

  <Accordion title="customGas full type">
    ```ts theme={null}
    {
      gasPrice?: string,
      maxFeePerGas?: string,
      maxPriorityFeePerGas?: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `blockHash` | `string` | No | — |
| `blockNumber` | `number` | No | — |
| `chainId` | `number` | Yes | — |
| `network` | `string` | Yes | — |
| `data` | `string` | No | — |
| `from` | `string` | Yes | — |
| `gasLimit` | `string` | No | — |
| `gasPrice` | `string` | No | — |
| `maxFeePerGas` | `string` | No | — |
| `maxPriorityFeePerGas` | `string` | No | — |
| `metadata` | `object` | No | — |
| `nonce` | `number` | No | — |
| `type` | `number` | No | — |
| `signerWallet` | `string` | Yes | — |
| `publishedDate` | `string` | No | — |
| `minedDate` | `string` | No | — |
| `signedTransaction` | `string` | No | — |
| `status` | `UNSIGNED \| ERROR_TX \| ERROR_PUBLISH \| PUBLISHED \| RECEIVED_BY_STARTON \| CREATED_BY_STARTON \| COULD_NOT_ESTIMATE_GAS_PRICE \| COULD_NOT_INCREASE_GAS_PRICE \| GAS_PRICE_ESTIMATED \| INVALID_GAS_PRICE \| REPLACEMENT_GAS_PRICE_UNDERPRICED \| COULD_NOT_ESTIMATE_GAS_LIMIT \| GAS_LIMIT_ESTIMATED \| EXECUTION_WILL_FAIL \| INVALID_ARGUMENT \| INSUFFICIENT_FUNDS \| INSUFFICIENT_FUNDS_AFTER_BROADCAST \| COULD_NOT_ASSIGN_NONCE \| COULD_NOT_UNSTUCK_NONCE \| NONCE_ASSIGNED \| NONCE_EXPIRED \| COULD_NOT_SIGN \| SIGNED \| SENT_TO_MEMPOOL \| COULD_NOT_BROADCAST \| ALREADY_KNOWN \| MINED \| CONFIRMED \| REPLACED \| FAILED \| MONITORING_IN_PROGRESS \| STUCK_BY_PREVIOUS_TRANSACTION \| MAX_GAS_PRICE_REACH \| GAS_PRICE_INCREASED \| NEW_TRANSACTION_HASH \| UNKNOWN \| MONITORING_INTERRUPTED` | Yes | — |
| `state` | `SUCCESS \| PENDING \| MANUAL_ACTION_REQUIRED \| ERROR` | Yes | — |
| `speed` | `low \| average \| fast \| fastest \| custom` | No | — |
| `logs` | `object[]` | Yes | — |
| `to` | `string` | No | — |
| `transactionHash` | `string` | No | — |
| `value` | `string` | Yes | — |
| `automaticNonce` | `boolean` | Yes | — |
| `isDeployTransaction` | `boolean` | Yes | — |
| `projectId` | `string` | Yes | — |
| `parentTransaction` | `string` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>

  <Accordion title="logs full type">
    ```ts theme={null}
    {
      message: string,
      type: UNSIGNED | ERROR_TX | ERROR_PUBLISH | PUBLISHED | RECEIVED_BY_STARTON | CREATED_BY_STARTON | COULD_NOT_ESTIMATE_GAS_PRICE | COULD_NOT_INCREASE_GAS_PRICE | GAS_PRICE_ESTIMATED | INVALID_GAS_PRICE | REPLACEMENT_GAS_PRICE_UNDERPRICED | COULD_NOT_ESTIMATE_GAS_LIMIT | GAS_LIMIT_ESTIMATED | EXECUTION_WILL_FAIL | INVALID_ARGUMENT | INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS_AFTER_BROADCAST | COULD_NOT_ASSIGN_NONCE | COULD_NOT_UNSTUCK_NONCE | NONCE_ASSIGNED | NONCE_EXPIRED | COULD_NOT_SIGN | SIGNED | SENT_TO_MEMPOOL | COULD_NOT_BROADCAST | ALREADY_KNOWN | MINED | CONFIRMED | REPLACED | FAILED | MONITORING_IN_PROGRESS | STUCK_BY_PREVIOUS_TRANSACTION | MAX_GAS_PRICE_REACH | GAS_PRICE_INCREASED | NEW_TRANSACTION_HASH | UNKNOWN | MONITORING_INTERRUPTED,
      context?: Record<string, object | string | number | boolean | null>,
      createdAt: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### deployFromTemplate

`smartContract.deployFromTemplate`

Deploy a smart contract from a Starton-audited template (e.g. ERC20, ERC721)

**Risk:** `write`

```ts theme={null}
await corsair.starton.api.smartContract.deployFromTemplate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Network of the smart contract, e.g. `polygon-mumbai`. List via GET /v3/network. |
| `signerWallet` | `string` | Yes | Address of the KMS wallet that signs and pays for the transaction. |
| `templateId` | `string` | Yes | Starton Library template to deploy, e.g. `ERC20_META_TRANSACTION`. List via GET /v3/smart-contract-template. |
| `name` | `string` | Yes | Contract name on Starton (off-chain). Max 255 characters. |
| `params` | `object[]` | Yes | Smart contract constructor parameters, in the order the template declares them. |
| `description` | `string` | No | Contract description on Starton (off-chain). |
| `gasLimit` | `string` | No | Optional gas limit. |
| `speed` | `low \| average \| fast \| fastest \| custom` | No | Gas speed. Defaults to `average`; use `custom` to supply customGas. |
| `customGas` | `object` | No | Custom gas settings. Only used when speed is set to `custom`. |
| `nonce` | `number` | No | Manual nonce. If set, the Starton relayer will not assign one automatically. |
| `value` | `string` | No | Native-currency value sent with the deployment, in wei. For payable constructors. |
| `metadata` | `object` | No | Arbitrary JSON stored alongside the contract. |
| `uiData` | `object` | No | Dashboard display metadata Starton stores with the contract. |
| `simulate` | `boolean` | No | Simulate only: estimates gas and does NOT broadcast a transaction. |

<AccordionGroup>
  <Accordion title="params full type">
    ```ts theme={null}
    (
      string | number | boolean | Record<string, object | string | number | boolean | null>
    )[]
    ```
  </Accordion>

  <Accordion title="customGas full type">
    ```ts theme={null}
    {
      gasPrice?: string,
      maxFeePerGas?: string,
      maxPriorityFeePerGas?: string
    }
    ```
  </Accordion>

  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>

  <Accordion title="uiData full type">
    ```ts theme={null}
    {
      version: 1,
      deployMethod: web3 | kms,
      imported: boolean,
      deployType?: string,
      chainId?: number
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `smartContract` | `object` | Yes | — |
| `transaction` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="smartContract full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      description?: string | null,
      network: string,
      abi?: Record<string, object | string | number | boolean | null>[],
      address: string,
      params?: string[] | null,
      compilationDetails?: Record<string, object | string | number | boolean | null> | null,
      creationHash?: string | null,
      status: UNSIGNED | ERROR_TX | ERROR_PUBLISH | PUBLISHED | RECEIVED_BY_STARTON | CREATED_BY_STARTON | COULD_NOT_ESTIMATE_GAS_PRICE | COULD_NOT_INCREASE_GAS_PRICE | GAS_PRICE_ESTIMATED | INVALID_GAS_PRICE | REPLACEMENT_GAS_PRICE_UNDERPRICED | COULD_NOT_ESTIMATE_GAS_LIMIT | GAS_LIMIT_ESTIMATED | EXECUTION_WILL_FAIL | INVALID_ARGUMENT | INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS_AFTER_BROADCAST | COULD_NOT_ASSIGN_NONCE | COULD_NOT_UNSTUCK_NONCE | NONCE_ASSIGNED | NONCE_EXPIRED | COULD_NOT_SIGN | SIGNED | SENT_TO_MEMPOOL | COULD_NOT_BROADCAST | ALREADY_KNOWN | MINED | CONFIRMED | REPLACED | FAILED | MONITORING_IN_PROGRESS | STUCK_BY_PREVIOUS_TRANSACTION | MAX_GAS_PRICE_REACH | GAS_PRICE_INCREASED | NEW_TRANSACTION_HASH | UNKNOWN | MONITORING_INTERRUPTED,
      state: SUCCESS | PENDING | MANUAL_ACTION_REQUIRED | ERROR,
      minedDate?: string | null,
      blockNumber?: number | null,
      templateId?: string | null,
      projectId: string,
      metadata?: Record<string, object | string | number | boolean | null> | null,
      uiData?: {
        version: 1,
        deployMethod: web3 | kms,
        imported: boolean,
        deployType?: string,
        chainId?: number
      } | null,
      createdAt: string,
      updatedAt: string
    }
    ```
  </Accordion>

  <Accordion title="transaction full type">
    ```ts theme={null}
    {
      id: string,
      blockHash?: string | null,
      blockNumber?: number | null,
      chainId: number,
      network: string,
      data?: string | null,
      from: string,
      gasLimit?: string | null,
      gasPrice?: string | null,
      maxFeePerGas?: string | null,
      maxPriorityFeePerGas?: string | null,
      metadata?: Record<string, object | string | number | boolean | null> | null,
      nonce?: number | null,
      type?: number | null,
      signerWallet: string,
      publishedDate?: string | null,
      minedDate?: string | null,
      signedTransaction?: string | null,
      status: UNSIGNED | ERROR_TX | ERROR_PUBLISH | PUBLISHED | RECEIVED_BY_STARTON | CREATED_BY_STARTON | COULD_NOT_ESTIMATE_GAS_PRICE | COULD_NOT_INCREASE_GAS_PRICE | GAS_PRICE_ESTIMATED | INVALID_GAS_PRICE | REPLACEMENT_GAS_PRICE_UNDERPRICED | COULD_NOT_ESTIMATE_GAS_LIMIT | GAS_LIMIT_ESTIMATED | EXECUTION_WILL_FAIL | INVALID_ARGUMENT | INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS_AFTER_BROADCAST | COULD_NOT_ASSIGN_NONCE | COULD_NOT_UNSTUCK_NONCE | NONCE_ASSIGNED | NONCE_EXPIRED | COULD_NOT_SIGN | SIGNED | SENT_TO_MEMPOOL | COULD_NOT_BROADCAST | ALREADY_KNOWN | MINED | CONFIRMED | REPLACED | FAILED | MONITORING_IN_PROGRESS | STUCK_BY_PREVIOUS_TRANSACTION | MAX_GAS_PRICE_REACH | GAS_PRICE_INCREASED | NEW_TRANSACTION_HASH | UNKNOWN | MONITORING_INTERRUPTED,
      state: SUCCESS | PENDING | MANUAL_ACTION_REQUIRED | ERROR,
      speed?: low | average | fast | fastest | custom | null,
      logs: {
        message: string,
        type: UNSIGNED | ERROR_TX | ERROR_PUBLISH | PUBLISHED | RECEIVED_BY_STARTON | CREATED_BY_STARTON | COULD_NOT_ESTIMATE_GAS_PRICE | COULD_NOT_INCREASE_GAS_PRICE | GAS_PRICE_ESTIMATED | INVALID_GAS_PRICE | REPLACEMENT_GAS_PRICE_UNDERPRICED | COULD_NOT_ESTIMATE_GAS_LIMIT | GAS_LIMIT_ESTIMATED | EXECUTION_WILL_FAIL | INVALID_ARGUMENT | INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS_AFTER_BROADCAST | COULD_NOT_ASSIGN_NONCE | COULD_NOT_UNSTUCK_NONCE | NONCE_ASSIGNED | NONCE_EXPIRED | COULD_NOT_SIGN | SIGNED | SENT_TO_MEMPOOL | COULD_NOT_BROADCAST | ALREADY_KNOWN | MINED | CONFIRMED | REPLACED | FAILED | MONITORING_IN_PROGRESS | STUCK_BY_PREVIOUS_TRANSACTION | MAX_GAS_PRICE_REACH | GAS_PRICE_INCREASED | NEW_TRANSACTION_HASH | UNKNOWN | MONITORING_INTERRUPTED,
        context?: Record<string, object | string | number | boolean | null>,
        createdAt: string
      }[],
      to?: string | null,
      transactionHash?: string | null,
      value: string,
      automaticNonce: boolean,
      isDeployTransaction: boolean,
      projectId: string,
      parentTransaction?: string | null,
      createdAt: string,
      updatedAt: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`smartContract.list`

List the smart contracts in the project (paginated)

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.smartContract.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Number of returned page. By default the returned page is the first. |
| `limit` | `number` | No | Number of entities returned on each page. Defaults to 100, maximum 2500. |
| `network` | `string` | No | Filter by network, e.g. `polygon-amoy`. |
| `address` | `string` | No | Filter by contract address. |
| `includeAbi` | `boolean` | No | Include each contract ABI in the response. |
| `includeCompilationDetails` | `boolean` | No | Include each contract compilation details in the response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `meta` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      description?: string | null,
      network: string,
      abi?: Record<string, object | string | number | boolean | null>[],
      address: string,
      params?: string[] | null,
      compilationDetails?: Record<string, object | string | number | boolean | null> | null,
      creationHash?: string | null,
      status: UNSIGNED | ERROR_TX | ERROR_PUBLISH | PUBLISHED | RECEIVED_BY_STARTON | CREATED_BY_STARTON | COULD_NOT_ESTIMATE_GAS_PRICE | COULD_NOT_INCREASE_GAS_PRICE | GAS_PRICE_ESTIMATED | INVALID_GAS_PRICE | REPLACEMENT_GAS_PRICE_UNDERPRICED | COULD_NOT_ESTIMATE_GAS_LIMIT | GAS_LIMIT_ESTIMATED | EXECUTION_WILL_FAIL | INVALID_ARGUMENT | INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS_AFTER_BROADCAST | COULD_NOT_ASSIGN_NONCE | COULD_NOT_UNSTUCK_NONCE | NONCE_ASSIGNED | NONCE_EXPIRED | COULD_NOT_SIGN | SIGNED | SENT_TO_MEMPOOL | COULD_NOT_BROADCAST | ALREADY_KNOWN | MINED | CONFIRMED | REPLACED | FAILED | MONITORING_IN_PROGRESS | STUCK_BY_PREVIOUS_TRANSACTION | MAX_GAS_PRICE_REACH | GAS_PRICE_INCREASED | NEW_TRANSACTION_HASH | UNKNOWN | MONITORING_INTERRUPTED,
      state: SUCCESS | PENDING | MANUAL_ACTION_REQUIRED | ERROR,
      minedDate?: string | null,
      blockNumber?: number | null,
      templateId?: string | null,
      projectId: string,
      metadata?: Record<string, object | string | number | boolean | null> | null,
      uiData?: {
        version: 1,
        deployMethod: web3 | kms,
        imported: boolean,
        deployType?: string,
        chainId?: number
      } | null,
      createdAt: string,
      updatedAt: string
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      itemCount: number,
      totalItems?: number,
      itemsPerPage: number,
      totalPages?: number,
      currentPage: number
    }
    ```
  </Accordion>
</AccordionGroup>

***

### read

`smartContract.read`

Call a read-only function on a deployed smart contract without broadcasting a transaction

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.smartContract.read({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network` | `string` | Yes | Network of the smart contract, e.g. `polygon-mumbai`. List via GET /v3/network. |
| `address` | `string` | Yes | Address of the deployed smart contract. |
| `functionName` | `string` | Yes | Name of the read-only (view) contract function to call. |
| `params` | `object[]` | Yes | Function arguments, in the order the ABI declares them. |

<AccordionGroup>
  <Accordion title="params full type">
    ```ts theme={null}
    (
      string | number | boolean | Record<string, object | string | number | boolean | null>
    )[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `object[]` | Yes | — |
| `params` | `object[]` | Yes | — |
| `functionName` | `string` | Yes | — |
| `address` | `string` | Yes | — |
| `network` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="response full type">
    ```ts theme={null}
    string | number | boolean | Record<string, object | string | number | boolean | null> | (Record<string, object | string | number | boolean | null> | string | number | boolean | null)[]
    ```
  </Accordion>

  <Accordion title="params full type">
    ```ts theme={null}
    (
      string | number | boolean | Record<string, object | string | number | boolean | null>
    )[]
    ```
  </Accordion>
</AccordionGroup>

***

## Template

### list

`template.list`

List the Starton Library smart contract templates

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.template.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Number of returned page. By default the returned page is the first. |
| `limit` | `number` | No | Number of entities returned on each page. Defaults to 100, maximum 2500. |
| `isAudited` | `boolean` | No | Only return templates audited by Starton. |
| `isActivated` | `boolean` | No | Only return activated (deployable) templates. |
| `name` | `string` | No | Filter by template name. Letters, digits, -, \_ and spaces only. |
| `blockchain` | `string` | No | Filter by supported blockchain, e.g. `ethereum`. |
| `category` | `NFT \| FUNGIBLE \| OTHER \| DEPRECATED \| SALE \| TOOL` | No | Filter by template category. |
| `includeCompilationDetails` | `boolean` | No | Include each template compilation details. |
| `includeForm` | `boolean` | No | Include each template deployment form definition. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `meta` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      description: string,
      shortDescription: string,
      githubUrl: string,
      blockchains: string[],
      tags: string[],
      category: NFT | FUNGIBLE | OTHER | DEPRECATED | SALE | TOOL,
      humanReadableAbi: string[],
      abi: Record<string, object | string | number | boolean | null>[],
      form?: Record<string, object | string | number | boolean | null> | null,
      compilationDetails?: Record<string, object | string | number | boolean | null> | null,
      isAudited: boolean,
      isActivated: boolean,
      order: number,
      createdAt: string,
      updatedAt: string
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      itemCount: number,
      totalItems?: number,
      itemsPerPage: number,
      totalPages?: number,
      currentPage: number
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Transaction

### get

`transaction.get`

Retrieve a blockchain transaction by its Starton id

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.transaction.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Starton transaction id, as returned by smartContract.call or smartContract.deployFromTemplate. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `blockHash` | `string` | No | — |
| `blockNumber` | `number` | No | — |
| `chainId` | `number` | Yes | — |
| `network` | `string` | Yes | — |
| `data` | `string` | No | — |
| `from` | `string` | Yes | — |
| `gasLimit` | `string` | No | — |
| `gasPrice` | `string` | No | — |
| `maxFeePerGas` | `string` | No | — |
| `maxPriorityFeePerGas` | `string` | No | — |
| `metadata` | `object` | No | — |
| `nonce` | `number` | No | — |
| `type` | `number` | No | — |
| `signerWallet` | `string` | Yes | — |
| `publishedDate` | `string` | No | — |
| `minedDate` | `string` | No | — |
| `signedTransaction` | `string` | No | — |
| `status` | `UNSIGNED \| ERROR_TX \| ERROR_PUBLISH \| PUBLISHED \| RECEIVED_BY_STARTON \| CREATED_BY_STARTON \| COULD_NOT_ESTIMATE_GAS_PRICE \| COULD_NOT_INCREASE_GAS_PRICE \| GAS_PRICE_ESTIMATED \| INVALID_GAS_PRICE \| REPLACEMENT_GAS_PRICE_UNDERPRICED \| COULD_NOT_ESTIMATE_GAS_LIMIT \| GAS_LIMIT_ESTIMATED \| EXECUTION_WILL_FAIL \| INVALID_ARGUMENT \| INSUFFICIENT_FUNDS \| INSUFFICIENT_FUNDS_AFTER_BROADCAST \| COULD_NOT_ASSIGN_NONCE \| COULD_NOT_UNSTUCK_NONCE \| NONCE_ASSIGNED \| NONCE_EXPIRED \| COULD_NOT_SIGN \| SIGNED \| SENT_TO_MEMPOOL \| COULD_NOT_BROADCAST \| ALREADY_KNOWN \| MINED \| CONFIRMED \| REPLACED \| FAILED \| MONITORING_IN_PROGRESS \| STUCK_BY_PREVIOUS_TRANSACTION \| MAX_GAS_PRICE_REACH \| GAS_PRICE_INCREASED \| NEW_TRANSACTION_HASH \| UNKNOWN \| MONITORING_INTERRUPTED` | Yes | — |
| `state` | `SUCCESS \| PENDING \| MANUAL_ACTION_REQUIRED \| ERROR` | Yes | — |
| `speed` | `low \| average \| fast \| fastest \| custom` | No | — |
| `logs` | `object[]` | Yes | — |
| `to` | `string` | No | — |
| `transactionHash` | `string` | No | — |
| `value` | `string` | Yes | — |
| `automaticNonce` | `boolean` | Yes | — |
| `isDeployTransaction` | `boolean` | Yes | — |
| `projectId` | `string` | Yes | — |
| `parentTransaction` | `string` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>

  <Accordion title="logs full type">
    ```ts theme={null}
    {
      message: string,
      type: UNSIGNED | ERROR_TX | ERROR_PUBLISH | PUBLISHED | RECEIVED_BY_STARTON | CREATED_BY_STARTON | COULD_NOT_ESTIMATE_GAS_PRICE | COULD_NOT_INCREASE_GAS_PRICE | GAS_PRICE_ESTIMATED | INVALID_GAS_PRICE | REPLACEMENT_GAS_PRICE_UNDERPRICED | COULD_NOT_ESTIMATE_GAS_LIMIT | GAS_LIMIT_ESTIMATED | EXECUTION_WILL_FAIL | INVALID_ARGUMENT | INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS_AFTER_BROADCAST | COULD_NOT_ASSIGN_NONCE | COULD_NOT_UNSTUCK_NONCE | NONCE_ASSIGNED | NONCE_EXPIRED | COULD_NOT_SIGN | SIGNED | SENT_TO_MEMPOOL | COULD_NOT_BROADCAST | ALREADY_KNOWN | MINED | CONFIRMED | REPLACED | FAILED | MONITORING_IN_PROGRESS | STUCK_BY_PREVIOUS_TRANSACTION | MAX_GAS_PRICE_REACH | GAS_PRICE_INCREASED | NEW_TRANSACTION_HASH | UNKNOWN | MONITORING_INTERRUPTED,
      context?: Record<string, object | string | number | boolean | null>,
      createdAt: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Wallet

### create

`wallet.create`

Create a new KMS-managed blockchain wallet for the project

**Risk:** `write`

```ts theme={null}
await corsair.starton.api.wallet.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kmsId` | `string` | Yes | Id of the Key Management System the wallet key is stored under. Required. List available KMS via GET /v3/kms. |
| `name` | `string` | No | Wallet name on Starton (off-chain). |
| `description` | `string` | No | Wallet description on Starton (off-chain). |
| `metadata` | `object` | No | Arbitrary JSON stored alongside the wallet. |

<AccordionGroup>
  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `address` | `string` | Yes | — |
| `providerKeyId` | `string` | Yes | — |
| `kmsId` | `string` | Yes | — |
| `name` | `string` | No | — |
| `description` | `string` | No | — |
| `metadata` | `object` | No | — |
| `projectId` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>
</AccordionGroup>

***

### list

`wallet.list`

List the KMS-managed wallets for the project (paginated)

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.wallet.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Number of returned page. By default the returned page is the first. |
| `limit` | `number` | No | Number of entities returned on each page. Defaults to 100, maximum 2500. |
| `name` | `string` | No | Filter by wallet name. Letters, digits, -, \_ and spaces only. |
| `kmsId` | `string` | No | Filter by Key Management System id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `meta` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      address: string,
      providerKeyId: string,
      kmsId: string,
      name?: string | null,
      description?: string | null,
      metadata?: Record<string, object | string | number | boolean | null> | null,
      projectId: string,
      createdAt: string,
      updatedAt: string
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      itemCount: number,
      totalItems?: number,
      itemsPerPage: number,
      totalPages?: number,
      currentPage: number
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Watcher

### delete

`watcher.delete`

Delete a blockchain event watcher by its id

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.starton.api.watcher.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Starton watcher id. |

**Output:** `number`

***

### get

`watcher.get`

Retrieve a blockchain event watcher by its id

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.watcher.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Starton watcher id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `description` | `string` | No | — |
| `address` | `string` | Yes | — |
| `network` | `string` | Yes | — |
| `projectId` | `string` | Yes | — |
| `type` | `MINED_TRANSACTION \| ADDRESS_ACTIVITY \| ADDRESS_RECEIVED_NATIVE_CURRENCY \| ADDRESS_SENT_NATIVE_CURRENCY \| EVENT_TRANSFER \| ERC721_EVENT_TRANSFER \| ERC1155_EVENT_TRANSFER_SINGLE \| ERC1155_EVENT_TRANSFER_BATCH \| EVENT_MINT \| EVENT_APPROVAL \| EVENT_CUSTOM` | Yes | — |
| `customEventAbi` | `object[]` | No | — |
| `triggerType` | `BLOCK \| TRANSACTION \| EVENT \| GAS_PRICE` | Yes | — |
| `webhookUrl` | `string` | Yes | — |
| `confirmationsBlocks` | `number` | Yes | — |
| `paused` | `boolean` | Yes | — |
| `pausedReason` | `string` | No | — |
| `metadata` | `object` | No | — |
| `customFilters` | `object` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="customEventAbi full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>[]
    ```
  </Accordion>

  <Accordion title="metadata full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>

  <Accordion title="customFilters full type">
    ```ts theme={null}
    Record<string, object | string | number | boolean | null>
    ```
  </Accordion>
</AccordionGroup>

***

## Webhook

### list

`webhook.list`

List the webhook deliveries sent by watchers (paginated)

**Risk:** `read`

```ts theme={null}
await corsair.starton.api.webhook.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Number of returned page. By default the returned page is the first. |
| `limit` | `number` | No | Number of entities returned on each page. Defaults to 100, maximum 2500. |
| `status` | `RETRYING \| SUCCESSFUL \| FAILED \| CANCELED` | No | Filter by delivery status. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `meta` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      refId: string,
      status: RETRYING | SUCCESSFUL | FAILED | CANCELED,
      payload?: Record<string, object | string | number | boolean | null> | null,
      url: string,
      headers?: Record<string, object | string | number | boolean | null> | null,
      attempts: Record<string, object | string | number | boolean | null>[],
      projectId: string,
      createdAt: string,
      updatedAt: string
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      itemCount: number,
      totalItems?: number,
      itemsPerPage: number,
      totalPages?: number,
      currentPage: number
    }
    ```
  </Accordion>
</AccordionGroup>

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.