1. Introduction

This document contains generated documentation for Dev3 blockchain-api-service. Blockchain API service provides endpoints to verify user wallet ownership as well as endpoints to fetch data from blockchain for verified wallets. Source code is available on Github.

Base API URL is

2. Wallet Authorization API

All endpoints are public and do not require Authorization: Bearer JWT header.

2.1. Create Wallet Authorization Request

Creates wallet authorization request with specified parameters. Parameters redirect_url, message_to_sign, store_indefinitely, wallet_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Wallet authorization request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

If message_to_sign field is not set, then the message will be generated on backend. store_indefinitely field determines if the request should be readable only once. If it is not provided in the request, it will be set to true.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/wallet-authorization HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 296
Host: localhost:8080

{
  "redirect_url" : "https://custom-url/${id}",
  "wallet_address" : "0x000000000000000000000000000000000000000a",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: e08f2d3e-71d2-44aa-a67d-06cdc6b60343
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 631

{
  "id" : "38ea5c30-c204-424e-b0f4-ebb3ba156715",
  "project_id" : "27058cab-f018-4f23-b674-f45b6c601d41",
  "status" : "PENDING",
  "redirect_url" : "https://custom-url/38ea5c30-c204-424e-b0f4-ebb3ba156715",
  "wallet_address" : "0x000000000000000000000000000000000000000a",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "message_to_sign" : "Authorization message ID to sign: 38ea5c30-c204-424e-b0f4-ebb3ba156715",
  "signed_message" : null,
  "created_at" : "2023-01-19T13:00:40.912325212Z"
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "message_to_sign" : {
      "type" : [ "string", "null" ]
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "store_indefinitely" : {
      "type" : [ "boolean", "null" ]
    },
    "wallet_address" : {
      "type" : [ "string", "null" ]
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "message_to_sign" : {
      "type" : "string"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "signed_message" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "wallet_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

2.2. Fetch Wallet Authorization Request by ID

Fetches stored wallet authorization request with its current status. The request is considered successful if the attached signed message is valid and was signed by wallet_address. If wallet_address was not specified when the request was created, then any valid signature will be accepted. For pending requests, signed_message field will always be null. If the signed message is invalid or does not match specified wallet_address, request will be considered as failed. If the request was crated with store_indefinitely field set to false, the the request will be deleted after the first time it is fetched by ID.

Request Example
GET /v1/wallet-authorization/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 98e32410-fec8-445c-9394-cd25fbb3e2d7
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 759

{
  "id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
  "project_id" : "27058cab-f018-4f23-b674-f45b6c601d41",
  "status" : "SUCCESS",
  "redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
  "wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "message_to_sign" : "Authorization message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
  "signed_message" : "0xcf6025b67228271aaed15b17d42d6258e3b47ad5dcd27088a81b2f36b9d7ff5d2d133a652297bc19bea94d10750076fbdc529ab03540e2ea6be02903645a98531b",
  "created_at" : "2023-01-19T13:00:41.333001Z"
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "message_to_sign" : {
      "type" : "string"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "signed_message" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "wallet_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

2.3. Fetch Wallet Authorization Requests by Project ID

Fetches stored wallet authorization requests with their current status filtered by project ID.

Request Example
GET /v1/wallet-authorization/by-project/27058cab-f018-4f23-b674-f45b6c601d41 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: db8b7d19-dd9b-48c6-bebb-cca3a4361032
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 814

{
  "requests" : [ {
    "id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
    "project_id" : "27058cab-f018-4f23-b674-f45b6c601d41",
    "status" : "SUCCESS",
    "redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
    "wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "message_to_sign" : "Authorization message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
    "signed_message" : "0xcf6025b67228271aaed15b17d42d6258e3b47ad5dcd27088a81b2f36b9d7ff5d2d133a652297bc19bea94d10750076fbdc529ab03540e2ea6be02903645a98531b",
    "created_at" : "2023-01-19T13:00:41.196416Z"
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "message_to_sign" : {
            "type" : "string"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "signed_message" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "wallet_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

2.4. Attach Wallet Address and Signed Message to Wallet Authorization Request

Attaches wallet address and signed message to existing wallet authorization request. Once the wallet address and signed message are attached to the request, any subsequent attempts to attach new values will fail.

Request Example
PUT /v1/wallet-authorization/4eb33d72-2e78-455f-b023-83496cab957c HTTP/1.1
Content-Type: application/json
Content-Length: 108
Host: localhost:8080

{
  "wallet_address" : "0x000000000000000000000000000000000000000c",
  "signed_message" : "signed-message"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "signed_message" : {
      "type" : "string"
    },
    "wallet_address" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3e9daacf-b4e8-4d28-9df2-1ee9a13238c1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

3. Asset Balance Checking API

All endpoints are public and do not require Authorization: Bearer JWT header.

3.1. Create Asset Balance Check Request

Creates asset balance request with specified parameters. Parameters redirect_url, block_number, wallet_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Balance check request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

If asset_type is set to NATIVE, then chain-native currency balance will be checked (i.e. Ether) and then token_address must not be present. If asset_type is set to TOKEN, then token_address must be present.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/balance HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 413
Host: localhost:8080

{
  "redirect_url" : "https://custom-url/${id}",
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "asset_type" : "TOKEN",
  "block_number" : "10",
  "wallet_address" : "0x000000000000000000000000000000000000000a",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6c98cfde-a371-4e43-a99f-28ed98b74bf4
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 789

{
  "id" : "a8e0d456-ed7b-4293-9601-59a04bae829b",
  "project_id" : "f46e00d2-8f02-4b2e-9f0f-ef17f0ca4d4c",
  "status" : "PENDING",
  "chain_id" : 31337,
  "redirect_url" : "https://custom-url/a8e0d456-ed7b-4293-9601-59a04bae829b",
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "asset_type" : "TOKEN",
  "block_number" : "10",
  "wallet_address" : "0x000000000000000000000000000000000000000a",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "balance" : null,
  "message_to_sign" : "Verification message ID to sign: a8e0d456-ed7b-4293-9601-59a04bae829b",
  "signed_message" : null,
  "created_at" : "2023-01-19T13:00:24.136794172Z"
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "block_number" : {
      "type" : [ "string", "null" ],
      "pattern" : "^[+-]?[0-9]+$"
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    },
    "wallet_address" : {
      "type" : [ "string", "null" ]
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "balance" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "amount" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        },
        "block_number" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        },
        "timestamp" : {
          "type" : "string",
          "format" : "date-time"
        },
        "wallet" : {
          "type" : "string"
        }
      }
    },
    "block_number" : {
      "type" : [ "string", "null" ],
      "pattern" : "^[+-]?[0-9]+$"
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "message_to_sign" : {
      "type" : "string"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "signed_message" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    },
    "wallet_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

3.2. Fetch Asset Balance Check Request by ID

Fetches stored asset balance check request with its current status. The request is considered successful if the attached signed message is valid and was signed by wallet_address. If wallet_address was not specified when the request was created, then any valid signature will be accepted. For successful requests, balance field will contain info about requested asset balance. For pending requests, balance and signed_message fields will always be null. If the signed message is invalid or does not match specified wallet_address, request will be considered as failed. If block_number was specified during request creation, then asset balance will be fetched only for that block number, and if block_number was not specified then the latest asset balance will be fetched every time this resource is requested.

Request Example
GET /v1/balance/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0e0a2746-2077-4142-99df-a6cae4f6e5fd
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1069

{
  "id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
  "project_id" : "f46e00d2-8f02-4b2e-9f0f-ef17f0ca4d4c",
  "status" : "SUCCESS",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
  "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "asset_type" : "TOKEN",
  "block_number" : "1",
  "wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "balance" : {
    "wallet" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
    "block_number" : "1",
    "timestamp" : "2023-01-19T12:59:53Z",
    "amount" : "10000"
  },
  "message_to_sign" : "Verification message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
  "signed_message" : "0xfc90c8aa9f2164234b8826144d8ecfc287b5d7c168d0e9d284baf76dbef55c4c5761cf46e34b7cdb72cc97f1fb1c19f315ee7a430dd6111fa6c693b41c96c5501c",
  "created_at" : "2023-01-19T13:00:24.346195Z"
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "balance" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "amount" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        },
        "block_number" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        },
        "timestamp" : {
          "type" : "string",
          "format" : "date-time"
        },
        "wallet" : {
          "type" : "string"
        }
      }
    },
    "block_number" : {
      "type" : [ "string", "null" ],
      "pattern" : "^[+-]?[0-9]+$"
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "message_to_sign" : {
      "type" : "string"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "signed_message" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    },
    "wallet_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

3.3. Fetch Asset Balance Check Requests by Project ID

Fetches stored asset balance check requests with their current status filtered by project ID.

Request Example
GET /v1/balance/by-project/f46e00d2-8f02-4b2e-9f0f-ef17f0ca4d4c HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 9c0cec99-90b2-4e70-b0c8-53314434c56e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1144

{
  "requests" : [ {
    "id" : "7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
    "project_id" : "f46e00d2-8f02-4b2e-9f0f-ef17f0ca4d4c",
    "status" : "SUCCESS",
    "chain_id" : 31337,
    "redirect_url" : "https://example.com/7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
    "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "asset_type" : "TOKEN",
    "block_number" : "1",
    "wallet_address" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "balance" : {
      "wallet" : "0x865f603f42ca1231e5b5f90e15663b0fe19f0b21",
      "block_number" : "1",
      "timestamp" : "2023-01-19T12:59:53Z",
      "amount" : "10000"
    },
    "message_to_sign" : "Verification message ID to sign: 7d86b0ac-a9a6-40fc-ac6d-2a29ca687f73",
    "signed_message" : "0xfc90c8aa9f2164234b8826144d8ecfc287b5d7c168d0e9d284baf76dbef55c4c5761cf46e34b7cdb72cc97f1fb1c19f315ee7a430dd6111fa6c693b41c96c5501c",
    "created_at" : "2023-01-19T13:00:22.143662Z"
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "balance" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "amount" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              },
              "block_number" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              },
              "timestamp" : {
                "type" : "string",
                "format" : "date-time"
              },
              "wallet" : {
                "type" : "string"
              }
            }
          },
          "block_number" : {
            "type" : [ "string", "null" ],
            "pattern" : "^[+-]?[0-9]+$"
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "message_to_sign" : {
            "type" : "string"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "signed_message" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          },
          "wallet_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

3.4. Attach Wallet Address and Signed Message to Asset Balance Check Request

Attaches wallet address and signed message to existing asset balance check request. Once the wallet address and signed message are attached to the request, any subsequent attempts to attach new values will fail.

Request Example
PUT /v1/balance/a63ebeeb-1217-46da-805b-d607b6a3f58a HTTP/1.1
Content-Type: application/json
Content-Length: 108
Host: localhost:8080

{
  "wallet_address" : "0x000000000000000000000000000000000000000c",
  "signed_message" : "signed-message"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "signed_message" : {
      "type" : "string"
    },
    "wallet_address" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 32015914-696e-4767-92b3-af2defeefac0
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

4. Asset Send Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

4.1. Create Asset Send Request

Creates asset send request with specified parameters. Parameters redirect_url, sender_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Send request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

If asset_type is set to NATIVE, then chain-native currency will be send (i.e. Ether) and then token_address must not be present. If asset_type is set to TOKEN, then token_address must be present.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/send HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 477
Host: localhost:8080

{
  "redirect_url" : "https://custom-url/${id}",
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "asset_type" : "TOKEN",
  "amount" : "10",
  "sender_address" : "0x000000000000000000000000000000000000000b",
  "recipient_address" : "0x000000000000000000000000000000000000000c",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: c1b390da-8414-4375-a3d6-b40946026e65
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1120

{
  "id" : "c4d04ef5-18ab-48bc-8cc3-da99c65c9c4e",
  "project_id" : "45673a24-d079-46e0-9142-d77803baf8e5",
  "status" : "PENDING",
  "chain_id" : 31337,
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "asset_type" : "TOKEN",
  "amount" : "10",
  "sender_address" : "0x000000000000000000000000000000000000000b",
  "recipient_address" : "0x000000000000000000000000000000000000000c",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "redirect_url" : "https://custom-url/c4d04ef5-18ab-48bc-8cc3-da99c65c9c4e",
  "send_tx" : {
    "tx_hash" : null,
    "from" : "0x000000000000000000000000000000000000000b",
    "to" : "0x00000000000000000000000000000000cafebabe",
    "data" : "0xa9059cbb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : null,
    "timestamp" : null
  },
  "created_at" : "2023-01-19T13:00:34.402169103Z",
  "events" : null
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "recipient_address" : {
      "type" : "string"
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "recipient_address" : {
      "type" : "string"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "send_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

4.2. Fetch Asset Send Request by ID

Fetches stored asset send request with its current status. The request is considered successful if the attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to and from addresses, amount, matching data and tx_hash). If there are any mismatches between specified request data and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction for attached hash is not yet mined on blockchain, request will be in pending state.

Request Example
GET /v1/send/24f9b2d9-98ee-4e08-987f-3cd25d524e0a HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b67ee5ae-fe53-450a-964e-1e53fd26f316
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1672

{
  "id" : "24f9b2d9-98ee-4e08-987f-3cd25d524e0a",
  "project_id" : "45673a24-d079-46e0-9142-d77803baf8e5",
  "status" : "SUCCESS",
  "chain_id" : 31337,
  "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "asset_type" : "TOKEN",
  "amount" : "10",
  "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "redirect_url" : "https://example.com/request-send/24f9b2d9-98ee-4e08-987f-3cd25d524e0a/action",
  "send_tx" : {
    "tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:54Z"
  },
  "created_at" : "2023-01-19T13:00:36.10739Z",
  "events" : [ {
    "signature" : "Transfer(address,address,uint256)",
    "arguments" : [ {
      "name" : "from",
      "type" : "VALUE",
      "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "hash" : null
    }, {
      "name" : "to",
      "type" : "VALUE",
      "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
      "hash" : null
    }, {
      "name" : "value",
      "type" : "VALUE",
      "value" : "10",
      "hash" : null
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "recipient_address" : {
      "type" : "string"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "send_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

4.3. Fetch Asset Send Requests by Project ID

Fetches stored asset send requests with their current status filtered by project ID.

Request Example
GET /v1/send/by-project/45673a24-d079-46e0-9142-d77803baf8e5 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3d9c609e-fc5d-4009-b454-d334c6013252
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1790

{
  "requests" : [ {
    "id" : "d6e94103-f8e8-4fd0-9418-443da8f780fb",
    "project_id" : "45673a24-d079-46e0-9142-d77803baf8e5",
    "status" : "SUCCESS",
    "chain_id" : 31337,
    "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "asset_type" : "TOKEN",
    "amount" : "10",
    "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "redirect_url" : "https://example.com/request-send/d6e94103-f8e8-4fd0-9418-443da8f780fb/action",
    "send_tx" : {
      "tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:54Z"
    },
    "created_at" : "2023-01-19T13:00:34.941496Z",
    "events" : [ {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "recipient_address" : {
            "type" : "string"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "send_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "sender_address" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

4.4. Fetch Asset Send Requests by Sender Address

Fetches stored asset send requests with their current status filtered by sender address which was specified at the moment of request creation (if specified) or attached along with transaction info (if not specified during request creation).

Request Example
GET /v1/send/by-sender/0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: f9a1738e-4b4c-4056-b486-f9e2c6351155
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1790

{
  "requests" : [ {
    "id" : "5969a84c-e721-437d-8d1d-87d13d9e8597",
    "project_id" : "45673a24-d079-46e0-9142-d77803baf8e5",
    "status" : "SUCCESS",
    "chain_id" : 31337,
    "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "asset_type" : "TOKEN",
    "amount" : "10",
    "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "redirect_url" : "https://example.com/request-send/5969a84c-e721-437d-8d1d-87d13d9e8597/action",
    "send_tx" : {
      "tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:54Z"
    },
    "created_at" : "2023-01-19T13:00:36.330701Z",
    "events" : [ {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "recipient_address" : {
            "type" : "string"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "send_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "sender_address" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

4.5. Fetch Asset Send Requests by Recipient Address

Fetches stored asset send requests with their current status filtered by recipient address which was specified at the moment of request creation.

Request Example
GET /v1/send/by-recipient/0x4e90a36b45879f5bae71b57ad525e817afa54890 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 81fb6bc3-350b-456c-925a-6419a01b202b
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1790

{
  "requests" : [ {
    "id" : "70a62608-60bb-4f88-9cdf-92636a082fd6",
    "project_id" : "45673a24-d079-46e0-9142-d77803baf8e5",
    "status" : "SUCCESS",
    "chain_id" : 31337,
    "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "asset_type" : "TOKEN",
    "amount" : "10",
    "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "recipient_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "redirect_url" : "https://example.com/request-send/70a62608-60bb-4f88-9cdf-92636a082fd6/action",
    "send_tx" : {
      "tx_hash" : "0x31c93a45822bc16a8faa42b1c16a07df289deaa43a51c98961f1d42a54ad17f3",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0xa9059cbb0000000000000000000000004e90a36b45879f5bae71b57ad525e817afa54890000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:54Z"
    },
    "created_at" : "2023-01-19T13:00:35.679764Z",
    "events" : [ {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "recipient_address" : {
            "type" : "string"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "send_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "sender_address" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

4.6. Attach Transaction Info to Asset Send Request

Attaches transaction hash and caller wallet address to existing asset send request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.

Request Example
PUT /v1/send/bb65d439-ea24-457c-94a1-9345e59301b3 HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: e1887436-0c38-4c89-a7c0-42a2f04f65be
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

5. Asset Multi-Send Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

5.1. Create Asset Multi-Send Request

Creates asset multi-send request with specified parameters. Parameters redirect_url, sender_address, arbitrary_data, approve_screen_config and all its child fields, and disperse_screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Multi-send request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

If asset_type is set to NATIVE, then chain-native currency will be send (i.e. Ether) and then token_address must not be present. If asset_type is set to TOKEN, then token_address must be present.

For requests that send tokens, approve_status and approve_tx will be returned during the request creation and disperse_status and disperse_tx will be null. After the approve transaction info is attached and is successful, the disperse_status and disperse_tx fields will no longer be null.

For requests that send native asset, approve_status and approve_tx will always be null and disperse_status and disperse_tx will always be non-null.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/multi-send HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 792
Host: localhost:8080

{
  "redirect_url" : "https://custom-url/${id}",
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "disperse_contract_address" : "0x0000000000000000000000000000000000000abe",
  "asset_type" : "TOKEN",
  "items" : [ {
    "wallet_address" : "0x000000000000000000000000000000000000000c",
    "amount" : "10",
    "item_name" : "Example"
  } ],
  "sender_address" : "0x000000000000000000000000000000000000000b",
  "arbitrary_data" : {
    "test" : true
  },
  "approve_screen_config" : {
    "before_action_message" : "approve-before-action-message",
    "after_action_message" : "approve-after-action-message"
  },
  "disperse_screen_config" : {
    "before_action_message" : "disperse-before-action-message",
    "after_action_message" : "disperse-after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 92562fd8-80dd-4424-a964-6274e088a327
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1533

{
  "id" : "ffb25c4a-d9a3-4e31-8909-9225a411ffd4",
  "project_id" : "7aba00eb-5f83-4908-bc57-dd339910ed24",
  "approve_status" : "PENDING",
  "disperse_status" : null,
  "chain_id" : 31337,
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "disperse_contract_address" : "0x0000000000000000000000000000000000000abe",
  "asset_type" : "TOKEN",
  "items" : [ {
    "wallet_address" : "0x000000000000000000000000000000000000000c",
    "amount" : "10",
    "item_name" : "Example"
  } ],
  "sender_address" : "0x000000000000000000000000000000000000000b",
  "arbitrary_data" : {
    "test" : true
  },
  "approve_screen_config" : {
    "before_action_message" : "approve-before-action-message",
    "after_action_message" : "approve-after-action-message"
  },
  "disperse_screen_config" : {
    "before_action_message" : "disperse-before-action-message",
    "after_action_message" : "disperse-after-action-message"
  },
  "redirect_url" : "https://custom-url/ffb25c4a-d9a3-4e31-8909-9225a411ffd4",
  "approve_tx" : {
    "tx_hash" : null,
    "from" : "0x000000000000000000000000000000000000000b",
    "to" : "0x00000000000000000000000000000000cafebabe",
    "data" : "0x095ea7b30000000000000000000000000000000000000000000000000000000000000abe000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : null,
    "timestamp" : null
  },
  "disperse_tx" : null,
  "created_at" : "2023-01-19T13:00:28.38606266Z",
  "approve_events" : null,
  "disperse_events" : null
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ScreenConfig-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "approve_screen_config" : {
      "$ref" : "#/$defs/ScreenConfig-nullable"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "disperse_contract_address" : {
      "type" : "string"
    },
    "disperse_screen_config" : {
      "$ref" : "#/$defs/ScreenConfig-nullable"
    },
    "items" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "item_name" : {
            "type" : [ "string", "null" ]
          },
          "wallet_address" : {
            "type" : "string"
          }
        }
      }
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "EventInfoResponse" : {
      "type" : "object",
      "properties" : {
        "arguments" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "hash" : {
                "type" : [ "string", "null" ]
              },
              "name" : {
                "type" : "string"
              },
              "type" : {
                "type" : "string",
                "enum" : [ "VALUE", "HASH" ]
              },
              "value" : { }
            }
          }
        },
        "signature" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "ScreenConfig-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "Status-nullable" : {
      "anyOf" : [ {
        "type" : "null"
      }, {
        "type" : "string",
        "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
      } ]
    },
    "TransactionResponse-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "approve_events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "$ref" : "#/$defs/EventInfoResponse"
      }
    },
    "approve_screen_config" : {
      "$ref" : "#/$defs/ScreenConfig-nullable"
    },
    "approve_status" : {
      "$ref" : "#/$defs/Status-nullable"
    },
    "approve_tx" : {
      "$ref" : "#/$defs/TransactionResponse-nullable"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "disperse_contract_address" : {
      "type" : "string"
    },
    "disperse_events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "$ref" : "#/$defs/EventInfoResponse"
      }
    },
    "disperse_screen_config" : {
      "$ref" : "#/$defs/ScreenConfig-nullable"
    },
    "disperse_status" : {
      "$ref" : "#/$defs/Status-nullable"
    },
    "disperse_tx" : {
      "$ref" : "#/$defs/TransactionResponse-nullable"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "items" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "item_name" : {
            "type" : [ "string", "null" ]
          },
          "wallet_address" : {
            "type" : "string"
          }
        }
      }
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

5.2. Fetch Asset Multi-Send Request by ID

Fetches stored asset multi-send request with its current status.

For token transfers, the request is considered successful if the attached approve and disperse transactions are confirmed on blockchain and all their data matches specified request parameters (correct to and from addresses, amount, matching data and tx_hash). If there are any mismatches between specified request data and state on blockchain, the request will be marked as failed. If there are no attached transaction hashes or if approve or disperse transactions for attached hashes are not yet mined on blockchain, request will be in pending state.

If approve_status is FAILED or PENDING for token transfer request, then disperse_status and disperse_tx will be null until approve_status changes to SUCCESS.

For native token transfers, only disperse transaction is considered when determining request status (both approve_status and approve_tx fields will be null).

Request Example
GET /v1/multi-send/f20a366c-864a-415f-993f-109a30d79a01 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 635dafe9-01f7-4482-b502-55bd95365934
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3784

{
  "id" : "f20a366c-864a-415f-993f-109a30d79a01",
  "project_id" : "7aba00eb-5f83-4908-bc57-dd339910ed24",
  "approve_status" : "SUCCESS",
  "disperse_status" : "SUCCESS",
  "chain_id" : 31337,
  "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "disperse_contract_address" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
  "asset_type" : "TOKEN",
  "items" : [ {
    "wallet_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
    "amount" : "10",
    "item_name" : "Example"
  } ],
  "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "arbitrary_data" : {
    "test" : true
  },
  "approve_screen_config" : {
    "before_action_message" : "approve-before-action-message",
    "after_action_message" : "approve-after-action-message"
  },
  "disperse_screen_config" : {
    "before_action_message" : "disperse-before-action-message",
    "after_action_message" : "disperse-after-action-message"
  },
  "redirect_url" : "https://example.com/request-multi-send/f20a366c-864a-415f-993f-109a30d79a01/action",
  "approve_tx" : {
    "tx_hash" : "0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "data" : "0x095ea7b300000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : "3",
    "timestamp" : "2023-01-19T12:59:55Z"
  },
  "disperse_tx" : {
    "tx_hash" : "0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
    "data" : "0xc73a2d60000000000000000000000000668ed30aacc7c7c206aaf1327d733226416233e2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004e90a36b45879f5bae71b57ad525e817afa548900000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:57Z"
  },
  "created_at" : "2023-01-19T13:00:27.84358Z",
  "approve_events" : [ {
    "signature" : "Approval(address,address,uint256)",
    "arguments" : [ {
      "name" : "owner",
      "type" : "VALUE",
      "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "hash" : null
    }, {
      "name" : "spender",
      "type" : "VALUE",
      "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
      "hash" : null
    }, {
      "name" : "value",
      "type" : "VALUE",
      "value" : "10",
      "hash" : null
    } ]
  } ],
  "disperse_events" : [ {
    "signature" : "Transfer(address,address,uint256)",
    "arguments" : [ {
      "name" : "from",
      "type" : "VALUE",
      "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "hash" : null
    }, {
      "name" : "to",
      "type" : "VALUE",
      "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
      "hash" : null
    }, {
      "name" : "value",
      "type" : "VALUE",
      "value" : "10",
      "hash" : null
    } ]
  }, {
    "signature" : "Transfer(address,address,uint256)",
    "arguments" : [ {
      "name" : "from",
      "type" : "VALUE",
      "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
      "hash" : null
    }, {
      "name" : "to",
      "type" : "VALUE",
      "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
      "hash" : null
    }, {
      "name" : "value",
      "type" : "VALUE",
      "value" : "10",
      "hash" : null
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "EventInfoResponse" : {
      "type" : "object",
      "properties" : {
        "arguments" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "hash" : {
                "type" : [ "string", "null" ]
              },
              "name" : {
                "type" : "string"
              },
              "type" : {
                "type" : "string",
                "enum" : [ "VALUE", "HASH" ]
              },
              "value" : { }
            }
          }
        },
        "signature" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "ScreenConfig-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "Status-nullable" : {
      "anyOf" : [ {
        "type" : "null"
      }, {
        "type" : "string",
        "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
      } ]
    },
    "TransactionResponse-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "approve_events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "$ref" : "#/$defs/EventInfoResponse"
      }
    },
    "approve_screen_config" : {
      "$ref" : "#/$defs/ScreenConfig-nullable"
    },
    "approve_status" : {
      "$ref" : "#/$defs/Status-nullable"
    },
    "approve_tx" : {
      "$ref" : "#/$defs/TransactionResponse-nullable"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "disperse_contract_address" : {
      "type" : "string"
    },
    "disperse_events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "$ref" : "#/$defs/EventInfoResponse"
      }
    },
    "disperse_screen_config" : {
      "$ref" : "#/$defs/ScreenConfig-nullable"
    },
    "disperse_status" : {
      "$ref" : "#/$defs/Status-nullable"
    },
    "disperse_tx" : {
      "$ref" : "#/$defs/TransactionResponse-nullable"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "items" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "item_name" : {
            "type" : [ "string", "null" ]
          },
          "wallet_address" : {
            "type" : "string"
          }
        }
      }
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    }
  }
}

5.3. Fetch Asset Multi-Send Requests by Project ID

Fetches stored asset multi-send requests with their current status filtered by project ID.

Request Example
GET /v1/multi-send/by-project/7aba00eb-5f83-4908-bc57-dd339910ed24 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 5cdcaa88-a6e1-4acf-83bf-0bac6d94b7ce
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4012

{
  "requests" : [ {
    "id" : "0c40a932-69d1-45e6-aae1-354c9fff0cce",
    "project_id" : "7aba00eb-5f83-4908-bc57-dd339910ed24",
    "approve_status" : "SUCCESS",
    "disperse_status" : "SUCCESS",
    "chain_id" : 31337,
    "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "disperse_contract_address" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
    "asset_type" : "TOKEN",
    "items" : [ {
      "wallet_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
      "amount" : "10",
      "item_name" : "Example"
    } ],
    "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "arbitrary_data" : {
      "test" : true
    },
    "approve_screen_config" : {
      "before_action_message" : "approve-before-action-message",
      "after_action_message" : "approve-after-action-message"
    },
    "disperse_screen_config" : {
      "before_action_message" : "disperse-before-action-message",
      "after_action_message" : "disperse-after-action-message"
    },
    "redirect_url" : "https://example.com/request-multi-send/0c40a932-69d1-45e6-aae1-354c9fff0cce/action",
    "approve_tx" : {
      "tx_hash" : "0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0x095ea7b300000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "3",
      "timestamp" : "2023-01-19T12:59:55Z"
    },
    "disperse_tx" : {
      "tx_hash" : "0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
      "data" : "0xc73a2d60000000000000000000000000668ed30aacc7c7c206aaf1327d733226416233e2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004e90a36b45879f5bae71b57ad525e817afa548900000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:57Z"
    },
    "created_at" : "2023-01-19T13:00:31.345954Z",
    "approve_events" : [ {
      "signature" : "Approval(address,address,uint256)",
      "arguments" : [ {
        "name" : "owner",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "spender",
        "type" : "VALUE",
        "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ],
    "disperse_events" : [ {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    }, {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "EventInfoResponse" : {
      "type" : "object",
      "properties" : {
        "arguments" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "hash" : {
                "type" : [ "string", "null" ]
              },
              "name" : {
                "type" : "string"
              },
              "type" : {
                "type" : "string",
                "enum" : [ "VALUE", "HASH" ]
              },
              "value" : { }
            }
          }
        },
        "signature" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "ScreenConfig-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "Status-nullable" : {
      "anyOf" : [ {
        "type" : "null"
      }, {
        "type" : "string",
        "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
      } ]
    },
    "TransactionResponse-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "approve_events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/$defs/EventInfoResponse"
            }
          },
          "approve_screen_config" : {
            "$ref" : "#/$defs/ScreenConfig-nullable"
          },
          "approve_status" : {
            "$ref" : "#/$defs/Status-nullable"
          },
          "approve_tx" : {
            "$ref" : "#/$defs/TransactionResponse-nullable"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "disperse_contract_address" : {
            "type" : "string"
          },
          "disperse_events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/$defs/EventInfoResponse"
            }
          },
          "disperse_screen_config" : {
            "$ref" : "#/$defs/ScreenConfig-nullable"
          },
          "disperse_status" : {
            "$ref" : "#/$defs/Status-nullable"
          },
          "disperse_tx" : {
            "$ref" : "#/$defs/TransactionResponse-nullable"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "items" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "amount" : {
                  "type" : "string",
                  "pattern" : "^[+-]?[0-9]+$"
                },
                "item_name" : {
                  "type" : [ "string", "null" ]
                },
                "wallet_address" : {
                  "type" : "string"
                }
              }
            }
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "sender_address" : {
            "type" : [ "string", "null" ]
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

5.4. Fetch Asset Multi-Send Requests by Sender Address

Fetches stored asset multi-send requests with their current status filtered by sender address which was specified at the moment of request creation (if specified) or attached along with transaction info (if not specified during request creation).

Request Example
GET /v1/multi-send/by-sender/0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0558bfd1-e684-4523-a951-d538921c6e68
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4012

{
  "requests" : [ {
    "id" : "32ea5c09-83e9-4f95-a7a9-cc470c0f216c",
    "project_id" : "7aba00eb-5f83-4908-bc57-dd339910ed24",
    "approve_status" : "SUCCESS",
    "disperse_status" : "SUCCESS",
    "chain_id" : 31337,
    "token_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "disperse_contract_address" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
    "asset_type" : "TOKEN",
    "items" : [ {
      "wallet_address" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
      "amount" : "10",
      "item_name" : "Example"
    } ],
    "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "arbitrary_data" : {
      "test" : true
    },
    "approve_screen_config" : {
      "before_action_message" : "approve-before-action-message",
      "after_action_message" : "approve-after-action-message"
    },
    "disperse_screen_config" : {
      "before_action_message" : "disperse-before-action-message",
      "after_action_message" : "disperse-after-action-message"
    },
    "redirect_url" : "https://example.com/request-multi-send/32ea5c09-83e9-4f95-a7a9-cc470c0f216c/action",
    "approve_tx" : {
      "tx_hash" : "0x0754ac2ef0f2f88032df6e89fe5dbffc7a13afd66a195c04bc1d4e94d921a443",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0x095ea7b300000000000000000000000050d75c1bc6a1ce35002c9f92d0af4b3684aa6b74000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "3",
      "timestamp" : "2023-01-19T12:59:55Z"
    },
    "disperse_tx" : {
      "tx_hash" : "0x687734efd69a39a4f109a1fef50d9b109f4f2f76147ce0c7e6dd992113bd1a1e",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
      "data" : "0xc73a2d60000000000000000000000000668ed30aacc7c7c206aaf1327d733226416233e2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000004e90a36b45879f5bae71b57ad525e817afa548900000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:57Z"
    },
    "created_at" : "2023-01-19T13:00:31.015214Z",
    "approve_events" : [ {
      "signature" : "Approval(address,address,uint256)",
      "arguments" : [ {
        "name" : "owner",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "spender",
        "type" : "VALUE",
        "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ],
    "disperse_events" : [ {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    }, {
      "signature" : "Transfer(address,address,uint256)",
      "arguments" : [ {
        "name" : "from",
        "type" : "VALUE",
        "value" : "0x50d75c1bc6a1ce35002c9f92d0af4b3684aa6b74",
        "hash" : null
      }, {
        "name" : "to",
        "type" : "VALUE",
        "value" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
        "hash" : null
      }, {
        "name" : "value",
        "type" : "VALUE",
        "value" : "10",
        "hash" : null
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "EventInfoResponse" : {
      "type" : "object",
      "properties" : {
        "arguments" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "hash" : {
                "type" : [ "string", "null" ]
              },
              "name" : {
                "type" : "string"
              },
              "type" : {
                "type" : "string",
                "enum" : [ "VALUE", "HASH" ]
              },
              "value" : { }
            }
          }
        },
        "signature" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "ScreenConfig-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "Status-nullable" : {
      "anyOf" : [ {
        "type" : "null"
      }, {
        "type" : "string",
        "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
      } ]
    },
    "TransactionResponse-nullable" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "approve_events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/$defs/EventInfoResponse"
            }
          },
          "approve_screen_config" : {
            "$ref" : "#/$defs/ScreenConfig-nullable"
          },
          "approve_status" : {
            "$ref" : "#/$defs/Status-nullable"
          },
          "approve_tx" : {
            "$ref" : "#/$defs/TransactionResponse-nullable"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "disperse_contract_address" : {
            "type" : "string"
          },
          "disperse_events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/$defs/EventInfoResponse"
            }
          },
          "disperse_screen_config" : {
            "$ref" : "#/$defs/ScreenConfig-nullable"
          },
          "disperse_status" : {
            "$ref" : "#/$defs/Status-nullable"
          },
          "disperse_tx" : {
            "$ref" : "#/$defs/TransactionResponse-nullable"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "items" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "amount" : {
                  "type" : "string",
                  "pattern" : "^[+-]?[0-9]+$"
                },
                "item_name" : {
                  "type" : [ "string", "null" ]
                },
                "wallet_address" : {
                  "type" : "string"
                }
              }
            }
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "sender_address" : {
            "type" : [ "string", "null" ]
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

5.5. Attach Approve Transaction Info to Asset Multi-Send Request

Attaches approve transaction hash and caller wallet address to existing asset multi-send request. Once the approve transaction hash is attached to the request, any subsequent attempts to attach a new approve transaction hash will fail. Only token transfers require an approve transaction, for native asset this step is skipped.

Request Example
PUT /v1/multi-send/83771df2-8545-456e-ba92-def4b915af25/approve HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000d"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 86173aff-fa3f-430a-bd8b-26a98261b60d
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

5.6. Attach Disperse Transaction Info to Asset Multi-Send Request

Attaches disperse transaction hash and caller wallet address to existing asset multi-send request. Once the disperse transaction hash is attached to the request, any subsequent attempts to attach a new approve transaction hash will fail. For token transfers, disperse transaction info must be attached after the approve transaction has been successful and its info has been attached to the request. For native asset transfers, only disperse transaction info must be attached.

Request Example
PUT /v1/multi-send/c0f889aa-c40a-4da0-b4e5-c6cc7c2b718a/disperse HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000d"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 9104e7aa-eddf-4db9-a8a6-f1265d4977af
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

6. Asset Snapshot Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

6.1. Create Asset Snapshot Request

Creates asset snapshot request with specified parameters. The asset snapshot will take some time to complete, so this endpoint will only return the ID of the created snapshot.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/asset-snapshots HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 260
Host: localhost:8080

{
  "name" : "asset-snapshot-name",
  "asset_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "payout_block_number" : "2",
  "ignored_holder_addresses" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1", "0x301e1528bad61177ef8ff89bd4ad6760581e5409" ]
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 946bab58-24f0-44ca-bf83-8b5164ade6f1
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 51

{
  "id" : "bfa47527-39fd-4ad0-b767-1e4ae7296e58"
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "asset_address" : {
      "type" : "string"
    },
    "ignored_holder_addresses" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "name" : {
      "type" : "string"
    },
    "payout_block_number" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "id" : {
      "type" : "string",
      "format" : "uuid"
    }
  }
}

6.2. Fetch Asset Snapshot Request by ID

Fetches stored asset snapshot request with its current status and snapshot data. Possible statuses are PENDING, SUCCESS and FAILED. Response fields total_asset_amount, asset_snapshot_merkle_root, asset_snapshot_merkle_depth and asset_snapshot_merkle_ipfs_hash will be non-null only when asset snapshot status is SUCCESS. For FAILED status, field failure_cause will be non-null and have value of either LOG_RESPONSE_LIMIT or OTHER.

Request Example
GET /v1/asset-snapshots/48de55f4-b305-4120-8d94-441bce8ca072 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0c38c0fa-4701-4233-b7eb-a4bbad23081e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 661

{
  "id" : "48de55f4-b305-4120-8d94-441bce8ca072",
  "project_id" : "40131e7c-359c-4c6e-b155-c19f84ec936b",
  "name" : "asset-snapshot-name",
  "chain_id" : 31337,
  "status" : "SUCCESS",
  "failure_cause" : null,
  "asset" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "total_asset_amount" : "600",
  "ignored_holder_addresses" : [ "0x301e1528bad61177ef8ff89bd4ad6760581e5409", "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
  "asset_snapshot_merkle_root" : "0x3ac65938baf45936b0ec984cdf7dbf4fd3a57cc18f5ee33791fe8d669f74fc1d",
  "asset_snapshot_merkle_depth" : 2,
  "asset_snapshot_block_number" : "6",
  "asset_snapshot_merkle_ipfs_hash" : "test-hash"
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "asset" : {
      "type" : "string"
    },
    "asset_snapshot_block_number" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "asset_snapshot_merkle_depth" : {
      "type" : [ "integer", "null" ],
      "format" : "int32"
    },
    "asset_snapshot_merkle_ipfs_hash" : {
      "type" : [ "string", "null" ]
    },
    "asset_snapshot_merkle_root" : {
      "type" : [ "string", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "failure_cause" : {
      "anyOf" : [ {
        "type" : "null"
      }, {
        "type" : "string",
        "enum" : [ "LOG_RESPONSE_LIMIT", "OTHER" ]
      } ]
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "ignored_holder_addresses" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "name" : {
      "type" : "string"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "total_asset_amount" : {
      "type" : [ "string", "null" ],
      "pattern" : "^[+-]?[0-9]+$"
    }
  }
}

6.3. Fetch Asset Snapshot Requests by Project ID

Fetches stored asset snapshot requests with their current status filtered by project ID.

Query Parameters
Parameter Description

status

List of comma-separated statuses for which asset snapshots will be fetched for specified project ID. Possible values are: PENDING, SUCCESS and FAILED.

Request Example
GET /v1/asset-snapshots/by-project/40131e7c-359c-4c6e-b155-c19f84ec936b?status=PENDING,SUCCESS,FAILED HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3a1593e0-1fbb-4a7f-8fa1-cbd41b03dddd
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 646

{
  "snapshots" : [ {
    "id" : "3df4a0b3-9cc3-4984-9fab-4a7d98a558b6",
    "project_id" : "40131e7c-359c-4c6e-b155-c19f84ec936b",
    "name" : "asset-snapshot-name",
    "chain_id" : 31337,
    "status" : "FAILED",
    "failure_cause" : "OTHER",
    "asset" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "total_asset_amount" : null,
    "ignored_holder_addresses" : [ "0x301e1528bad61177ef8ff89bd4ad6760581e5409", "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
    "asset_snapshot_merkle_root" : null,
    "asset_snapshot_merkle_depth" : null,
    "asset_snapshot_block_number" : "2",
    "asset_snapshot_merkle_ipfs_hash" : null
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "snapshots" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "asset" : {
            "type" : "string"
          },
          "asset_snapshot_block_number" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "asset_snapshot_merkle_depth" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "asset_snapshot_merkle_ipfs_hash" : {
            "type" : [ "string", "null" ]
          },
          "asset_snapshot_merkle_root" : {
            "type" : [ "string", "null" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "failure_cause" : {
            "anyOf" : [ {
              "type" : "null"
            }, {
              "type" : "string",
              "enum" : [ "LOG_RESPONSE_LIMIT", "OTHER" ]
            } ]
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "ignored_holder_addresses" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : "string"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "total_asset_amount" : {
            "type" : [ "string", "null" ],
            "pattern" : "^[+-]?[0-9]+$"
          }
        }
      }
    }
  }
}

7. Claimable Payouts API

Payout info endpoints are public and do not require Authorization: Bearer JWT header. Claimable payouts endpoint requires Authorization: Bearer JWT header.

7.1. Fetch Payout Merkle Tree

Fetches payout Merkle tree by chain ID, asset contract address and Merkle tree root hash. The Merkle tree can be generated by creating an asset snapshot, see Asset Snapshot Request API.

Request Example
GET /v1/payout-info/31337/0x5bf28a1e60eb56107fad2de1f2aa51fc7a60c690/tree/0x0449524a95f9c3b8a3f89876d0ddd69917f8993f641ea9e8614c470c6bf7e897 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 8facda97-1fdf-497a-a417-0943da1d35ae
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 485

{
  "merkle_tree" : {
    "depth" : 1,
    "hash" : "0x0449524a95f9c3b8a3f89876d0ddd69917f8993f641ea9e8614c470c6bf7e897",
    "hash_fn" : "KECCAK_256",
    "left" : {
      "hash" : "0x0000000000000000000000000000000000000000000000000000000000000000"
    },
    "right" : {
      "hash" : "0x99237419f13d684e6b0dbeed5ad434eb2e0c2276d247cdcb482226ebdbbf09ff",
      "data" : {
        "address" : "0x8f52b0cc50967fc59c6289f8fdb3e356edeebd23",
        "balance" : "1"
      }
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "LeafNodeSchema" : {
      "type" : "object",
      "properties" : {
        "data" : {
          "type" : "object",
          "properties" : {
            "address" : {
              "type" : "string"
            },
            "balance" : {
              "type" : "string",
              "pattern" : "^[+-]?[0-9]+$"
            }
          }
        },
        "hash" : {
          "type" : "string"
        }
      }
    },
    "NilNodeSchema" : {
      "type" : "object",
      "properties" : {
        "hash" : {
          "type" : "string"
        }
      }
    },
    "PathNodeSchema" : {
      "type" : "object",
      "properties" : {
        "hash" : {
          "type" : "string"
        },
        "left" : {
          "anyOf" : [ {
            "$ref" : "#/$defs/NilNodeSchema"
          }, {
            "$ref" : "#/$defs/LeafNodeSchema"
          }, {
            "$ref" : "#/$defs/PathNodeSchema"
          } ]
        },
        "right" : {
          "anyOf" : [ {
            "$ref" : "#/$defs/NilNodeSchema"
          }, {
            "$ref" : "#/$defs/LeafNodeSchema"
          }, {
            "$ref" : "#/$defs/PathNodeSchema"
          } ]
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "merkle_tree" : {
      "type" : "object",
      "properties" : {
        "depth" : {
          "type" : "integer",
          "format" : "int32"
        },
        "hash" : {
          "type" : "string"
        },
        "hash_fn" : {
          "type" : "string",
          "enum" : [ "IDENTITY", "FIXED", "KECCAK_256" ]
        },
        "left" : {
          "anyOf" : [ {
            "$ref" : "#/$defs/NilNodeSchema"
          }, {
            "$ref" : "#/$defs/LeafNodeSchema"
          }, {
            "$ref" : "#/$defs/PathNodeSchema"
          } ]
        },
        "right" : {
          "anyOf" : [ {
            "$ref" : "#/$defs/NilNodeSchema"
          }, {
            "$ref" : "#/$defs/LeafNodeSchema"
          }, {
            "$ref" : "#/$defs/PathNodeSchema"
          } ]
        }
      }
    }
  }
}

7.2. Fetch Payout Merkle Tree Path

Fetches payout Merkle tree path by chain ID, asset contract address, Merkle tree root hash and wallet address. the fetched path can be used to claim payout generated by asset snapshot, see Asset Snapshot Request API.

Request Example
GET /v1/payout-info/31337/0x5bf28a1e60eb56107fad2de1f2aa51fc7a60c690/tree/0x0449524a95f9c3b8a3f89876d0ddd69917f8993f641ea9e8614c470c6bf7e897/path/0x8f52b0cc50967fc59c6289f8fdb3e356edeebd23 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b22f3c1a-f665-4953-a31e-e31e65a92dd8
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 315

{
  "wallet_address" : "0x8f52b0cc50967fc59c6289f8fdb3e356edeebd23",
  "wallet_balance" : "1",
  "path" : [ {
    "sibling_hash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
    "is_left" : true
  } ],
  "proof" : [ "0x0000000000000000000000000000000000000000000000000000000000000000" ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "path" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "is_left" : {
            "type" : "boolean"
          },
          "sibling_hash" : {
            "type" : "string"
          }
        }
      }
    },
    "proof" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "wallet_address" : {
      "type" : "string"
    },
    "wallet_balance" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    }
  }
}

7.3. Fetch Claimable Payouts

Fetches list of claimable payouts for the requesting user wallet address. The payouts are fetched for specified chain ID and payout manager contract.

This endpoint requires Authorization: Bearer JWT header.

Query Parameters
Parameter Description

chainId Required

Chain ID for which to fetch claimable payouts.

payoutManager Required

Contract address of the payout manager contract which contains info about created payouts.

Request Example
GET /v1/claimable-payouts?chainId=31337&payoutManager=0x13e07a1dc038b61cbdb1d501221ec634cc4a7013 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: a27dd666-86ba-418e-b1c5-2f5276b3e6da
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1151

{
  "claimable_payouts" : [ {
    "payout" : {
      "payout_id" : "0",
      "payout_owner" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "payout_info" : "payout-info",
      "is_canceled" : false,
      "asset" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "total_asset_amount" : "600",
      "ignored_holder_addresses" : [ "0x301e1528bad61177ef8ff89bd4ad6760581e5409", "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
      "asset_snapshot_merkle_root" : "0x3ac65938baf45936b0ec984cdf7dbf4fd3a57cc18f5ee33791fe8d669f74fc1d",
      "asset_snapshot_merkle_depth" : 2,
      "asset_snapshot_block_number" : "7",
      "asset_snapshot_merkle_ipfs_hash" : "test-hash",
      "reward_asset" : "0x0000000000000000000000000000000000123456",
      "total_reward_amount" : "60000",
      "remaining_reward_amount" : "60000"
    },
    "investor" : "0x4e90a36b45879f5bae71b57ad525e817afa54890",
    "amount_claimed" : "0",
    "amount_claimable" : "10000",
    "balance" : "100",
    "proof" : [ "0x2d1c16044c1356518f69628db82774a5b1966ba94369b80ed9a7145b92e18120", "0x886b363035ea0461a5f24cc74febb9d9eef43a3cb6fa9d1ee55c25e3532f3333" ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "claimable_payouts" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount_claimable" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "amount_claimed" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "balance" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "investor" : {
            "type" : "string"
          },
          "payout" : {
            "type" : "object",
            "properties" : {
              "asset" : {
                "type" : "string"
              },
              "asset_snapshot_block_number" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              },
              "asset_snapshot_merkle_depth" : {
                "type" : "integer",
                "format" : "int32"
              },
              "asset_snapshot_merkle_ipfs_hash" : {
                "type" : "string"
              },
              "asset_snapshot_merkle_root" : {
                "type" : "string"
              },
              "ignored_holder_addresses" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "is_canceled" : {
                "type" : "boolean"
              },
              "payout_id" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              },
              "payout_info" : {
                "type" : "string"
              },
              "payout_owner" : {
                "type" : "string"
              },
              "remaining_reward_amount" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              },
              "reward_asset" : {
                "type" : "string"
              },
              "total_asset_amount" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              },
              "total_reward_amount" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "proof" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      }
    }
  }
}

8. ERC20 Lock Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

8.1. Create ERC20 Lock Request

Creates ERC20 lock request with specified parameters. Parameters redirect_url, sender_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Lock request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/lock HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 493
Host: localhost:8080

{
  "redirect_url" : "https://custom-url/${id}",
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "amount" : "10",
  "lock_duration_in_seconds" : "100",
  "lock_contract_address" : "0x000000000000000000000000000000000000000b",
  "sender_address" : "0x000000000000000000000000000000000000000c",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b9423a4c-684b-4e4f-a9c4-829c1d564fab
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1543

{
  "id" : "265d56aa-0e1c-41be-b208-1e3c1bd5a8c4",
  "project_id" : "7c1dbdb5-680c-4333-8614-41f6346dfe85",
  "status" : "PENDING",
  "chain_id" : 31337,
  "token_address" : "0x00000000000000000000000000000000cafebabe",
  "amount" : "10",
  "lock_duration_in_seconds" : "100",
  "unlocks_at" : null,
  "lock_contract_address" : "0x000000000000000000000000000000000000000b",
  "sender_address" : "0x000000000000000000000000000000000000000c",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "redirect_url" : "https://custom-url/265d56aa-0e1c-41be-b208-1e3c1bd5a8c4",
  "lock_tx" : {
    "tx_hash" : null,
    "from" : "0x000000000000000000000000000000000000000c",
    "to" : "0x00000000000000000000000000000000cafebabe",
    "data" : "0xbc633cd400000000000000000000000000000000000000000000000000000000cafebabe000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002432363564353661612d306531632d343162652d623230382d31653363316264356138633400000000000000000000000000000000000000000000000000000000",
    "value" : "0",
    "block_confirmations" : null,
    "timestamp" : null
  },
  "created_at" : "2023-01-19T13:01:54.444858955Z",
  "events" : null
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "lock_contract_address" : {
      "type" : "string"
    },
    "lock_duration_in_seconds" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "token_address" : {
      "type" : "string"
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "lock_contract_address" : {
      "type" : "string"
    },
    "lock_duration_in_seconds" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "lock_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "token_address" : {
      "type" : "string"
    },
    "unlocks_at" : {
      "type" : [ "string", "null" ],
      "format" : "date-time"
    }
  }
}

8.2. Fetch ERC20 Lock Request by ID

Fetches stored ERC20 lock request with its current status. The request is considered successful if the attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to and from addresses, amount, matching data and tx_hash). If there are any mismatches between specified request data and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction for attached hash is not yet mined on blockchain, request will be in pending state.

Request Example
GET /v1/lock/57254009-e8ed-4a37-b3ee-b13a92c2a97e HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b96d404d-4418-48d0-b494-941dfd7b08a6
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1658

{
  "id" : "57254009-e8ed-4a37-b3ee-b13a92c2a97e",
  "project_id" : "7c1dbdb5-680c-4333-8614-41f6346dfe85",
  "status" : "SUCCESS",
  "chain_id" : 31337,
  "token_address" : "0x000000000000000000000000000000000000000a",
  "amount" : "10",
  "lock_duration_in_seconds" : "100",
  "unlocks_at" : "2023-01-19T13:01:34Z",
  "lock_contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "redirect_url" : "https://example.com/request-lock/57254009-e8ed-4a37-b3ee-b13a92c2a97e/action",
  "lock_tx" : {
    "tx_hash" : "0x90413725039e0c8e6d9ec7e4e4967f43174ad5d820d95c6d850e18adff79c210",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "data" : "0xbc633cd4000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002435373235343030392d653865642d346133372d623365652d62313361393263326139376500000000000000000000000000000000000000000000000000000000",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:54Z"
  },
  "created_at" : "2023-01-19T13:01:55.04084Z",
  "events" : [ ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "lock_contract_address" : {
      "type" : "string"
    },
    "lock_duration_in_seconds" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "lock_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "sender_address" : {
      "type" : [ "string", "null" ]
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    },
    "token_address" : {
      "type" : "string"
    },
    "unlocks_at" : {
      "type" : [ "string", "null" ],
      "format" : "date-time"
    }
  }
}

8.3. Fetch ERC20 Lock Requests by Project ID

Fetches stored ERC20 lock requests with their current status filtered by project ID.

Request Example
GET /v1/lock/by-project/7c1dbdb5-680c-4333-8614-41f6346dfe85 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: bbe7a091-6c8d-43e8-b246-147743ae86cd
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1742

{
  "requests" : [ {
    "id" : "a27bc9bc-edd2-4408-8192-892767650d2b",
    "project_id" : "7c1dbdb5-680c-4333-8614-41f6346dfe85",
    "status" : "SUCCESS",
    "chain_id" : 31337,
    "token_address" : "0x000000000000000000000000000000000000000a",
    "amount" : "10",
    "lock_duration_in_seconds" : "100",
    "unlocks_at" : "2023-01-19T13:01:34Z",
    "lock_contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "sender_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "redirect_url" : "https://example.com/request-lock/a27bc9bc-edd2-4408-8192-892767650d2b/action",
    "lock_tx" : {
      "tx_hash" : "0xdcc07928b95920e0d1bc1fccf153dd761f14e2b7020901fd9d1d655066575700",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0xbc633cd4000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002461323762633962632d656464322d343430382d383139322d38393237363736353064326200000000000000000000000000000000000000000000000000000000",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:54Z"
    },
    "created_at" : "2023-01-19T13:01:54.164517Z",
    "events" : [ ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "lock_contract_address" : {
            "type" : "string"
          },
          "lock_duration_in_seconds" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "lock_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "sender_address" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          },
          "token_address" : {
            "type" : "string"
          },
          "unlocks_at" : {
            "type" : [ "string", "null" ],
            "format" : "date-time"
          }
        }
      }
    }
  }
}

8.4. Attach Transaction Info to ERC20 Lock Request

Attaches transaction hash and caller wallet address to existing ERC20 lock request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.

Request Example
PUT /v1/lock/510b7407-6715-47fa-830b-9e65f84a21fe HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000c"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 3ec0cc6c-65cf-4d68-8373-1eaa336a92e6
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

9. Deployable Contracts API

All endpoints are public and do not require Authorization: Bearer JWT header.

9.1. Fetch Deployable Contract by ID

Fetches info about deployable contract by contract ID.

Query Parameters
Parameter Description

projectId

Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them.

Request Example
GET /v1/deployable-contracts/examples.examplecontract HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 236fed1b-d080-4a2c-a2cf-c635f21d69b4
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2228

{
  "id" : "examples.examplecontract",
  "name" : "name",
  "description" : "description",
  "binary" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
  "tags" : [ "example", "simple" ],
  "implements" : [ "traits.example", "traits.exampleownable" ],
  "constructors" : [ {
    "inputs" : [ {
      "name" : "Owner address",
      "description" : "Contract owner address",
      "solidity_name" : "owner",
      "solidity_type" : "address",
      "recommended_types" : [ ],
      "parameters" : null,
      "hints" : null
    } ],
    "description" : "Main constructor",
    "payable" : true
  } ],
  "functions" : [ {
    "name" : "Get contract owner",
    "description" : "Fetches contract owner",
    "solidity_name" : "getOwner",
    "signature" : "getOwner()",
    "inputs" : [ ],
    "outputs" : [ {
      "name" : "Owner address",
      "description" : "Contract owner address",
      "solidity_name" : "",
      "solidity_type" : "address",
      "recommended_types" : [ ],
      "parameters" : null,
      "hints" : null
    } ],
    "emittable_events" : [ ],
    "read_only" : true
  } ],
  "events" : [ ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ContractParameter" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ContractParameter"
          }
        },
        "recommended_types" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidity_name" : {
          "type" : "string"
        },
        "solidity_type" : {
          "type" : "string"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "binary" : {
      "type" : "string"
    },
    "constructors" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "inputs" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/ContractParameter"
            }
          },
          "payable" : {
            "type" : "boolean"
          }
        }
      }
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "inputs" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "hints" : {
                  "type" : [ "array", "null" ],
                  "items" : { }
                },
                "indexed" : {
                  "type" : "boolean"
                },
                "name" : {
                  "type" : "string"
                },
                "parameters" : {
                  "type" : [ "array", "null" ],
                  "items" : {
                    "$ref" : "#/$defs/ContractParameter"
                  }
                },
                "recommended_types" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                },
                "solidity_name" : {
                  "type" : "string"
                },
                "solidity_type" : {
                  "type" : "string"
                }
              }
            }
          },
          "name" : {
            "type" : "string"
          },
          "signature" : {
            "type" : "string"
          },
          "solidity_name" : {
            "type" : "string"
          }
        }
      }
    },
    "functions" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "emittable_events" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "inputs" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/ContractParameter"
            }
          },
          "name" : {
            "type" : "string"
          },
          "outputs" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/ContractParameter"
            }
          },
          "read_only" : {
            "type" : "boolean"
          },
          "signature" : {
            "type" : "string"
          },
          "solidity_name" : {
            "type" : "string"
          }
        }
      }
    },
    "id" : {
      "type" : "string"
    },
    "implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}

9.2. Fetch Deployable Contract manifest.json by ID

Fetches manifest.json file for deployable contract by contract ID.

Query Parameters
Parameter Description

projectId

Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them.

Request Example
GET /v1/deployable-contracts/examples.examplecontract/manifest.json HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0e31bf14-c479-4a06-8b80-15b9a1e759d5
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 968

{
  "name" : "name",
  "description" : "description",
  "tags" : [ "example", "simple" ],
  "implements" : [ "traits.example", "traits.exampleOwnable" ],
  "eventDecorators" : [ ],
  "constructorDecorators" : [ {
    "signature" : "constructor(address)",
    "description" : "Main constructor",
    "parameterDecorators" : [ {
      "name" : "Owner address",
      "description" : "Contract owner address",
      "recommendedTypes" : [ ],
      "parameters" : null,
      "hints" : null
    } ]
  } ],
  "functionDecorators" : [ {
    "signature" : "getOwner()",
    "name" : "Get contract owner",
    "description" : "Fetches contract owner",
    "parameterDecorators" : [ ],
    "returnDecorators" : [ {
      "name" : "Owner address",
      "description" : "Contract owner address",
      "solidityType" : "address",
      "recommendedTypes" : [ ],
      "parameters" : null,
      "hints" : null
    } ],
    "emittableEvents" : [ ],
    "readOnly" : false
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ReturnTypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ReturnTypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidityType" : {
          "type" : "string"
        }
      }
    },
    "TypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/TypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "constructorDecorators" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "parameterDecorators" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/TypeDecorator"
            }
          },
          "signature" : {
            "type" : "string"
          }
        }
      }
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "eventDecorators" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "parameterDecorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "hints" : {
                  "type" : [ "array", "null" ],
                  "items" : { }
                },
                "indexed" : {
                  "type" : "boolean"
                },
                "name" : {
                  "type" : "string"
                },
                "parameters" : {
                  "type" : [ "array", "null" ],
                  "items" : {
                    "$ref" : "#/$defs/TypeDecorator"
                  }
                },
                "recommendedTypes" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                }
              }
            }
          },
          "signature" : {
            "type" : "string"
          }
        }
      }
    },
    "functionDecorators" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "emittableEvents" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : "string"
          },
          "parameterDecorators" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/TypeDecorator"
            }
          },
          "readOnly" : {
            "type" : "boolean"
          },
          "returnDecorators" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/ReturnTypeDecorator"
            }
          },
          "signature" : {
            "type" : "string"
          }
        }
      }
    },
    "implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}

9.3. Fetch Deployable Contract artifact.json by ID

Fetches artifact.json file for deployable contract by contract ID.

Query Parameters
Parameter Description

projectId

Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them.

Request Example
GET /v1/deployable-contracts/examples.examplecontract/artifact.json HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0010c9e2-a043-43d9-8bb2-c487260cd261
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 209

{
  "contractName" : "ExampleContract",
  "sourceName" : "ExampleContract.sol",
  "abi" : [ ],
  "bytecode" : "0x0",
  "deployedBytecode" : "0x0",
  "linkReferences" : null,
  "deployedLinkReferences" : null
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "AbiInputOutput" : {
      "type" : "object",
      "properties" : {
        "components" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/AbiInputOutput"
          }
        },
        "indexed" : {
          "type" : [ "boolean", "null" ]
        },
        "internalType" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string"
        }
      }
    },
    "JsonNode-nullable" : {
      "type" : [ "object", "null" ]
    }
  },
  "type" : "object",
  "properties" : {
    "abi" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "anonymous" : {
            "type" : [ "boolean", "null" ]
          },
          "inputs" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/$defs/AbiInputOutput"
            }
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "outputs" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/$defs/AbiInputOutput"
            }
          },
          "stateMutability" : {
            "type" : [ "string", "null" ]
          },
          "type" : {
            "type" : "string"
          }
        }
      }
    },
    "bytecode" : {
      "type" : "string"
    },
    "contractName" : {
      "type" : "string"
    },
    "deployedBytecode" : {
      "type" : "string"
    },
    "deployedLinkReferences" : {
      "$ref" : "#/$defs/JsonNode-nullable"
    },
    "linkReferences" : {
      "$ref" : "#/$defs/JsonNode-nullable"
    },
    "sourceName" : {
      "type" : "string"
    }
  }
}

9.4. Fetch Deployable Contract info.md by ID

Fetches info.md file for deployable contract by contract ID.

Query Parameters
Parameter Description

projectId

Project ID under which to search for imported contract decorator ID. Imported contract decorators can potentially have same IDs, so this query parameter is used to distinguish between them.

Request Example
GET /v1/deployable-contracts/examples.examplecontract/info.md HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6733bfc9-0937-42e9-bbac-67774a9dadba
Content-Type: text/markdown;charset=UTF-8
Content-Length: 23
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

# info.md file contents

9.5. Fetch List of Deployable Contracts

Fetches list of deployable contracts with specified filters.

Query Parameters
Parameter Description

tags

Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

Example: tags=tag-1,tag-2 will fetch all contracts with either tag-1 or tag-2, while tags=tag-1 AND tag-2,tag-3 will fetch all contracts with both tag-1 and tag-2, or with at least tag-3.

implements

Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented contract traits separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

projectId

ID of the project for which imported contract decorators will be fetched.

Request Example
GET /v1/deployable-contracts/?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: b9772e52-af2b-4ff9-84b2-b0c95c7b50f2
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2341

{
  "deployable_contracts" : [ {
    "id" : "examples.examplecontract",
    "name" : "name",
    "description" : "description",
    "binary" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
    "tags" : [ "example", "simple" ],
    "implements" : [ "traits.example", "traits.exampleownable" ],
    "constructors" : [ {
      "inputs" : [ {
        "name" : "Owner address",
        "description" : "Contract owner address",
        "solidity_name" : "owner",
        "solidity_type" : "address",
        "recommended_types" : [ ],
        "parameters" : null,
        "hints" : null
      } ],
      "description" : "Main constructor",
      "payable" : true
    } ],
    "functions" : [ {
      "name" : "Get contract owner",
      "description" : "Fetches contract owner",
      "solidity_name" : "getOwner",
      "signature" : "getOwner()",
      "inputs" : [ ],
      "outputs" : [ {
        "name" : "Owner address",
        "description" : "Contract owner address",
        "solidity_name" : "",
        "solidity_type" : "address",
        "recommended_types" : [ ],
        "parameters" : null,
        "hints" : null
      } ],
      "emittable_events" : [ ],
      "read_only" : true
    } ],
    "events" : [ ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ContractParameter" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ContractParameter"
          }
        },
        "recommended_types" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidity_name" : {
          "type" : "string"
        },
        "solidity_type" : {
          "type" : "string"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "deployable_contracts" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "binary" : {
            "type" : "string"
          },
          "constructors" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "inputs" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/ContractParameter"
                  }
                },
                "payable" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "description" : {
            "type" : [ "string", "null" ]
          },
          "events" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "inputs" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "description" : {
                        "type" : "string"
                      },
                      "hints" : {
                        "type" : [ "array", "null" ],
                        "items" : { }
                      },
                      "indexed" : {
                        "type" : "boolean"
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "parameters" : {
                        "type" : [ "array", "null" ],
                        "items" : {
                          "$ref" : "#/$defs/ContractParameter"
                        }
                      },
                      "recommended_types" : {
                        "type" : "array",
                        "items" : {
                          "type" : "string"
                        }
                      },
                      "solidity_name" : {
                        "type" : "string"
                      },
                      "solidity_type" : {
                        "type" : "string"
                      }
                    }
                  }
                },
                "name" : {
                  "type" : "string"
                },
                "signature" : {
                  "type" : "string"
                },
                "solidity_name" : {
                  "type" : "string"
                }
              }
            }
          },
          "functions" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "emittable_events" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                },
                "inputs" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/ContractParameter"
                  }
                },
                "name" : {
                  "type" : "string"
                },
                "outputs" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/ContractParameter"
                  }
                },
                "read_only" : {
                  "type" : "boolean"
                },
                "signature" : {
                  "type" : "string"
                },
                "solidity_name" : {
                  "type" : "string"
                }
              }
            }
          },
          "id" : {
            "type" : "string"
          },
          "implements" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "tags" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      }
    }
  }
}

9.6. Fetch List of Deployable Contract manifest.json Files

Fetches list of deployable contract manifest.json files with specified filters.

Query Parameters
Parameter Description

tags

Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

Example: tags=tag-1,tag-2 will fetch all contracts with either tag-1 or tag-2, while tags=tag-1 AND tag-2,tag-3 will fetch all contracts with both tag-1 and tag-2, or with at least tag-3.

implements

Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented contract traits separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

projectId

ID of the project for which imported contract decorator manifest.json files will be fetched.

Request Example
GET /v1/deployable-contracts/manifest.json?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 9130f0a3-6d60-4fda-b9fe-b9f6225cbf69
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1058

{
  "manifests" : [ {
    "name" : "name",
    "description" : "description",
    "tags" : [ "example", "simple" ],
    "implements" : [ "traits.example", "traits.exampleOwnable" ],
    "eventDecorators" : [ ],
    "constructorDecorators" : [ {
      "signature" : "constructor(address)",
      "description" : "Main constructor",
      "parameterDecorators" : [ {
        "name" : "Owner address",
        "description" : "Contract owner address",
        "recommendedTypes" : [ ],
        "parameters" : null,
        "hints" : null
      } ]
    } ],
    "functionDecorators" : [ {
      "signature" : "getOwner()",
      "name" : "Get contract owner",
      "description" : "Fetches contract owner",
      "parameterDecorators" : [ ],
      "returnDecorators" : [ {
        "name" : "Owner address",
        "description" : "Contract owner address",
        "solidityType" : "address",
        "recommendedTypes" : [ ],
        "parameters" : null,
        "hints" : null
      } ],
      "emittableEvents" : [ ],
      "readOnly" : false
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ReturnTypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ReturnTypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidityType" : {
          "type" : "string"
        }
      }
    },
    "TypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/TypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "manifests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "constructorDecorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/TypeDecorator"
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "description" : {
            "type" : [ "string", "null" ]
          },
          "eventDecorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "name" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "description" : {
                        "type" : "string"
                      },
                      "hints" : {
                        "type" : [ "array", "null" ],
                        "items" : { }
                      },
                      "indexed" : {
                        "type" : "boolean"
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "parameters" : {
                        "type" : [ "array", "null" ],
                        "items" : {
                          "$ref" : "#/$defs/TypeDecorator"
                        }
                      },
                      "recommendedTypes" : {
                        "type" : "array",
                        "items" : {
                          "type" : "string"
                        }
                      }
                    }
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "functionDecorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "emittableEvents" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                },
                "name" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/TypeDecorator"
                  }
                },
                "readOnly" : {
                  "type" : "boolean"
                },
                "returnDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/ReturnTypeDecorator"
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "implements" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "tags" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      }
    }
  }
}

9.7. Fetch List of Deployable Contract artifact.json Files

Fetches list of deployable contract artifact.json files with specified filters.

Query Parameters
Parameter Description

tags

Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

Example: tags=tag-1,tag-2 will fetch all contracts with either tag-1 or tag-2, while tags=tag-1 AND tag-2,tag-3 will fetch all contracts with both tag-1 and tag-2, or with at least tag-3.

implements

Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented contract traits separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

projectId

ID of the project for which imported contract decorator artifact.json files will be fetched.

Request Example
GET /v1/deployable-contracts/artifact.json?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 90a7a8da-31ea-4d2d-bb63-a95651e56a23
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 249

{
  "artifacts" : [ {
    "contractName" : "ExampleContract",
    "sourceName" : "ExampleContract.sol",
    "abi" : [ ],
    "bytecode" : "0x0",
    "deployedBytecode" : "0x0",
    "linkReferences" : null,
    "deployedLinkReferences" : null
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "AbiInputOutput" : {
      "type" : "object",
      "properties" : {
        "components" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/AbiInputOutput"
          }
        },
        "indexed" : {
          "type" : [ "boolean", "null" ]
        },
        "internalType" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string"
        }
      }
    },
    "JsonNode-nullable" : {
      "type" : [ "object", "null" ]
    }
  },
  "type" : "object",
  "properties" : {
    "artifacts" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "abi" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "anonymous" : {
                  "type" : [ "boolean", "null" ]
                },
                "inputs" : {
                  "type" : [ "array", "null" ],
                  "items" : {
                    "$ref" : "#/$defs/AbiInputOutput"
                  }
                },
                "name" : {
                  "type" : [ "string", "null" ]
                },
                "outputs" : {
                  "type" : [ "array", "null" ],
                  "items" : {
                    "$ref" : "#/$defs/AbiInputOutput"
                  }
                },
                "stateMutability" : {
                  "type" : [ "string", "null" ]
                },
                "type" : {
                  "type" : "string"
                }
              }
            }
          },
          "bytecode" : {
            "type" : "string"
          },
          "contractName" : {
            "type" : "string"
          },
          "deployedBytecode" : {
            "type" : "string"
          },
          "deployedLinkReferences" : {
            "$ref" : "#/$defs/JsonNode-nullable"
          },
          "linkReferences" : {
            "$ref" : "#/$defs/JsonNode-nullable"
          },
          "sourceName" : {
            "type" : "string"
          }
        }
      }
    }
  }
}

9.8. Fetch List of Deployable Contract info.md Files

Fetches list of deployable contract info.md files with specified filters.

Query Parameters
Parameter Description

tags

Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

Example: tags=tag-1,tag-2 will fetch all contracts with either tag-1 or tag-2, while tags=tag-1 AND tag-2,tag-3 will fetch all contracts with both tag-1 and tag-2, or with at least tag-3.

implements

Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented contract traits separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

projectId

ID of the project for which imported contract decorator info.md files will be fetched.

Request Example
GET /v1/deployable-contracts/info.md?tags=example%20AND%20simple,other&implements=traits/example%20AND%20traits/exampleOwnable,traits/other HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: a2bc526b-dd19-4252-8ed2-e3373ea983fe
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 45

{
  "infos" : [ "# info.md file contents" ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "infos" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}

10. Contract Interfaces API

All endpoints are public and do not require Authorization: Bearer JWT header.

10.1. Fetch Contract Interface by ID

Fetches info about contract interface by interface ID.

Request Example
GET /v1/contract-interfaces/example.interface HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 46b38851-cec0-4a5b-8a18-896d33f6fb9b
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 636

{
  "id" : "example.interface",
  "name" : "name",
  "tags" : [ "interface-tag", "another-interface-tag" ],
  "description" : "description",
  "event_decorators" : [ ],
  "function_decorators" : [ {
    "signature" : "getOwner()",
    "name" : "Get contract owner",
    "description" : "Fetches contract owner",
    "parameterDecorators" : [ ],
    "returnDecorators" : [ {
      "name" : "Owner address",
      "description" : "Contract owner address",
      "solidityType" : "address",
      "recommendedTypes" : [ ],
      "parameters" : null,
      "hints" : null
    } ],
    "emittableEvents" : [ ],
    "readOnly" : false
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ReturnTypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ReturnTypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidityType" : {
          "type" : "string"
        }
      }
    },
    "TypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/TypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "description" : {
      "type" : [ "string", "null" ]
    },
    "event_decorators" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "parameterDecorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "hints" : {
                  "type" : [ "array", "null" ],
                  "items" : { }
                },
                "indexed" : {
                  "type" : "boolean"
                },
                "name" : {
                  "type" : "string"
                },
                "parameters" : {
                  "type" : [ "array", "null" ],
                  "items" : {
                    "$ref" : "#/$defs/TypeDecorator"
                  }
                },
                "recommendedTypes" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                }
              }
            }
          },
          "signature" : {
            "type" : "string"
          }
        }
      }
    },
    "function_decorators" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "emittableEvents" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : "string"
          },
          "parameterDecorators" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/TypeDecorator"
            }
          },
          "readOnly" : {
            "type" : "boolean"
          },
          "returnDecorators" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/ReturnTypeDecorator"
            }
          },
          "signature" : {
            "type" : "string"
          }
        }
      }
    },
    "id" : {
      "type" : "string"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}

10.2. Fetch Contract Interface info.md by ID

Fetches info.md file for contract interface by interface ID.

Request Example
GET /v1/contract-interfaces/example.interface/info.md HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 42525517-fc4a-4210-ab28-0d366901b2a9
Content-Type: text/markdown;charset=UTF-8
Content-Length: 23
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

# info.md file contents

10.3. Fetch List of Contract Interfaces

Fetches list of contract interfaces.

Query Parameters
Parameter Description

tags

Comma separated list of interface tags to filter by. Individual elements can contain multiple interface tags separated by AND to specify that interface must contain all of those tags, while individual list elements act as OR operator.

Example: tags=tag-1,tag-2 will fetch all interfaces with either tag-1 or tag-2, while tags=tag-1 AND tag-2,tag-3 will fetch all interfaces with both tag-1 and tag-2, or with at least tag-3.

Request Example
GET /v1/contract-interfaces?tags=interface-tag%20AND%20another-interface-tag,other-tag HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 49bb4c22-cac6-4771-b74b-8bd3b14e725d
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 704

{
  "manifests" : [ {
    "id" : "example.interface",
    "name" : "name",
    "tags" : [ "interface-tag", "another-interface-tag" ],
    "description" : "description",
    "event_decorators" : [ ],
    "function_decorators" : [ {
      "signature" : "getOwner()",
      "name" : "Get contract owner",
      "description" : "Fetches contract owner",
      "parameterDecorators" : [ ],
      "returnDecorators" : [ {
        "name" : "Owner address",
        "description" : "Contract owner address",
        "solidityType" : "address",
        "recommendedTypes" : [ ],
        "parameters" : null,
        "hints" : null
      } ],
      "emittableEvents" : [ ],
      "readOnly" : false
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ReturnTypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ReturnTypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidityType" : {
          "type" : "string"
        }
      }
    },
    "TypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/TypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "manifests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : [ "string", "null" ]
          },
          "event_decorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "name" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "description" : {
                        "type" : "string"
                      },
                      "hints" : {
                        "type" : [ "array", "null" ],
                        "items" : { }
                      },
                      "indexed" : {
                        "type" : "boolean"
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "parameters" : {
                        "type" : [ "array", "null" ],
                        "items" : {
                          "$ref" : "#/$defs/TypeDecorator"
                        }
                      },
                      "recommendedTypes" : {
                        "type" : "array",
                        "items" : {
                          "type" : "string"
                        }
                      }
                    }
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "function_decorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "emittableEvents" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                },
                "name" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/TypeDecorator"
                  }
                },
                "readOnly" : {
                  "type" : "boolean"
                },
                "returnDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/ReturnTypeDecorator"
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "tags" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      }
    }
  }
}

10.4. Fetch List of Contract Interface info.md Files

Fetches list of contract interface info.md files.

Query Parameters
Parameter Description

tags

Comma separated list of interface tags to filter by. Individual elements can contain multiple interface tags separated by AND to specify that interface must contain all of those tags, while individual list elements act as OR operator.

Example: tags=tag-1,tag-2 will fetch all interfaces with either tag-1 or tag-2, while tags=tag-1 AND tag-2,tag-3 will fetch all interfaces with both tag-1 and tag-2, or with at least tag-3.

Request Example
GET /v1/contract-interfaces/info.md?tags=interface-tag%20AND%20another-interface-tag,other-tag HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6aca7086-ccd4-449b-9a93-44294df751b1
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 45

{
  "infos" : [ "# info.md file contents" ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "infos" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}

11. Contract Deployment Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

11.1. Create Contract Deployment Request

Creates contract deployment request with specified parameters. Parameters redirect_url, deployer_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Contract deployment request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

The constructor_params field is an array of objects which must have type and value according to the table in section Available Function Argument Types.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/deploy HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 467
Host: localhost:8080

{
  "alias" : "alias",
  "contract_id" : "examples.examplecontract",
  "constructor_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000a"
  } ],
  "deployer_address" : "0x000000000000000000000000000000000000000b",
  "initial_eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0ba11cef-0337-4872-82ab-c95f3772f675
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 3800

{
  "id" : "55558774-a121-4f58-97c3-8788e3959ec5",
  "alias" : "alias",
  "name" : "name",
  "description" : "description",
  "status" : "PENDING",
  "contract_id" : "examples.examplecontract",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
  "constructor_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000a"
  } ],
  "contract_tags" : [ "example", "simple" ],
  "contract_implements" : [ "traits.example", "traits.exampleownable" ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/55558774-a121-4f58-97c3-8788e3959ec5/action",
  "project_id" : "1624939c-7edd-41f1-a611-d57598f28d1c",
  "created_at" : "2023-01-19T13:01:38.643842Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : null,
  "deployer_address" : "0x000000000000000000000000000000000000000b",
  "deploy_tx" : {
    "tx_hash" : null,
    "from" : "0x000000000000000000000000000000000000000b",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : null,
    "timestamp" : null
  },
  "imported" : false,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : null
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_id" : {
      "type" : "string"
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.2. Preview Import of Already Deployed Smart Contract

Previews import of already deployed smart contract for the specified contract address and chain ID.

Query Parameters
Parameter Description

customRpcUrl

Optional custom RPC URL which will override the default RPC URL for the specified chain. Can be used to provide custom RPC URL for non-supported chains.

Request Example
GET /v1/import-smart-contract/preview/31337/contract/0x668ed30aacc7c7c206aaf1327d733226416233e2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: e66e2a20-69ed-4f8f-b4be-4b6c96d31001
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 5941

{
  "manifest" : {
    "name" : "Imported Contract",
    "description" : "Imported smart contract.",
    "tags" : [ ],
    "implements" : [ "example.ownable" ],
    "eventDecorators" : [ ],
    "constructorDecorators" : [ ],
    "functionDecorators" : [ {
      "signature" : "setOwner(address)",
      "name" : "setOwner",
      "description" : "",
      "parameterDecorators" : [ {
        "name" : "param1",
        "description" : "",
        "recommendedTypes" : [ ],
        "parameters" : null,
        "hints" : null
      } ],
      "returnDecorators" : [ ],
      "emittableEvents" : [ ],
      "readOnly" : false
    }, {
      "signature" : "getOwner()",
      "name" : "getOwner",
      "description" : "",
      "parameterDecorators" : [ ],
      "returnDecorators" : [ ],
      "emittableEvents" : [ ],
      "readOnly" : false
    } ]
  },
  "artifact" : {
    "contractName" : "ImportedContract",
    "sourceName" : "ImportedContract.sol",
    "abi" : [ {
      "anonymous" : null,
      "inputs" : [ {
        "components" : null,
        "internalType" : "address",
        "name" : "param1",
        "type" : "address",
        "indexed" : null
      } ],
      "outputs" : [ ],
      "stateMutability" : null,
      "name" : "setOwner",
      "type" : "function"
    }, {
      "anonymous" : null,
      "inputs" : [ ],
      "outputs" : [ ],
      "stateMutability" : null,
      "name" : "getOwner",
      "type" : "function"
    } ],
    "bytecode" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
    "deployedBytecode" : "608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
    "linkReferences" : null,
    "deployedLinkReferences" : null
  },
  "decorator" : {
    "id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
    "name" : "Imported Contract",
    "description" : "Imported smart contract.",
    "binary" : "6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033",
    "tags" : [ "interface-tag" ],
    "implements" : [ "example.ownable" ],
    "constructors" : [ ],
    "functions" : [ {
      "name" : "Set owner",
      "description" : "Set contract owner",
      "solidity_name" : "setOwner",
      "signature" : "setOwner(address)",
      "inputs" : [ {
        "name" : "New owner",
        "description" : "New owner of the contract",
        "solidity_name" : "param1",
        "solidity_type" : "address",
        "recommended_types" : [ ],
        "parameters" : [ ],
        "hints" : [ ]
      } ],
      "outputs" : [ ],
      "emittable_events" : [ ],
      "read_only" : false
    }, {
      "name" : "Get owner",
      "description" : "Get current contract owner",
      "solidity_name" : "getOwner",
      "signature" : "getOwner()",
      "inputs" : [ ],
      "outputs" : [ {
        "name" : "Current owner",
        "description" : "Current owner of the contract",
        "solidity_name" : "",
        "solidity_type" : "address",
        "recommended_types" : [ ],
        "parameters" : [ ],
        "hints" : [ ]
      } ],
      "emittable_events" : [ ],
      "read_only" : true
    } ],
    "events" : [ ]
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "AbiInputOutput" : {
      "type" : "object",
      "properties" : {
        "components" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/AbiInputOutput"
          }
        },
        "indexed" : {
          "type" : [ "boolean", "null" ]
        },
        "internalType" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string"
        }
      }
    },
    "ContractParameter" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ContractParameter"
          }
        },
        "recommended_types" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidity_name" : {
          "type" : "string"
        },
        "solidity_type" : {
          "type" : "string"
        }
      }
    },
    "JsonNode-nullable" : {
      "type" : [ "object", "null" ]
    },
    "ReturnTypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ReturnTypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidityType" : {
          "type" : "string"
        }
      }
    },
    "TypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/TypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "artifact" : {
      "type" : "object",
      "properties" : {
        "abi" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "anonymous" : {
                "type" : [ "boolean", "null" ]
              },
              "inputs" : {
                "type" : [ "array", "null" ],
                "items" : {
                  "$ref" : "#/$defs/AbiInputOutput"
                }
              },
              "name" : {
                "type" : [ "string", "null" ]
              },
              "outputs" : {
                "type" : [ "array", "null" ],
                "items" : {
                  "$ref" : "#/$defs/AbiInputOutput"
                }
              },
              "stateMutability" : {
                "type" : [ "string", "null" ]
              },
              "type" : {
                "type" : "string"
              }
            }
          }
        },
        "bytecode" : {
          "type" : "string"
        },
        "contractName" : {
          "type" : "string"
        },
        "deployedBytecode" : {
          "type" : "string"
        },
        "deployedLinkReferences" : {
          "$ref" : "#/$defs/JsonNode-nullable"
        },
        "linkReferences" : {
          "$ref" : "#/$defs/JsonNode-nullable"
        },
        "sourceName" : {
          "type" : "string"
        }
      }
    },
    "decorator" : {
      "type" : "object",
      "properties" : {
        "binary" : {
          "type" : "string"
        },
        "constructors" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "description" : {
                "type" : "string"
              },
              "inputs" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/$defs/ContractParameter"
                }
              },
              "payable" : {
                "type" : "boolean"
              }
            }
          }
        },
        "description" : {
          "type" : [ "string", "null" ]
        },
        "events" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "description" : {
                "type" : "string"
              },
              "inputs" : {
                "type" : "array",
                "items" : {
                  "type" : "object",
                  "properties" : {
                    "description" : {
                      "type" : "string"
                    },
                    "hints" : {
                      "type" : [ "array", "null" ],
                      "items" : { }
                    },
                    "indexed" : {
                      "type" : "boolean"
                    },
                    "name" : {
                      "type" : "string"
                    },
                    "parameters" : {
                      "type" : [ "array", "null" ],
                      "items" : {
                        "$ref" : "#/$defs/ContractParameter"
                      }
                    },
                    "recommended_types" : {
                      "type" : "array",
                      "items" : {
                        "type" : "string"
                      }
                    },
                    "solidity_name" : {
                      "type" : "string"
                    },
                    "solidity_type" : {
                      "type" : "string"
                    }
                  }
                }
              },
              "name" : {
                "type" : "string"
              },
              "signature" : {
                "type" : "string"
              },
              "solidity_name" : {
                "type" : "string"
              }
            }
          }
        },
        "functions" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "description" : {
                "type" : "string"
              },
              "emittable_events" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "inputs" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/$defs/ContractParameter"
                }
              },
              "name" : {
                "type" : "string"
              },
              "outputs" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/$defs/ContractParameter"
                }
              },
              "read_only" : {
                "type" : "boolean"
              },
              "signature" : {
                "type" : "string"
              },
              "solidity_name" : {
                "type" : "string"
              }
            }
          }
        },
        "id" : {
          "type" : "string"
        },
        "implements" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "name" : {
          "type" : [ "string", "null" ]
        },
        "tags" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "manifest" : {
      "type" : "object",
      "properties" : {
        "constructorDecorators" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "description" : {
                "type" : "string"
              },
              "parameterDecorators" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/$defs/TypeDecorator"
                }
              },
              "signature" : {
                "type" : "string"
              }
            }
          }
        },
        "description" : {
          "type" : [ "string", "null" ]
        },
        "eventDecorators" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "description" : {
                "type" : "string"
              },
              "name" : {
                "type" : "string"
              },
              "parameterDecorators" : {
                "type" : "array",
                "items" : {
                  "type" : "object",
                  "properties" : {
                    "description" : {
                      "type" : "string"
                    },
                    "hints" : {
                      "type" : [ "array", "null" ],
                      "items" : { }
                    },
                    "indexed" : {
                      "type" : "boolean"
                    },
                    "name" : {
                      "type" : "string"
                    },
                    "parameters" : {
                      "type" : [ "array", "null" ],
                      "items" : {
                        "$ref" : "#/$defs/TypeDecorator"
                      }
                    },
                    "recommendedTypes" : {
                      "type" : "array",
                      "items" : {
                        "type" : "string"
                      }
                    }
                  }
                }
              },
              "signature" : {
                "type" : "string"
              }
            }
          }
        },
        "functionDecorators" : {
          "type" : "array",
          "items" : {
            "type" : "object",
            "properties" : {
              "description" : {
                "type" : "string"
              },
              "emittableEvents" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "name" : {
                "type" : "string"
              },
              "parameterDecorators" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/$defs/TypeDecorator"
                }
              },
              "readOnly" : {
                "type" : "boolean"
              },
              "returnDecorators" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/$defs/ReturnTypeDecorator"
                }
              },
              "signature" : {
                "type" : "string"
              }
            }
          }
        },
        "implements" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "name" : {
          "type" : [ "string", "null" ]
        },
        "tags" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  }
}

11.3. Import Already Deployed Smart Contract

Imports already deployed smart contract for the specified contract address. Parameters contract_id, redirect_url, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Contract import request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

If contract_id field is not provided, then contract binary de-compilation will be attempted in order to generate a contract decorator for the imported contract.

This request requires an API key present in the X-API-KEY header.

Request Example
POST /v1/import-smart-contract HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 318
Host: localhost:8080

{
  "alias" : "alias",
  "contract_id" : "examples.examplecontract",
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 50881eb1-5ce7-4731-9914-b4035edb1158
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4335

{
  "id" : "a2ca090a-e84e-415f-b390-005a9cff7246",
  "alias" : "alias",
  "name" : "name",
  "description" : "description",
  "status" : "SUCCESS",
  "contract_id" : "examples.examplecontract",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
  "constructor_params" : [ {
    "type" : "address",
    "value" : "0x35e13c4870077f4610b74f23e887cbb10e21c19f"
  } ],
  "contract_tags" : [ "example", "simple" ],
  "contract_implements" : [ "traits.example", "traits.exampleownable" ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/a2ca090a-e84e-415f-b390-005a9cff7246/action",
  "project_id" : "c9028166-8f48-4771-b1ca-d803ac5d721b",
  "created_at" : "2023-01-19T13:01:57.581839Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "deploy_tx" : {
    "tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
    "value" : "0",
    "block_confirmations" : "0",
    "timestamp" : "2023-01-19T12:59:53Z"
  },
  "imported" : true,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : [ {
    "signature" : "ExampleEvent(tuple(address),tuple(address))",
    "arguments" : [ {
      "name" : "nonIndexedStruct",
      "type" : "VALUE",
      "value" : [ "0x35e13c4870077f4610b74f23e887cbb10e21c19f" ],
      "hash" : null
    }, {
      "name" : "indexedStruct",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
    } ]
  } ]
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "contract_address" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : [ "string", "null" ]
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.4. Fetch Suggested Interfaces For Imported Smart Contract by Contract Deployment Request ID

Fetches suggested smart contract interfaces for imported smart contract which did not have a specified contract decorator ID. Only interfaces not already implemented by the smart contract will be returned.

Request Example
GET /v1/import-smart-contract/2d0688d0-9cea-4b12-8669-fc2662b99560/suggested-interfaces HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 54d20524-8867-44cd-b43e-fc5952dbe45d
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1186

{
  "manifests" : [ {
    "id" : "example.ownable",
    "name" : "Example Interface",
    "tags" : [ "interface-tag" ],
    "description" : "Example smart contract interface",
    "event_decorators" : [ ],
    "function_decorators" : [ {
      "signature" : "setOwner(address)",
      "name" : "Set owner",
      "description" : "Set contract owner",
      "parameterDecorators" : [ {
        "name" : "New owner",
        "description" : "New owner of the contract",
        "recommendedTypes" : [ ],
        "parameters" : [ ],
        "hints" : [ ]
      } ],
      "returnDecorators" : [ ],
      "emittableEvents" : [ ],
      "readOnly" : false
    }, {
      "signature" : "getOwner()",
      "name" : "Get owner",
      "description" : "Get current contract owner",
      "parameterDecorators" : [ ],
      "returnDecorators" : [ {
        "name" : "Current owner",
        "description" : "Current owner of the contract",
        "solidityType" : "address",
        "recommendedTypes" : [ ],
        "parameters" : [ ],
        "hints" : [ ]
      } ],
      "emittableEvents" : [ ],
      "readOnly" : true
    } ]
  } ],
  "best_matching_interfaces" : [ "example.ownable" ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "ReturnTypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/ReturnTypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "solidityType" : {
          "type" : "string"
        }
      }
    },
    "TypeDecorator" : {
      "type" : "object",
      "properties" : {
        "description" : {
          "type" : "string"
        },
        "hints" : {
          "type" : [ "array", "null" ],
          "items" : { }
        },
        "name" : {
          "type" : "string"
        },
        "parameters" : {
          "type" : [ "array", "null" ],
          "items" : {
            "$ref" : "#/$defs/TypeDecorator"
          }
        },
        "recommendedTypes" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "best_matching_interfaces" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "manifests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : [ "string", "null" ]
          },
          "event_decorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "name" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "description" : {
                        "type" : "string"
                      },
                      "hints" : {
                        "type" : [ "array", "null" ],
                        "items" : { }
                      },
                      "indexed" : {
                        "type" : "boolean"
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "parameters" : {
                        "type" : [ "array", "null" ],
                        "items" : {
                          "$ref" : "#/$defs/TypeDecorator"
                        }
                      },
                      "recommendedTypes" : {
                        "type" : "array",
                        "items" : {
                          "type" : "string"
                        }
                      }
                    }
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "function_decorators" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "description" : {
                  "type" : "string"
                },
                "emittableEvents" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                },
                "name" : {
                  "type" : "string"
                },
                "parameterDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/TypeDecorator"
                  }
                },
                "readOnly" : {
                  "type" : "boolean"
                },
                "returnDecorators" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/$defs/ReturnTypeDecorator"
                  }
                },
                "signature" : {
                  "type" : "string"
                }
              }
            }
          },
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "tags" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      }
    }
  }
}

11.5. Add Interfaces To Imported Smart Contract by Contract Deployment Request ID

Adds specified interfaces to the imported smart contract. Interfaces can only be added to imported contracts for which the contract decorator was not specified during the import process.

This request requires an API key present in the X-API-KEY header.

Request Example
PATCH /v1/import-smart-contract/124837f7-cf6d-4617-add5-c82745c09bbc/add-interfaces HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 42
Host: localhost:8080

{
  "interfaces" : [ "example.ownable" ]
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "interfaces" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 632c87e3-b9fb-4d20-9951-028b8418196e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4613

{
  "id" : "124837f7-cf6d-4617-add5-c82745c09bbc",
  "alias" : "alias",
  "name" : "Imported Contract",
  "description" : "Imported smart contract.",
  "status" : "SUCCESS",
  "contract_id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
  "constructor_params" : [ {
    "type" : "bytes32",
    "value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ]
  } ],
  "contract_tags" : [ ],
  "contract_implements" : [ "example.ownable" ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/124837f7-cf6d-4617-add5-c82745c09bbc/action",
  "project_id" : "c9028166-8f48-4771-b1ca-d803ac5d721b",
  "created_at" : "2023-01-19T13:01:58.844007Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "deploy_tx" : {
    "tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
    "value" : "0",
    "block_confirmations" : "0",
    "timestamp" : "2023-01-19T12:59:53Z"
  },
  "imported" : true,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : [ {
    "signature" : null,
    "arguments" : [ {
      "name" : "arg0",
      "type" : "VALUE",
      "value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ],
      "hash" : null
    }, {
      "name" : "arg1",
      "type" : "HASH",
      "value" : null,
      "hash" : "0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091"
    }, {
      "name" : "arg2",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.6. Remove Interfaces From Imported Smart Contract by Contract Deployment Request ID

Removes specified interfaces from the imported smart contract. Interfaces can only be removed from imported contracts for which the contract decorator was not specified during the import process.

This request requires an API key present in the X-API-KEY header.

Request Example
PATCH /v1/import-smart-contract/e24753d1-20d5-453e-b7fa-fd7540165193/remove-interfaces HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 42
Host: localhost:8080

{
  "interfaces" : [ "example.ownable" ]
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "interfaces" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 419c7a77-41d2-4e9e-8cb5-86ca7f24c92e
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4595

{
  "id" : "e24753d1-20d5-453e-b7fa-fd7540165193",
  "alias" : "alias",
  "name" : "Imported Contract",
  "description" : "Imported smart contract.",
  "status" : "SUCCESS",
  "contract_id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
  "constructor_params" : [ {
    "type" : "bytes32",
    "value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ]
  } ],
  "contract_tags" : [ ],
  "contract_implements" : [ ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/e24753d1-20d5-453e-b7fa-fd7540165193/action",
  "project_id" : "c9028166-8f48-4771-b1ca-d803ac5d721b",
  "created_at" : "2023-01-19T13:02:00.456233Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "deploy_tx" : {
    "tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
    "value" : "0",
    "block_confirmations" : "0",
    "timestamp" : "2023-01-19T12:59:53Z"
  },
  "imported" : true,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : [ {
    "signature" : null,
    "arguments" : [ {
      "name" : "arg0",
      "type" : "VALUE",
      "value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ],
      "hash" : null
    }, {
      "name" : "arg1",
      "type" : "HASH",
      "value" : null,
      "hash" : "0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091"
    }, {
      "name" : "arg2",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.7. Set Interfaces For Imported Smart Contract by Contract Deployment Request ID

Sets specified interfaces for the imported smart contract. Interfaces can only be set for imported contracts for which the contract decorator was not specified during the import process.

This request requires an API key present in the X-API-KEY header.

Request Example
PATCH /v1/import-smart-contract/9aff6b27-3a0f-4098-9fa0-3c4f8dbb953e/set-interfaces HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 42
Host: localhost:8080

{
  "interfaces" : [ "example.ownable" ]
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "interfaces" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 7ea42745-e164-4701-9930-951751f77603
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4613

{
  "id" : "9aff6b27-3a0f-4098-9fa0-3c4f8dbb953e",
  "alias" : "alias",
  "name" : "Imported Contract",
  "description" : "Imported smart contract.",
  "status" : "SUCCESS",
  "contract_id" : "imported-0x668ed30aacc7c7c206aaf1327d733226416233e2-31337",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
  "constructor_params" : [ {
    "type" : "bytes32",
    "value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ]
  } ],
  "contract_tags" : [ ],
  "contract_implements" : [ "example.ownable" ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/9aff6b27-3a0f-4098-9fa0-3c4f8dbb953e/action",
  "project_id" : "c9028166-8f48-4771-b1ca-d803ac5d721b",
  "created_at" : "2023-01-19T13:02:01.437186Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "deploy_tx" : {
    "tx_hash" : "0x58266f19ef41df3a175642c5c82791c13f0c3a387ffeda8a2aed3a922acbb941",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c6343000804003300000000000000000000000035e13c4870077f4610b74f23e887cbb10e21c19f",
    "value" : "0",
    "block_confirmations" : "0",
    "timestamp" : "2023-01-19T12:59:53Z"
  },
  "imported" : true,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : [ {
    "signature" : null,
    "arguments" : [ {
      "name" : "arg0",
      "type" : "VALUE",
      "value" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, -31, 60, 72, 112, 7, 127, 70, 16, -73, 79, 35, -24, -121, -53, -79, 14, 33, -63, -97 ],
      "hash" : null
    }, {
      "name" : "arg1",
      "type" : "HASH",
      "value" : null,
      "hash" : "0x69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091"
    }, {
      "name" : "arg2",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xe412d7b15343cf0762057bcdfc6e0e1196c887a6e48273443abb85a65433a9e2"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.8. Fetch Contract Deployment Request by ID

Fetches stored contract deployment request with its current status. The request is considered successful if the attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to and from addresses, amount, matching data and tx_hash). If there are any mismatches between specified request data and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction for attached hash is not yet mined on blockchain, request will be in pending state.

Request Example
GET /v1/deploy/36e9fdfd-939e-4f38-9be2-a2c9a5ba28fe HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 702068a3-8c60-478d-9516-993d4e9abdec
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4336

{
  "id" : "36e9fdfd-939e-4f38-9be2-a2c9a5ba28fe",
  "alias" : "alias",
  "name" : "name",
  "description" : "description",
  "status" : "SUCCESS",
  "contract_id" : "examples.examplecontract",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
  "constructor_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000a"
  } ],
  "contract_tags" : [ "example", "simple" ],
  "contract_implements" : [ "traits.example", "traits.exampleownable" ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/36e9fdfd-939e-4f38-9be2-a2c9a5ba28fe/action",
  "project_id" : "1624939c-7edd-41f1-a611-d57598f28d1c",
  "created_at" : "2023-01-19T13:01:39.787502Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "deploy_tx" : {
    "tx_hash" : "0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:53Z"
  },
  "imported" : false,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : [ {
    "signature" : "ExampleEvent(tuple(address),tuple(address))",
    "arguments" : [ {
      "name" : "nonIndexedStruct",
      "type" : "VALUE",
      "value" : [ "0x000000000000000000000000000000000000000a" ],
      "hash" : null
    }, {
      "name" : "indexedStruct",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.9. Fetch Contract Deployment Requests by Project ID and Contract Alias

Fetches contract deployment request for given project ID and contract alias.

Request Example
GET /v1/deploy/by-project/1624939c-7edd-41f1-a611-d57598f28d1c/by-alias/alias HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 76fec5e1-45c3-4e93-a8b9-38f35b0e6049
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4336

{
  "id" : "6467d657-b445-4e26-99c6-840965aecd54",
  "alias" : "alias",
  "name" : "name",
  "description" : "description",
  "status" : "SUCCESS",
  "contract_id" : "examples.examplecontract",
  "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
  "constructor_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000a"
  } ],
  "contract_tags" : [ "example", "simple" ],
  "contract_implements" : [ "traits.example", "traits.exampleownable" ],
  "initial_eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-deploy/6467d657-b445-4e26-99c6-840965aecd54/action",
  "project_id" : "1624939c-7edd-41f1-a611-d57598f28d1c",
  "created_at" : "2023-01-19T13:01:39.965179Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "deploy_tx" : {
    "tx_hash" : "0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x0000000000000000000000000000000000000000",
    "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:53Z"
  },
  "imported" : false,
  "proxy" : false,
  "implementation_contract_address" : null,
  "events" : [ {
    "signature" : "ExampleEvent(tuple(address),tuple(address))",
    "arguments" : [ {
      "name" : "nonIndexedStruct",
      "type" : "VALUE",
      "value" : [ "0x000000000000000000000000000000000000000a" ],
      "hash" : null
    }, {
      "name" : "indexedStruct",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "alias" : {
      "type" : "string"
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "constructor_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_deployment_data" : {
      "type" : "string"
    },
    "contract_id" : {
      "type" : "string"
    },
    "contract_implements" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "contract_tags" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deploy_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "deployer_address" : {
      "type" : [ "string", "null" ]
    },
    "description" : {
      "type" : [ "string", "null" ]
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "implementation_contract_address" : {
      "type" : [ "string", "null" ]
    },
    "imported" : {
      "type" : "boolean"
    },
    "initial_eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "name" : {
      "type" : [ "string", "null" ]
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "proxy" : {
      "type" : "boolean"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

11.10. Fetch Contract Deployment Requests by Project ID and Filters

Fetches stored contract deployment requests with their current status filtered by project ID and other filters.

Query Parameters
Parameter Description

contractIds

Comma separated list of contract IDs to filter by. Each list element act as an OR operator.

contractTags

Comma separated list of contract tags to filter by. Individual elements can contain multiple contract tags separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

Example: contractTags=tag-1,tag-2 will fetch all contracts with either tag-1 or tag-2, while contractTags=tag-1 AND tag-2,tag-3 will fetch all contracts with both tag-1 and tag-2, or with at least tag-3.

contractImplements

Comma separated list of implemented contract traits to filter by. Individual elements can contain multiple implemented contract traits separated by AND to specify that contract must contain all of those tags, while individual list elements act as OR operator.

deployedOnly

If set to true, only deployed contracts (with status equal to SUCCESS and non-null contractAddress) will be fetched.

Request Example
GET /v1/deploy/by-project/1624939c-7edd-41f1-a611-d57598f28d1c?contractIds=examples.examplecontract&contractTags=example%20AND%20simple,other&contractImplements=traits/example%20AND%20traits/exampleOwnable,traits/other&deployedOnly=true HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 5a6bdfc3-55e3-43bb-bc50-ca4f7e072fdb
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 4467

{
  "requests" : [ {
    "id" : "3b5e011b-4011-427a-8bff-3f87c91b74f2",
    "alias" : "alias",
    "name" : "name",
    "description" : "description",
    "status" : "SUCCESS",
    "contract_id" : "examples.examplecontract",
    "contract_deployment_data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
    "constructor_params" : [ {
      "type" : "address",
      "value" : "0x000000000000000000000000000000000000000a"
    } ],
    "contract_tags" : [ "example", "simple" ],
    "contract_implements" : [ "traits.example", "traits.exampleownable" ],
    "initial_eth_amount" : "0",
    "chain_id" : 31337,
    "redirect_url" : "https://example.com/request-deploy/3b5e011b-4011-427a-8bff-3f87c91b74f2/action",
    "project_id" : "1624939c-7edd-41f1-a611-d57598f28d1c",
    "created_at" : "2023-01-19T13:01:40.790134Z",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "deployer_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "deploy_tx" : {
      "tx_hash" : "0xd3f6dcf206b2755ca7f932eda9561c777859aec1d3d4421f276bca5bc94f0ee1",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x0000000000000000000000000000000000000000",
      "data" : "0x6080604052604051610241380380610241833981016040819052610022916100ab565b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a2506100d9565b6000602082840312156100bc578081fd5b81516001600160a01b03811681146100d2578182fd5b9392505050565b610159806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806313af40351461003b578063893d20e814610050575b600080fd5b61004e6100493660046100f5565b61006f565b005b600054604080516001600160a01b039092168252519081900360200190f35b600080546001600160a01b0319166001600160a01b03831690811790915560408051602080820183529083905290519182520160408051918290038220602080840183526001600160a01b038516938490529151928352917f69a766900e90becfd154fc1d070ac01e5c63a59f0ff928ff58cad2126b204091910160405180910390a250565b600060208284031215610106578081fd5b81356001600160a01b038116811461011c578182fd5b939250505056fea264697066735822122047c20863208c0d498dab178ed6e76065ca8aa1b150387c04583e0c14f0aab1b464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000000a",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:53Z"
    },
    "imported" : false,
    "proxy" : false,
    "implementation_contract_address" : null,
    "events" : [ {
      "signature" : "ExampleEvent(tuple(address),tuple(address))",
      "arguments" : [ {
        "name" : "nonIndexedStruct",
        "type" : "VALUE",
        "value" : [ "0x000000000000000000000000000000000000000a" ],
        "hash" : null
      }, {
        "name" : "indexedStruct",
        "type" : "HASH",
        "value" : null,
        "hash" : "0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8"
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "alias" : {
            "type" : "string"
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "constructor_params" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/FunctionArgumentSchema"
            }
          },
          "contract_address" : {
            "type" : [ "string", "null" ]
          },
          "contract_deployment_data" : {
            "type" : "string"
          },
          "contract_id" : {
            "type" : "string"
          },
          "contract_implements" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "contract_tags" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "deploy_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "deployer_address" : {
            "type" : [ "string", "null" ]
          },
          "description" : {
            "type" : [ "string", "null" ]
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "implementation_contract_address" : {
            "type" : [ "string", "null" ]
          },
          "imported" : {
            "type" : "boolean"
          },
          "initial_eth_amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "proxy" : {
            "type" : "boolean"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          }
        }
      }
    }
  }
}

11.11. Attach Transaction Info to Contract Deployment Request

Attaches transaction hash and deployer wallet address to existing contract deployment request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.

Request Example
PUT /v1/deploy/342c5ea1-5d9e-48e1-b3df-58665220d2dd HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 1212eba7-d1ae-4068-b1b0-0b82a4ce3209
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

11.12. Delete Contract Deployment Request by ID

Deletes created contract deployment request by ID. Only the request creator can delete the contract deployment request.

This request requires an API key present in the X-API-KEY header.

Request Example
DELETE /v1/deploy/f764f147-fe33-41b2-9681-f3fdf2323d2d HTTP/1.1
X-API-KEY: api-key
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 8d3adbd7-ed40-4328-a42f-99a8e5730bf6
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

12. Contract Function Call Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

12.1. Call Read-Only Contract Function Request

Calls read-only contract function with specified parameters. Parameter block_number is optional.

Target contract can be specified by providing deployed_contract_id, deployed_contract_alias or contract_address in the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered invalid. The deployed_contract_id and deployed_contract_alias correspond to ID or alias of the contract which was deployed using the Contract Deployment Request API. If contract_address is used to specify target contract, then deployed_contract_id will have null value in the response.

The functionParams field is an array of objects which must have type and value according to the table in section Available Function Argument Types.

The outputParams field is an array of output parameter types, which correspond to the type name according to the table in section Available Function Argument Types. Tuple types are constructed by providing an object instead of type name, for example {"type": "tuple", "elems": ["uint", "string"]} is a tuple with element types of uint and string. Tuple nesting is possible by providing the appropriate value in the elem array. Any array dimensions of the tuple must be expressed in its type field, for example {"type": "tuple[]", "elems": ["uint", "string"]} defines an array of tuples with element types of uint and string.

This request requires an API key present in the X-API-KEY header.

Request Example (via deployed_contract_id)
POST /v1/readonly-function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 308
Host: localhost:8080

{
  "deployed_contract_id" : "1823fc59-543e-43a7-80c1-d4819604d685",
  "block_number" : "1",
  "function_name" : "returningUint",
  "function_params" : [ {
    "type" : "uint256",
    "value" : "10"
  } ],
  "output_params" : [ "uint256" ],
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias)
POST /v1/readonly-function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 289
Host: localhost:8080

{
  "deployed_contract_alias" : "contract-alias",
  "block_number" : "1",
  "function_name" : "returningUint",
  "function_params" : [ {
    "type" : "uint256",
    "value" : "10"
  } ],
  "output_params" : [ "uint256" ],
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address)
POST /v1/readonly-function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 310
Host: localhost:8080

{
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "block_number" : "1",
  "function_name" : "returningUint",
  "function_params" : [ {
    "type" : "uint256",
    "value" : "10"
  } ],
  "output_params" : [ "uint256" ],
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: c586688c-98b7-4b2d-afc7-82471d355875
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 360

{
  "deployed_contract_id" : "1823fc59-543e-43a7-80c1-d4819604d685",
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "block_number" : "1",
  "timestamp" : "2023-01-19T12:59:53Z",
  "output_params" : [ "uint256" ],
  "return_values" : [ "10" ],
  "raw_return_value" : "0x000000000000000000000000000000000000000000000000000000000000000a"
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    },
    "OutputParameterSchema" : {
      "type" : "object",
      "properties" : {
        "elems" : {
          "type" : "array",
          "items" : {
            "anyOf" : [ {
              "$ref" : "#/$defs/OutputParameterSchema"
            }, {
              "type" : "string"
            } ]
          }
        },
        "type" : {
          "type" : "string"
        }
      }
    }
  },
  "type" : "object",
  "properties" : {
    "block_number" : {
      "type" : [ "string", "null" ],
      "pattern" : "^[+-]?[0-9]+$"
    },
    "caller_address" : {
      "type" : "string"
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "deployed_contract_alias" : {
      "type" : [ "string", "null" ]
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "function_name" : {
      "type" : "string"
    },
    "function_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "output_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/OutputParameterSchema"
      }
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "OutputParameterSchema" : {
      "type" : "object",
      "properties" : {
        "elems" : {
          "type" : "array",
          "items" : {
            "anyOf" : [ {
              "$ref" : "#/$defs/OutputParameterSchema"
            }, {
              "type" : "string"
            } ]
          }
        },
        "type" : {
          "type" : "string"
        }
      }
    },
    "ReturnValueTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/ReturnValueTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "block_number" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "contract_address" : {
      "type" : "string"
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "output_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/OutputParameterSchema"
      }
    },
    "raw_return_value" : {
      "type" : "string"
    },
    "return_values" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/ReturnValueTypes"
      }
    },
    "timestamp" : {
      "type" : "string",
      "format" : "date-time"
    }
  }
}

12.2. Create Contract Function Call Request

Creates contract function call request with specified parameters. Parameters redirect_url, caller_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Contract function call request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

Target contract can be specified by providing deployed_contract_id, deployed_contract_alias or contract_address in the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered invalid. The deployed_contract_id and deployed_contract_alias correspond to ID or alias of the contract which was deployed using the Contract Deployment Request API. If contract_address is used to specify target contract, then deployed_contract_id will have null value in the response.

The functionParams field is an array of objects which must have type and value according to the table in section Available Function Argument Types.

This request requires an API key present in the X-API-KEY header.

Request Example (via deployed_contract_id)
POST /v1/function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 486
Host: localhost:8080

{
  "deployed_contract_id" : "689fd259-5832-4568-a78f-c35d3ecc8cd9",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000b"
  } ],
  "eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias)
POST /v1/function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 467
Host: localhost:8080

{
  "deployed_contract_alias" : "contract-alias",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000b"
  } ],
  "eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address)
POST /v1/function-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 488
Host: localhost:8080

{
  "contract_address" : "0x00000000000000000000000000000000cafebabe",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000b"
  } ],
  "eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: e10cff66-b336-4d62-8d1e-d3357a3544ff
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1323

{
  "id" : "640200b6-3be0-4918-a47f-4df6db114fac",
  "status" : "PENDING",
  "deployed_contract_id" : "689fd259-5832-4568-a78f-c35d3ecc8cd9",
  "contract_address" : "0x00000000000000000000000000000000cafebabe",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000b"
  } ],
  "function_call_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
  "eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-function-call/640200b6-3be0-4918-a47f-4df6db114fac/action",
  "project_id" : "060cba93-b107-4df0-bf67-9cb4ca1124a9",
  "created_at" : "2023-01-19T13:01:43.781155918Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b",
  "function_call_tx" : {
    "tx_hash" : null,
    "from" : "0x000000000000000000000000000000000000000b",
    "to" : "0x00000000000000000000000000000000cafebabe",
    "data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
    "value" : "0",
    "block_confirmations" : null,
    "timestamp" : null
  },
  "events" : null
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "caller_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "deployed_contract_alias" : {
      "type" : [ "string", "null" ]
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "function_name" : {
      "type" : "string"
    },
    "function_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "caller_address" : {
      "type" : [ "string", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "contract_address" : {
      "type" : "string"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "function_call_data" : {
      "type" : "string"
    },
    "function_call_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "function_name" : {
      "type" : "string"
    },
    "function_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

12.3. Fetch Contract Function Call Request by ID

Fetches stored contract function call request with its current status. The request is considered successful if the attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to and from addresses, amount, matching data and tx_hash). If there are any mismatches between specified request data and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction for attached hash is not yet mined on blockchain, request will be in pending state.

Request Example
GET /v1/function-call/8d270603-4f6f-4f1a-bc6e-97521aaea4b5 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: f51b7cdf-a74f-4059-9dd0-4e927a5a5690
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1816

{
  "id" : "8d270603-4f6f-4f1a-bc6e-97521aaea4b5",
  "status" : "SUCCESS",
  "deployed_contract_id" : "689fd259-5832-4568-a78f-c35d3ecc8cd9",
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
  } ],
  "function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-function-call/8d270603-4f6f-4f1a-bc6e-97521aaea4b5/action",
  "project_id" : "060cba93-b107-4df0-bf67-9cb4ca1124a9",
  "created_at" : "2023-01-19T13:01:44.567976Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "function_call_tx" : {
    "tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:54Z"
  },
  "events" : [ {
    "signature" : "ExampleEvent(tuple(address),tuple(address))",
    "arguments" : [ {
      "name" : "nonIndexedStruct",
      "type" : "VALUE",
      "value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
      "hash" : null
    }, {
      "name" : "indexedStruct",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "caller_address" : {
      "type" : [ "string", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "contract_address" : {
      "type" : "string"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "function_call_data" : {
      "type" : "string"
    },
    "function_call_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "function_name" : {
      "type" : "string"
    },
    "function_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

12.4. Fetch Contract Function Call Requests by Project ID and Filters

Fetches stored contract function call requests with their current status filtered by project ID and other filters.

Query Parameters
Parameter Description

deployedContractId

ID of the deployed contract to filter by.

contractAddress

Address of the contract to filter by.

Request Example
GET /v1/function-call/by-project/060cba93-b107-4df0-bf67-9cb4ca1124a9?deployedContractId=689fd259-5832-4568-a78f-c35d3ecc8cd9&contractAddress=0x668ed30aacc7c7c206aaf1327d733226416233e2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6d9d2dab-92ca-4b9e-bec1-8e90dfdc0351
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1933

{
  "requests" : [ {
    "id" : "15835a40-35ce-4441-953e-31cfc24b888c",
    "status" : "SUCCESS",
    "deployed_contract_id" : "689fd259-5832-4568-a78f-c35d3ecc8cd9",
    "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "function_name" : "setOwner",
    "function_params" : [ {
      "type" : "address",
      "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
    } ],
    "function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "eth_amount" : "0",
    "chain_id" : 31337,
    "redirect_url" : "https://example.com/request-function-call/15835a40-35ce-4441-953e-31cfc24b888c/action",
    "project_id" : "060cba93-b107-4df0-bf67-9cb4ca1124a9",
    "created_at" : "2023-01-19T13:01:44.331078Z",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "function_call_tx" : {
      "tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:54Z"
    },
    "events" : [ {
      "signature" : "ExampleEvent(tuple(address),tuple(address))",
      "arguments" : [ {
        "name" : "nonIndexedStruct",
        "type" : "VALUE",
        "value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
        "hash" : null
      }, {
        "name" : "indexedStruct",
        "type" : "HASH",
        "value" : null,
        "hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "caller_address" : {
            "type" : [ "string", "null" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "contract_address" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "deployed_contract_id" : {
            "type" : [ "string", "null" ],
            "format" : "uuid"
          },
          "eth_amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "function_call_data" : {
            "type" : "string"
          },
          "function_call_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "function_name" : {
            "type" : "string"
          },
          "function_params" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/FunctionArgumentSchema"
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          }
        }
      }
    }
  }
}

12.5. Attach Transaction Info to Contract Function Call Request

Attaches transaction hash and caller wallet address to existing contract function call request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.

Request Example
PUT /v1/function-call/aa24d701-017e-458d-8f52-1fc007cb9470 HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000c"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: a0d44144-5e56-4fdb-be6b-3641bb3035c1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

13. Contract Arbitrary Call Request API

All endpoints are public and do not require Authorization: Bearer JWT header.

13.1. Create Contract Arbitrary Call Request

Creates contract arbitrary call request with specified parameters. Parameters redirect_url, caller_address, arbitrary_data, screen_config and all its child fields are optional. arbitrary_data field can contain any desired JSON value. Contract arbitrary call request ID can be interpolated into the redirect_url by placing ${id} placeholder in the place where request ID is desired in the URL. The placeholder must strictly have dollar sign and brackets to be interpolated, and only id field can be interpolated.

Target contract can be specified by providing deployed_contract_id, deployed_contract_alias or contract_address in the request body. Exactly one of the mentioned values must be provided, otherwise the request will be considered invalid. The deployed_contract_id and deployed_contract_alias correspond to ID or alias of the contract which was deployed using the Contract Deployment Request API. If contract_address is used to specify target contract, then deployed_contract_id will have null value in the response.

This request requires an API key present in the X-API-KEY header.

Request Example (via deployed_contract_id)
POST /v1/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 436
Host: localhost:8080

{
  "deployed_contract_id" : "d1a635b3-1b6e-4efa-a854-5230cb98d758",
  "function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
  "eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via deployed_contract_alias)
POST /v1/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 417
Host: localhost:8080

{
  "deployed_contract_alias" : "contract-alias",
  "function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
  "eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Request Example (via contract_address)
POST /v1/arbitrary-call HTTP/1.1
Content-Type: application/json
X-API-KEY: api-key
Content-Length: 438
Host: localhost:8080

{
  "contract_address" : "0x00000000000000000000000000000000cafebabe",
  "function_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
  "eth_amount" : "0",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: bca9d0af-8066-4a15-aca5-554ee88914d7
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1325

{
  "id" : "82b55cff-ae6f-4f74-ac1a-448d10a9b129",
  "status" : "PENDING",
  "deployed_contract_id" : "d1a635b3-1b6e-4efa-a854-5230cb98d758",
  "contract_address" : "0x00000000000000000000000000000000cafebabe",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x000000000000000000000000000000000000000b"
  } ],
  "function_call_data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
  "eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-arbitrary-call/82b55cff-ae6f-4f74-ac1a-448d10a9b129/action",
  "project_id" : "01a6e9f2-c76f-4706-b9a5-8fd6c95665bf",
  "created_at" : "2023-01-19T13:01:32.057724403Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x000000000000000000000000000000000000000b",
  "arbitrary_call_tx" : {
    "tx_hash" : null,
    "from" : "0x000000000000000000000000000000000000000b",
    "to" : "0x00000000000000000000000000000000cafebabe",
    "data" : "0x13af4035000000000000000000000000000000000000000000000000000000000000000b",
    "value" : "0",
    "block_confirmations" : null,
    "timestamp" : null
  },
  "events" : null
}

Schemas:

Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "caller_address" : {
      "type" : [ "string", "null" ]
    },
    "contract_address" : {
      "type" : [ "string", "null" ]
    },
    "deployed_contract_alias" : {
      "type" : [ "string", "null" ]
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "function_data" : {
      "type" : "string"
    },
    "redirect_url" : {
      "type" : [ "string", "null" ]
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    }
  }
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "arbitrary_call_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "caller_address" : {
      "type" : [ "string", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "contract_address" : {
      "type" : "string"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "function_call_data" : {
      "type" : "string"
    },
    "function_name" : {
      "type" : [ "string", "null" ]
    },
    "function_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

13.2. Fetch Contract Arbitrary Call Request by ID

Fetches stored contract arbitrary call request with its current status. The request is considered successful if the attached transaction is confirmed on blockchain and all its data matches specified request parameters (correct to and from addresses, amount, matching data and tx_hash). If there are any mismatches between specified request data and state on blockchain, the request will be marked as failed. If there is no attached transaction hash or if transaction for attached hash is not yet mined on blockchain, request will be in pending state.

Request Example
GET /v1/arbitrary-call/73189e77-2e88-4080-aa28-0468ef9207fa HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: fc56c519-3647-4f1b-84da-76f755af6c83
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1817

{
  "id" : "73189e77-2e88-4080-aa28-0468ef9207fa",
  "status" : "SUCCESS",
  "deployed_contract_id" : "d1a635b3-1b6e-4efa-a854-5230cb98d758",
  "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
  "function_name" : "setOwner",
  "function_params" : [ {
    "type" : "address",
    "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
  } ],
  "function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "eth_amount" : "0",
  "chain_id" : 31337,
  "redirect_url" : "https://example.com/request-arbitrary-call/73189e77-2e88-4080-aa28-0468ef9207fa/action",
  "project_id" : "01a6e9f2-c76f-4706-b9a5-8fd6c95665bf",
  "created_at" : "2023-01-19T13:01:32.40948Z",
  "arbitrary_data" : {
    "test" : true
  },
  "screen_config" : {
    "before_action_message" : "before-action-message",
    "after_action_message" : "after-action-message"
  },
  "caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
  "arbitrary_call_tx" : {
    "tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
    "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "value" : "0",
    "block_confirmations" : "1",
    "timestamp" : "2023-01-19T12:59:54Z"
  },
  "events" : [ {
    "signature" : "ExampleEvent(tuple(address),tuple(address))",
    "arguments" : [ {
      "name" : "nonIndexedStruct",
      "type" : "VALUE",
      "value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
      "hash" : null
    }, {
      "name" : "indexedStruct",
      "type" : "HASH",
      "value" : null,
      "hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "arbitrary_call_tx" : {
      "type" : "object",
      "properties" : {
        "block_confirmations" : {
          "type" : [ "string", "null" ],
          "pattern" : "^[+-]?[0-9]+$"
        },
        "data" : {
          "type" : [ "string", "null" ]
        },
        "from" : {
          "type" : [ "string", "null" ]
        },
        "timestamp" : {
          "type" : [ "string", "null" ],
          "format" : "date-time"
        },
        "to" : {
          "type" : "string"
        },
        "tx_hash" : {
          "type" : [ "string", "null" ]
        },
        "value" : {
          "type" : "string",
          "pattern" : "^[+-]?[0-9]+$"
        }
      }
    },
    "arbitrary_data" : {
      "type" : [ "object", "null" ]
    },
    "caller_address" : {
      "type" : [ "string", "null" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "contract_address" : {
      "type" : "string"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "deployed_contract_id" : {
      "type" : [ "string", "null" ],
      "format" : "uuid"
    },
    "eth_amount" : {
      "type" : "string",
      "pattern" : "^[+-]?[0-9]+$"
    },
    "events" : {
      "type" : [ "array", "null" ],
      "items" : {
        "type" : "object",
        "properties" : {
          "arguments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "hash" : {
                  "type" : [ "string", "null" ]
                },
                "name" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "VALUE", "HASH" ]
                },
                "value" : { }
              }
            }
          },
          "signature" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    },
    "function_call_data" : {
      "type" : "string"
    },
    "function_name" : {
      "type" : [ "string", "null" ]
    },
    "function_params" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/FunctionArgumentSchema"
      }
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "project_id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "redirect_url" : {
      "type" : "string"
    },
    "screen_config" : {
      "type" : [ "object", "null" ],
      "properties" : {
        "after_action_message" : {
          "type" : [ "string", "null" ]
        },
        "before_action_message" : {
          "type" : [ "string", "null" ]
        }
      }
    },
    "status" : {
      "type" : "string",
      "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
    }
  }
}

13.3. Fetch Contract Arbitrary Call Requests by Project ID and Filters

Fetches stored contract arbitrary call requests with their current status filtered by project ID and other filters.

Query Parameters
Parameter Description

deployedContractId

ID of the deployed contract to filter by.

contractAddress

Address of the contract to filter by.

Request Example
GET /v1/arbitrary-call/by-project/01a6e9f2-c76f-4706-b9a5-8fd6c95665bf?deployedContractId=d1a635b3-1b6e-4efa-a854-5230cb98d758&contractAddress=0x668ed30aacc7c7c206aaf1327d733226416233e2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: d89c243b-7efb-4d1d-b2f8-78f16c3051c5
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1935

{
  "requests" : [ {
    "id" : "81195991-b9e6-4dea-a29f-605f0b3b8929",
    "status" : "SUCCESS",
    "deployed_contract_id" : "d1a635b3-1b6e-4efa-a854-5230cb98d758",
    "contract_address" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
    "function_name" : "setOwner",
    "function_params" : [ {
      "type" : "address",
      "value" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1"
    } ],
    "function_call_data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "eth_amount" : "0",
    "chain_id" : 31337,
    "redirect_url" : "https://example.com/request-arbitrary-call/81195991-b9e6-4dea-a29f-605f0b3b8929/action",
    "project_id" : "01a6e9f2-c76f-4706-b9a5-8fd6c95665bf",
    "created_at" : "2023-01-19T13:01:31.124375Z",
    "arbitrary_data" : {
      "test" : true
    },
    "screen_config" : {
      "before_action_message" : "before-action-message",
      "after_action_message" : "after-action-message"
    },
    "caller_address" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
    "arbitrary_call_tx" : {
      "tx_hash" : "0xbb786e6f66d15b5c6518cd29e00aedfbf8a82a73f9f7ec11e3ede544b8d9e42f",
      "from" : "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "to" : "0x668ed30aacc7c7c206aaf1327d733226416233e2",
      "data" : "0x13af4035000000000000000000000000959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1",
      "value" : "0",
      "block_confirmations" : "1",
      "timestamp" : "2023-01-19T12:59:54Z"
    },
    "events" : [ {
      "signature" : "ExampleEvent(tuple(address),tuple(address))",
      "arguments" : [ {
        "name" : "nonIndexedStruct",
        "type" : "VALUE",
        "value" : [ "0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1" ],
        "hash" : null
      }, {
        "name" : "indexedStruct",
        "type" : "HASH",
        "value" : null,
        "hash" : "0xb3ab459503754d7ffbceb026c9a12971f082734e588c5e09df0875237fd918a2"
      } ]
    } ]
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$defs" : {
    "FunctionArgumentSchema" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "value" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      }
    },
    "FunctionArgumentTypes" : {
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "boolean"
      }, {
        "type" : "number"
      }, {
        "type" : "array",
        "items" : {
          "anyOf" : [ {
            "type" : "string"
          }, {
            "type" : "number"
          } ]
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentSchema"
        }
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/FunctionArgumentTypes"
        }
      } ]
    }
  },
  "type" : "object",
  "properties" : {
    "requests" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "arbitrary_call_tx" : {
            "type" : "object",
            "properties" : {
              "block_confirmations" : {
                "type" : [ "string", "null" ],
                "pattern" : "^[+-]?[0-9]+$"
              },
              "data" : {
                "type" : [ "string", "null" ]
              },
              "from" : {
                "type" : [ "string", "null" ]
              },
              "timestamp" : {
                "type" : [ "string", "null" ],
                "format" : "date-time"
              },
              "to" : {
                "type" : "string"
              },
              "tx_hash" : {
                "type" : [ "string", "null" ]
              },
              "value" : {
                "type" : "string",
                "pattern" : "^[+-]?[0-9]+$"
              }
            }
          },
          "arbitrary_data" : {
            "type" : [ "object", "null" ]
          },
          "caller_address" : {
            "type" : [ "string", "null" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "contract_address" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "deployed_contract_id" : {
            "type" : [ "string", "null" ],
            "format" : "uuid"
          },
          "eth_amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "events" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "object",
              "properties" : {
                "arguments" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "hash" : {
                        "type" : [ "string", "null" ]
                      },
                      "name" : {
                        "type" : "string"
                      },
                      "type" : {
                        "type" : "string",
                        "enum" : [ "VALUE", "HASH" ]
                      },
                      "value" : { }
                    }
                  }
                },
                "signature" : {
                  "type" : [ "string", "null" ]
                }
              }
            }
          },
          "function_call_data" : {
            "type" : "string"
          },
          "function_name" : {
            "type" : [ "string", "null" ]
          },
          "function_params" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/$defs/FunctionArgumentSchema"
            }
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "project_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "redirect_url" : {
            "type" : "string"
          },
          "screen_config" : {
            "type" : [ "object", "null" ],
            "properties" : {
              "after_action_message" : {
                "type" : [ "string", "null" ]
              },
              "before_action_message" : {
                "type" : [ "string", "null" ]
              }
            }
          },
          "status" : {
            "type" : "string",
            "enum" : [ "PENDING", "SUCCESS", "FAILED" ]
          }
        }
      }
    }
  }
}

13.4. Attach Transaction Info to Contract Arbitrary Call Request

Attaches transaction hash and caller wallet address to existing contract arbitrary call request. Once the transaction hash is attached to the request, any subsequent attempts to attach a new transaction hash will fail.

Request Example
PUT /v1/arbitrary-call/e20ed0b9-eaf3-4377-9c7b-6beb217df91a HTTP/1.1
Content-Type: application/json
Content-Length: 90
Host: localhost:8080

{
  "tx_hash" : "0x1",
  "caller_address" : "0x000000000000000000000000000000000000000c"
}
Request Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "caller_address" : {
      "type" : "string"
    },
    "tx_hash" : {
      "type" : "string"
    }
  }
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 4c1450fa-dfb0-4bfb-aca5-3ce560d5d4b8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

14. Public Address Book API

All endpoints are public and do not require Authorization: Bearer JWT header. Endpoints to modify address book entries can be found in the internal API documentation.

14.1. Fetch Address Book Entry by ID

Fetches stored address book entry by ID.

Request Example
GET /v1/address-book/42a91049-ff1e-466e-a4e0-39cbe81364d0 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 38f63e20-35d0-4bbf-9fa8-962a85bbcf0c
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 229

{
  "id" : "42a91049-ff1e-466e-a4e0-39cbe81364d0",
  "alias" : "alias",
  "address" : "0x0000000000000000000000000000000000000abc",
  "phone_number" : "phone-number",
  "email" : "email",
  "created_at" : "2022-02-02T00:00:00Z"
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "address" : {
      "type" : "string"
    },
    "alias" : {
      "type" : "string"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "email" : {
      "type" : [ "string", "null" ]
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "phone_number" : {
      "type" : [ "string", "null" ]
    }
  }
}

14.2. Fetch Address Book Entries

Fetches stored address book entries for the specified wallet address.

Request Example
GET /v1/address-book/by-wallet-address/0x0000000000000000000000000000000000abc123 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 0ef96078-9270-478b-ad58-205d0e5a1259
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 265

{
  "entries" : [ {
    "id" : "8d6fe2a6-af32-491e-a2af-ecb4dc695357",
    "alias" : "alias",
    "address" : "0x0000000000000000000000000000000000000abc",
    "phone_number" : "phone-number",
    "email" : "email",
    "created_at" : "2022-02-02T00:00:00Z"
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "entries" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "address" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "email" : {
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "phone_number" : {
            "type" : [ "string", "null" ]
          }
        }
      }
    }
  }
}

15. Public Multi-Payment Template API

All endpoints are public and do not require Authorization: Bearer JWT header. Endpoints to modify multi-payment templates can be found in the internal API documentation.

15.1. Fetch Multi-Payment Template

Fetches stored multi-payment template by ID.

Request Example
GET /v1/multi-payment-template/fd1985c7-92b5-445c-bdb2-8d98e032b17c HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 6c2c9689-f0ea-42bf-9b7e-4e030bef9b37
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 561

{
  "id" : "fd1985c7-92b5-445c-bdb2-8d98e032b17c",
  "items" : [ {
    "id" : "26a3990d-5a8e-4f3f-b267-f7a129ce026a",
    "template_id" : "fd1985c7-92b5-445c-bdb2-8d98e032b17c",
    "wallet_address" : "0x000000000000000000000000000000000000000a",
    "item_name" : "itemName",
    "amount" : "10",
    "created_at" : "2022-02-02T00:00:00Z"
  } ],
  "template_name" : "templateName",
  "asset_type" : "TOKEN",
  "token_address" : "0x000000000000000000000000000000000000000b",
  "chain_id" : 31337,
  "created_at" : "2022-02-02T00:00:00Z",
  "updated_at" : null
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "asset_type" : {
      "type" : "string",
      "enum" : [ "NATIVE", "TOKEN" ]
    },
    "chain_id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "created_at" : {
      "type" : "string",
      "format" : "date-time"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "items" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "amount" : {
            "type" : "string",
            "pattern" : "^[+-]?[0-9]+$"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "item_name" : {
            "type" : [ "string", "null" ]
          },
          "template_id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "wallet_address" : {
            "type" : "string"
          }
        }
      }
    },
    "template_name" : {
      "type" : "string"
    },
    "token_address" : {
      "type" : [ "string", "null" ]
    },
    "updated_at" : {
      "type" : [ "string", "null" ],
      "format" : "date-time"
    }
  }
}

15.2. Fetch Multi-Payment Templates

Fetches stored multi-payment templates for the specified wallet address.

Request Example
GET /v1/multi-payment-template/by-wallet-address/abc123 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-CORRELATION-ID: 962a6d45-1dbe-405e-b23e-456b4f7b38b7
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 305

{
  "templates" : [ {
    "id" : "28d37090-fd4d-486e-a408-0dcb535b17c7",
    "template_name" : "templateName",
    "asset_type" : "TOKEN",
    "token_address" : "0x000000000000000000000000000000000000000b",
    "chain_id" : 31337,
    "created_at" : "2022-02-02T00:00:00Z",
    "updated_at" : null
  } ]
}
Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "templates" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : {
          "asset_type" : {
            "type" : "string",
            "enum" : [ "NATIVE", "TOKEN" ]
          },
          "chain_id" : {
            "type" : "integer",
            "format" : "int64"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid"
          },
          "template_name" : {
            "type" : "string"
          },
          "token_address" : {
            "type" : [ "string", "null" ]
          },
          "updated_at" : {
            "type" : [ "string", "null" ],
            "format" : "date-time"
          }
        }
      }
    }
  }
}

16. Available Function Argument Types

Below table contains the list of all supported function argument types. Any type can be made into an array by appending square brackets to the end of the type ([]). Fixed-size arrays are also supported by inserting a number inside the square brackets to indicate the array size (e.g. string[1] is an array of exactly one string element). Multi-dimensional arrays can be made by appending multiple square brackets. All array elements must be of the same type - this means that all tuple arrays must have tuple elements with matching field element types in the correct order.

Array Examples
Array type JSON value example

string[]

["a", "b"]

int[1][2]

[[1], [2]]

tuple[]

[ [{type: "string", "value": "a"}], [{"type": "string", "value": "b"}] ]

Type name JSON value type Example value Description

tuple

{"type": string, "value": any}[]

[{"type": "string", "value": "example tuple"}, {"type": "bool", "value": true}]

Array of objects which must contain type and name elements. The type value must be one of the supported function argument types from this table and the value must match the type’s accepted format. Order of tuple elements is important and must be in the order in which the tuple elements are declared. Tuple nesting is supported to any arbitrary depth - simply use the tuple type and provide a valid tuple array for the value field.

address

string

"0x0000000000000000000000000000000000000000"

Wallet or contract address in hex format, with optional 0x prefix.

bool

boolean

true

Boolean value, true or false.

string

string

"example"

Arbitrary string value.

bytes

(number | string)[]

[1, 2, "3"]

Array of bytes of variable size. Elements can be either numbers or string representations of numbers in base 10.

byte

number | string

1

Byte value. Can be either a number or a string representation of the number in base 10.

uint

number | string

1

256-bit unsigned integer (alias for uint256). Can be either a number or a string representation of the number in base 10.

uint8, uint16, uint24, uint32, uint40, uint48, uint56, uint64, uint72, uint80, uint88, uint96, uint104, uint112, uint120, uint128, uint136, uint144, uint152, uint160, uint168, uint176, uint184, uint192, uint200, uint208, uint216, uint224, uint232, uint240, uint248, uint256

number | string

1

Unsigned integer with specified bit precision. Can be either a number or a string representation of the number in base 10.

int

number | string

1

256-bit signed integer (alias for int256). Can be either a number or a string representation of the number in base 10.

int8, int16, int24, int32, int40, int48, int56, int64, int72, int80, int88, int96, int104, int112, int120, int128, int136, int144, int152, int160, int168, int176, int184, int192, int200, int208, int216, int224, int232, int240, int248, int256

number | string

1

Signed integer with specified bit precision. Can be either a number or a string representation of the number in base 10.

bytes1, bytes2, bytes3, bytes4, bytes5, bytes6, bytes7, bytes8, bytes9, bytes10, bytes11, bytes12, bytes13, bytes14, bytes15, bytes16, bytes17, bytes18, bytes19, bytes20, bytes21, bytes22, bytes23, bytes24, bytes25, bytes26, bytes27, bytes28, bytes29, bytes30, bytes31, bytes32

(number | string)[]

[1, 2, "3"]

Fixed-size byte array. The size of the provided array must match the specified type size. Elements can be either numbers or string representations of numbers in base 10.

17. Error Response

All endpoints can return an error response. This section contains an example error response, error response schema and a table of all possible error codes.

Error Response Example
HTTP/1.1 401 UNAUTHORIZED
Content-Type: application/json

{
  "error_code" : "BAD_AUTHENTICATION",
  "message" : "Provided authentication header has invalid format"
}
Error Response Schema
{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "error_code" : {
      "type" : "string",
      "enum" : [ "RESOURCE_NOT_FOUND", "UNSUPPORTED_CHAIN_ID", "TEMPORARY_BLOCKCHAIN_READ_ERROR", "BLOCKCHAIN_READ_ERROR", "BLOCKCHAIN_EVENT_READ_ERROR", "TX_INFO_ALREADY_SET", "SIGNED_MESSAGE_ALREADY_SET", "ACCESS_FORBIDDEN", "BAD_AUTHENTICATION", "API_KEY_ALREADY_EXISTS", "NON_EXISTENT_API_KEY", "API_RATE_LIMIT_EXCEEDED", "MISSING_TOKEN_ADDRESS", "TOKEN_ADDRESS_NOT_ALLOWED", "DUPLICATE_ISSUER_CONTRACT_ADDRESS_FOR_CHAIN_ID", "ALIAS_ALREADY_IN_USE", "CONTRACT_NOT_DEPLOYED", "INVALID_REQUEST_BODY", "INVALID_QUERY_PARAM", "CONTRACT_NOT_FOUND", "CONTRACT_BINARY_MISMATCH", "CANNOT_DECOMPILE_CONTRACT_BINARY", "CONTRACT_DECOMPILATION_TEMPORARILY_UNAVAILABLE", "CONTRACT_DECORATOR_INCOMPATIBLE", "CONTRACT_INTERFACE_NOT_FOUND", "IPFS_UPLOAD_FAILED", "ABI_DECODING_FAILED", "CUSTOMER_ALREADY_EXISTS", "CUSTOMER_CREATION_FAILED", "CUSTOMER_NOT_YET_CREATED", "SUBSCRIPTION_ALREADY_ACTIVE", "PROMO_CODE_EXPIRED", "PROMO_CODE_ALREADY_USED" ]
    },
    "message" : {
      "type" : "string"
    }
  }
}
Error Codes
Error Code Description

RESOURCE_NOT_FOUND

Indicates that the requested resource cannot be found

UNSUPPORTED_CHAIN_ID

The chain ID specified in the project is not directly supported and requires a custom RPC URL

TEMPORARY_BLOCKCHAIN_READ_ERROR

Data cannot be temporarily read from blockchain, the same request should be retried at a later time

BLOCKCHAIN_READ_ERROR

Requested data cannot be retrieved from the blockchain because it is not well formed (i.e. non-existent contract address, calling non-existent contract function etc.)

BLOCKCHAIN_EVENT_READ_ERROR

Requested event data cannot be retrieved from the blockchain because it is not well formed (i.e. non-existent contract address, calling non-existent contract function etc.)

TX_INFO_ALREADY_SET

The transaction info has already been set for the requested resource and it cannot be overridden

SIGNED_MESSAGE_ALREADY_SET

The signed message has already been set for the requested resource and it cannot be overridden

ACCESS_FORBIDDEN

Access to the provided resource is not allowed for the current user

BAD_AUTHENTICATION

Provided authentication token has invalid format

API_KEY_ALREADY_EXISTS

The project already has an API key generated and no more keys can be generated for that project

NON_EXISTENT_API_KEY

The provided API key does not exist and is therefore invalid

API_RATE_LIMIT_EXCEEDED

API rate limit has been exceeded for the project

MISSING_TOKEN_ADDRESS

The request body is missing token_address value

TOKEN_ADDRESS_NOT_ALLOWED

The request body must not have non-null token_address value

DUPLICATE_ISSUER_CONTRACT_ADDRESS_FOR_CHAIN_ID

A project with given issuer contract address already exists for the specified chain ID

ALIAS_ALREADY_IN_USE

The provided alias is already in use for the specified resource type for the project associated with provided API key

CONTRACT_NOT_DEPLOYED

The contract has not yet been deployed on the blockchain, and therefore has no contract address defined - the request should be retried at a later time

INVALID_REQUEST_BODY

Indicates that one or more fields in the request body has an invalid value

INVALID_QUERY_PARAM

Indicates that one or more query parameters have invalid value

CONTRACT_NOT_FOUND

No smart contract can be found for given contract address

CONTRACT_BINARY_MISMATCH

Indicates that the imported contract binary does not match binary of requested contract ID

CANNOT_DECOMPILE_CONTRACT_BINARY

Binary of the requested contract cannot be successfully decompiled

CONTRACT_DECOMPILATION_TEMPORARILY_UNAVAILABLE

Decompilation of contract binary is currently unavailable and should be tried at a later time

CONTRACT_DECORATOR_INCOMPATIBLE

Contract decorator is incompatible with contract ABI specification

CONTRACT_INTERFACE_NOT_FOUND

Indicates that the requested contract interface cannot be found

IPFS_UPLOAD_FAILED

Indicates that file upload to IPFS has failed

ABI_DECODING_FAILED

Indicates that error occurred while decoding ABI-encoded response. This is most likely caused by incompatible ABI types (e.g. decoding an int as a string)

CUSTOMER_ALREADY_EXISTS

Indicates that customer has already been created for the authenticated wallet

CUSTOMER_CREATION_FAILED

Indicates that customer has failed created due to an error

CUSTOMER_NOT_YET_CREATED

Indicates that customer has not been created yet for the authenticated wallet

SUBSCRIPTION_ALREADY_ACTIVE

Indicates that customer has an already active subscription

PROMO_CODE_EXPIRED

Indicates that the requested promo code has expired

PROMO_CODE_ALREADY_USED

Indicates that the user has already used the requested promo code before