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

# Starton API reference

> API reference for the Starton plugin in Corsair: every `starton.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## 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` | `Record<string, any>` | No | Arbitrary JSON stored alongside the pin. |

**Output**

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

***

## 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` | `(string \| number \| boolean \| Record<string, any>)[]` | No | Function arguments, in the order the ABI declares them. Defaults to \[]. |
| `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. |

> [accordion] customGas full type
>
> ```ts theme={null}
> {
>   gasPrice?: string,
>   maxFeePerGas?: string,
>   maxPriorityFeePerGas?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `blockHash` | `string \| null` | No | — |
| `blockNumber` | `number \| null` | No | — |
| `chainId` | `number` | Yes | — |
| `network` | `string` | Yes | — |
| `data` | `string \| null` | No | — |
| `from` | `string` | Yes | — |
| `gasLimit` | `string \| null` | No | — |
| `gasPrice` | `string \| null` | No | — |
| `maxFeePerGas` | `string \| null` | No | — |
| `maxPriorityFeePerGas` | `string \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | — |
| `nonce` | `number \| null` | No | — |
| `type` | `number \| null` | No | — |
| `signerWallet` | `string` | Yes | — |
| `publishedDate` | `string \| null` | No | — |
| `minedDate` | `string \| null` | No | — |
| `signedTransaction` | `string \| null` | 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 \| null` | No | — |
| `logs` | `object[]` | Yes | — |
| `to` | `string \| null` | No | — |
| `transactionHash` | `string \| null` | No | — |
| `value` | `string` | Yes | — |
| `automaticNonce` | `boolean` | Yes | — |
| `isDeployTransaction` | `boolean` | Yes | — |
| `projectId` | `string` | Yes | — |
| `parentTransaction` | `string \| null` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

> [accordion] 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, any>,
>   createdAt: string
> }[]
> ```

***

### 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` | `(string \| number \| boolean \| Record<string, any>)[]` | No | Smart contract constructor parameters, in the order the template declares them. Defaults to \[]. |
| `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` | `Record<string, any>` | No | Arbitrary JSON stored alongside the contract. |
| `uiData` | `object \| null` | No | Dashboard display metadata Starton stores with the contract. |
| `simulate` | `boolean` | No | Simulate only: estimates gas and does NOT broadcast a transaction. |

> [accordion] customGas full type
>
> ```ts theme={null}
> {
>   gasPrice?: string,
>   maxFeePerGas?: string,
>   maxPriorityFeePerGas?: string
> }
> ```

> [accordion] uiData full type
>
> ```ts theme={null}
> {
>   version: 1,
>   deployMethod: web3 | kms,
>   imported: boolean,
>   deployType?: string,
>   chainId?: number
> } | null
> ```

**Output**

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

> [accordion] smartContract full type
>
> ```ts theme={null}
> {
>   id: string,
>   name: string,
>   description?: string | null,
>   network: string,
>   abi?: Record<string, any>[],
>   address: string,
>   params?: string[] | null,
>   compilationDetails?: Record<string, any> | 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, any> | null,
>   uiData?: {
>     version: 1,
>     deployMethod: web3 | kms,
>     imported: boolean,
>     deployType?: string,
>     chainId?: number
>   } | null,
>   createdAt: string,
>   updatedAt: string
> }
> ```

> [accordion] 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, any> | 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, any>,
>     createdAt: string
>   }[],
>   to?: string | null,
>   transactionHash?: string | null,
>   value: string,
>   automaticNonce: boolean,
>   isDeployTransaction: boolean,
>   projectId: string,
>   parentTransaction?: string | null,
>   createdAt: string,
>   updatedAt: string
> }
> ```

***

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

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id: string,
>   name: string,
>   description?: string | null,
>   network: string,
>   abi?: Record<string, any>[],
>   address: string,
>   params?: string[] | null,
>   compilationDetails?: Record<string, any> | 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, any> | null,
>   uiData?: {
>     version: 1,
>     deployMethod: web3 | kms,
>     imported: boolean,
>     deployType?: string,
>     chainId?: number
>   } | null,
>   createdAt: string,
>   updatedAt: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   itemCount: number,
>   totalItems?: number,
>   itemsPerPage: number,
>   totalPages?: number,
>   currentPage: number
> }
> ```

***

### 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` | `(string \| number \| boolean \| Record<string, any>)[]` | No | Function arguments, in the order the ABI declares them. Defaults to \[]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `string \| number \| boolean \| Record<string, any> \| any[]` | Yes | — |
| `params` | `(string \| number \| boolean \| Record<string, any>)[]` | Yes | — |
| `functionName` | `string` | Yes | — |
| `address` | `string` | Yes | — |
| `network` | `string` | Yes | — |

***

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

> [accordion] 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, any>[],
>   form?: Record<string, any> | null,
>   compilationDetails?: Record<string, any> | null,
>   isAudited: boolean,
>   isActivated: boolean,
>   order: number,
>   createdAt: string,
>   updatedAt: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   itemCount: number,
>   totalItems?: number,
>   itemsPerPage: number,
>   totalPages?: number,
>   currentPage: number
> }
> ```

***

## 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 \| null` | No | — |
| `blockNumber` | `number \| null` | No | — |
| `chainId` | `number` | Yes | — |
| `network` | `string` | Yes | — |
| `data` | `string \| null` | No | — |
| `from` | `string` | Yes | — |
| `gasLimit` | `string \| null` | No | — |
| `gasPrice` | `string \| null` | No | — |
| `maxFeePerGas` | `string \| null` | No | — |
| `maxPriorityFeePerGas` | `string \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | — |
| `nonce` | `number \| null` | No | — |
| `type` | `number \| null` | No | — |
| `signerWallet` | `string` | Yes | — |
| `publishedDate` | `string \| null` | No | — |
| `minedDate` | `string \| null` | No | — |
| `signedTransaction` | `string \| null` | 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 \| null` | No | — |
| `logs` | `object[]` | Yes | — |
| `to` | `string \| null` | No | — |
| `transactionHash` | `string \| null` | No | — |
| `value` | `string` | Yes | — |
| `automaticNonce` | `boolean` | Yes | — |
| `isDeployTransaction` | `boolean` | Yes | — |
| `projectId` | `string` | Yes | — |
| `parentTransaction` | `string \| null` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

> [accordion] 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, any>,
>   createdAt: string
> }[]
> ```

***

## 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` | `Record<string, any>` | No | Arbitrary JSON stored alongside the wallet. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `address` | `string` | Yes | — |
| `providerKeyId` | `string` | Yes | — |
| `kmsId` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | — |
| `projectId` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

***

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

> [accordion] items full type
>
> ```ts theme={null}
> {
>   address: string,
>   providerKeyId: string,
>   kmsId: string,
>   name?: string | null,
>   description?: string | null,
>   metadata?: Record<string, any> | null,
>   projectId: string,
>   createdAt: string,
>   updatedAt: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   itemCount: number,
>   totalItems?: number,
>   itemsPerPage: number,
>   totalPages?: number,
>   currentPage: number
> }
> ```

***

## 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 \| null` | No | — |
| `description` | `string \| null` | 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` | `Record<string, any>[] \| null` | No | — |
| `triggerType` | `BLOCK \| TRANSACTION \| EVENT \| GAS_PRICE` | Yes | — |
| `webhookUrl` | `string` | Yes | — |
| `confirmationsBlocks` | `number` | Yes | — |
| `paused` | `boolean` | Yes | — |
| `pausedReason` | `string \| null` | No | — |
| `metadata` | `Record<string, any> \| null` | No | — |
| `customFilters` | `Record<string, any>` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

***

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

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id: string,
>   refId: string,
>   status: RETRYING | SUCCESSFUL | FAILED | CANCELED,
>   payload: Record<string, any> | null,
>   url: string,
>   headers: Record<string, any> | null,
>   attempts: Record<string, any>[],
>   projectId: string,
>   createdAt: string,
>   updatedAt: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   itemCount: number,
>   totalItems?: number,
>   itemsPerPage: number,
>   totalPages?: number,
>   currentPage: number
> }
> ```

***


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