Created
December 26, 2024 12:05
-
-
Save dome/06e3b90a06324cfbea2fb2a9cba9c424 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.3", | |
"info": { | |
"title": "Rate Wallet", | |
"description": "Base on Engine, Engine is an open-source, backend server that reads, writes, and deploys contracts at production scale.", | |
"version": "1.0.0", | |
"license": { | |
"name": "Apache 2.0", | |
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | |
} | |
}, | |
"servers": [ | |
{ | |
"url": "https://dev-engine.dome.cloud/", | |
"description": "Rate wallet server" | |
} | |
], | |
"components": { | |
"securitySchemes": { | |
"bearerAuth": { | |
"type": "http", | |
"scheme": "bearer", | |
"description": "To authenticate server-side requests" | |
} | |
}, | |
"schemas": {} | |
}, | |
"paths": { | |
"/json": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "Default Response" | |
} | |
} | |
} | |
}, | |
"/openapi.json": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "Default Response" | |
} | |
} | |
} | |
}, | |
"/json/": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "Default Response" | |
} | |
} | |
} | |
}, | |
"/backend-wallet/create": { | |
"post": { | |
"operationId": "create", | |
"summary": "Create backend wallet", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Create a backend wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"label": { | |
"type": "string" | |
}, | |
"type": { | |
"description": "Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used.", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"local" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:local" | |
] | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"status": { | |
"type": "string" | |
}, | |
"type": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"local" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:local" | |
] | |
} | |
] | |
} | |
}, | |
"required": [ | |
"walletAddress", | |
"status", | |
"type" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"walletAddress": "0x....", | |
"status": "success", | |
"type": "local" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{walletAddress}": { | |
"delete": { | |
"operationId": "removeBackendWallet", | |
"summary": "Remove backend wallet", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are transferred out before removing a local wallet.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "walletAddress", | |
"required": true, | |
"description": "A contract or wallet address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"status": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"status" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"status": "success" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/import": { | |
"post": { | |
"operationId": "import", | |
"summary": "Import backend wallet", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Import an existing wallet as a backend wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"label": { | |
"description": "Optional label for the imported wallet", | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"anyOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"awsKmsArn": { | |
"description": "AWS KMS key ARN", | |
"examples": [ | |
"arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012" | |
], | |
"type": "string" | |
}, | |
"credentials": { | |
"description": "Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available).", | |
"type": "object", | |
"properties": { | |
"awsAccessKeyId": { | |
"description": "AWS Access Key ID", | |
"type": "string" | |
}, | |
"awsSecretAccessKey": { | |
"description": "AWS Secret Access Key", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"awsAccessKeyId", | |
"awsSecretAccessKey" | |
] | |
} | |
}, | |
"required": [ | |
"awsKmsArn" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"gcpKmsKeyId": { | |
"description": "GCP KMS key ID", | |
"examples": [ | |
"12345678-1234-1234-1234-123456789012" | |
], | |
"type": "string" | |
}, | |
"gcpKmsKeyVersionId": { | |
"description": "GCP KMS key version ID", | |
"examples": [ | |
"1" | |
], | |
"type": "string" | |
}, | |
"credentials": { | |
"description": "Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available).", | |
"type": "object", | |
"properties": { | |
"email": { | |
"description": "GCP service account email", | |
"type": "string" | |
}, | |
"privateKey": { | |
"description": "GCP service account private key", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"email", | |
"privateKey" | |
] | |
} | |
}, | |
"required": [ | |
"gcpKmsKeyId", | |
"gcpKmsKeyVersionId" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"privateKey": { | |
"description": "The private key of the wallet to import", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"privateKey" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"mnemonic": { | |
"description": "The mnemonic phrase of the wallet to import", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"mnemonic" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"encryptedJson": { | |
"description": "The encrypted JSON of the wallet to import", | |
"type": "string" | |
}, | |
"password": { | |
"description": "The password used to encrypt the encrypted JSON", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"encryptedJson", | |
"password" | |
] | |
} | |
] | |
} | |
] | |
}, | |
"examples": { | |
"example1": { | |
"value": { | |
"privateKey": "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" | |
} | |
}, | |
"example2": { | |
"value": { | |
"mnemonic": "crouch cabbage puppy sunset fever adjust giggle blanket maze loyal wreck dream" | |
} | |
}, | |
"example3": { | |
"value": { | |
"encryptedJson": "", | |
"password": "password123" | |
} | |
}, | |
"example4": { | |
"value": { | |
"awsKmsArn": "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012" | |
} | |
}, | |
"example5": { | |
"value": { | |
"gcpKmsKeyId": "12345678-1234-1234-1234-123456789012", | |
"gcpKmsKeyVersionId": "1" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"status": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"walletAddress", | |
"status" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"walletAddress": "0x....", | |
"status": "success" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/update": { | |
"post": { | |
"operationId": "update", | |
"summary": "Update backend wallet", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Update a backend wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"label": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"walletAddress" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"status": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"walletAddress", | |
"status" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"walletAddress": "0x....", | |
"status": "success" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/{walletAddress}/get-balance": { | |
"get": { | |
"operationId": "getBalance", | |
"summary": "Get balance", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Get the native balance for a backend wallet.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "walletAddress", | |
"required": true, | |
"description": "Backend wallet address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"symbol": { | |
"type": "string" | |
}, | |
"decimals": { | |
"type": "integer" | |
}, | |
"value": { | |
"type": "string" | |
}, | |
"displayValue": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"walletAddress", | |
"name", | |
"symbol", | |
"decimals", | |
"value", | |
"displayValue" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"walletAddress": "0x...", | |
"name": "ERC20", | |
"symbol": "", | |
"decimals": "18", | |
"value": "0", | |
"displayValue": "0.0" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/get-all": { | |
"get": { | |
"operationId": "getAll", | |
"summary": "Get all backend wallets", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Get all backend wallets.", | |
"parameters": [ | |
{ | |
"schema": { | |
"default": "1", | |
"minimum": 1, | |
"type": "integer" | |
}, | |
"example": "1", | |
"in": "query", | |
"name": "page", | |
"required": true, | |
"description": "The page of wallets to get." | |
}, | |
{ | |
"schema": { | |
"default": "10", | |
"minimum": 1, | |
"type": "integer" | |
}, | |
"example": "10", | |
"in": "query", | |
"name": "limit", | |
"required": true, | |
"description": "The number of wallets to get per page." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"address": { | |
"description": "Wallet Address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"type": { | |
"description": "Wallet Type", | |
"type": "string" | |
}, | |
"label": { | |
"anyOf": [ | |
{ | |
"description": "A label for your wallet", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"awsKmsKeyId": { | |
"anyOf": [ | |
{ | |
"description": "AWS KMS Key ID", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"awsKmsArn": { | |
"anyOf": [ | |
{ | |
"description": "AWS KMS Key ARN", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsKeyId": { | |
"anyOf": [ | |
{ | |
"description": "GCP KMS Key ID", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsKeyRingId": { | |
"anyOf": [ | |
{ | |
"description": "GCP KMS Key Ring ID", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsLocationId": { | |
"anyOf": [ | |
{ | |
"description": "GCP KMS Location ID", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsKeyVersionId": { | |
"anyOf": [ | |
{ | |
"description": "GCP KMS Key Version ID", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsResourcePath": { | |
"anyOf": [ | |
{ | |
"description": "GCP KMS Resource Path", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"address", | |
"type", | |
"label", | |
"awsKmsKeyId", | |
"awsKmsArn", | |
"gcpKmsKeyId", | |
"gcpKmsKeyRingId", | |
"gcpKmsLocationId", | |
"gcpKmsKeyVersionId", | |
"gcpKmsResourcePath" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": [ | |
{ | |
"address": "0xe201a491a204e4a78e60033ae8ed39036b55bacb", | |
"type": "local", | |
"label": "my-wallet", | |
"awsKmsKeyId": null, | |
"awsKmsArn": null, | |
"gcpKmsKeyId": null, | |
"gcpKmsKeyRingId": null, | |
"gcpKmsLocationId": null, | |
"gcpKmsKeyVersionId": null, | |
"gcpKmsResourcePath": null | |
} | |
] | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/transfer": { | |
"post": { | |
"operationId": "transfer", | |
"summary": "Transfer tokens", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Transfer native currency or ERC20 tokens to another wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"to": { | |
"description": "The recipient wallet address.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"currencyAddress": { | |
"description": "The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum).", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x0000000000000000000000000000000000000000" | |
}, | |
"amount": { | |
"description": "The amount in ether to transfer. Example: \"0.1\" to send 0.1 ETH.", | |
"type": "string", | |
"pattern": "^\\d+(\\.\\d+)?$", | |
"example": "0.1" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"to", | |
"amount" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/withdraw": { | |
"post": { | |
"operationId": "withdraw", | |
"summary": "Withdraw funds", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Withdraw all funds from this wallet to another wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"toAddress": { | |
"description": "Address to withdraw all funds to", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"toAddress" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"transactionHash": { | |
"description": "A transaction hash", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$", | |
"example": "0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
}, | |
"amount": { | |
"description": "An amount in native token (decimals allowed). Example: \"0.1\"", | |
"type": "string", | |
"pattern": "^\\d+(\\.\\d+)?$", | |
"example": "0.1" | |
} | |
}, | |
"required": [ | |
"transactionHash", | |
"amount" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/send-transaction": { | |
"post": { | |
"operationId": "sendTransaction", | |
"summary": "Send a transaction", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Send a transaction with transaction parameters", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"toAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"data": { | |
"type": "string", | |
"example": "0x..." | |
}, | |
"value": { | |
"type": "string", | |
"example": "10000000" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"data", | |
"value" | |
] | |
}, | |
"example": { | |
"toAddress": "0x7a0ce8524bea337f0bee853b68fabde145dac0a0", | |
"data": "0x449a52f800000000000000000000000043cae0d7fe86c713530e679ce02574743b2ee9fc0000000000000000000000000000000000000000000000000de0b6b3a7640000", | |
"value": "0x00", | |
"txOverrides": { | |
"gas": "50000" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/send-transaction-batch": { | |
"post": { | |
"operationId": "sendTransactionBatch", | |
"summary": "Send a batch of raw transactions", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Send a batch of raw transactions with transaction parameters", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"toAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"data": { | |
"type": "string", | |
"example": "0x..." | |
}, | |
"value": { | |
"type": "string", | |
"example": "10000000" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"data", | |
"value" | |
] | |
} | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueIds": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"queueIds" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/sign-transaction": { | |
"post": { | |
"operationId": "signTransaction", | |
"summary": "Sign a transaction", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Sign a transaction", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"transaction": { | |
"type": "object", | |
"properties": { | |
"to": { | |
"type": "string" | |
}, | |
"nonce": { | |
"type": "string" | |
}, | |
"gasLimit": { | |
"type": "string" | |
}, | |
"gasPrice": { | |
"type": "string" | |
}, | |
"data": { | |
"type": "string" | |
}, | |
"value": { | |
"type": "string" | |
}, | |
"chainId": { | |
"type": "integer" | |
}, | |
"type": { | |
"type": "integer" | |
}, | |
"accessList": {}, | |
"maxFeePerGas": { | |
"type": "string" | |
}, | |
"maxPriorityFeePerGas": { | |
"type": "string" | |
}, | |
"ccipReadEnabled": { | |
"type": "boolean" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"transaction" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/sign-message": { | |
"post": { | |
"operationId": "signMessage", | |
"summary": "Sign a message", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Send a message", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"isBytes": { | |
"type": "boolean" | |
}, | |
"chainId": { | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"message" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/sign-typed-data": { | |
"post": { | |
"operationId": "signTypedData", | |
"summary": "Sign an EIP-712 message", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Send an EIP-712 message (\"typed data\")", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"domain": { | |
"additionalProperties": true, | |
"type": "object", | |
"properties": {} | |
}, | |
"types": { | |
"additionalProperties": true, | |
"type": "object", | |
"properties": {} | |
}, | |
"value": { | |
"additionalProperties": true, | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"required": [ | |
"domain", | |
"types", | |
"value" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/{walletAddress}/get-all-transactions": { | |
"get": { | |
"operationId": "getTransactionsForBackendWallet", | |
"summary": "Get recent transactions", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Get recent transactions for this backend wallet.", | |
"parameters": [ | |
{ | |
"schema": { | |
"default": 1, | |
"minimum": 1, | |
"type": "integer" | |
}, | |
"example": 1, | |
"in": "query", | |
"name": "page", | |
"required": true, | |
"description": "Specify the page number." | |
}, | |
{ | |
"schema": { | |
"default": 100, | |
"type": "integer" | |
}, | |
"example": 100, | |
"in": "query", | |
"name": "limit", | |
"required": true, | |
"description": "Specify the number of results to return per page." | |
}, | |
{ | |
"schema": { | |
"default": "queued", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
} | |
] | |
}, | |
"in": "query", | |
"name": "status", | |
"required": true, | |
"description": "The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued'" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "walletAddress", | |
"required": true, | |
"description": "Backend wallet address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"transactions": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"anyOf": [ | |
{ | |
"description": "An identifier for an enqueued blockchain write call", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"status": { | |
"description": "The current state of the transaction.", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
} | |
], | |
"example": "queued" | |
}, | |
"chainId": { | |
"anyOf": [ | |
{ | |
"description": "The chain ID for the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"fromAddress": { | |
"anyOf": [ | |
{ | |
"description": "The backend wallet submitting the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"toAddress": { | |
"anyOf": [ | |
{ | |
"description": "The contract address to be called", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"data": { | |
"anyOf": [ | |
{ | |
"description": "Encoded calldata", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"extension": { | |
"anyOf": [ | |
{ | |
"description": "The extension detected by thirdweb", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"value": { | |
"anyOf": [ | |
{ | |
"description": "The amount of native currency to send", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"nonce": { | |
"anyOf": [ | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "integer" | |
}, | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasLimit": { | |
"anyOf": [ | |
{ | |
"description": "The max gas unit limit", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasPrice": { | |
"anyOf": [ | |
{ | |
"description": "The gas price used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionType": { | |
"anyOf": [ | |
{ | |
"description": "The type of transaction", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"queuedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is enqueued", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is submitted to mempool", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is mined onchain", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cancelledAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transactino is cancelled", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractAddress": { | |
"anyOf": [ | |
{ | |
"description": "The address for a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractType": { | |
"anyOf": [ | |
{ | |
"description": "The type of a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"errorMessage": { | |
"anyOf": [ | |
{ | |
"description": "The error that occurred", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAtBlockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is submitted to mempool", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"blockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is mined", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryCount": { | |
"description": "The number of retry attempts", | |
"type": "integer" | |
}, | |
"retryGasValues": { | |
"anyOf": [ | |
{ | |
"description": "Whether to replace gas values on the next retry", | |
"type": "boolean" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"signerAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountSalt": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountFactoryAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"target": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sender": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"initCode": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"verificationGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"preVerificationGas": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"paymasterAndData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"userOpHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionName": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionArgs": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onChainTxStatus": { | |
"anyOf": [ | |
{ | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onchainStatus": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"success" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"reverted" | |
] | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"effectiveGasPrice": { | |
"anyOf": [ | |
{ | |
"description": "Effective Gas Price", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cumulativeGasUsed": { | |
"anyOf": [ | |
{ | |
"description": "Cumulative Gas Used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"queueId", | |
"status", | |
"chainId", | |
"fromAddress", | |
"toAddress", | |
"data", | |
"extension", | |
"value", | |
"nonce", | |
"gasLimit", | |
"gasPrice", | |
"maxFeePerGas", | |
"maxPriorityFeePerGas", | |
"transactionType", | |
"transactionHash", | |
"queuedAt", | |
"sentAt", | |
"minedAt", | |
"cancelledAt", | |
"deployedContractAddress", | |
"deployedContractType", | |
"errorMessage", | |
"sentAtBlockNumber", | |
"blockNumber", | |
"retryCount", | |
"retryGasValues", | |
"retryMaxFeePerGas", | |
"retryMaxPriorityFeePerGas", | |
"signerAddress", | |
"accountAddress", | |
"accountSalt", | |
"accountFactoryAddress", | |
"target", | |
"sender", | |
"initCode", | |
"callData", | |
"callGasLimit", | |
"verificationGasLimit", | |
"preVerificationGas", | |
"paymasterAndData", | |
"userOpHash", | |
"functionName", | |
"functionArgs", | |
"onChainTxStatus", | |
"onchainStatus", | |
"effectiveGasPrice", | |
"cumulativeGasUsed" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"transactions" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce": { | |
"get": { | |
"operationId": "getTransactionsForBackendWalletByNonce", | |
"summary": "Get recent transactions by nonce", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Get recent transactions for this backend wallet, sorted by descending nonce.", | |
"parameters": [ | |
{ | |
"schema": { | |
"minimum": 0, | |
"type": "integer" | |
}, | |
"example": 100, | |
"in": "query", | |
"name": "fromNonce", | |
"required": true, | |
"description": "The earliest nonce, inclusive." | |
}, | |
{ | |
"schema": { | |
"minimum": 0, | |
"type": "integer" | |
}, | |
"example": 100, | |
"in": "query", | |
"name": "toNonce", | |
"required": false, | |
"description": "The latest nonce, inclusive. If omitted, queries up to the latest sent nonce." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "walletAddress", | |
"required": true, | |
"description": "Backend wallet address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"nonce": { | |
"type": "integer" | |
}, | |
"transaction": { | |
"anyOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"anyOf": [ | |
{ | |
"description": "An identifier for an enqueued blockchain write call", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"status": { | |
"description": "The current state of the transaction.", | |
"examples": [ | |
"queued", | |
"sent", | |
"mined", | |
"errored", | |
"cancelled" | |
], | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
} | |
] | |
}, | |
"chainId": { | |
"anyOf": [ | |
{ | |
"description": "The chain ID for the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"fromAddress": { | |
"anyOf": [ | |
{ | |
"description": "The backend wallet submitting the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"toAddress": { | |
"anyOf": [ | |
{ | |
"description": "The contract address to be called", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"data": { | |
"anyOf": [ | |
{ | |
"description": "Encoded calldata", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"extension": { | |
"anyOf": [ | |
{ | |
"description": "The extension detected by thirdweb", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"value": { | |
"anyOf": [ | |
{ | |
"description": "The amount of native currency to send", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"nonce": { | |
"anyOf": [ | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "integer" | |
}, | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasLimit": { | |
"anyOf": [ | |
{ | |
"description": "The max gas unit limit", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasPrice": { | |
"anyOf": [ | |
{ | |
"description": "The gas price used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionType": { | |
"anyOf": [ | |
{ | |
"description": "The type of transaction", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"queuedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is enqueued", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is submitted to mempool", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is mined onchain", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cancelledAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transactino is cancelled", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractAddress": { | |
"anyOf": [ | |
{ | |
"description": "The address for a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractType": { | |
"anyOf": [ | |
{ | |
"description": "The type of a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"errorMessage": { | |
"anyOf": [ | |
{ | |
"description": "The error that occurred", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAtBlockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is submitted to mempool", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"blockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is mined", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryCount": { | |
"description": "The number of retry attempts", | |
"type": "integer" | |
}, | |
"retryGasValues": { | |
"anyOf": [ | |
{ | |
"description": "Whether to replace gas values on the next retry", | |
"type": "boolean" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"signerAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountSalt": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountFactoryAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"target": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sender": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"initCode": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"verificationGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"preVerificationGas": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"paymasterAndData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"userOpHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionName": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionArgs": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onChainTxStatus": { | |
"anyOf": [ | |
{ | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onchainStatus": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"success" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"reverted" | |
] | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"effectiveGasPrice": { | |
"anyOf": [ | |
{ | |
"description": "Effective Gas Price", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cumulativeGasUsed": { | |
"anyOf": [ | |
{ | |
"description": "Cumulative Gas Used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"queueId", | |
"status", | |
"chainId", | |
"fromAddress", | |
"toAddress", | |
"data", | |
"extension", | |
"value", | |
"nonce", | |
"gasLimit", | |
"gasPrice", | |
"maxFeePerGas", | |
"maxPriorityFeePerGas", | |
"transactionType", | |
"transactionHash", | |
"queuedAt", | |
"sentAt", | |
"minedAt", | |
"cancelledAt", | |
"deployedContractAddress", | |
"deployedContractType", | |
"errorMessage", | |
"sentAtBlockNumber", | |
"blockNumber", | |
"retryCount", | |
"retryGasValues", | |
"retryMaxFeePerGas", | |
"retryMaxPriorityFeePerGas", | |
"signerAddress", | |
"accountAddress", | |
"accountSalt", | |
"accountFactoryAddress", | |
"target", | |
"sender", | |
"initCode", | |
"callData", | |
"callGasLimit", | |
"verificationGasLimit", | |
"preVerificationGas", | |
"paymasterAndData", | |
"userOpHash", | |
"functionName", | |
"functionArgs", | |
"onChainTxStatus", | |
"onchainStatus", | |
"effectiveGasPrice", | |
"cumulativeGasUsed" | |
] | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"nonce", | |
"transaction" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/reset-nonces": { | |
"post": { | |
"operationId": "resetNonces", | |
"summary": "Reset nonces", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"chainId": { | |
"description": "The chain ID to reset nonces for.", | |
"type": "number" | |
}, | |
"walletAddress": { | |
"description": "The backend wallet address to reset nonces for. Omit to reset all backend wallets.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"status": { | |
"type": "string" | |
}, | |
"count": { | |
"description": "The number of backend wallets processed.", | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"status", | |
"count" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"status": "success", | |
"count": 1 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/cancel-nonces": { | |
"post": { | |
"operationId": "cancelNonces", | |
"summary": "Cancel nonces", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Cancel all nonces up to the provided nonce. This is useful to unblock a backend wallet that has transactions waiting for nonces to be mined.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"toNonce": { | |
"description": "The nonce to cancel up to, inclusive. Example: If the onchain nonce is 10 and 'toNonce' is 15, this request will cancel nonces: 11, 12, 13, 14, 15", | |
"type": "number", | |
"example": "42" | |
} | |
}, | |
"required": [ | |
"toNonce" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"cancelledNonces": { | |
"type": "array", | |
"items": { | |
"type": "number" | |
} | |
} | |
}, | |
"required": [ | |
"cancelledNonces" | |
], | |
"example": { | |
"result": { | |
"cancelledNonces": [ | |
11, | |
12, | |
13, | |
14, | |
15 | |
] | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/{walletAddress}/get-nonce": { | |
"get": { | |
"operationId": "getNonce", | |
"summary": "Get nonce", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "walletAddress", | |
"required": true, | |
"description": "Backend wallet address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"nonce": { | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"nonce" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"nonce": 100 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/backend-wallet/{chain}/simulate-transaction": { | |
"post": { | |
"operationId": "simulateTransaction", | |
"summary": "Simulate a transaction", | |
"tags": [ | |
"Backend Wallet" | |
], | |
"description": "Simulate a transaction with transaction parameters", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"toAddress": { | |
"description": "The contract address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"value": { | |
"description": "The amount of native currency in wei", | |
"type": "string", | |
"example": "0" | |
}, | |
"functionName": { | |
"description": "The function to call on the contract", | |
"type": "string" | |
}, | |
"args": { | |
"description": "The arguments to call for this function", | |
"type": "array", | |
"items": { | |
"anyOf": [ | |
{ | |
"description": "String argument", | |
"type": "string" | |
}, | |
{ | |
"description": "Numeric argument", | |
"type": "number" | |
}, | |
{ | |
"description": "Boolean argument", | |
"type": "boolean" | |
}, | |
{ | |
"description": "Array argument", | |
"type": "array", | |
"items": {} | |
}, | |
{ | |
"description": "Object argument", | |
"type": "object", | |
"properties": {} | |
} | |
] | |
} | |
}, | |
"data": { | |
"description": "Raw calldata", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"toAddress" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"description": "Simulation Success", | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/wallets": { | |
"get": { | |
"operationId": "getWalletsConfiguration", | |
"summary": "Get wallets configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get wallets configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"local" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:local" | |
] | |
} | |
] | |
}, | |
"awsAccessKeyId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"awsRegion": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpApplicationProjectId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsLocationId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsKeyRingId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpApplicationCredentialEmail": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"type", | |
"awsAccessKeyId", | |
"awsRegion", | |
"gcpApplicationProjectId", | |
"gcpKmsLocationId", | |
"gcpKmsKeyRingId", | |
"gcpApplicationCredentialEmail" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateWalletsConfiguration", | |
"summary": "Update wallets configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update wallets configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"anyOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"awsAccessKeyId": { | |
"type": "string" | |
}, | |
"awsSecretAccessKey": { | |
"type": "string" | |
}, | |
"awsRegion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"awsAccessKeyId", | |
"awsSecretAccessKey", | |
"awsRegion" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"gcpApplicationProjectId": { | |
"type": "string" | |
}, | |
"gcpKmsLocationId": { | |
"type": "string" | |
}, | |
"gcpKmsKeyRingId": { | |
"type": "string" | |
}, | |
"gcpApplicationCredentialEmail": { | |
"type": "string" | |
}, | |
"gcpApplicationCredentialPrivateKey": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"gcpApplicationProjectId", | |
"gcpKmsLocationId", | |
"gcpKmsKeyRingId", | |
"gcpApplicationCredentialEmail", | |
"gcpApplicationCredentialPrivateKey" | |
] | |
} | |
] | |
}, | |
"examples": { | |
"example1": { | |
"value": { | |
"type": "local" | |
} | |
}, | |
"example2": { | |
"value": { | |
"type": "aws-kms", | |
"awsAccessKeyId": "<your-aws-access-key-id>", | |
"awsSecretAccessKey": "<your-aws-secret-access-key>", | |
"awsRegion": "<your-aws-region>" | |
} | |
}, | |
"example3": { | |
"value": { | |
"type": "gcp-kms", | |
"gcpApplicationProjectId": "<your-gcp-application-project-id>", | |
"gcpKmsLocationId": "<your-gcp-kms-location-id>", | |
"gcpKmsKeyRingId": "<your-gcp-key-ring-id>", | |
"gcpApplicationCredentialEmail": "<your-gcp-application-credential-email>", | |
"gcpApplicationCredentialPrivateKey": "<your-gcp-application-credential-private-key>" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"local" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:aws-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:gcp-kms" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"smart:local" | |
] | |
} | |
] | |
}, | |
"awsAccessKeyId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"awsRegion": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpApplicationProjectId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsLocationId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpKmsKeyRingId": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gcpApplicationCredentialEmail": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"type", | |
"awsAccessKeyId", | |
"awsRegion", | |
"gcpApplicationProjectId", | |
"gcpKmsLocationId", | |
"gcpKmsKeyRingId", | |
"gcpApplicationCredentialEmail" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/chains": { | |
"get": { | |
"operationId": "getChainsConfiguration", | |
"summary": "Get chain overrides configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get chain overrides configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"chain": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"rpc": { | |
"type": "array", | |
"items": { | |
"description": "RPC URL", | |
"type": "string" | |
} | |
}, | |
"nativeCurrency": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Native currency name", | |
"type": "string" | |
}, | |
"symbol": { | |
"description": "Native currency symbol", | |
"type": "string" | |
}, | |
"decimals": { | |
"description": "Native currency decimals", | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"decimals" | |
] | |
}, | |
"shortName": { | |
"description": "Chain short name", | |
"type": "string" | |
}, | |
"chainId": { | |
"description": "Chain ID", | |
"type": "integer" | |
}, | |
"testnet": { | |
"description": "Is testnet", | |
"type": "boolean" | |
}, | |
"slug": { | |
"description": "Chain slug", | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateChainsConfiguration", | |
"summary": "Update chain overrides configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update chain overrides configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"chainOverrides": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"chain": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"rpc": { | |
"type": "array", | |
"items": { | |
"description": "RPC URL", | |
"type": "string" | |
} | |
}, | |
"nativeCurrency": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Native currency name", | |
"type": "string" | |
}, | |
"symbol": { | |
"description": "Native currency symbol", | |
"type": "string" | |
}, | |
"decimals": { | |
"description": "Native currency decimals", | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"decimals" | |
] | |
}, | |
"shortName": { | |
"description": "Chain short name", | |
"type": "string" | |
}, | |
"chainId": { | |
"description": "Chain ID", | |
"type": "integer" | |
}, | |
"testnet": { | |
"description": "Is testnet", | |
"type": "boolean" | |
}, | |
"slug": { | |
"description": "Chain slug", | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"required": [ | |
"chainOverrides" | |
] | |
}, | |
"example": { | |
"chainOverrides": [ | |
{ | |
"name": "Localhost", | |
"chain": "ETH", | |
"rpc": [ | |
"http://localhost:8545" | |
], | |
"nativeCurrency": { | |
"name": "Ether", | |
"symbol": "ETH", | |
"decimals": 18 | |
}, | |
"chainId": 1337, | |
"slug": "localhost" | |
} | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"chain": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"rpc": { | |
"type": "array", | |
"items": { | |
"description": "RPC URL", | |
"type": "string" | |
} | |
}, | |
"nativeCurrency": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Native currency name", | |
"type": "string" | |
}, | |
"symbol": { | |
"description": "Native currency symbol", | |
"type": "string" | |
}, | |
"decimals": { | |
"description": "Native currency decimals", | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"decimals" | |
] | |
}, | |
"shortName": { | |
"description": "Chain short name", | |
"type": "string" | |
}, | |
"chainId": { | |
"description": "Chain ID", | |
"type": "integer" | |
}, | |
"testnet": { | |
"description": "Is testnet", | |
"type": "boolean" | |
}, | |
"slug": { | |
"description": "Chain slug", | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/transactions": { | |
"get": { | |
"operationId": "getTransactionConfiguration", | |
"summary": "Get transaction processing configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get transactions processing configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"minTxsToProcess": { | |
"type": "integer" | |
}, | |
"maxTxsToProcess": { | |
"type": "integer" | |
}, | |
"minedTxListenerCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxTxsToUpdate": { | |
"type": "integer" | |
}, | |
"retryTxListenerCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minEllapsedBlocksBeforeRetry": { | |
"type": "integer" | |
}, | |
"maxFeePerGasForRetries": { | |
"type": "string" | |
}, | |
"maxPriorityFeePerGasForRetries": { | |
"type": "string" | |
}, | |
"maxRetriesPerTx": { | |
"type": "integer" | |
}, | |
"clearCacheCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"minTxsToProcess", | |
"maxTxsToProcess", | |
"minedTxListenerCronSchedule", | |
"maxTxsToUpdate", | |
"retryTxListenerCronSchedule", | |
"minEllapsedBlocksBeforeRetry", | |
"maxFeePerGasForRetries", | |
"maxPriorityFeePerGasForRetries", | |
"maxRetriesPerTx", | |
"clearCacheCronSchedule" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateTransactionConfiguration", | |
"summary": "Update transaction processing configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update transaction processing configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"maxTxsToProcess": { | |
"minimum": 1, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"maxTxsToUpdate": { | |
"minimum": 1, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"minedTxListenerCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryTxListenerCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minEllapsedBlocksBeforeRetry": { | |
"minimum": 1, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"maxFeePerGasForRetries": { | |
"type": "string" | |
}, | |
"maxRetriesPerTx": { | |
"minimum": 0, | |
"maximum": 10000, | |
"type": "integer" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"minTxsToProcess": { | |
"type": "integer" | |
}, | |
"maxTxsToProcess": { | |
"type": "integer" | |
}, | |
"minedTxListenerCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxTxsToUpdate": { | |
"type": "integer" | |
}, | |
"retryTxListenerCronSchedule": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minEllapsedBlocksBeforeRetry": { | |
"type": "integer" | |
}, | |
"maxFeePerGasForRetries": { | |
"type": "string" | |
}, | |
"maxPriorityFeePerGasForRetries": { | |
"type": "string" | |
}, | |
"maxRetriesPerTx": { | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"minTxsToProcess", | |
"maxTxsToProcess", | |
"minedTxListenerCronSchedule", | |
"maxTxsToUpdate", | |
"retryTxListenerCronSchedule", | |
"minEllapsedBlocksBeforeRetry", | |
"maxFeePerGasForRetries", | |
"maxPriorityFeePerGasForRetries", | |
"maxRetriesPerTx" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/auth": { | |
"get": { | |
"operationId": "getAuthConfiguration", | |
"summary": "Get auth configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get auth configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"domain": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"domain" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateAuthConfiguration", | |
"summary": "Update auth configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update auth configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"domain": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"domain" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"domain": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"domain" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/backend-wallet-balance": { | |
"get": { | |
"operationId": "getBackendWalletBalanceConfiguration", | |
"summary": "Get wallet-balance configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get wallet-balance configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"minWalletBalance": { | |
"description": "Minimum wallet balance in wei", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"minWalletBalance" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateBackendWalletBalanceConfiguration", | |
"summary": "Update backend wallet balance configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update backend wallet balance configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"minWalletBalance": { | |
"description": "Minimum wallet balance in wei", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"minWalletBalance": { | |
"description": "Minimum wallet balance in wei", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"minWalletBalance" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/cors": { | |
"get": { | |
"operationId": "getCorsConfiguration", | |
"summary": "Get CORS configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get CORS configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "addUrlToCorsConfiguration", | |
"summary": "Add a CORS URL", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Add a URL to allow client-side calls to Engine", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"urlsToAdd": { | |
"type": "array", | |
"items": { | |
"description": "Comma separated list of origins that will call Engine", | |
"minLength": 1, | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"urlsToAdd" | |
] | |
}, | |
"example": { | |
"urlsToAdd": [ | |
"https://example.com", | |
"https://subdomain.example.com" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"delete": { | |
"operationId": "removeUrlToCorsConfiguration", | |
"summary": "Remove CORS URLs", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Remove URLs from CORS configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"urlsToRemove": { | |
"type": "array", | |
"items": { | |
"description": "Comma separated list of origins to remove", | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"urlsToRemove" | |
] | |
}, | |
"example": { | |
"urlsToRemove": [ | |
"https://example.com", | |
"https://subdomain.example.com" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"put": { | |
"operationId": "setUrlsToCorsConfiguration", | |
"summary": "Set CORS URLs", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Replaces the CORS URLs to allow client-side calls to Engine", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"urls": { | |
"type": "array", | |
"items": { | |
"description": "Comma separated list of origins that will call Engine", | |
"minLength": 1, | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"urls" | |
] | |
}, | |
"example": { | |
"urls": [ | |
"https://example.com", | |
"https://subdomain.example.com" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/cache": { | |
"get": { | |
"operationId": "getCacheConfiguration", | |
"summary": "Get cache configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get cache configuration", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"clearCacheCronSchedule": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"clearCacheCronSchedule" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateCacheConfiguration", | |
"summary": "Update cache configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update cache configuration", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"clearCacheCronSchedule": { | |
"description": "Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10", | |
"default": "*/30 * * * * *", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"clearCacheCronSchedule" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"clearCacheCronSchedule": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"clearCacheCronSchedule" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/contract-subscriptions": { | |
"get": { | |
"operationId": "getContractSubscriptionsConfiguration", | |
"summary": "Get Contract Subscriptions configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get the configuration for Contract Subscriptions", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"maxBlocksToIndex": { | |
"type": "integer" | |
}, | |
"contractSubscriptionsRequeryDelaySeconds": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"maxBlocksToIndex", | |
"contractSubscriptionsRequeryDelaySeconds" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"post": { | |
"operationId": "updateContractSubscriptionsConfiguration", | |
"summary": "Update Contract Subscriptions configuration", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Update the configuration for Contract Subscriptions", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"maxBlocksToIndex": { | |
"minimum": 1, | |
"maximum": 100, | |
"type": "integer" | |
}, | |
"contractSubscriptionsRequeryDelaySeconds": { | |
"description": "Requery after one or more delays. Use comma-separated positive integers. Example: \"2,10\" means requery after 2s and 10s.", | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"maxBlocksToIndex": { | |
"type": "integer" | |
}, | |
"contractSubscriptionsRequeryDelaySeconds": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"maxBlocksToIndex", | |
"contractSubscriptionsRequeryDelaySeconds" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/configuration/ip-allowlist": { | |
"get": { | |
"operationId": "getIpAllowlist", | |
"summary": "Get Allowed IP Addresses", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Get the list of allowed IP addresses", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"put": { | |
"operationId": "setIpAllowlist", | |
"summary": "Set IP Allowlist", | |
"tags": [ | |
"Configuration" | |
], | |
"description": "Replaces the IP Allowlist array to allow calls to Engine", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"ips": { | |
"description": "Array of IP addresses to allowlist", | |
"type": "array", | |
"items": { | |
"minLength": 7, | |
"description": "IP address as a string", | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"ips" | |
] | |
}, | |
"example": { | |
"ips": [ | |
"8.8.8.8", | |
"172.217.255.255" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/webhooks/get-all": { | |
"get": { | |
"operationId": "listWebhooks", | |
"summary": "Get all webhooks configured", | |
"tags": [ | |
"Webhooks" | |
], | |
"description": "Get all webhooks configuration data set up on Engine", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"url": { | |
"type": "string" | |
}, | |
"name": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"secret": { | |
"type": "string" | |
}, | |
"eventType": { | |
"type": "string" | |
}, | |
"active": { | |
"type": "boolean" | |
}, | |
"createdAt": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id", | |
"url", | |
"name", | |
"eventType", | |
"active", | |
"createdAt" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/webhooks/create": { | |
"post": { | |
"operationId": "createWebhook", | |
"summary": "Create a webhook", | |
"tags": [ | |
"Webhooks" | |
], | |
"description": "Create a webhook to call when a specific Engine event occurs.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"url": { | |
"description": "Webhook URL. Non-HTTPS URLs are not supported.", | |
"type": "string", | |
"example": "https://example.com/webhook" | |
}, | |
"name": { | |
"minLength": 3, | |
"type": "string" | |
}, | |
"eventType": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"all_transactions" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"backend_wallet_balance" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"auth" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"contract_subscription" | |
] | |
} | |
] | |
} | |
}, | |
"required": [ | |
"url", | |
"eventType" | |
] | |
}, | |
"example": { | |
"url": "https://example.com/webhook", | |
"name": "Notify of transaction updates", | |
"secret": "...", | |
"eventType": "all_transactions", | |
"active": true, | |
"createdAt": "2024-10-02T02:07:27.255Z", | |
"id": 42 | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"url": { | |
"type": "string" | |
}, | |
"name": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"secret": { | |
"type": "string" | |
}, | |
"eventType": { | |
"type": "string" | |
}, | |
"active": { | |
"type": "boolean" | |
}, | |
"createdAt": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id", | |
"url", | |
"name", | |
"eventType", | |
"active", | |
"createdAt" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/webhooks/revoke": { | |
"post": { | |
"operationId": "revoke", | |
"summary": "Revoke webhook", | |
"tags": [ | |
"Webhooks" | |
], | |
"description": "Revoke a Webhook", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"minimum": 0, | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/webhooks/event-types": { | |
"get": { | |
"operationId": "getEventTypes", | |
"summary": "Get webhooks event types", | |
"tags": [ | |
"Webhooks" | |
], | |
"description": "Get the all the webhooks event types", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled_transaction" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"all_transactions" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"backend_wallet_balance" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"auth" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"contract_subscription" | |
] | |
} | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/webhooks/{webhookId}/test": { | |
"post": { | |
"operationId": "testWebhook", | |
"summary": "Test webhook", | |
"tags": [ | |
"Webhooks" | |
], | |
"description": "Send a test payload to a webhook.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^\\d+$" | |
}, | |
"example": "42", | |
"in": "path", | |
"name": "webhookId", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"ok": { | |
"type": "boolean" | |
}, | |
"status": { | |
"type": "number" | |
}, | |
"body": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"ok", | |
"status", | |
"body" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/permissions/get-all": { | |
"get": { | |
"operationId": "listAdmins", | |
"summary": "Get all permissions", | |
"tags": [ | |
"Permissions" | |
], | |
"description": "Get all users with their corresponding permissions", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"permissions": { | |
"type": "string" | |
}, | |
"label": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"walletAddress", | |
"permissions", | |
"label" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/permissions/grant": { | |
"post": { | |
"operationId": "grantAdmin", | |
"summary": "Grant permissions to user", | |
"tags": [ | |
"Permissions" | |
], | |
"description": "Grant permissions to a user", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"permissions": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"ADMIN" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"OWNER" | |
] | |
} | |
] | |
}, | |
"label": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"walletAddress", | |
"permissions" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/permissions/revoke": { | |
"post": { | |
"operationId": "revokeAdmin", | |
"summary": "Revoke permissions from user", | |
"tags": [ | |
"Permissions" | |
], | |
"description": "Revoke a user's permissions", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
}, | |
"required": [ | |
"walletAddress" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/access-tokens/get-all": { | |
"get": { | |
"operationId": "listAccessTokens", | |
"summary": "Get all access tokens", | |
"tags": [ | |
"Access Tokens" | |
], | |
"description": "Get all access tokens", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"tokenMask": { | |
"type": "string" | |
}, | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"createdAt": { | |
"type": "string" | |
}, | |
"expiresAt": { | |
"type": "string" | |
}, | |
"label": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"id", | |
"tokenMask", | |
"walletAddress", | |
"createdAt", | |
"expiresAt", | |
"label" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/access-tokens/create": { | |
"post": { | |
"operationId": "createAccessToken", | |
"summary": "Create a new access token", | |
"tags": [ | |
"Access Tokens" | |
], | |
"description": "Create a new access token", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"label": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"tokenMask": { | |
"type": "string" | |
}, | |
"walletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"createdAt": { | |
"type": "string" | |
}, | |
"expiresAt": { | |
"type": "string" | |
}, | |
"label": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accessToken": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id", | |
"tokenMask", | |
"walletAddress", | |
"createdAt", | |
"expiresAt", | |
"label", | |
"accessToken" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/access-tokens/revoke": { | |
"post": { | |
"operationId": "revokeAccessTokens", | |
"summary": "Revoke an access token", | |
"tags": [ | |
"Access Tokens" | |
], | |
"description": "Revoke an access token", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/access-tokens/update": { | |
"post": { | |
"operationId": "updateAccessTokens", | |
"summary": "Update an access token", | |
"tags": [ | |
"Access Tokens" | |
], | |
"description": "Update an access token", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"label": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/keypair/get-all": { | |
"get": { | |
"operationId": "list", | |
"summary": "List public keys", | |
"tags": [ | |
"Keypair" | |
], | |
"description": "List the public keys configured with Engine", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"hash": { | |
"description": "A unique identifier for the keypair", | |
"type": "string" | |
}, | |
"publicKey": { | |
"description": "The public key", | |
"type": "string" | |
}, | |
"algorithm": { | |
"description": "The keypair algorithm.", | |
"type": "string" | |
}, | |
"label": { | |
"description": "A description for the keypair.", | |
"type": "string" | |
}, | |
"createdAt": { | |
"type": "string", | |
"format": "date", | |
"description": "When the keypair was added" | |
}, | |
"updatedAt": { | |
"type": "string", | |
"format": "date", | |
"description": "When the keypair was updated" | |
} | |
}, | |
"required": [ | |
"hash", | |
"publicKey", | |
"algorithm", | |
"createdAt", | |
"updatedAt" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/keypair/add": { | |
"post": { | |
"operationId": "add", | |
"summary": "Add public key", | |
"tags": [ | |
"Keypair" | |
], | |
"description": "Add the public key for a keypair", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"publicKey": { | |
"description": "The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'.", | |
"type": "string" | |
}, | |
"algorithm": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"RS256" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"RS384" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"RS512" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"ES256" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"ES384" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"ES512" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"PS256" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"PS384" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"PS512" | |
] | |
} | |
] | |
}, | |
"label": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"publicKey", | |
"algorithm" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"keypair": { | |
"type": "object", | |
"properties": { | |
"hash": { | |
"description": "A unique identifier for the keypair", | |
"type": "string" | |
}, | |
"publicKey": { | |
"description": "The public key", | |
"type": "string" | |
}, | |
"algorithm": { | |
"description": "The keypair algorithm.", | |
"type": "string" | |
}, | |
"label": { | |
"description": "A description for the keypair.", | |
"type": "string" | |
}, | |
"createdAt": { | |
"type": "string", | |
"format": "date", | |
"description": "When the keypair was added" | |
}, | |
"updatedAt": { | |
"type": "string", | |
"format": "date", | |
"description": "When the keypair was updated" | |
} | |
}, | |
"required": [ | |
"hash", | |
"publicKey", | |
"algorithm", | |
"createdAt", | |
"updatedAt" | |
] | |
} | |
}, | |
"required": [ | |
"keypair" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/auth/keypair/remove": { | |
"post": { | |
"operationId": "remove", | |
"summary": "Remove public key", | |
"tags": [ | |
"Keypair" | |
], | |
"description": "Remove the public key for a keypair", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"hash": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"hash" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/chain/get": { | |
"get": { | |
"operationId": "getChain", | |
"summary": "Get chain details", | |
"tags": [ | |
"Chain" | |
], | |
"description": "Get details about a chain.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "query", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"chain": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"rpc": { | |
"type": "array", | |
"items": { | |
"description": "RPC URL", | |
"type": "string" | |
} | |
}, | |
"nativeCurrency": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Native currency name", | |
"type": "string" | |
}, | |
"symbol": { | |
"description": "Native currency symbol", | |
"type": "string" | |
}, | |
"decimals": { | |
"description": "Native currency decimals", | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"decimals" | |
] | |
}, | |
"shortName": { | |
"description": "Chain short name", | |
"type": "string" | |
}, | |
"chainId": { | |
"description": "Chain ID", | |
"type": "integer" | |
}, | |
"testnet": { | |
"description": "Is testnet", | |
"type": "boolean" | |
}, | |
"slug": { | |
"description": "Chain slug", | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
}, | |
"example": { | |
"result": { | |
"name": "Polygon Amoy Testnet", | |
"chain": "Polygon", | |
"rpc": [ | |
"https://7117.rpc.thirdweb.com/${THIRDWEB_API_SECRET_KEY}" | |
], | |
"nativeCurrency": { | |
"name": "MATIC", | |
"symbol": "MATIC", | |
"decimals": 18 | |
}, | |
"shortName": "amoy", | |
"chainId": 7117, | |
"testnet": true, | |
"slug": "polygon-amoy-testnet" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/chain/get-all": { | |
"get": { | |
"operationId": "listChains", | |
"summary": "Get all chain details", | |
"tags": [ | |
"Chain" | |
], | |
"description": "Get details about all supported chains.", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"chain": { | |
"description": "Chain name", | |
"type": "string" | |
}, | |
"rpc": { | |
"type": "array", | |
"items": { | |
"description": "RPC URL", | |
"type": "string" | |
} | |
}, | |
"nativeCurrency": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"description": "Native currency name", | |
"type": "string" | |
}, | |
"symbol": { | |
"description": "Native currency symbol", | |
"type": "string" | |
}, | |
"decimals": { | |
"description": "Native currency decimals", | |
"type": "number" | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"decimals" | |
] | |
}, | |
"shortName": { | |
"description": "Chain short name", | |
"type": "string" | |
}, | |
"chainId": { | |
"description": "Chain ID", | |
"type": "integer" | |
}, | |
"testnet": { | |
"description": "Is testnet", | |
"type": "boolean" | |
}, | |
"slug": { | |
"description": "Chain slug", | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
}, | |
"example": { | |
"result": [ | |
{ | |
"name": "Ethereum Mainnet", | |
"chain": "ETH", | |
"rpc": [ | |
"https://ethereum.rpc.thirdweb.com/${THIRDWEB_API_SECRET_KEY}" | |
], | |
"nativeCurrency": { | |
"name": "Ether", | |
"symbol": "ETH", | |
"decimals": 18 | |
}, | |
"shortName": "eth", | |
"chainId": 1, | |
"testnet": false, | |
"slug": "ethereum" | |
}, | |
{ | |
"name": "Ropsten", | |
"chain": "ETH", | |
"rpc": [ | |
"https://ropsten.rpc.thirdweb.com/${THIRDWEB_API_SECRET_KEY}" | |
], | |
"nativeCurrency": { | |
"name": "Ropsten Ether", | |
"symbol": "ETH", | |
"decimals": 18 | |
}, | |
"shortName": "rop", | |
"chainId": 3, | |
"testnet": true, | |
"slug": "ropsten" | |
} | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/relayer/get-all": { | |
"get": { | |
"operationId": "listRelayers", | |
"summary": "Get all meta-transaction relayers", | |
"tags": [ | |
"Relayer" | |
], | |
"description": "Get all meta-transaction relayers", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"name": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"chainId": { | |
"type": "string" | |
}, | |
"backendWalletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"allowedContracts": { | |
"anyOf": [ | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"allowedForwarders": { | |
"anyOf": [ | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"id", | |
"name", | |
"chainId", | |
"backendWalletAddress", | |
"allowedContracts", | |
"allowedForwarders" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/relayer/create": { | |
"post": { | |
"operationId": "createRelayer", | |
"summary": "Create a new meta-transaction relayer", | |
"tags": [ | |
"Relayer" | |
], | |
"description": "Create a new meta-transaction relayer", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"chain": { | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred.", | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$", | |
"example": "7117" | |
}, | |
"backendWalletAddress": { | |
"description": "The address of the backend wallet to use for relaying transactions.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"allowedContracts": { | |
"type": "array", | |
"items": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
}, | |
"allowedForwarders": { | |
"type": "array", | |
"items": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
}, | |
"required": [ | |
"chain", | |
"backendWalletAddress" | |
] | |
}, | |
"example": { | |
"name": "My relayer", | |
"chain": "mainnet", | |
"backendWalletAddress": "0", | |
"allowedContracts": [ | |
"0x1234...." | |
], | |
"allowedForwarders": [ | |
"0x1234..." | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"relayerId": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"relayerId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/relayer/revoke": { | |
"post": { | |
"operationId": "revokeRelayer", | |
"summary": "Revoke a relayer", | |
"tags": [ | |
"Relayer" | |
], | |
"description": "Revoke a relayer", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/relayer/update": { | |
"post": { | |
"operationId": "updateRelayer", | |
"summary": "Update a relayer", | |
"tags": [ | |
"Relayer" | |
], | |
"description": "Update a relayer", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"chain": { | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred.", | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$", | |
"example": "7117" | |
}, | |
"backendWalletAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"allowedContracts": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"allowedForwarders": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"id" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"success" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/relayer/{relayerId}": { | |
"post": { | |
"operationId": "relay", | |
"summary": "Relay a meta-transaction", | |
"tags": [ | |
"Relayer" | |
], | |
"description": "Relay an EIP-2771 meta-transaction", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"anyOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string", | |
"enum": [ | |
"forward" | |
] | |
}, | |
"request": { | |
"type": "object", | |
"properties": { | |
"from": { | |
"type": "string" | |
}, | |
"to": { | |
"type": "string" | |
}, | |
"value": { | |
"type": "string" | |
}, | |
"gas": { | |
"type": "string" | |
}, | |
"nonce": { | |
"type": "string" | |
}, | |
"data": { | |
"type": "string" | |
}, | |
"chainid": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"from", | |
"to", | |
"value", | |
"gas", | |
"nonce", | |
"data" | |
] | |
}, | |
"signature": { | |
"type": "string" | |
}, | |
"forwarderAddress": { | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
} | |
}, | |
"required": [ | |
"type", | |
"request", | |
"signature", | |
"forwarderAddress" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string", | |
"enum": [ | |
"permit" | |
] | |
}, | |
"request": { | |
"type": "object", | |
"properties": { | |
"to": { | |
"type": "string" | |
}, | |
"owner": { | |
"type": "string" | |
}, | |
"spender": { | |
"type": "string" | |
}, | |
"value": { | |
"type": "string" | |
}, | |
"nonce": { | |
"type": "string" | |
}, | |
"deadline": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"to", | |
"owner", | |
"spender", | |
"value", | |
"nonce", | |
"deadline" | |
] | |
}, | |
"signature": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"type", | |
"request", | |
"signature" | |
] | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string", | |
"enum": [ | |
"execute-meta-transaction" | |
] | |
}, | |
"request": { | |
"type": "object", | |
"properties": { | |
"from": { | |
"type": "string" | |
}, | |
"to": { | |
"type": "string" | |
}, | |
"data": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"from", | |
"to", | |
"data" | |
] | |
}, | |
"signature": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"type", | |
"request", | |
"signature" | |
] | |
} | |
] | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "path", | |
"name": "relayerId", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/read": { | |
"get": { | |
"operationId": "read", | |
"summary": "Read from contract", | |
"tags": [ | |
"Contract" | |
], | |
"description": "Call a read function on a contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"example": "balanceOf", | |
"in": "query", | |
"name": "functionName", | |
"required": true, | |
"description": "Name of the function to call on Contract" | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"example": "", | |
"in": "query", | |
"name": "args", | |
"required": false, | |
"description": "Arguments for the function. Comma Separated" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": {} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/write": { | |
"post": { | |
"operationId": "write", | |
"summary": "Write to contract", | |
"tags": [ | |
"Contract" | |
], | |
"description": "Call a write function on a contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"functionName": { | |
"description": "The function to call on the contract. It is highly recommended to provide a full function signature, such as \"function mintTo(address to, uint256 amount)\", to avoid ambiguity and to skip ABI resolution.", | |
"type": "string", | |
"example": "function mintTo(address to, uint256 amount)" | |
}, | |
"args": { | |
"description": "An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: BigNumber, bigint, Date objects", | |
"type": "array", | |
"items": {}, | |
"example": [ | |
1730380951, | |
"0x09530565aC1Ce08C3621f5B24Fca6d9a76574620", | |
[ | |
"a", | |
"b", | |
"c" | |
] | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
}, | |
"abi": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"inputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"outputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"stateMutability": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"type" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"functionName", | |
"args" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/events/get-all": { | |
"get": { | |
"operationId": "getAllEvents", | |
"summary": "Get all events", | |
"tags": [ | |
"Contract-Events" | |
], | |
"description": "Get a list of all blockchain events for this contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"default": "0", | |
"anyOf": [ | |
{ | |
"minimum": 0, | |
"type": "integer" | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"in": "query", | |
"name": "fromBlock", | |
"required": false | |
}, | |
{ | |
"schema": { | |
"default": "latest", | |
"anyOf": [ | |
{ | |
"minimum": 0, | |
"type": "integer" | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"in": "query", | |
"name": "toBlock", | |
"required": false | |
}, | |
{ | |
"schema": { | |
"default": "desc", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"asc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"desc" | |
] | |
} | |
] | |
}, | |
"in": "query", | |
"name": "order", | |
"required": false | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"additionalProperties": {} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": [ | |
{ | |
"eventName": "Transfer", | |
"data": { | |
"from": "0x0000000000000000000000000000000000000000", | |
"to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", | |
"tokenId": { | |
"type": "BigNumber", | |
"hex": "0x01" | |
} | |
}, | |
"transaction": { | |
"blockNumber": 35439713, | |
"blockHash": "0x0413d9c88a664f46b54cd47d66073f47114fa3b0183ca5f713d4567d345de4a1", | |
"transactionIndex": 6, | |
"removed": false, | |
"address": "0xc8be6265C06aC376876b4F62670adB3c4d72EABA", | |
"data": "0x", | |
"topics": [ | |
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", | |
"0x0000000000000000000000000000000000000000000000000000000000000000", | |
"0x0000000000000000000000001946267d81fb8adeeea28e6b98bcd446c8248473", | |
"0x0000000000000000000000000000000000000000000000000000000000000001" | |
], | |
"transactionHash": "0x6ee82341f1e09511e9502eea45e0ca9e52dd0295a515401834d0d05a5e802da5", | |
"logIndex": 13, | |
"event": "Transfer", | |
"eventSignature": "Transfer(address,address,uint256)" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/events/get": { | |
"post": { | |
"operationId": "getEvents", | |
"summary": "Get events", | |
"tags": [ | |
"Contract-Events" | |
], | |
"description": "Get a list of specific blockchain events emitted from this contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Specify the from and to block numbers to get events for, defaults to all blocks", | |
"type": "object", | |
"properties": { | |
"eventName": { | |
"type": "string", | |
"example": "Transfer" | |
}, | |
"fromBlock": { | |
"default": "0", | |
"anyOf": [ | |
{ | |
"minimum": 0, | |
"type": "integer" | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"toBlock": { | |
"default": "latest", | |
"anyOf": [ | |
{ | |
"minimum": 0, | |
"type": "integer" | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"order": { | |
"default": "desc", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"asc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"desc" | |
] | |
} | |
] | |
}, | |
"filters": { | |
"type": "object", | |
"properties": {} | |
} | |
}, | |
"required": [ | |
"eventName" | |
] | |
} | |
} | |
}, | |
"required": true, | |
"description": "Specify the from and to block numbers to get events for, defaults to all blocks" | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"additionalProperties": {} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"eventName": "ApprovalForAll", | |
"data": { | |
"owner": "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", | |
"operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", | |
"approved": true | |
}, | |
"transaction": { | |
"blockNumber": 36010321, | |
"blockHash": "0x2c388fe429215b6c2934746410a52a3416b7a1725cea6885eaf220f05f50a6ec", | |
"transactionIndex": 19, | |
"removed": false, | |
"address": "0xc8be6265C06aC376876b4F62670adB3c4d72EABA", | |
"data": "0x0000000000000000000000000000000000000000000000000000000000000001", | |
"topics": [ | |
"0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31", | |
"0x000000000000000000000000e79ee09bd47f4f5381dbbacacff2040f2fbc5803", | |
"0x0000000000000000000000003ecdbf3b911d0e9052b64850693888b008e18373" | |
], | |
"transactionHash": "0xa4143253005103e5203554f4e17e90a517591cd2d5e3b3dceabfbfb8fbdca5f9", | |
"logIndex": 55, | |
"event": "ApprovalForAll", | |
"eventSignature": "ApprovalForAll(address,address,bool)" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/metadata/abi": { | |
"get": { | |
"operationId": "getAbi", | |
"summary": "Get ABI", | |
"tags": [ | |
"Contract-Metadata" | |
], | |
"description": "Get the ABI of a contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"inputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"outputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"stateMutability": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"type" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": [ | |
{ | |
"type": "function", | |
"name": "transferFrom", | |
"inputs": [ | |
{ | |
"type": "address", | |
"name": "from" | |
}, | |
{ | |
"type": "address", | |
"name": "to" | |
}, | |
{ | |
"type": "uint256", | |
"name": "tokenId" | |
} | |
] | |
}, | |
{ | |
"type": "event", | |
"name": "Transfer", | |
"inputs": [ | |
{ | |
"type": "address", | |
"name": "from" | |
}, | |
{ | |
"type": "address", | |
"name": "to" | |
}, | |
{ | |
"type": "uint256", | |
"name": "tokenId" | |
} | |
] | |
} | |
] | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/metadata/events": { | |
"get": { | |
"operationId": "getContractEvents", | |
"summary": "Get events", | |
"tags": [ | |
"Contract-Metadata" | |
], | |
"description": "Get details of all events implemented by a contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"inputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"outputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"comment": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"name", | |
"inputs", | |
"outputs" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": [ | |
{ | |
"name": "Approval", | |
"inputs": [ | |
{ | |
"type": "address", | |
"name": "owner" | |
}, | |
{ | |
"type": "address", | |
"name": "approved" | |
}, | |
{ | |
"type": "uint256", | |
"name": "tokenId" | |
} | |
], | |
"outputs": [] | |
}, | |
{ | |
"name": "ApprovalForAll", | |
"inputs": [ | |
{ | |
"type": "address", | |
"name": "owner" | |
}, | |
{ | |
"type": "address", | |
"name": "operator" | |
}, | |
{ | |
"type": "bool", | |
"name": "approved" | |
} | |
], | |
"outputs": [] | |
} | |
] | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/metadata/extensions": { | |
"get": { | |
"operationId": "getExtensions", | |
"summary": "Get extensions", | |
"tags": [ | |
"Contract-Metadata" | |
], | |
"description": "Get all detected extensions for a contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"description": "Array of detected extension names", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": [ | |
"ERC721", | |
"ERC721Burnable", | |
"ERC721Supply", | |
"ERC721LazyMintable", | |
"ERC721Revealable", | |
"ERC721ClaimPhasesV2", | |
"Royalty", | |
"PlatformFee", | |
"PrimarySale", | |
"Permissions", | |
"PermissionsEnumerable", | |
"ContractMetadata", | |
"Ownable", | |
"Gasless" | |
] | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/metadata/functions": { | |
"get": { | |
"operationId": "getFunctions", | |
"summary": "Get functions", | |
"tags": [ | |
"Contract-Metadata" | |
], | |
"description": "Get details of all functions implemented by the contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"inputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"outputs": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
}, | |
"components": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"internalType": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"comment": { | |
"type": "string" | |
}, | |
"signature": { | |
"type": "string" | |
}, | |
"stateMutability": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"name", | |
"inputs", | |
"outputs", | |
"signature", | |
"stateMutability" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": [ | |
{ | |
"name": "balanceOf", | |
"inputs": [ | |
{ | |
"type": "address", | |
"name": "owner" | |
} | |
], | |
"outputs": [ | |
{ | |
"type": "uint256", | |
"name": "" | |
} | |
], | |
"comment": "See {IERC721-balanceOf}.", | |
"signature": "contract.call(\"balanceOf\", owner: string): Promise<BigNumber>", | |
"stateMutability": "view" | |
}, | |
{ | |
"name": "burn", | |
"inputs": [ | |
{ | |
"type": "uint256", | |
"name": "tokenId" | |
} | |
], | |
"outputs": [], | |
"comment": "Burns `tokenId`. See {ERC721-_burn}.", | |
"signature": "contract.call(\"burn\", tokenId: BigNumberish): Promise<TransactionResult>", | |
"stateMutability": "nonpayable" | |
} | |
] | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/roles/get": { | |
"get": { | |
"operationId": "getContractRole", | |
"summary": "Get wallets for role", | |
"tags": [ | |
"Contract-Roles" | |
], | |
"description": "Get all wallets with a specific role for a contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "query", | |
"name": "role", | |
"required": true, | |
"description": "The role to list wallet members" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
}, | |
"example": { | |
"result": [ | |
"0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/roles/get-all": { | |
"get": { | |
"operationId": "listContractRoles", | |
"summary": "Get wallets for all roles", | |
"tags": [ | |
"Contract-Roles" | |
], | |
"description": "Get all wallets in each role for a contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"admin": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"transfer": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"minter": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"pauser": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"lister": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"asset": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"unwrap": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"factory": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"signer": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"admin", | |
"transfer", | |
"minter", | |
"pauser", | |
"lister", | |
"asset", | |
"unwrap", | |
"factory", | |
"signer" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/roles/grant": { | |
"post": { | |
"operationId": "grantContractRole", | |
"summary": "Grant role", | |
"tags": [ | |
"Contract-Roles" | |
], | |
"description": "Grant a role to a specific wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"role": { | |
"description": "The role to grant", | |
"type": "string" | |
}, | |
"address": { | |
"description": "The address to grant the role to", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"role", | |
"address" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/roles/revoke": { | |
"post": { | |
"operationId": "revokeContractRole", | |
"summary": "Revoke role", | |
"tags": [ | |
"Contract-Roles" | |
], | |
"description": "Revoke a role from a specific wallet.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"role": { | |
"description": "The role to revoke", | |
"type": "string" | |
}, | |
"address": { | |
"description": "The address to revoke the role from", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"role", | |
"address" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info": { | |
"get": { | |
"operationId": "getDefaultRoyaltyInfo", | |
"summary": "Get royalty details", | |
"tags": [ | |
"Contract-Royalties" | |
], | |
"description": "Gets the royalty recipient and BPS (basis points) of the smart contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"seller_fee_basis_points": { | |
"description": "The royalty fee in BPS (basis points). 100 = 1%.", | |
"minimum": 0, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"description": "The wallet address that will receive the royalty fees.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
}, | |
"required": [ | |
"seller_fee_basis_points", | |
"fee_recipient" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
}, | |
"example": { | |
"result": { | |
"fee_recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", | |
"seller_fee_basis_points": 100 | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}": { | |
"get": { | |
"operationId": "getTokenRoyaltyInfo", | |
"summary": "Get token royalty details", | |
"tags": [ | |
"Contract-Royalties" | |
], | |
"description": "Gets the royalty recipient and BPS (basis points) of a particular token in the contract.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "path", | |
"name": "tokenId", | |
"required": true | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"seller_fee_basis_points": { | |
"description": "The royalty fee in BPS (basis points). 100 = 1%.", | |
"minimum": 0, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"description": "The wallet address that will receive the royalty fees.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
}, | |
"required": [ | |
"seller_fee_basis_points", | |
"fee_recipient" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
}, | |
"example": { | |
"result": { | |
"fee_recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", | |
"seller_fee_basis_points": 100 | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info": { | |
"post": { | |
"operationId": "setDefaultRoyaltyInfo", | |
"summary": "Set royalty details", | |
"tags": [ | |
"Contract-Royalties" | |
], | |
"description": "Set the royalty recipient and fee for the smart contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"seller_fee_basis_points": { | |
"description": "The royalty fee in BPS (basis points). 100 = 1%.", | |
"minimum": 0, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"description": "The wallet address that will receive the royalty fees.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"seller_fee_basis_points", | |
"fee_recipient" | |
] | |
}, | |
"example": { | |
"fee_recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", | |
"seller_fee_basis_points": 100 | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info": { | |
"post": { | |
"operationId": "setTokenRoyaltyInfo", | |
"summary": "Set token royalty details", | |
"tags": [ | |
"Contract-Royalties" | |
], | |
"description": "Set the royalty recipient and fee for a particular token in the contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"seller_fee_basis_points": { | |
"description": "The royalty fee in BPS (basis points). 100 = 1%.", | |
"minimum": 0, | |
"maximum": 10000, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"description": "The wallet address that will receive the royalty fees.", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"token_id": { | |
"description": "The token ID to set the royalty info for.", | |
"type": "string" | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"token_id" | |
] | |
}, | |
"example": { | |
"fee_recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", | |
"seller_fee_basis_points": 100, | |
"token_id": "0" | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"default": false, | |
"type": "boolean" | |
}, | |
"in": "query", | |
"name": "simulateTx", | |
"required": false, | |
"description": "Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "path", | |
"name": "contractAddress", | |
"required": true, | |
"description": "Contract address" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Queue ID", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/edition": { | |
"post": { | |
"operationId": "deployEdition", | |
"summary": "Deploy Edition", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy an Edition contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Edition", | |
"symbol": "ED", | |
"primary_sale_recipient": "<your-wallet-address>" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/edition-drop": { | |
"post": { | |
"operationId": "deployEditionDrop", | |
"summary": "Deploy Edition Drop", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy an Edition Drop contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"merkle": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Edition Drop", | |
"symbol": "EDD", | |
"primary_sale_recipient": "<your-wallet-address>" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/marketplace-v3": { | |
"post": { | |
"operationId": "deployMarketplaceV3", | |
"summary": "Deploy Marketplace", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Marketplace contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Marketplace" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/multiwrap": { | |
"post": { | |
"operationId": "deployMultiwrap", | |
"summary": "Deploy Multiwrap", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Multiwrap contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Multiwrap", | |
"symbol": "Mw" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/nft-collection": { | |
"post": { | |
"operationId": "deployNFTCollection", | |
"summary": "Deploy NFT Collection", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy an NFT Collection contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My NFT Collection", | |
"symbol": "NFT" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/nft-drop": { | |
"post": { | |
"operationId": "deployNFTDrop", | |
"summary": "Deploy NFT Drop", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy an NFT Drop contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"merkle": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My NFT Drop", | |
"symbol": "NFTD", | |
"primary_sale_recipient": "<your-wallet-address>" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/pack": { | |
"post": { | |
"operationId": "deployPack", | |
"summary": "Deploy Pack", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Pack contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Pack", | |
"symbol": "PACK" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/signature-drop": { | |
"post": { | |
"operationId": "deploySignatureDrop", | |
"summary": "Deploy Signature Drop", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Signature Drop contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"seller_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"merkle": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"seller_fee_basis_points", | |
"fee_recipient", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My NFT Drop", | |
"symbol": "NFTD", | |
"primary_sale_recipient": "<your-wallet-address>" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/split": { | |
"post": { | |
"operationId": "deploySplit", | |
"summary": "Deploy Split", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Split contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"recipients": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"address": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"sharesBps": { | |
"minimum": 0, | |
"maximum": 10000, | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"address", | |
"sharesBps" | |
] | |
} | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"recipients", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Split", | |
"recipients": [ | |
{ | |
"recipient": "0x3EcDBF3B911d0e9052b64850693888b008e18373", | |
"percent": 50 | |
}, | |
{ | |
"recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", | |
"percent": 50 | |
} | |
] | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/token": { | |
"post": { | |
"operationId": "deployToken", | |
"summary": "Deploy Token", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Token contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Token", | |
"symbol": "TKN", | |
"primary_sale_recipient": "<your-wallet-address>" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/token-drop": { | |
"post": { | |
"operationId": "deployTokenDrop", | |
"summary": "Deploy Token Drop", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Token Drop contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"merkle": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
}, | |
"symbol": { | |
"default": "", | |
"type": "string" | |
}, | |
"platform_fee_basis_points": { | |
"maximum": 10000, | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"platform_fee_recipient": { | |
"default": "0x0000000000000000000000000000000000000000", | |
"type": "string" | |
}, | |
"primary_sale_recipient": { | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"symbol", | |
"platform_fee_basis_points", | |
"platform_fee_recipient", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Signature Drop", | |
"symbol": "SIGD", | |
"primary_sale_recipient": "<your-wallet-address>" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/prebuilts/vote": { | |
"post": { | |
"operationId": "deployVote", | |
"summary": "Deploy Vote", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a Vote contract.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"contractMetadata": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"external_link": { | |
"type": "string" | |
}, | |
"app_uri": { | |
"type": "string" | |
}, | |
"defaultAdmin": { | |
"type": "string" | |
}, | |
"voting_delay_in_blocks": { | |
"minimum": 0, | |
"default": 0, | |
"type": "integer" | |
}, | |
"voting_period_in_blocks": { | |
"minimum": 1, | |
"default": 1, | |
"type": "integer" | |
}, | |
"voting_token_address": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
}, | |
"voting_quorum_fraction": { | |
"maximum": 100, | |
"minimum": 0, | |
"default": 0, | |
"type": "number" | |
}, | |
"proposal_token_threshold": { | |
"default": "0", | |
"type": "string" | |
}, | |
"trusted_forwarders": { | |
"default": [], | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"voting_delay_in_blocks", | |
"voting_period_in_blocks", | |
"voting_token_address", | |
"voting_quorum_fraction", | |
"proposal_token_threshold", | |
"trusted_forwarders" | |
] | |
}, | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"contractMetadata" | |
] | |
}, | |
"example": { | |
"contractMetadata": { | |
"name": "My Vote" | |
} | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "A contract or wallet address", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$", | |
"example": "0x000000000000000000000000000000000000dead" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/{chain}/{publisher}/{contractName}": { | |
"post": { | |
"operationId": "deployPublished", | |
"summary": "Deploy published contract", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Deploy a published contract to the blockchain.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"version": { | |
"description": "Version of the contract to deploy. Defaults to latest.", | |
"type": "string" | |
}, | |
"forceDirectDeploy": { | |
"type": "boolean" | |
}, | |
"saltForProxyDeploy": { | |
"type": "string" | |
}, | |
"compilerOptions": { | |
"type": "object", | |
"properties": { | |
"compilerType": { | |
"type": "string", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"solc" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"string" | |
] | |
} | |
], | |
"enum": [ | |
"zksolc" | |
] | |
}, | |
"compilerVersion": { | |
"type": "string" | |
}, | |
"evmVersion": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"compilerType" | |
] | |
}, | |
"constructorParams": { | |
"description": "Constructor arguments for the deployment.", | |
"type": "array", | |
"items": {} | |
}, | |
"txOverrides": { | |
"type": "object", | |
"properties": { | |
"gas": { | |
"type": "string", | |
"pattern": "^\\d+$", | |
"description": "Gas limit for the transaction", | |
"example": "530000" | |
}, | |
"gasPrice": { | |
"description": "Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxFeePerGas": { | |
"description": "Maximum fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"maxPriorityFeePerGas": { | |
"description": "Maximum priority fee per gas", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
}, | |
"timeoutSeconds": { | |
"description": "Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout", | |
"minimum": 1, | |
"maximum": 604800, | |
"type": "integer", | |
"example": "7200" | |
}, | |
"value": { | |
"description": "Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract.", | |
"type": "string", | |
"pattern": "^\\d+$", | |
"example": "50000000000" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"constructorParams" | |
] | |
}, | |
"example": { | |
"constructorParams": [ | |
"0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^[\\w-]{1,50}$" | |
}, | |
"example": "7117", | |
"in": "path", | |
"name": "chain", | |
"required": true, | |
"description": "A chain ID (\"137\") or slug (\"polygon-amoy-testnet\"). Chain ID is preferred." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"example": "deployer.thirdweb.eth", | |
"in": "path", | |
"name": "publisher", | |
"required": true, | |
"description": "Address or ENS of the publisher of the contract" | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"example": "AirdropERC20", | |
"in": "path", | |
"name": "contractName", | |
"required": true, | |
"description": "Name of the published contract to deploy" | |
}, | |
{ | |
"schema": { | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"example": "0x000000000000000000000000000000000000dead", | |
"in": "header", | |
"name": "x-backend-wallet-address", | |
"required": true, | |
"description": "Backend wallet address" | |
}, | |
{ | |
"schema": { | |
"maxLength": 200, | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-idempotency-key", | |
"required": false, | |
"description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-address", | |
"required": false, | |
"description": "Smart account address" | |
}, | |
{ | |
"schema": { | |
"examples": [], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
"in": "header", | |
"name": "x-account-factory-address", | |
"required": false, | |
"description": "Smart account factory address. If omitted, Engine will try to resolve it from the contract." | |
}, | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"in": "header", | |
"name": "x-account-salt", | |
"required": false, | |
"description": "Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"type": "string" | |
}, | |
"deployedAddress": { | |
"description": "Not all contracts return a deployed address.", | |
"type": "string" | |
}, | |
"message": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/deploy/contract-types": { | |
"get": { | |
"operationId": "contractTypes", | |
"summary": "Get contract types", | |
"tags": [ | |
"Deploy" | |
], | |
"description": "Get all prebuilt contract types.", | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"result" | |
] | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/transaction/get-all": { | |
"get": { | |
"operationId": "listTransactions", | |
"summary": "Get all transactions", | |
"tags": [ | |
"Transaction" | |
], | |
"description": "Get all transaction requests.", | |
"parameters": [ | |
{ | |
"schema": { | |
"default": 1, | |
"minimum": 1, | |
"type": "integer" | |
}, | |
"example": 1, | |
"in": "query", | |
"name": "page", | |
"required": true, | |
"description": "Specify the page number." | |
}, | |
{ | |
"schema": { | |
"default": 100, | |
"type": "integer" | |
}, | |
"example": 100, | |
"in": "query", | |
"name": "limit", | |
"required": true, | |
"description": "Specify the number of results to return per page." | |
}, | |
{ | |
"schema": { | |
"default": "queued", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
} | |
] | |
}, | |
"in": "query", | |
"name": "status", | |
"required": true, | |
"description": "The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued'" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"transactions": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"anyOf": [ | |
{ | |
"description": "An identifier for an enqueued blockchain write call", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"status": { | |
"description": "The current state of the transaction.", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
} | |
], | |
"example": "queued" | |
}, | |
"chainId": { | |
"anyOf": [ | |
{ | |
"description": "The chain ID for the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"fromAddress": { | |
"anyOf": [ | |
{ | |
"description": "The backend wallet submitting the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"toAddress": { | |
"anyOf": [ | |
{ | |
"description": "The contract address to be called", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"data": { | |
"anyOf": [ | |
{ | |
"description": "Encoded calldata", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"extension": { | |
"anyOf": [ | |
{ | |
"description": "The extension detected by thirdweb", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"value": { | |
"anyOf": [ | |
{ | |
"description": "The amount of native currency to send", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"nonce": { | |
"anyOf": [ | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "integer" | |
}, | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasLimit": { | |
"anyOf": [ | |
{ | |
"description": "The max gas unit limit", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasPrice": { | |
"anyOf": [ | |
{ | |
"description": "The gas price used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionType": { | |
"anyOf": [ | |
{ | |
"description": "The type of transaction", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"queuedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is enqueued", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is submitted to mempool", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is mined onchain", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cancelledAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transactino is cancelled", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractAddress": { | |
"anyOf": [ | |
{ | |
"description": "The address for a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractType": { | |
"anyOf": [ | |
{ | |
"description": "The type of a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"errorMessage": { | |
"anyOf": [ | |
{ | |
"description": "The error that occurred", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAtBlockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is submitted to mempool", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"blockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is mined", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryCount": { | |
"description": "The number of retry attempts", | |
"type": "integer" | |
}, | |
"retryGasValues": { | |
"anyOf": [ | |
{ | |
"description": "Whether to replace gas values on the next retry", | |
"type": "boolean" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"signerAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountSalt": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountFactoryAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"target": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sender": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"initCode": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"verificationGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"preVerificationGas": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"paymasterAndData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"userOpHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionName": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionArgs": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onChainTxStatus": { | |
"anyOf": [ | |
{ | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onchainStatus": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"success" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"reverted" | |
] | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"effectiveGasPrice": { | |
"anyOf": [ | |
{ | |
"description": "Effective Gas Price", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cumulativeGasUsed": { | |
"anyOf": [ | |
{ | |
"description": "Cumulative Gas Used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"queueId", | |
"status", | |
"chainId", | |
"fromAddress", | |
"toAddress", | |
"data", | |
"extension", | |
"value", | |
"nonce", | |
"gasLimit", | |
"gasPrice", | |
"maxFeePerGas", | |
"maxPriorityFeePerGas", | |
"transactionType", | |
"transactionHash", | |
"queuedAt", | |
"sentAt", | |
"minedAt", | |
"cancelledAt", | |
"deployedContractAddress", | |
"deployedContractType", | |
"errorMessage", | |
"sentAtBlockNumber", | |
"blockNumber", | |
"retryCount", | |
"retryGasValues", | |
"retryMaxFeePerGas", | |
"retryMaxPriorityFeePerGas", | |
"signerAddress", | |
"accountAddress", | |
"accountSalt", | |
"accountFactoryAddress", | |
"target", | |
"sender", | |
"initCode", | |
"callData", | |
"callGasLimit", | |
"verificationGasLimit", | |
"preVerificationGas", | |
"paymasterAndData", | |
"userOpHash", | |
"functionName", | |
"functionArgs", | |
"onChainTxStatus", | |
"onchainStatus", | |
"effectiveGasPrice", | |
"cumulativeGasUsed" | |
] | |
} | |
}, | |
"totalCount": { | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"transactions", | |
"totalCount" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"transactions": [ | |
{ | |
"queueId": "3bb66998-4c99-436c-9753-9dc931214a9b", | |
"chainId": "80001", | |
"fromAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373", | |
"toAddress": "0x365b83d67d5539c6583b9c0266a548926bf216f4", | |
"data": "0xa9059cbb0000000000000000000000003ecdbf3b911d0e9052b64850693888b008e183730000000000000000000000000000000000000000000000000000000000000064", | |
"extension": "none", | |
"value": "0x00", | |
"nonce": 1758, | |
"gasLimit": "39580", | |
"gasPrice": "2008818932", | |
"maxFeePerGas": "2209700838", | |
"maxPriorityFeePerGas": "2008818916", | |
"transactionType": 2, | |
"transactionHash": "0xf11ca950299c9e72b8d6cac8a03623c6e5a43af1d1b0d45b3fd804c129b573f8", | |
"queuedAt": "2023-09-29T18:17:36.929Z", | |
"sentAt": "2023-09-29T18:17:40.832Z", | |
"minedAt": "2023-09-29T18:17:44.000Z", | |
"cancelledAt": null, | |
"deployedContractAddress": null, | |
"deployedContractType": null, | |
"errorMessage": null, | |
"sentAtBlockNumber": 40653754, | |
"blockNumber": 40653756, | |
"status": "mined", | |
"retryCount": 0, | |
"retryGasValues": false, | |
"retryMaxFeePerGas": null, | |
"retryMaxPriorityFeePerGas": null, | |
"signerAddress": null, | |
"accountAddress": null, | |
"target": null, | |
"sender": null, | |
"initCode": null, | |
"callData": null, | |
"callGasLimit": null, | |
"verificationGasLimit": null, | |
"preVerificationGas": null, | |
"paymasterAndData": null, | |
"userOpHash": null, | |
"functionName": "transfer", | |
"functionArgs": "0x3ecdbf3b911d0e9052b64850693888b008e18373,100" | |
} | |
], | |
"totalCount": 1 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/transaction/status/{queueId}": { | |
"get": { | |
"operationId": "status", | |
"summary": "Get transaction status", | |
"tags": [ | |
"Transaction" | |
], | |
"description": "Get the status for a transaction request.", | |
"parameters": [ | |
{ | |
"schema": { | |
"type": "string" | |
}, | |
"example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"in": "path", | |
"name": "queueId", | |
"required": true, | |
"description": "Transaction queue ID" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"anyOf": [ | |
{ | |
"description": "An identifier for an enqueued blockchain write call", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"status": { | |
"description": "The current state of the transaction.", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
} | |
], | |
"example": "queued" | |
}, | |
"chainId": { | |
"anyOf": [ | |
{ | |
"description": "The chain ID for the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"fromAddress": { | |
"anyOf": [ | |
{ | |
"description": "The backend wallet submitting the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"toAddress": { | |
"anyOf": [ | |
{ | |
"description": "The contract address to be called", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"data": { | |
"anyOf": [ | |
{ | |
"description": "Encoded calldata", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"extension": { | |
"anyOf": [ | |
{ | |
"description": "The extension detected by thirdweb", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"value": { | |
"anyOf": [ | |
{ | |
"description": "The amount of native currency to send", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"nonce": { | |
"anyOf": [ | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "integer" | |
}, | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasLimit": { | |
"anyOf": [ | |
{ | |
"description": "The max gas unit limit", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasPrice": { | |
"anyOf": [ | |
{ | |
"description": "The gas price used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionType": { | |
"anyOf": [ | |
{ | |
"description": "The type of transaction", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"queuedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is enqueued", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is submitted to mempool", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is mined onchain", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cancelledAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transactino is cancelled", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractAddress": { | |
"anyOf": [ | |
{ | |
"description": "The address for a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractType": { | |
"anyOf": [ | |
{ | |
"description": "The type of a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"errorMessage": { | |
"anyOf": [ | |
{ | |
"description": "The error that occurred", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAtBlockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is submitted to mempool", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"blockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is mined", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryCount": { | |
"description": "The number of retry attempts", | |
"type": "integer" | |
}, | |
"retryGasValues": { | |
"anyOf": [ | |
{ | |
"description": "Whether to replace gas values on the next retry", | |
"type": "boolean" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"signerAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountSalt": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountFactoryAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"target": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sender": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"initCode": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"verificationGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"preVerificationGas": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"paymasterAndData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"userOpHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionName": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionArgs": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onChainTxStatus": { | |
"anyOf": [ | |
{ | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onchainStatus": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"success" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"reverted" | |
] | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"effectiveGasPrice": { | |
"anyOf": [ | |
{ | |
"description": "Effective Gas Price", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cumulativeGasUsed": { | |
"anyOf": [ | |
{ | |
"description": "Cumulative Gas Used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"queueId", | |
"status", | |
"chainId", | |
"fromAddress", | |
"toAddress", | |
"data", | |
"extension", | |
"value", | |
"nonce", | |
"gasLimit", | |
"gasPrice", | |
"maxFeePerGas", | |
"maxPriorityFeePerGas", | |
"transactionType", | |
"transactionHash", | |
"queuedAt", | |
"sentAt", | |
"minedAt", | |
"cancelledAt", | |
"deployedContractAddress", | |
"deployedContractType", | |
"errorMessage", | |
"sentAtBlockNumber", | |
"blockNumber", | |
"retryCount", | |
"retryGasValues", | |
"retryMaxFeePerGas", | |
"retryMaxPriorityFeePerGas", | |
"signerAddress", | |
"accountAddress", | |
"accountSalt", | |
"accountFactoryAddress", | |
"target", | |
"sender", | |
"initCode", | |
"callData", | |
"callGasLimit", | |
"verificationGasLimit", | |
"preVerificationGas", | |
"paymasterAndData", | |
"userOpHash", | |
"functionName", | |
"functionArgs", | |
"onChainTxStatus", | |
"onchainStatus", | |
"effectiveGasPrice", | |
"cumulativeGasUsed" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"queueId": "a20ed4ce-301d-4251-a7af-86bd88f6c015", | |
"walletAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373", | |
"contractAddress": "0x365b83d67d5539c6583b9c0266a548926bf216f4", | |
"chainId": "80001", | |
"extension": "non-extension", | |
"status": "mined", | |
"encodedInputData": "0xa9059cbb0000000000000000000000001946267d81fb8adeeea28e6b98bcd446c824847300000000000000000000000000000000000000000000000000000000000186a0", | |
"txType": 2, | |
"gasPrice": "1500000017", | |
"gasLimit": "46512", | |
"maxPriorityFeePerGas": "1500000000", | |
"maxFeePerGas": "1500000034", | |
"txHash": "0x6de86da898fa4beb13d965c42bf331ad46cfa061cadf75f69791f31c9d8a4f66", | |
"submittedTxNonce": 698, | |
"createdTimestamp": "2023-08-25T22:42:26.910Z", | |
"txProcessedTimestamp": "2023-08-25T22:42:27.302Z", | |
"txSubmittedTimestamp": "2023-08-25T22:42:28.743Z", | |
"deployedContractAddress": "", | |
"contractType": "", | |
"errorMessage": "", | |
"txMinedTimestamp": "2023-08-25T22:42:33.000Z", | |
"blockNumber": 39398545, | |
"onChainTxStatus": 1 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/transaction/get-all-deployed-contracts": { | |
"get": { | |
"operationId": "getAllDeployedContracts", | |
"summary": "Get all deployment transactions", | |
"tags": [ | |
"Transaction" | |
], | |
"description": "Get all transaction requests to deploy contracts.", | |
"parameters": [ | |
{ | |
"schema": { | |
"default": 1, | |
"minimum": 1, | |
"type": "integer" | |
}, | |
"example": 1, | |
"in": "query", | |
"name": "page", | |
"required": true, | |
"description": "Specify the page number for pagination." | |
}, | |
{ | |
"schema": { | |
"default": 10, | |
"minimum": 1, | |
"type": "integer" | |
}, | |
"example": 10, | |
"in": "query", | |
"name": "limit", | |
"required": true, | |
"description": "Specify the number of transactions to return per page." | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"transactions": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"anyOf": [ | |
{ | |
"description": "An identifier for an enqueued blockchain write call", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"status": { | |
"description": "The current state of the transaction.", | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"queued" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"sent" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"mined" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"errored" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"cancelled" | |
] | |
} | |
], | |
"example": "queued" | |
}, | |
"chainId": { | |
"anyOf": [ | |
{ | |
"description": "The chain ID for the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"fromAddress": { | |
"anyOf": [ | |
{ | |
"description": "The backend wallet submitting the transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"toAddress": { | |
"anyOf": [ | |
{ | |
"description": "The contract address to be called", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"data": { | |
"anyOf": [ | |
{ | |
"description": "Encoded calldata", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"extension": { | |
"anyOf": [ | |
{ | |
"description": "The extension detected by thirdweb", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"value": { | |
"anyOf": [ | |
{ | |
"description": "The amount of native currency to send", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"nonce": { | |
"anyOf": [ | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "integer" | |
}, | |
{ | |
"description": "The nonce used by the backend wallet for this transaction", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasLimit": { | |
"anyOf": [ | |
{ | |
"description": "The max gas unit limit", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"gasPrice": { | |
"anyOf": [ | |
{ | |
"description": "The gas price used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"maxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas (EIP-1559)", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionType": { | |
"anyOf": [ | |
{ | |
"description": "The type of transaction", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"transactionHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"queuedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is enqueued", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is submitted to mempool", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"minedAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transaction is mined onchain", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cancelledAt": { | |
"anyOf": [ | |
{ | |
"description": "When the transactino is cancelled", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractAddress": { | |
"anyOf": [ | |
{ | |
"description": "The address for a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"deployedContractType": { | |
"anyOf": [ | |
{ | |
"description": "The type of a deployed contract", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"errorMessage": { | |
"anyOf": [ | |
{ | |
"description": "The error that occurred", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sentAtBlockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is submitted to mempool", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"blockNumber": { | |
"anyOf": [ | |
{ | |
"description": "The block number when the transaction is mined", | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryCount": { | |
"description": "The number of retry attempts", | |
"type": "integer" | |
}, | |
"retryGasValues": { | |
"anyOf": [ | |
{ | |
"description": "Whether to replace gas values on the next retry", | |
"type": "boolean" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"retryMaxPriorityFeePerGas": { | |
"anyOf": [ | |
{ | |
"description": "The max priority fee per gas to use on retry", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"signerAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountSalt": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"accountFactoryAddress": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"target": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"sender": { | |
"anyOf": [ | |
{ | |
"description": "A contract or wallet address", | |
"examples": [ | |
"0x000000000000000000000000000000000000dead" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{40}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"initCode": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"callGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"verificationGasLimit": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"preVerificationGas": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"paymasterAndData": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"userOpHash": { | |
"anyOf": [ | |
{ | |
"description": "A transaction hash", | |
"examples": [ | |
"0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
], | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionName": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"functionArgs": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onChainTxStatus": { | |
"anyOf": [ | |
{ | |
"type": "integer" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"onchainStatus": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"success" | |
] | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"reverted" | |
] | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"effectiveGasPrice": { | |
"anyOf": [ | |
{ | |
"description": "Effective Gas Price", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
}, | |
"cumulativeGasUsed": { | |
"anyOf": [ | |
{ | |
"description": "Cumulative Gas Used", | |
"type": "string" | |
}, | |
{ | |
"type": "null" | |
} | |
] | |
} | |
}, | |
"required": [ | |
"queueId", | |
"status", | |
"chainId", | |
"fromAddress", | |
"toAddress", | |
"data", | |
"extension", | |
"value", | |
"nonce", | |
"gasLimit", | |
"gasPrice", | |
"maxFeePerGas", | |
"maxPriorityFeePerGas", | |
"transactionType", | |
"transactionHash", | |
"queuedAt", | |
"sentAt", | |
"minedAt", | |
"cancelledAt", | |
"deployedContractAddress", | |
"deployedContractType", | |
"errorMessage", | |
"sentAtBlockNumber", | |
"blockNumber", | |
"retryCount", | |
"retryGasValues", | |
"retryMaxFeePerGas", | |
"retryMaxPriorityFeePerGas", | |
"signerAddress", | |
"accountAddress", | |
"accountSalt", | |
"accountFactoryAddress", | |
"target", | |
"sender", | |
"initCode", | |
"callData", | |
"callGasLimit", | |
"verificationGasLimit", | |
"preVerificationGas", | |
"paymasterAndData", | |
"userOpHash", | |
"functionName", | |
"functionArgs", | |
"onChainTxStatus", | |
"onchainStatus", | |
"effectiveGasPrice", | |
"cumulativeGasUsed" | |
] | |
} | |
}, | |
"totalCount": { | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"transactions", | |
"totalCount" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"transactions": [ | |
{ | |
"queueId": "8fe7d546-2b8b-465e-b0d2-f1cb5d3d0db3", | |
"walletAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373", | |
"contractAddress": "0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0", | |
"chainId": "80001", | |
"extension": "deploy_prebuilt", | |
"status": "submitted", | |
"encodedInputData": "0x11b804ab0000000000000000000000004fa15bae96f5816c268f3b473cf67e223644d536000000000000000000000000000000000000000000000000000000000000006033373131393539310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000284e15916340000000000000000000000003ecdbf3b911d0e9052b64850693888b008e183730000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000003ecdbf3b911d0e9052b64850693888b008e18373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034949490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000349494900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d5553734471664a4879686375686f504e653650374566336547717864466e78516977526d37585a434234724b2f300000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c82bbe41f2cf04e3a8efa18f7032bdd7f6d98a810000000000000000000000009399bb24dbb5c4b782c70c2969f58716ebbd6a3b00000000000000000000000000000000000000000000000000000000", | |
"txType": 2, | |
"gasPrice": "", | |
"gasLimit": "925188", | |
"maxPriorityFeePerGas": "1500000000", | |
"maxFeePerGas": "1500000032", | |
"txHash": "0x383b0ef55b76f1848f81c1016580f83faf3cde9f6affd66f789e741e39861f30", | |
"submittedTxNonce": 111, | |
"createdTimestamp": "2023-06-21T18:05:18.979Z", | |
"txSubmittedTimestamp": "2023-06-21T18:05:21.823Z", | |
"txProcessedTimestamp": "2023-06-21T18:05:21.823Z", | |
"deployedContractAddress": "0x8dE0E40e8a5108Da3e0D65cFc908269fE083DfE7", | |
"contractType": "edition" | |
} | |
], | |
"totalCount": 1 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/transaction/sync-retry": { | |
"post": { | |
"operationId": "syncRetry", | |
"summary": "Retry transaction (synchronous)", | |
"tags": [ | |
"Transaction" | |
], | |
"description": "Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors.", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Transaction queue ID", | |
"type": "string", | |
"example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
}, | |
"maxFeePerGas": { | |
"type": "string" | |
}, | |
"maxPriorityFeePerGas": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"transactionHash": { | |
"description": "A transaction hash", | |
"type": "string", | |
"pattern": "^0x[a-fA-F0-9]{64}$", | |
"example": "0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431" | |
} | |
}, | |
"required": [ | |
"transactionHash" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"transactionHash": "0xc3b437073c164c33f95065fb325e9bc419f306cb39ae8b4ca233f33efaa74ead" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction simulation failed with reason: types/values length mismatch", | |
"code": "INTERNAL_SERVER_ERROR", | |
"statusCode": 500 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/transaction/retry-failed": { | |
"post": { | |
"operationId": "retryFailed", | |
"summary": "Retry failed transaction", | |
"tags": [ | |
"Transaction" | |
], | |
"description": "Retry a failed transaction", | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"queueId": { | |
"description": "Transaction queue ID", | |
"type": "string", | |
"example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" | |
} | |
}, | |
"required": [ | |
"queueId" | |
] | |
} | |
} | |
}, | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "Default Response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"result": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"status": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"message", | |
"status" | |
] | |
} | |
}, | |
"required": [ | |
"result" | |
], | |
"example": { | |
"result": { | |
"message": "Sent transaction to be retried.", | |
"status": "success" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Bad Request", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "", | |
"code": "BAD_REQUEST", | |
"statusCode": 400 | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Not Found", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"example": { | |
"error": { | |
"message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", | |
"code": "NOT_FOUND", | |
"statusCode": 404 | |
} | |
} | |
} | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"content": { | |
"application/json": { | |
"schema": { | |
"description": "Internal Server Error", | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "object", | |
"properties": { | |
"message": { | |
"type": "string" | |
}, | |
"reason": {}, | |
"code": { | |
"type": "string" | |
}, | |
"stack": { | |
"type": "string" | |
}, | |
"statusCode": { | |
"type": "integer" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment