Starton Connect: Documentation (3.0)
Download OpenAPI specification:Download
An API is an application programming interface. It is a set of routines, functions, data structures and other tools that make possible for computers program to communicate with each other. Starton API is a REST API. A REST API is an application program interface that uses HTTP requests to send information between client and server.
It's a protocol that works over the web and uses URLs (Uniform Resource Locators) to identify resources. Information or content can be accessed at a URLs location, such as JSON, HTML, audio files or images. Often resources have one or more methods that can be performed on them over HTTP (Hypertext Transfer Protocol), such as GET, POST, PUT and DELETE. The action represented by the first and last of these is clear; but POST and PUT have specific meanings: use POST to create resources; use PUT to update them.
Authenticating on Starton API
To use Starton from your code, you will need to authenticate yourself to the API through an API key.
What is an API Key ?
An API key (Application Programming Key) is used to authenticate yourself to an API. For example, Starton can generate API keys related to the use of Connect, so you can call our API from your code and authenticate yourself with it. The API keys generated by Starton are linked to a specific project, which means you could have multiple API keys. API keys are linked to your projects/account, so anyone gaining access to your API keys could use your credits by pretending to be you.
Generating an API Key
On the Developer section, you can generate new API keys or revoke the previous ones (for example, if they leaked).
Using an API Key
The API key will be needed in your code if you try to call Starton's API endpoints (as the x-api-key variable in the Headers of the requests).
Gets all the smart contract templates
query Parameters
page | number The index of the page from the result |
limit | number <= 100 Maximum number of elements to return |
isAudited | boolean If defined, returns only the templates with a matching "isAudited" value |
isActivated | boolean If defined, returns only the templates with a matching "isActivated" value |
name | boolean Filters on the name |
includeCompilationDetails | boolean Should the response include the compilation details such as bytecode and source code |
Responses
Response samples
- 200
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "tags": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "color": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "blockchains": [
- "ethereum"
], - "humanReadableAbi": [
- "string"
], - "abi": [
- { }
], - "compilationDetails": { },
- "isAudited": true,
- "isActivated": true,
- "order": 0,
- "createdAt": "string",
- "updatedAt": "string"
}
]
}
Gets the {id} smart contract template
Returns the smart contract template identified by {id}.
path Parameters
id required | string Identifier of the smart contract template to get |
query Parameters
includeCompilationDetails | boolean Should the response include the compilation details such as bytecode and source code? |
Responses
Response samples
- 200
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "shortDescription": "string",
- "tags": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "color": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "blockchains": [
- "ethereum"
], - "humanReadableAbi": [
- "string"
], - "abi": [
- { }
], - "compilationDetails": { },
- "isAudited": true,
- "isActivated": true,
- "order": 0,
- "createdAt": "string",
- "updatedAt": "string"
}
Gets the list of all the webhooks
query Parameters
page | number The index of the page from the result |
limit | number <= 100 The maximum number of webhooks to return |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "refId": "string",
- "status": "RETRYING",
- "payload": { },
- "url": "string",
- "headers": { },
- "attempts": [
- { }
], - "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
}
Get a specific webhook identified by {id}
path Parameters
id required | string The identifier of the webhook |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "id": "string",
- "refId": "string",
- "status": "RETRYING",
- "payload": { },
- "url": "string",
- "headers": { },
- "attempts": [
- { }
], - "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Response samples
- 201
- 400
- 401
- 404
{- "id": "string",
- "refId": "string",
- "status": "RETRYING",
- "payload": { },
- "url": "string",
- "headers": { },
- "attempts": [
- { }
], - "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Cancels webhook identified by {id}
path Parameters
id required | string Identifier of the webhook |
Responses
Response samples
- 201
- 400
- 401
- 404
{- "id": "string",
- "refId": "string",
- "status": "RETRYING",
- "payload": { },
- "url": "string",
- "headers": { },
- "attempts": [
- { }
], - "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Gets the list of all the existing watchers
query Parameters
page | number The index of the page from the result |
limit | number <= 100 Maximum number of elements to return |
address | string The address of the smart contract |
network | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-fuji" "avalanche-mainnet" Network on which are deployed the webhooks. |
type | string Enum: "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" "NEW_BLOCK" |
webhookUrl | string |
confirmationsBlocks | number |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- {
- "id": "string",
- "watcher": { },
- "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
}
Creates a new watcher
Request Body schema: application/json
name | string Name of the watcher |
description | string Description of the watcher |
address required | string Address of the watcher |
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-fuji" "avalanche-mainnet" Network of the watcher |
type required | string Enum: "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" "NEW_BLOCK" Type of events watched |
webhookUrl required | string URL of the webhook |
confirmationsBlocks required | number Number of confirmation blocks |
Responses
Request samples
- Payload
{- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "type": "MINED_TRANSACTION",
- "webhookUrl": "string",
- "confirmationsBlocks": 0
}
Response samples
- 201
- 400
- 401
{- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- {
- "id": "string",
- "watcher": { },
- "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Gets a specific watcher identified by {id}
path Parameters
id required | string The identifier of the webhook |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- {
- "id": "string",
- "watcher": { },
- "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Updates the watcher identified by {id}
path Parameters
id required | string The identifier of the webhook |
Request Body schema: application/json
paused | boolean Is the watcher paused? |
webhookUrl required | string URL of the webhook |
confirmationsBlocks required | number Number of confirmation blocks |
name | string Name of the watcher |
description | string Description of the watcher |
Responses
Request samples
- Payload
{- "paused": true,
- "webhookUrl": "string",
- "confirmationsBlocks": 0,
- "name": "string",
- "description": "string"
}
Response samples
- 200
- 400
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- {
- "id": "string",
- "watcher": { },
- "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Creates a watcher on several networks
Request Body schema: application/json
networks required | Array of strings Items Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-fuji" "avalanche-mainnet" Networks of the watcher |
name | string Name of the watchers |
description | string Description of the watchers |
address required | string Address of the watchers |
type required | string Enum: "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" "NEW_BLOCK" Type of events watched |
webhookUrl required | string URL of the webhook |
confirmationsBlocks required | number Number of confirmation blocks |
Responses
Request samples
- Payload
{- "networks": [
- "ethereum-mainnet"
], - "name": "string",
- "description": "string",
- "address": "string",
- "type": "MINED_TRANSACTION",
- "webhookUrl": "string",
- "confirmationsBlocks": 0
}
Response samples
- 201
- 400
- 401
[- {
- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- {
- "id": "string",
- "watcher": { },
- "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
Gets all the events for a watcher
Gets the list of all events which triggered watcher {id}.
path Parameters
id required | string Identifier of the watcher |
query Parameters
page | number The index of the page from the result |
limit | number <= 100 Maximum number of elements to return |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "watcher": {
- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- { }
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}, - "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
}
Gets event {eventId} that triggered watcher {id}
Gets the specific event which triggered watcher {id}.
path Parameters
eventId required | string Identifier of the event |
id required | string Identifier of the watcher |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "id": "string",
- "watcher": {
- "id": "string",
- "name": "string",
- "description": "string",
- "address": "string",
- "network": "ethereum-mainnet",
- "projectId": "string",
- "type": "MINED_TRANSACTION",
- "triggerType": "BLOCK",
- "webhookUrl": "string",
- "events": [
- { }
], - "confirmationsBlocks": 0,
- "paused": true,
- "pausedReason": "string",
- "createdAt": "string",
- "updatedAt": "string"
}, - "watcherId": "string",
- "blockNumber": 0,
- "blockHash": "string",
- "txHash": "string",
- "network": "ethereum-mainnet",
- "status": "PENDING_VALIDATION",
- "payload": { },
- "projectId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Gets all existing projects
Returns the list of existing projects.
query Parameters
page | number The index of the page from the result |
limit | number <= 100 Maximum number of elements to return |
Responses
Response samples
- 200
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "email": "string",
- "color": "string",
- "subscriptionPlan": "FREE",
- "ownerId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
]
}
Creates a new project
Request Body schema: application/json
description | string Description of the project |
name required | string <= 255 characters Name of the project |
string Email of the user | |
color | string |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string",
- "email": "string",
- "color": "string"
}
Response samples
- 201
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "email": "string",
- "color": "string",
- "subscriptionPlan": "FREE",
- "ownerId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Gets a specific project
Gets the project identified by {id}
path Parameters
id required | string Project ID |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "email": "string",
- "color": "string",
- "subscriptionPlan": "FREE",
- "ownerId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Updates the project identified by {id}
Updates the project identified by {id}.
path Parameters
id required | string Identifier of the project to update |
Request Body schema: application/json
description | string Description of the project |
name | string <= 255 characters Name of the project |
string Email of the user | |
color | string |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string",
- "email": "string",
- "color": "string"
}
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "email": "string",
- "color": "string",
- "subscriptionPlan": "FREE",
- "ownerId": "string",
- "createdAt": "string",
- "updatedAt": "string"
}
Response samples
- 200
- 400
- 401
- 403
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "created_at": "string",
- "key": "string",
- "consumer": {
- "id": "string"
}
}
]
}
Gets all transactions
query Parameters
network | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Network on which are deployed the smart contracts. |
transactionHash | string The transaction hash of the smart contract |
to | string Receiver of the transaction. It is a smart contract if calling one of its functions. |
from | string Wallet used to sign the transaction |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "blockHash": "string",
- "blockNumber": 0,
- "chainId": 0,
- "network": "ethereum-mainnet",
- "data": "string",
- "from": "string",
- "gasLimit": "string",
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "metadata": { },
- "nonce": 0,
- "type": 0,
- "signerWallet": "string",
- "publishedDate": "2019-08-24T14:15:22Z",
- "minedDate": "2019-08-24T14:15:22Z",
- "signedTransaction": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "speed": "low",
- "logs": [
- {
- "message": "string",
- "type": "UNSIGNED",
- "context": { },
- "createdAt": "string"
}
], - "to": "string",
- "transactionHash": "string",
- "value": "string",
- "automaticNonce": true,
- "isDeployTransaction": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.313Z",
- "updatedAt": "2022-11-03T11:10:29.313Z"
}
]
}
Creates a new transaction
query Parameters
simulate | boolean Is it a simulation? |
Request Body schema: application/json
data | string Transaction data that will be published on-chain |
gasLimit | string Maximum gas allowed to be used for the transaction |
speed | string Enum: "low" "average" "fast" "fastest" "custom" Speed for the transaction |
object (CustomGasDto) | |
metadata | object Metadata of the transaction. Visible on-chain. |
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Network on which are deployed the smart contracts. |
nonce | number Index of the transaction. Used to prevent replay attacks. |
signerWallet required | string Address to use to sign the transaction |
to | string Address of the receiver |
value | string Amount of native currency transferred |
Responses
Request samples
- Payload
{- "data": "string",
- "gasLimit": "string",
- "speed": "low",
- "customGas": {
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string"
}, - "metadata": { },
- "network": "ethereum-mainnet",
- "nonce": 0,
- "signerWallet": "string",
- "to": "string",
- "value": "string"
}
Response samples
- 201
- 400
- 401
- 404
- 422
- 500
{- "id": "string",
- "blockHash": "string",
- "blockNumber": 0,
- "chainId": 0,
- "network": "ethereum-mainnet",
- "data": "string",
- "from": "string",
- "gasLimit": "string",
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "metadata": { },
- "nonce": 0,
- "type": 0,
- "signerWallet": "string",
- "publishedDate": "2019-08-24T14:15:22Z",
- "minedDate": "2019-08-24T14:15:22Z",
- "signedTransaction": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "speed": "low",
- "logs": [
- {
- "message": "string",
- "type": "UNSIGNED",
- "context": { },
- "createdAt": "string"
}
], - "to": "string",
- "transactionHash": "string",
- "value": "string",
- "automaticNonce": true,
- "isDeployTransaction": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.313Z",
- "updatedAt": "2022-11-03T11:10:29.313Z"
}
Gets a specific transaction identified by {id}
path Parameters
id required | string The id of the transaction |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "blockHash": "string",
- "blockNumber": 0,
- "chainId": 0,
- "network": "ethereum-mainnet",
- "data": "string",
- "from": "string",
- "gasLimit": "string",
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "metadata": { },
- "nonce": 0,
- "type": 0,
- "signerWallet": "string",
- "publishedDate": "2019-08-24T14:15:22Z",
- "minedDate": "2019-08-24T14:15:22Z",
- "signedTransaction": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "speed": "low",
- "logs": [
- {
- "message": "string",
- "type": "UNSIGNED",
- "context": { },
- "createdAt": "string"
}
], - "to": "string",
- "transactionHash": "string",
- "value": "string",
- "automaticNonce": true,
- "isDeployTransaction": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.313Z",
- "updatedAt": "2022-11-03T11:10:29.313Z"
}
Gets the settings of the Relayer for a project on a network
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" |
Responses
Response samples
- 200
- 401
{- "id": "string",
- "projectId": "string",
- "network": "ethereum-mainnet",
- "unstuckMaxGasPrice": {
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "gasPrice": "string"
}, - "unstuckMissingNonce": true,
- "unstuckMissingNonceDelay": 0,
- "unstuckCustomGasPrice": true,
- "unstuckAutomaticGasPrice": true,
- "unstuckGasPriceDelay": 0,
- "unstuckConcurrency": 0,
- "createdAt": "2022-11-03T11:10:29.341Z",
- "updatedAt": "2022-11-03T11:10:29.341Z"
}
Updating the Relayer settings for a project
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" |
Request Body schema: application/json
object (UnstuckMaxGasPriceDto) | |
unstuckMissingNonce | boolean |
unstuckMissingNonceDelay | number [ 10 .. 3600 ] |
unstuckCustomGasPrice | boolean |
unstuckAutomaticGasPrice | boolean |
unstuckGasPriceDelay | number [ 10 .. 3600 ] |
unstuckConcurrency | number [ 1 .. 100 ] |
Responses
Request samples
- Payload
{- "unstuckMaxGasPrice": {
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string"
}, - "unstuckMissingNonce": true,
- "unstuckMissingNonceDelay": 10,
- "unstuckCustomGasPrice": true,
- "unstuckAutomaticGasPrice": true,
- "unstuckGasPriceDelay": 10,
- "unstuckConcurrency": 1
}
Response samples
- 200
- 401
- 404
{- "id": "string",
- "projectId": "string",
- "network": "ethereum-mainnet",
- "unstuckMaxGasPrice": {
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "gasPrice": "string"
}, - "unstuckMissingNonce": true,
- "unstuckMissingNonceDelay": 0,
- "unstuckCustomGasPrice": true,
- "unstuckAutomaticGasPrice": true,
- "unstuckGasPriceDelay": 0,
- "unstuckConcurrency": 0,
- "createdAt": "2022-11-03T11:10:29.341Z",
- "updatedAt": "2022-11-03T11:10:29.341Z"
}
Gets all files pinned on Starton IPFS
query Parameters
cid | string Unique content identifier |
name | string^[\w\-\s]+$ Name of the files |
status | string Enum: "queued" "pinning" "pinned" "failed" "deleted" Status of the pin |
includeDirectoryContent | boolean informs whether or not content of the directory is included |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
]
}
Pins a file already uploaded on IPFS
Request Body schema: application/json
cid required | string Content identifier of the file to pin |
name | string <= 255 characters Name for the file to pin |
origins | Array of strings |
metadata | object Metadata for the file to pin |
Responses
Request samples
- Payload
{- "cid": "string",
- "name": "string",
- "origins": [
- "string"
], - "metadata": { }
}
Response samples
- 201
- 401
{- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
Gets the file pinned identified by {id}
path Parameters
id required | string identifier of the pinned file |
query Parameters
includeDirectoryContent | boolean informs whether or not content of the directory is included |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
Updates pinned file referenced by {id}
path Parameters
id required | string identifier of the pinned file |
Request Body schema: application/json
name | string <= 255 characters updated name for the pinned file |
metadata | object updated metadata for the pinned file |
Responses
Request samples
- Payload
{- "name": "string",
- "metadata": { }
}
Response samples
- 200
- 400
- 401
- 404
{- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
Uploads a file on IPFS
THE "BODY" PARAMETERS ARE "FORM" PARAMETERS FOR THIS ENDPOINT. You can see the object format in Typescript below.
import {readFileSync} from "fs";
import FormData = require("form-data");
import {headerConfig, startonUrl} from "./variables";
import axios from "axios";
function bufferFromLocalPath(path: string){
return readFileSync(path);
}
async function uploadFileOnIPFS(
path: string,
dashboardName: string
) {
const bufferFile: Buffer = bufferFromLocalPath(path)
console.log(bufferFile)
let data = new FormData();
let storage_name: string = dashboardName;
data.append("file", bufferFile, storage_name);
data.append("isSync", "true");
console.log(data)
const ipfsFileResponse = await axios.post(startonUrl + "/ipfs/file", data, {
maxBodyLength: Infinity,
headers: {
...headerConfig
,"Content-Type": `multipart/form-data; boundary=${data.getBoundary()}`
},
});
console.log(ipfsFileResponse.data)
return ipfsFileResponse.data
}
uploadFileOnIPFS("./folder/a.txt", "hello").then().catch(e=>console.log(e))
Request Body schema: multipart/form-data
file | buffer, name The buffer and the name of your file |
isSync | boolean Should the request wait for the pinning to be done before completing (default: false) |
metadata | object Metadata associated to the request |
Responses
Response samples
- 201
- 400
- 401
- 404
- 413
{- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
Upload folder on IPFS
This endpoints accepts multiple files and jsons to be pinned together inside a folder on IPFS. By giving an array of names, the content will be available using the folder CID and the content name on IPFS. For example : ipfs://ipfs/{folderCID}/myFile.txt THE "BODY" PARAMETERS ARE "FORM" PARAMETERS FOR THIS ENDPOINT !!
Request Body schema: application/json
metadata | object metadata for the folder to upload |
folderName | string name for the folder to upload |
Responses
Request samples
- Payload
{- "metadata": { },
- "folderName": "string"
}
Response samples
- 201
- 400
- 401
- 404
- 413
{- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
Upload JSON file on IPFS
Request Body schema: application/json
name required | string <= 255 characters name for the json to upload |
content required | object content of the json file to upload |
metadata | object metadata for the json file to upload |
Responses
Request samples
- Payload
{- "name": "string",
- "content": { },
- "metadata": { }
}
Response samples
- 201
- 400
- 401
- 404
- 413
{- "id": "string",
- "name": "string",
- "cid": "string",
- "origins": [
- "string"
], - "metadata": { },
- "status": "queued",
- "delegates": [
- "string"
], - "size": 0,
- "type": "directory",
- "directoryContent": [
- {
- "cid": "string",
- "path": "string",
- "size": 0
}
], - "projectId": "string",
- "createdAt": "2022-11-03T11:45:46.075Z",
- "updatedAt": "2022-11-03T11:45:46.075Z"
}
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "provider": { },
- "projectId": "string",
- "metadata": { },
- "createdAt": "2022-11-03T11:10:29.277Z",
- "updatedAt": "2022-11-03T11:10:29.277Z"
}
]
}
Creates a Key Management System
Request Body schema: application/json
name required | string Name of the Key Management System |
metadata | object Metadata of the Key Management System |
object (AwsKmsCredentialsDto) | |
provider required | string Value: "AWS" Key Management System's provider |
Responses
Request samples
- Payload
{- "name": "string",
- "metadata": { },
- "credentials": {
- "accountId": "string",
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string"
}, - "provider": "AWS"
}
Response samples
- 201
- 401
{- "id": "string",
- "name": "string",
- "provider": { },
- "projectId": "string",
- "metadata": { },
- "createdAt": "2022-11-03T11:10:29.277Z",
- "updatedAt": "2022-11-03T11:10:29.277Z"
}
Gets the Key Management System identified by {id}
path Parameters
id required | string The identifier of the key management system |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "provider": { },
- "projectId": "string",
- "metadata": { },
- "createdAt": "2022-11-03T11:10:29.277Z",
- "updatedAt": "2022-11-03T11:10:29.277Z"
}
Updates the Key Management System identified by {id}
path Parameters
id required | string The identifier of the key management system |
Request Body schema: application/json
name | string Name of the Key Management System |
metadata | object Metadata of the Key Management System |
object (AwsKmsCredentialsDto) | |
provider | string Value: "AWS" Key Management System's provider |
Responses
Request samples
- Payload
{- "name": "string",
- "metadata": { },
- "credentials": {
- "accountId": "string",
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string"
}, - "provider": "AWS"
}
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "provider": { },
- "projectId": "string",
- "metadata": { },
- "createdAt": "2022-11-03T11:10:29.277Z",
- "updatedAt": "2022-11-03T11:10:29.277Z"
}
Gets the list of wallets
query Parameters
name | string^[\w\-\s]+$ The name of the wallet |
isExternal | boolean True if the wallet is a third party wallet |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "address": "string",
- "credentials": {
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string",
- "arn": "string"
}, - "name": "string",
- "description": "string",
- "metadata": { },
- "external": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.286Z",
- "updatedAt": "2022-11-03T11:10:29.286Z"
}
]
}
Creates a wallet
Request Body schema: application/json
description | string Description of the wallet |
name | string Name of the wallet |
metadata | object metadata of the wallet |
kmsId required | string id of your KMS on Starton |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string",
- "metadata": { },
- "kmsId": "string"
}
Response samples
- 201
- 401
{- "address": "string",
- "credentials": {
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string",
- "arn": "string"
}, - "name": "string",
- "description": "string",
- "metadata": { },
- "external": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.286Z",
- "updatedAt": "2022-11-03T11:10:29.286Z"
}
Gets a specific wallet
Returns the specific wallet identified by {address}
path Parameters
address required | string The address of the wallet |
Responses
Response samples
- 200
- 401
- 404
{- "address": "string",
- "credentials": {
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string",
- "arn": "string"
}, - "name": "string",
- "description": "string",
- "metadata": { },
- "external": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.286Z",
- "updatedAt": "2022-11-03T11:10:29.286Z"
}
Updates the wallet
path Parameters
address required | string The address of the wallet |
Request Body schema: application/json
description | string Description of the wallet |
name | string Name of the wallet |
metadata | object metadata of the wallet |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string",
- "metadata": { }
}
Response samples
- 200
- 401
- 404
{- "address": "string",
- "credentials": {
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string",
- "arn": "string"
}, - "name": "string",
- "description": "string",
- "metadata": { },
- "external": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.286Z",
- "updatedAt": "2022-11-03T11:10:29.286Z"
}
Imports the provider key of the wallet you need from your kms
Request Body schema: application/json
description | string |
name | string |
metadata | object |
providerKeyId | string |
provider required | string Value: "AWS" |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string",
- "metadata": { },
- "providerKeyId": "string",
- "provider": "AWS"
}
Response samples
- 201
- 401
{- "address": "string",
- "credentials": {
- "accessKeyId": "string",
- "secretAccessKey": "string",
- "region": "string",
- "arn": "string"
}, - "name": "string",
- "description": "string",
- "metadata": { },
- "external": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.286Z",
- "updatedAt": "2022-11-03T11:10:29.286Z"
}
Signs message using wallet {address}
path Parameters
address required | string The address of the wallet |
Request Body schema: application/json
message required | string message to be signed |
Responses
Request samples
- Payload
{- "message": "string"
}
Response samples
- 200
- 401
{ }
Gets the next available nonce for a wallet address on a network
path Parameters
address required | string The address of the wallet |
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" The network of which the next available nonce is needed |
Responses
Response samples
- 200
- 401
- 404
- 422
- 500
{- "nextNonce": 0,
- "availableNonces": [
- 0
]
}
Resyncs next available nonce with database for a specific wallet on a network
path Parameters
address required | string The address of the wallet |
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Network on which are deployed the smart contracts. |
Responses
Response samples
- 201
- 401
- 404
- 500
{- "nextNonce": 0
}
Get gas price information for a network
Returns gas price information according to different speeds on a specific {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" |
Responses
Response samples
- 200
- 400
- 401
{- "low": {
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "gasPrice": "string"
}, - "average": {
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "gasPrice": "string"
}, - "fast": {
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "gasPrice": "string"
}, - "fastest": {
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "gasPrice": "string"
}
}
Gets the balance of native currency of an {address} on a specific {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" |
address required | string |
Responses
Response samples
- 200
- 400
- 401
{- "symbol": "string",
- "balance": "string",
- "decimal": 0,
- "formatted": "string"
}
Gets the balance of native currency of a contract on a specific network
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" |
contractAddress required | string |
query Parameters
address required | string |
Responses
Response samples
- 200
- 400
- 401
{- "symbol": "string",
- "balance": "string",
- "decimal": 0,
- "formatted": "string",
- "contractAddress": { }
}
Request faucet for a specific {network}
path Parameters
network required | string Enum: "ethereum-ropsten" "ethereum-goerli" "binance-testnet" "polygon-mumbai" "avalanche-fuji" Specifies the network on which faucet is required. |
Request Body schema: application/json
wallet | string Address on which faucet will be received. |
captchaToken required | string |
Responses
Request samples
- Payload
{- "wallet": "string",
- "captchaToken": "string"
}
Response samples
- 201
{- "id": "string",
- "ip": "string",
- "wallet": "string",
- "network": "ethereum-ropsten",
- "userId": "string",
- "txHash": "string",
- "createdAt": "2022-11-03T11:10:29.351Z"
}
Gets the list of smart contracts for a network
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies on which network the smart contracts are deployed |
query Parameters
address | string The address of the wallet |
includeAbi | boolean Specifies if ABI needs to be included |
includeCompilationDetails | boolean Specifies if compilation details need to be included |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}
]
}
Gets the list of all smart contracts
query Parameters
network | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies on which network the smart contracts are deployed |
address | string The address of the wallet |
includeAbi | boolean Specifies if the contract ABI needs to be included |
includeCompilationDetails | boolean Specifies if compilation details need to be included |
Responses
Response samples
- 200
- 400
- 401
{- "meta": {
- "itemCount": 0,
- "totalItems": 0,
- "itemsPerPage": 0,
- "totalPages": 0,
- "currentPage": 0
}, - "items": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}
]
}
Gets smart contract located at {address} on {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies the network on which the smart contract is deployed |
address required | string Specifies the address of the smart contract |
query Parameters
includeAbi | boolean Specifies if ABI of the contract needs to be included |
includeCompilationDetails | boolean Specifies if compilation details need to be included |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}
Updates the smart contract located at {address} on {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies the network on which the smart contract is deployed |
address required | string The address of the smart contract |
Request Body schema: application/json
description | string Description the smart contract will be updated to |
name | string <= 255 characters Name the smart contract will be updated to |
metadata | object |
Responses
Request samples
- Payload
{- "description": "string",
- "name": "string",
- "metadata": { }
}
Response samples
- 200
- 401
- 404
{- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}
Deletes Smart contract located at {address} on {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies the network on which the smart contract is deployed |
address required | string |
Responses
Response samples
- 200
- 401
0
Creates smart contrat from bytecode
query Parameters
simulate | boolean Enter true if you need to simulate the operation |
Request Body schema: application/json
required | Array of objects (AbiObjectDto) ABI of the smart contract |
params required | Array of objects Default: [] Smart contract's constructor's parameters |
speed | string Enum: "low" "average" "fast" "fastest" "custom" Speed for the transaction |
object (CustomGasDto) | |
gasLimit | string Maximum gas fees you're willing to pay |
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" network on which the transaction will occur |
bytecode required | string Bytecode of the smart contract |
description | string Description of this smart contract that will be displayed on our dashboard |
name required | string <= 255 characters Name of the smart contract that will be displayed on our dashboard |
signerWallet required | string Address of the wallet to use to sign the transaction |
nonce | number Nonce to use for the transaction |
value | string Amount of native currency to use in the transaction |
Responses
Request samples
- Payload
{- "abi": [
- {
- "type": "constructor",
- "name": "string",
- "stateMutability": "pure",
- "payability": true,
- "constant": true,
- "anonymous": true,
- "inputs": {
- "name": "string",
- "type": "string",
- "internalType": "string",
- "indexed": true,
- "components": { }
}, - "outputs": {
- "name": "string",
- "type": "string",
- "internalType": "string"
}
}
], - "params": [ ],
- "speed": "low",
- "customGas": {
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string"
}, - "gasLimit": "string",
- "network": "ethereum-mainnet",
- "bytecode": "string",
- "description": "string",
- "name": "string",
- "signerWallet": "string",
- "nonce": 0,
- "value": "string"
}
Response samples
- 201
- 400
- 401
- 404
- 422
- 500
{- "smartContract": {
- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}, - "transaction": {
- "id": "string",
- "blockHash": "string",
- "blockNumber": 0,
- "chainId": 0,
- "network": "ethereum-mainnet",
- "data": "string",
- "from": "string",
- "gasLimit": "string",
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "metadata": { },
- "nonce": 0,
- "type": 0,
- "signerWallet": "string",
- "publishedDate": "2019-08-24T14:15:22Z",
- "minedDate": "2019-08-24T14:15:22Z",
- "signedTransaction": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "speed": "low",
- "logs": [
- {
- "message": "string",
- "type": "UNSIGNED",
- "context": { },
- "createdAt": "string"
}
], - "to": "string",
- "transactionHash": "string",
- "value": "string",
- "automaticNonce": true,
- "isDeployTransaction": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.313Z",
- "updatedAt": "2022-11-03T11:10:29.313Z"
}
}
Creates Smart Contract from Template
Deploys a smart contract using a template hosted in the Starton Library. It is possible to only do a simulation by setting the simulate parameter to true.
query Parameters
simulate | boolean Enter true if you need to simulate the operation |
Request Body schema: application/json
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Network on which are deployed the smart contracts |
signerWallet required | string Address of the wallet signing the transaction |
templateId required | string Id of the smart contract template |
name required | string <= 255 characters Name of the smart contract that will be displayed on our dashboard |
description | string Description of this smart contract that will be displayed on our dashboard |
params required | Array of objects Default: [] Smart contract's constructor's parameters |
gasLimit | string Maximum gas allowed to be used for the transaction |
speed | string Enum: "low" "average" "fast" "fastest" "custom" Speed for the transaction |
object (CustomGasDto) | |
nonce | number Nonce to use for the transaction |
value | string Amount of native currency to use in the transaction |
Responses
Request samples
- Payload
{- "network": "ethereum-mainnet",
- "signerWallet": "string",
- "templateId": "string",
- "name": "string",
- "description": "string",
- "params": [ ],
- "gasLimit": "string",
- "speed": "low",
- "customGas": {
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string"
}, - "nonce": 0,
- "value": "string"
}
Response samples
- 201
- 400
- 401
- 404
- 500
{- "smartContract": {
- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}, - "transaction": {
- "id": "string",
- "blockHash": "string",
- "blockNumber": 0,
- "chainId": 0,
- "network": "ethereum-mainnet",
- "data": "string",
- "from": "string",
- "gasLimit": "string",
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "metadata": { },
- "nonce": 0,
- "type": 0,
- "signerWallet": "string",
- "publishedDate": "2019-08-24T14:15:22Z",
- "minedDate": "2019-08-24T14:15:22Z",
- "signedTransaction": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "speed": "low",
- "logs": [
- {
- "message": "string",
- "type": "UNSIGNED",
- "context": { },
- "createdAt": "string"
}
], - "to": "string",
- "transactionHash": "string",
- "value": "string",
- "automaticNonce": true,
- "isDeployTransaction": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.313Z",
- "updatedAt": "2022-11-03T11:10:29.313Z"
}
}
Calls Smart contract located at {address} on {network}
Find out more on state and status in our functional documentation
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies the network on which the smart contract is deployed |
address required | string Specifies the address at which the smart contract is deployed |
query Parameters
simulate | boolean Enter true if you need to simulate the operation |
Request Body schema: application/json
functionName required | string name of the function |
params required | Array of objects Default: [] Smart contract constructor parameters |
speed | string Enum: "low" "average" "fast" "fastest" "custom" Speed for the transaction |
object (CustomGasDto) | |
gasLimit | string Maximum gas allowed to be used for the transaction |
signerWallet required | string The address which will sign the transaction |
nonce | number Nonce to use for the transaction |
value | string Amount of native currency to use in the call |
Responses
Request samples
- Payload
{- "functionName": "string",
- "params": [ ],
- "speed": "low",
- "customGas": {
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string"
}, - "gasLimit": "string",
- "signerWallet": "string",
- "nonce": 0,
- "value": "string"
}
Response samples
- 201
- 400
- 401
- 404
- 422
- 500
{- "id": "string",
- "blockHash": "string",
- "blockNumber": 0,
- "chainId": 0,
- "network": "ethereum-mainnet",
- "data": "string",
- "from": "string",
- "gasLimit": "string",
- "gasPrice": "string",
- "maxFeePerGas": "string",
- "maxPriorityFeePerGas": "string",
- "metadata": { },
- "nonce": 0,
- "type": 0,
- "signerWallet": "string",
- "publishedDate": "2019-08-24T14:15:22Z",
- "minedDate": "2019-08-24T14:15:22Z",
- "signedTransaction": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "speed": "low",
- "logs": [
- {
- "message": "string",
- "type": "UNSIGNED",
- "context": { },
- "createdAt": "string"
}
], - "to": "string",
- "transactionHash": "string",
- "value": "string",
- "automaticNonce": true,
- "isDeployTransaction": true,
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.313Z",
- "updatedAt": "2022-11-03T11:10:29.313Z"
}
Reads Smart Contract located at {address} on {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies the network on which the smart contract is located. |
address required | string Specifies the address of the contract |
Request Body schema: application/json
functionName required | string Name of the smart contract's function to call |
params required | Array of objects Default: [] Smart contract's constructor's parameters |
Responses
Request samples
- Payload
{- "functionName": "string",
- "params": [ ]
}
Response samples
- 201
- 400
- 404
- 500
{- "response": "string",
- "functionName": "string",
- "params": [
- { }
], - "address": "string",
- "network": "ethereum-mainnet"
}
Gets available Smart Contract located at {address} on {network}
path Parameters
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Specifies the network on which the smart contract is located. |
address required | string Specifies the address of the smart contract. |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "call": [
- "string"
], - "read": [
- "string"
], - "events": [
- "string"
]
}
Pins existing smart contract
Request Body schema: application/json
required | Array of objects (AbiObjectDto) ABI of the smart contract |
network required | string Enum: "ethereum-mainnet" "ethereum-ropsten" "ethereum-goerli" "binance-mainnet" "binance-testnet" "polygon-mainnet" "polygon-mumbai" "avalanche-mainnet" "avalanche-fuji" Network on which are deployed the smart contracts. |
description | string Description of this smart contract that will be displayed on our dashboard |
name required | string <= 255 characters Name of the smart contract that will be displayed on our dashboard |
address required | string Address of the smart contract to import on the given network |
Responses
Request samples
- Payload
{- "abi": [
- {
- "type": "constructor",
- "name": "string",
- "stateMutability": "pure",
- "payability": true,
- "constant": true,
- "anonymous": true,
- "inputs": {
- "name": "string",
- "type": "string",
- "internalType": "string",
- "indexed": true,
- "components": { }
}, - "outputs": {
- "name": "string",
- "type": "string",
- "internalType": "string"
}
}
], - "network": "ethereum-mainnet",
- "description": "string",
- "name": "string",
- "address": "string"
}
Response samples
- 201
- 400
- 401
{- "id": "string",
- "name": "string",
- "description": "string",
- "network": "ethereum-mainnet",
- "abi": [
- { }
], - "address": "string",
- "params": [
- { }
], - "compilationDetails": {
- "source": "string",
- "bytecode": "string",
- "compilerVersion": "string",
- "contractName": "string",
- "optimizationUsed": true,
- "runs": 0
}, - "creationHash": "string",
- "status": "UNSIGNED",
- "state": "SUCCESS",
- "minedDate": "2019-08-24T14:15:22Z",
- "blockNumber": 0,
- "templateId": "string",
- "projectId": "string",
- "createdAt": "2022-11-03T11:10:29.359Z",
- "updatedAt": "2022-11-03T11:10:29.359Z"
}