{
  "openapi": "3.0.0",
  "info": {
    "title": "Flow Wallet API",
    "description": "A REST HTTP service that allows a developer to integrate wallet functionality into a larger Flow application infrastructure",
    "version": "0.9.0",
    "contact": {
      "url": "https://github.com/orgs/flow-hydraulics/teams/wallet"
    }
  },
  "servers": [
    {
      "url": "http://localhost:3000/v1"
    }
  ],
  "tags": [
    {
      "name": "Debugging",
      "description": "View useful debugging information about the Wallet API."
    },
    {
      "name": "System",
      "description": "Get and set system wide settings (maintenance mode for example)."
    },
    {
      "name": "Healthcheck",
      "description": "Healthcheck endpoints."
    },
    {
      "name": "Accounts",
      "description": "Create and lists accounts managed by this Wallet API."
    },
    {
      "name": "Account Transactions",
      "description": "Send, list and get transactions for an account."
    },
    {
      "name": "Account Fungible Tokens",
      "description": "Manage fungible tokens for an account."
    },
    {
      "name": "Account Non-Fungible Tokens",
      "description": "Manage fungible tokens for an account."
    },
    {
      "name": "Transactions",
      "description": "Manage transactions sent by the Wallet API."
    },
    {
      "name": "Scripts",
      "description": "Run zero-cost Cadence scripts to read on-chain data."
    },
    {
      "name": "Fungible Tokens",
      "description": "Initialize tokens, withdraw funds and detect deposits of fungible tokens."
    },
    {
      "name": "Non-Fungible Tokens",
      "description": "Initialize non-fungible tokens, transfer NFTs and detect deposits of NFTs."
    },
    {
      "name": "Jobs",
      "description": "View the status of asynchronous tasks being completed by the Wallet API."
    },
    {
      "name": "Watchlist",
      "description": "View info for non-custodial accounts of interest."
    },
    {
      "name": "Ops",
      "description": "System operations and admin jobs."
    }
  ],
  "paths": {
    "/debug": {
      "get": {
        "summary": "Get debug information about the running instance.",
        "operationId": "getInstanceDebugInfo",
        "tags": [
          "Debugging"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/debugInfo"
                }
              }
            }
          }
        }
      }
    },
    "/system/settings": {
      "get": {
        "summary": "Get system settings",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "type": "object",
                  "properties": {
                    "maintenanceMode": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "maintenanceMode"
                  ],
                  "x-examples": {
                    "example-1": {
                      "maintenanceMode": false
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "maintenanceMode": true
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-system-settings",
        "description": "Get system wide settings."
      },
      "post": {
        "summary": "Set system settings",
        "operationId": "post-system-settings",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "type": "object",
                  "properties": {
                    "maintenanceMode": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "maintenanceMode"
                  ],
                  "x-examples": {
                    "example-1": {
                      "maintenanceMode": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Set system wide settings.",
        "tags": [
          "System"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "",
                "type": "object",
                "properties": {
                  "maintenanceMode": {
                    "type": "boolean"
                  }
                },
                "x-examples": {
                  "example-1": {
                    "maintenanceMode": false
                  }
                }
              },
              "examples": {
                "example-1": {
                  "value": {
                    "maintenanceMode": true
                  }
                }
              }
            }
          },
          "description": "Post only fields you want to be changed."
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ]
      }
    },
    "/system/sync-account-key-count": {
      "post": {
        "summary": "Sync key count for existing accounts",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/job"
                }
              }
            }
          }
        },
        "operationId": "post-system-sync-account-key-count",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  }
                }
              },
              "examples": {
                "example-1": {
                  "value": {
                    "address": "0xf669cb8d41ce0c74"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "summary": "Healthcheck ready",
        "tags": [
          "Healthcheck"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "operationId": "get-health-ready",
        "description": "Always responds with 200 OK when the service is running"
      }
    },
    "/health/liveness": {
      "get": {
        "summary": "Healthcheck liveness",
        "tags": [
          "Healthcheck"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "type": "object",
                  "properties": {
                    "jobsInit": {
                      "type": "number"
                    },
                    "jobsNotAccepted": {
                      "type": "number"
                    },
                    "jobsAccepted": {
                      "type": "number"
                    },
                    "jobsErrored": {
                      "type": "number"
                    },
                    "jobsFailed": {
                      "type": "number"
                    },
                    "jobsCompleted": {
                      "type": "number"
                    },
                    "poolCapacity": {
                      "type": "number"
                    },
                    "workerCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "jobsInit",
                    "jobsNotAccepted",
                    "jobsAccepted",
                    "jobsErrored",
                    "jobsFailed",
                    "jobsCompleted",
                    "poolCapacity",
                    "workerCount"
                  ],
                  "x-examples": {
                    "example-1": {
                      "jobsInit": 0,
                      "jobsNotAccepted": 0,
                      "jobsAccepted": 0,
                      "jobsErrored": 0,
                      "jobsFailed": 0,
                      "jobsCompleted": 0,
                      "poolCapacity": 1000,
                      "workerCount": 100
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "jobsInit": 0,
                      "jobsNotAccepted": 3,
                      "jobsAccepted": 0,
                      "jobsErrored": 1,
                      "jobsFailed": 2,
                      "jobsCompleted": 10,
                      "poolCapacity": 1000,
                      "workerCount": 100
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-health-liveness",
        "description": "Get basic job queue statistics."
      }
    },
    "/tokens": {
      "get": {
        "summary": "List enabled tokens",
        "description": "List all tokens (fungible and non-fungible) that are enabled in this instance.",
        "operationId": "listEnabledTokens",
        "tags": [
          "Fungible Tokens",
          "Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/fungibleToken"
                      },
                      {
                        "$ref": "#/components/schemas/nonFungibleToken"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Enable a new token",
        "description": "Enable a new token by sending its name, address and required Cadence transaction codes",
        "operationId": "enableNewToken",
        "tags": [
          "Fungible Tokens",
          "Non-Fungible Tokens"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/fungibleTokenEnable"
                  },
                  {
                    "$ref": "#/components/schemas/nonFungibleTokenEnable"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ]
      }
    },
    "/tokens/{id_or_name}": {
      "parameters": [
        {
          "name": "id_or_name",
          "in": "path",
          "required": true,
          "schema": {
            "oneOf": [
              {
                "type": "number",
                "example": 1
              },
              {
                "type": "string",
                "example": "FlowToken"
              }
            ]
          }
        }
      ],
      "get": {
        "summary": "Get enabled token details",
        "operationId": "getEnabledTokenDetails",
        "tags": [
          "Fungible Tokens",
          "Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/fungibleTokenDetails"
                    },
                    {
                      "$ref": "#/components/schemas/nonFungibleTokenDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/tokens/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "number",
            "example": 1
          }
        }
      ],
      "delete": {
        "summary": "Remove a token from the service",
        "description": "Remove a token, disabling functionality regarding it. Won't affect accounts.",
        "operationId": "removeToken",
        "tags": [
          "Fungible Tokens",
          "Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "Removal OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/fungible-tokens": {
      "get": {
        "summary": "List enabled fungible tokens",
        "description": "List all fungible tokens that are enabled in this instance.",
        "operationId": "listEnabledFungibleTokens",
        "tags": [
          "Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/fungibleToken"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/non-fungible-tokens": {
      "get": {
        "summary": "List enabled non-fungible tokens",
        "description": "List all non-fungible tokens that are enabled in this instance.",
        "operationId": "listEnabledNonFungibleTokens",
        "tags": [
          "Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/nonFungibleToken"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transactions": {
      "get": {
        "summary": "List all transactions",
        "description": "Get a list of all transactions sent from this service.",
        "operationId": "listTransactions",
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/transaction"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transactions/{transactionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/transactionId"
        }
      ],
      "get": {
        "summary": "Get a transaction",
        "description": "Get the details of a transaction sent by this service.\nNOTE: Will include possible transaction events.",
        "operationId": "getTransactionDetails",
        "tags": [
          "Transactions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transactionWithEvents"
                }
              }
            }
          }
        }
      }
    },
    "/scripts": {
      "post": {
        "summary": "Execute a script on chain",
        "operationId": "executeScriptOnChain",
        "tags": [
          "Scripts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/script"
                  },
                  {
                    "example": {
                      "code": "pub fun main(): Int { return 1 }",
                      "arguments": []
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/cadenceValue"
                    },
                    {
                      "$ref": "#/components/schemas/plainValue"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/jobs": {
      "get": {
        "summary": "List all jobs",
        "operationId": "listAllJobs",
        "tags": [
          "Jobs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/job"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{jobId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/jobId"
        }
      ],
      "get": {
        "summary": "Get job details",
        "operationId": "getJobDetails",
        "tags": [
          "Jobs"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/job"
                }
              }
            }
          }
        }
      }
    },
    "/accounts": {
      "get": {
        "summary": "List accounts",
        "description": "Get a list of all accounts managed by the wallet service.",
        "operationId": "listAllAccounts",
        "tags": [
          "Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/account"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create an account",
        "description": "Create a new account that will be managed by the wallet service. Returns a job.",
        "operationId": "createAccount",
        "tags": [
          "Accounts"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/job"
                    },
                    {
                      "$ref": "#/components/schemas/account"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        }
      ],
      "get": {
        "summary": "Get an account",
        "description": "Get the details of a specific account.",
        "operationId": "getAccountDetails",
        "tags": [
          "Accounts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/sign": {
      "post": {
        "summary": "Sign a raw transaction",
        "description": "Sign a transaction with custodial account keys, without sending it. Signed transaction is returned in response (with signatures).",
        "operationId": "signRawTransaction",
        "tags": [
          "Account Transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/address"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/script"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/signedTransaction"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/transactions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        }
      ],
      "get": {
        "summary": "List account raw transactions",
        "description": "Get a list of all transactions sent by an account.",
        "operationId": "listAccountRawTransactions",
        "tags": [
          "Account Transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/transaction"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Send a raw transaction",
        "description": "Send a transaction from an account. Returns a job, or the account information when synchronous mode is enabled.\nNOTE: The transaction code should require _exactly_ one AuthAccount and is assumed to be the account sending the transaction.",
        "operationId": "sendRawTransaction",
        "tags": [
          "Account Transactions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/script"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/job"
                    },
                    {
                      "$ref": "#/components/schemas/transactionWithEvents"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/transactions/{transactionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/transactionId"
        }
      ],
      "get": {
        "summary": "Get a raw transaction",
        "description": "Get the details of a raw transaction sent by an account.",
        "operationId": "getRawTransactionDetails",
        "tags": [
          "Account Transactions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transaction"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/fungible-tokens": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        }
      ],
      "get": {
        "summary": "List account fungible tokens",
        "description": "List fungible tokens that are enabled for an account.",
        "operationId": "listAccountFungibleTokens",
        "tags": [
          "Account Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/accountFungibleToken"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/fungible-tokens/{tokenName}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/fungibleTokenName"
        }
      ],
      "get": {
        "summary": "Get account fungible tokens details",
        "description": "Get details (balance) regarding a fungible token for an account.",
        "operationId": "getAccountFungibleTokenDetails",
        "tags": [
          "Account Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/accountFungibleTokenDetails"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Enable a fungible token for an account",
        "operationId": "enableFungibleTokenForAccount",
        "tags": [
          "Account Fungible Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/job"
                    },
                    {
                      "$ref": "#/components/schemas/transactionWithEvents"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/fungible-tokens/{tokenName}/withdrawals": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/fungibleTokenName"
        }
      ],
      "get": {
        "summary": "List accounts withdrawals of a fungible token",
        "operationId": "listAccountFungibleTokenWithdrawals",
        "tags": [
          "Account Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/fungibleTokenWithdrawal"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a fungible token withdrawal",
        "operationId": "createFungibleTokenWithdrawal",
        "tags": [
          "Account Fungible Tokens"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fungibleTokenWithdrawalRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/job"
                    },
                    {
                      "$ref": "#/components/schemas/transactionWithEvents"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/fungible-tokens/{tokenName}/withdrawals/{transactionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/fungibleTokenName"
        },
        {
          "$ref": "#/components/parameters/transactionId"
        }
      ],
      "get": {
        "summary": "Get details of a fungible token withdrawal",
        "operationId": "getFungibleTokenWithdrawalDetails",
        "tags": [
          "Account Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/fungibleTokenWithdrawal"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/fungible-tokens/{tokenName}/deposits": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/fungibleTokenName"
        }
      ],
      "get": {
        "summary": "List accounts deposits of a fungible token",
        "operationId": "listAccountFungibleTokenDeposits",
        "tags": [
          "Account Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/fungibleTokenDeposit"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/fungible-tokens/{tokenName}/deposits/{transactionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/fungibleTokenName"
        },
        {
          "$ref": "#/components/parameters/transactionId"
        }
      ],
      "get": {
        "summary": "Get details of a fungible token deposit",
        "operationId": "getFungibleTokenDepositDetails",
        "tags": [
          "Account Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/fungibleTokenDeposit"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/non-fungible-tokens": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        }
      ],
      "get": {
        "summary": "List accounts non-fungible tokens",
        "description": "List all non-fungible tokens that are enabled for an account.",
        "operationId": "listAccountNonFungibleTokens",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/accountNonFungibleToken"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/non-fungible-tokens/{tokenName}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/nonFungibleTokenName"
        }
      ],
      "get": {
        "summary": "Get account non-fungible token details",
        "description": "Get details (balance) regarding a non-fungible token for an account.",
        "operationId": "GetAccountNonFungibleTokenDetails",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accountNonFungibleTokenDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Enable a non-fungible token for an account",
        "operationId": "enableNonFungibleTokenForAccount",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/job"
                    },
                    {
                      "$ref": "#/components/schemas/transactionWithEvents"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/non-fungible-tokens/{tokenName}/withdrawals": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/nonFungibleTokenName"
        }
      ],
      "get": {
        "summary": "List withdrawals of a non-fungible token",
        "operationId": "listNonFungibleTokenWithdrawals",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/nonFungibleTokenWithdrawal"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a non-fungible token withdrawal",
        "operationId": "createNonFungibleTokenWithdrawal",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/nonFungibleTokenWithdrawalRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/sync"
          },
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/job"
                    },
                    {
                      "$ref": "#/components/schemas/transactionWithEvents"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/non-fungible-tokens/{tokenName}/withdrawals/{transactionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/nonFungibleTokenName"
        },
        {
          "$ref": "#/components/parameters/transactionId"
        }
      ],
      "get": {
        "summary": "Get details of a non-fungible token withdrawal",
        "operationId": "getNonFungibleTokenWithdrawalDetails",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nonFungibleTokenWithdrawal"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/non-fungible-tokens/{tokenName}/deposits": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/nonFungibleTokenName"
        }
      ],
      "get": {
        "summary": "List deposits of a non-fungible token",
        "operationId": "listNonFungibleTokenDeposits",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/nonFungibleTokenDeposit"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{address}/non-fungible-tokens/{tokenName}/deposits/{transactionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        },
        {
          "$ref": "#/components/parameters/nonFungibleTokenName"
        },
        {
          "$ref": "#/components/parameters/transactionId"
        }
      ],
      "get": {
        "summary": "Get details of a non-fungible token deposit",
        "operationId": "getNonFungibleTokenDepositDetails",
        "tags": [
          "Account Non-Fungible Tokens"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/nonFungibleTokenDeposit"
                }
              }
            }
          }
        }
      }
    },
    "/watchlist/accounts": {
      "post": {
        "summary": "Add a non-custodial account to watchlist.",
        "description": "Add a non-custodial account to watchlist so that deposits to them can be tracked.",
        "operationId": "addWatchlistAccount",
        "tags": [
          "Watchlist"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/account"
                  },
                  {
                    "example": {
                      "address": "0xf8d6e0586b0a20c7"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyKey"
          }
        ]
      }
    },
    "/watchlist/accounts/{address}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/address"
        }
      ],
      "delete": {
        "summary": "Remove a non-custodial account from watchlist.",
        "description": "Remove an account from a watchlist of non-custodial accounts' deposits.",
        "operationId": "removeWatchlistAccount",
        "tags": [
          "Watchlist"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/ops/missing-fungible-token-vaults/stats": {
      "get": {
        "summary": "Returns number of uninitialized accounts per enabled fungible token.",
        "description": "Returns number of uninitialized accounts per enabled fungible token based on the database. You can also use this endpoint to check the init job progress.",
        "operationId": "getMissingFungibleTokenVaults",
        "tags": [
          "Ops"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/tokenCount"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ops/missing-fungible-token-vaults/start": {
      "get": {
        "summary": "Starts the fungible token vault initialization job.",
        "description": "Starts the fungible token vault initialization job. The job is singleton.",
        "operationId": "initMissingFungibleTokenVaults",
        "tags": [
          "Ops"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "jobState": {
        "type": "string",
        "example": "ACCEPTED",
        "enum": [
          "INIT",
          "ACCEPTED",
          "NO_AVAILABLE_WORKERS",
          "ERROR",
          "COMPLETE",
          "FAILED"
        ]
      },
      "debugInfo": {
        "type": "string",
        "example": "url: GET /v1/debug\nHeaders:\n  User-Agent: vscode-restclient\n  Content-Type: application/json\n  Connection: close\n\nver: https://github.com/flow-hydraulics/flow-wallet-api/commit/\nbuilt on:\napi version called: v1\n"
      },
      "account": {
        "description": "Response data for account info, private key NOT included",
        "type": "object",
        "x-examples": {
          "example-1": {
            "address": "0x179b6b1cb6755e31",
            "keys": [
              {
                "index": 0,
                "type": "local",
                "publicKey": "0xc885376ff315cc26e9740e5f5418c1e515cf690e590433a4774c2b9f4c522e7dbbb720b5049bed79820c66c8e6555997900579e6885b131180bb844cd87f4c62",
                "signAlgo": "ECDSA_P256",
                "hashAlgo": "SHA3_256",
                "createdAt": "2021-11-18T13:08:04.4236649+02:00",
                "updatedAt": "2021-11-18T13:08:04.4236649+02:00"
              }
            ],
            "type": "custodial",
            "createdAt": "2021-11-18T13:08:04.4230401+02:00",
            "updatedAt": "2021-11-18T13:08:04.4230401+02:00"
          }
        },
        "properties": {
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/key"
            }
          },
          "type": {
            "type": "string",
            "example": "custodial"
          },
          "createdAt": {
            "type": "string",
            "minLength": 1,
            "example": "2021-04-27T05:49:53.211+00:00",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-04-27T05:49:54.211+00:00",
            "format": "date-time"
          }
        }
      },
      "transactionEvent": {
        "type": "object",
        "properties": {
          "Type": {
            "type": "string",
            "example": "A.0ae53cb6e3f42a79.FlowToken.TokensWithdrawn"
          },
          "TransactionId": {
            "type": "string",
            "example": "<this is actually a byte-array>"
          },
          "TransactionIndex": {
            "type": "number",
            "example": 1
          },
          "EventIndex": {
            "type": "number",
            "example": 0
          },
          "Value": {
            "type": "string",
            "example": "<this is actually a complex object>"
          }
        }
      },
      "transaction": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "example": "9613c9689a50a5ed9198dc43839cd90ef39203dfdd7ab54f0fc5ca12f256eef0"
          },
          "transactionType": {
            "type": "string",
            "example": "ftsetup"
          },
          "createdAt": {
            "type": "string",
            "example": "2021-04-27T05:49:53.211+00:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-04-27T05:49:53.211+00:00"
          }
        }
      },
      "transactionWithEvents": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "example": "9613c9689a50a5ed9198dc43839cd90ef39203dfdd7ab54f0fc5ca12f256eef0"
          },
          "transactionType": {
            "type": "string",
            "example": "fttransfer"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/transactionEvent"
            }
          },
          "createdAt": {
            "type": "string",
            "example": "2021-04-27T05:49:53.211+00:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-04-27T05:49:53.211+00:00"
          }
        }
      },
      "signedTransaction": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "transaction(greeting: String) { prepare(signer: AuthAccount){} execute { log(greeting.concat(\", World!\")) }}"
          },
          "arguments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "example": "String"
                },
                "value": {
                  "type": "string",
                  "example": "Hello"
                }
              }
            }
          },
          "referenceBlockId": {
            "type": "string",
            "example": "ff25699272a9f42b5268e1b9c80b40275ef772528d4dfe8aadb8e5aebdea9bd9"
          },
          "gasLimit": {
            "type": "integer",
            "example": 9999
          },
          "proposalKey": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "example": "e245813137217658"
              },
              "keyIndex": {
                "type": "integer",
                "example": 0
              },
              "sequenceNumber": {
                "type": "integer",
                "example": 42
              }
            }
          },
          "payer": {
            "type": "string",
            "example": "f8d6e0586b0a20c7"
          },
          "authorizers": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "e245813137217658"
            }
          },
          "payloadSignatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/transactionSignature"
            }
          },
          "envelopeSignatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/transactionSignature"
            }
          }
        }
      },
      "transactionSignature": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "example": "e245813137217658"
          },
          "keyIndex": {
            "type": "integer",
            "example": 0
          },
          "signature": {
            "type": "string",
            "example": "e2beedaf426c414925a7757defa61d1169781f1d84bc713788767efae54c1e275dc353481fc386cf7a961415cf9e749c384fdec35f8af0fc93e20d2da8cc29ef"
          }
        }
      },
      "job": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "example": "717c25c2-4b54-4588-8f83-72f37ae1a0e8"
          },
          "type": {
            "type": "string",
            "example": ""
          },
          "state": {
            "$ref": "#/components/schemas/jobState"
          },
          "error": {
            "type": "string",
            "example": "",
            "description": "Final error message, blank if job completed successfully"
          },
          "errors": {
            "type": "array",
            "description": "Error messages recorded during all job executions including retries",
            "items": {
              "type": "string",
              "example": "an error occurred"
            }
          },
          "result": {
            "type": "string",
            "example": ""
          },
          "transactionId": {
            "type": "string",
            "example": "f1e272ee125b370e5129215179705791220764bf71da2aa938c94181b2c06685"
          },
          "createdAt": {
            "type": "string",
            "example": "2021-04-27T05:49:53.211+00:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-04-27T05:49:53.211+00:00"
          }
        }
      },
      "script": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "arguments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "cadenceValue": {
        "type": "object",
        "properties": {
          "Value": {
            "type": "string"
          }
        }
      },
      "plainValue": {
        "type": "string"
      },
      "fungibleToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "FlowToken"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "type": {
            "type": "string",
            "example": "FT"
          }
        }
      },
      "fungibleTokenDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "FlowToken"
          },
          "nameLowerCase": {
            "type": "string",
            "example": "flowToken"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "type": {
            "type": "string",
            "example": "FT"
          },
          "setup": {
            "type": "string",
            "example": "<cadence transaction code for token setup>"
          },
          "transfer": {
            "type": "string",
            "example": "<cadence transaction code for token transfer>"
          },
          "balance": {
            "type": "string",
            "example": "<cadence script code for token balance>"
          }
        }
      },
      "fungibleTokenEnable": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "FUSD"
          },
          "nameLowerCase": {
            "type": "string",
            "example": "fusd",
            "deprecated": true
          },
          "receiverPublicPath": {
            "type": "string",
            "example": "/public/fusdReceiver"
          },
          "balancePublicPath": {
            "type": "string",
            "example": "/public/fusdBalance"
          },
          "vaultStoragePath": {
            "type": "string",
            "example": "/storage/fusdVault"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "type": {
            "type": "string",
            "example": "FT"
          },
          "setup": {
            "type": "string",
            "example": "<cadence transaction code for token setup>"
          },
          "transfer": {
            "type": "string",
            "example": "<cadence transaction code for token transfer>"
          },
          "balance": {
            "type": "string",
            "example": "<cadence script code for token balance>"
          }
        }
      },
      "fungibleTokenWithdrawalRequest": {
        "type": "object",
        "properties": {
          "recipient": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "amount": {
            "type": "string",
            "example": "1.0"
          }
        }
      },
      "fungibleTokenWithdrawal": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "example": "f1e272ee125b370e5129215179705791220764bf71da2aa938c94181b2c06685"
          },
          "amount": {
            "type": "string",
            "example": "1.0"
          },
          "nftId": {
            "type": "number",
            "example": 0
          },
          "token": {
            "type": "string",
            "example": "FlowToken"
          },
          "createdAt": {
            "type": "string",
            "example": "2021-06-167T12:05:24.613704+03:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-06-16T12:05:24.617898+03:00"
          },
          "recipient": {
            "type": "string",
            "example": "0x01cf0e2f2f715450"
          }
        }
      },
      "fungibleTokenDeposit": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "example": "f1e272ee125b370e5129215179705791220764bf71da2aa938c94181b2c06685"
          },
          "amount": {
            "type": "string",
            "example": "1.0"
          },
          "nftId": {
            "type": "number",
            "example": 0
          },
          "token": {
            "type": "string",
            "example": "FlowToken"
          },
          "createdAt": {
            "type": "string",
            "example": "2021-06-167T12:05:24.613704+03:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-06-16T12:05:24.617898+03:00"
          },
          "sender": {
            "type": "string",
            "example": "0x01cf0e2f2f715450"
          }
        }
      },
      "nonFungibleToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "example": 3
          },
          "name": {
            "type": "string",
            "example": "ExampleNFT"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "type": {
            "type": "string",
            "example": "NFT"
          }
        }
      },
      "nonFungibleTokenDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "example": 3
          },
          "name": {
            "type": "string",
            "example": "ExampleNFT"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "type": {
            "type": "string",
            "example": "NFT"
          },
          "setup": {
            "type": "string",
            "example": "<cadence transaction code for token setup>"
          },
          "transfer": {
            "type": "string",
            "example": "<cadence transaction code for token transfer>"
          },
          "balance": {
            "type": "string",
            "example": "<cadence script code for token balance>"
          }
        }
      },
      "nonFungibleTokenEnable": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "ExampleNFT"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "type": {
            "type": "string",
            "example": "NFT"
          },
          "setup": {
            "type": "string",
            "example": "<cadence transaction code for token setup>"
          },
          "transfer": {
            "type": "string",
            "example": "<cadence transaction code for token transfer>"
          },
          "balance": {
            "type": "string",
            "example": "<cadence script code for token balance>"
          }
        }
      },
      "nonFungibleTokenWithdrawalRequest": {
        "type": "object",
        "properties": {
          "recipient": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          },
          "nftId": {
            "type": "number",
            "example": 2
          }
        }
      },
      "nonFungibleTokenWithdrawal": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "example": "f1e272ee125b370e5129215179705791220764bf71da2aa938c94181b2c06685"
          },
          "amount": {
            "type": "string",
            "example": ""
          },
          "nftId": {
            "type": "number",
            "example": 2
          },
          "token": {
            "type": "string",
            "example": "ExampleNft"
          },
          "createdAt": {
            "type": "string",
            "example": "2021-06-167T12:05:24.613704+03:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-06-16T12:05:24.617898+03:00"
          },
          "recipient": {
            "type": "string",
            "example": "0x01cf0e2f2f715450"
          }
        }
      },
      "nonFungibleTokenDeposit": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "example": "f1e272ee125b370e5129215179705791220764bf71da2aa938c94181b2c06685"
          },
          "amount": {
            "type": "string",
            "example": ""
          },
          "nftId": {
            "type": "number",
            "example": 2
          },
          "token": {
            "type": "string",
            "example": "ExampleNFT"
          },
          "createdAt": {
            "type": "string",
            "example": "2021-06-167T12:05:24.613704+03:00"
          },
          "updatedAt": {
            "type": "string",
            "example": "2021-06-16T12:05:24.617898+03:00"
          },
          "sender": {
            "type": "string",
            "example": "0x01cf0e2f2f715450"
          }
        }
      },
      "accountFungibleToken": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "FlowToken"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          }
        }
      },
      "accountFungibleTokenDetails": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "FlowToken"
          },
          "balance": {
            "type": "number",
            "example": 1
          }
        }
      },
      "accountNonFungibleToken": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "ExampleNFT"
          },
          "address": {
            "type": "string",
            "example": "0xf8d6e0586b0a20c7"
          }
        }
      },
      "accountNonFungibleTokenDetails": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "ExampleNFT"
          },
          "balance": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "example": [
              1,
              2,
              3
            ]
          }
        }
      },
      "key": {
        "type": "object",
        "x-examples": {
          "example-1": {
            "index": 0,
            "type": "local",
            "publicKey": "0xc885376ff315cc26e9740e5f5418c1e515cf690e590433a4774c2b9f4c522e7dbbb720b5049bed79820c66c8e6555997900579e6885b131180bb844cd87f4c62",
            "signAlgo": "ECDSA_P256",
            "hashAlgo": "SHA3_256",
            "createdAt": "2021-11-18T13:08:04.4236649+02:00",
            "updatedAt": "2021-11-18T13:08:04.4236649+02:00"
          }
        },
        "properties": {
          "index": {
            "type": "number",
            "minimum": 0
          },
          "type": {
            "$ref": "#/components/schemas/keyType"
          },
          "publicKey": {
            "type": "string",
            "minLength": 1
          },
          "signAlgo": {
            "type": "string",
            "minLength": 1
          },
          "hashAlgo": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "type": "string",
            "minLength": 1,
            "format": "date-time",
            "example": "2021-04-27T05:49:53.211+00:00"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2021-04-27T05:49:53.211+00:00"
          }
        },
        "required": [
          "index",
          "type",
          "publicKey",
          "signAlgo",
          "hashAlgo",
          "createdAt",
          "updatedAt"
        ]
      },
      "keyType": {
        "type": "string",
        "enum": [
          "local",
          "aws_kms",
          "google_kms"
        ],
        "example": "local",
        "minLength": 1
      },
      "tokenCount": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "example": "FUSD"
          },
          "count": {
            "type": "integer"
          }
        }
      }
    },
    "parameters": {
      "limit": {
        "name": "limit",
        "description": "The maximum number of items to return. -1 disables the limit. If no limit is given (or limit=0) 1000 is used as a default.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": -1,
          "example": 1000
        }
      },
      "offset": {
        "name": "offset",
        "description": "The number of items to skip before starting to collect the result set.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0,
          "example": 0
        }
      },
      "address": {
        "name": "address",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "0xf8d6e0586b0a20c7"
        }
      },
      "jobId": {
        "name": "jobId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "717c25c2-4b54-4588-8f83-72f37ae1a0e8"
        }
      },
      "fungibleTokenName": {
        "name": "tokenName",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "FlowToken"
        }
      },
      "nonFungibleTokenName": {
        "name": "tokenName",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "ExampleNFT"
        }
      },
      "transactionId": {
        "name": "transactionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "example": "9613c9689a50a5ed9198dc43839cd90ef39203dfdd7ab54f0fc5ca12f256eef0"
        }
      },
      "sync": {
        "name": "sync",
        "description": "Use any non-empty value to run the request synchronously. ⚠️ NOT recommended for production (mainnet).",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "example": "something-non-empty"
        }
      },
      "idempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "schema": {
          "type": "string",
          "example": "bec0a613-0d3b-4748-9e98-223a6ddb6a9f"
        },
        "description": "Unique identifier for a request to guarantee idempotency for POST requests. Required when idempotency middleware is enabled."
      }
    }
  }
}