Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
alephium-api_2.13.3.6.6.source-code.openapi.json Maven / Gradle / Ivy
{
"openapi": "3.1.0",
"info": {
"title": "Alephium API",
"version": "3.6.6"
},
"servers": [
{
"url": "../"
},
{
"url": "{protocol}://{host}:{port}",
"variables": {
"protocol": {
"enum": [
"http",
"https"
],
"default": "http"
},
"host": {
"default": "127.0.0.1"
},
"port": {
"default": "12973"
}
}
}
],
"paths": {
"/wallets": {
"get": {
"tags": [
"Wallets"
],
"summary": "List available wallets",
"operationId": "getWallets",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WalletStatus"
}
},
"example": [
{
"walletName": "wallet-super-name",
"locked": true
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
},
"put": {
"tags": [
"Wallets"
],
"summary": "Restore a wallet from your mnemonic",
"operationId": "putWallets",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletRestore"
},
"examples": {
"Example0": {
"summary": "User",
"value": {
"password": "my-secret-password",
"mnemonic": "vault alarm sad mass witness property virus style good flower rice alpha viable evidence run glare pretty scout evil judge enroll refuse another lava",
"walletName": "wallet-super-name"
}
},
"Example1": {
"summary": "Miner (w/o pass phrase)",
"value": {
"password": "my-secret-password",
"mnemonic": "vault alarm sad mass witness property virus style good flower rice alpha viable evidence run glare pretty scout evil judge enroll refuse another lava",
"walletName": "wallet-super-name",
"isMiner": true
}
},
"Example2": {
"summary": "Miner (with pass phrase)",
"value": {
"password": "my-secret-password",
"mnemonic": "vault alarm sad mass witness property virus style good flower rice alpha viable evidence run glare pretty scout evil judge enroll refuse another lava",
"walletName": "wallet-super-name",
"isMiner": true,
"mnemonicPassphrase": "optional-mnemonic-passphrase"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletRestoreResult"
},
"example": {
"walletName": "wallet-super-name"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
},
"post": {
"tags": [
"Wallets"
],
"summary": "Create a new wallet",
"description": "A new wallet will be created and respond with a mnemonic. Make sure to keep that mnemonic safely as it will allows you to recover your wallet. Default mnemonic size is 24, (options: 12, 15, 18, 21, 24).",
"operationId": "postWallets",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletCreation"
},
"examples": {
"Example0": {
"summary": "User",
"value": {
"password": "my-secret-password",
"walletName": "wallet-super-name"
}
},
"Example1": {
"summary": "Miner (w/o pass phrase)",
"value": {
"password": "my-secret-password",
"walletName": "wallet-super-name",
"isMiner": true,
"mnemonicSize": 24
}
},
"Example2": {
"summary": "Miner (with pass phrase)",
"value": {
"password": "my-secret-password",
"walletName": "wallet-super-name",
"isMiner": true,
"mnemonicPassphrase": "optional-mnemonic-passphrase",
"mnemonicSize": 24
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletCreationResult"
},
"example": {
"walletName": "wallet-super-name",
"mnemonic": "vault alarm sad mass witness property virus style good flower rice alpha viable evidence run glare pretty scout evil judge enroll refuse another lava"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}": {
"get": {
"tags": [
"Wallets"
],
"summary": "Get wallet's status",
"operationId": "getWalletsWallet_name",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletStatus"
},
"example": {
"walletName": "wallet-super-name",
"locked": true
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
},
"delete": {
"tags": [
"Wallets"
],
"summary": "Delete your wallet file (can be recovered with your mnemonic)",
"operationId": "deleteWalletsWallet_name",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletDeletion"
},
"example": {
"password": "my-secret-password"
}
}
},
"required": true
},
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/lock": {
"post": {
"tags": [
"Wallets"
],
"summary": "Lock your wallet",
"operationId": "postWalletsWallet_nameLock",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/unlock": {
"post": {
"tags": [
"Wallets"
],
"summary": "Unlock your wallet",
"operationId": "postWalletsWallet_nameUnlock",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WalletUnlock"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"password": "my-secret-password"
}
},
"Example1": {
"summary": "More Settings (with pass phrase)",
"value": {
"password": "my-secret-password",
"mnemonicPassphrase": "optional-mnemonic-passphrase"
}
}
}
}
},
"required": true
},
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/balances": {
"get": {
"tags": [
"Wallets"
],
"summary": "Get your total balance",
"operationId": "getWalletsWallet_nameBalances",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Format 1: `1000000000000000000`\n\nFormat 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000\n\nField fromPublicKeyType can be `default` or `bip340-schnorr`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Balances"
},
"example": {
"totalBalance": "10000000000000000000",
"totalBalanceHint": "10 ALPH",
"balances": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"balance": "10000000000000000000",
"balanceHint": "10 ALPH",
"lockedBalance": "0",
"lockedBalanceHint": "0 ALPH"
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/reveal-mnemonic": {
"post": {
"tags": [
"Wallets"
],
"summary": "Reveal your mnemonic. !!! use it with caution !!!",
"operationId": "postWalletsWallet_nameReveal-mnemonic",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RevealMnemonic"
},
"example": {
"password": "my-secret-password"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RevealMnemonicResult"
},
"example": {
"mnemonic": "vault alarm sad mass witness property virus style good flower rice alpha viable evidence run glare pretty scout evil judge enroll refuse another lava"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/transfer": {
"post": {
"tags": [
"Wallets"
],
"summary": "Transfer ALPH from the active address",
"operationId": "postWalletsWallet_nameTransfer",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "Format 1: `1000000000000000000`\n\nFormat 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000\n\nField fromPublicKeyType can be `default` or `bip340-schnorr`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Transfer"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000"
}
]
}
},
"Example1": {
"summary": "More settings",
"value": {
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892
}
],
"gas": 20000,
"gasPrice": "100000000000",
"utxosLimit": 512
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferResult"
},
"example": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/sweep-active-address": {
"post": {
"tags": [
"Wallets"
],
"summary": "Transfer all unlocked ALPH from the active address to another address",
"operationId": "postWalletsWallet_nameSweep-active-address",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Sweep"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
},
"Example1": {
"summary": "More settings",
"value": {
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"lockTime": 1611041396892,
"gasAmount": 20000,
"gasPrice": "100000000000",
"utxosLimit": 512
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferResults"
},
"example": {
"results": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/sweep-all-addresses": {
"post": {
"tags": [
"Wallets"
],
"summary": "Transfer unlocked ALPH from all addresses (including all mining addresses if applicable) to another address",
"operationId": "postWalletsWallet_nameSweep-all-addresses",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Sweep"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
},
"Example1": {
"summary": "More settings",
"value": {
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"lockTime": 1611041396892,
"gasAmount": 20000,
"gasPrice": "100000000000",
"utxosLimit": 512
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferResults"
},
"example": {
"results": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/sign": {
"post": {
"tags": [
"Wallets"
],
"summary": "Sign the given data and return back the signature",
"operationId": "postWalletsWallet_nameSign",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Sign"
},
"example": {
"data": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignResult"
},
"example": {
"signature": "9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/addresses": {
"get": {
"tags": [
"Wallets"
],
"summary": "List all your wallet's addresses",
"operationId": "getWalletsWallet_nameAddresses",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Addresses"
},
"example": {
"activeAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"addresses": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"publicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"group": 0,
"path": "m/44'/1234'/O'/O/O"
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/addresses/{address}": {
"get": {
"tags": [
"Wallets"
],
"summary": "Get address' info",
"operationId": "getWalletsWallet_nameAddressesAddress",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddressInfo"
},
"example": {
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"publicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"group": 0,
"path": "m/44'/1234'/O'/O/O"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/miner-addresses": {
"get": {
"tags": [
"Miners"
],
"summary": "List all miner addresses per group",
"description": "This endpoint can only be called if the wallet was created with the `isMiner = true` flag",
"operationId": "getWalletsWallet_nameMiner-addresses",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MinerAddressesInfo"
}
},
"example": [
{
"addresses": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"publicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"group": 0,
"path": "m/44'/1234'/O'/O/O"
}
]
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/derive-next-address": {
"post": {
"tags": [
"Wallets"
],
"summary": "Derive your next address",
"description": "Cannot be called from a miner wallet",
"operationId": "postWalletsWallet_nameDerive-next-address",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "group",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddressInfo"
},
"example": {
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"publicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"group": 0,
"path": "m/44'/1234'/O'/O/O"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/derive-next-miner-addresses": {
"post": {
"tags": [
"Miners"
],
"summary": "Derive your next miner addresses for each group",
"description": "Your wallet need to have been created with the miner flag set to true",
"operationId": "postWalletsWallet_nameDerive-next-miner-addresses",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AddressInfo"
}
},
"example": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"publicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"group": 0,
"path": "m/44'/1234'/O'/O/O"
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/wallets/{wallet_name}/change-active-address": {
"post": {
"tags": [
"Wallets"
],
"summary": "Choose the active address",
"operationId": "postWalletsWallet_nameChange-active-address",
"parameters": [
{
"name": "wallet_name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChangeActiveAddress"
},
"example": {
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
}
},
"required": true
},
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/node": {
"get": {
"tags": [
"Infos"
],
"summary": "Get info about that node",
"operationId": "getInfosNode",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NodeInfo"
},
"example": {
"buildInfo": {
"releaseVersion": "1.2.3",
"commit": "47c01136d52cdf29062f6a3598a36ebc1e4dc57e"
},
"upnp": true,
"externalAddress": {
"addr": "1.2.3.4",
"port": 12344
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/version": {
"get": {
"tags": [
"Infos"
],
"summary": "Get version about that node",
"operationId": "getInfosVersion",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NodeVersion"
},
"example": {
"version": "v0.0.1"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/chain-params": {
"get": {
"tags": [
"Infos"
],
"summary": "Get key params about your blockchain",
"operationId": "getInfosChain-params",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChainParams"
},
"example": {
"networkId": 0,
"numZerosAtLeastInHash": 18,
"groupNumPerBroker": 1,
"groups": 2
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/self-clique": {
"get": {
"tags": [
"Infos"
],
"summary": "Get info about your own clique",
"operationId": "getInfosSelf-clique",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SelfClique"
},
"example": {
"cliqueId": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"nodes": [
{
"address": "1.2.3.4",
"restPort": 12377,
"wsPort": 12366,
"minerApiPort": 12355
}
],
"selfReady": true,
"synced": true
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/inter-clique-peer-info": {
"get": {
"tags": [
"Infos"
],
"summary": "Get infos about the inter cliques",
"operationId": "getInfosInter-clique-peer-info",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InterCliquePeerInfo"
}
},
"example": [
{
"cliqueId": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"brokerId": 1,
"groupNumPerBroker": 1,
"address": {
"addr": "1.2.3.4",
"port": 12344
},
"isSynced": true,
"clientVersion": "v1.0.0"
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/discovered-neighbors": {
"get": {
"tags": [
"Infos"
],
"summary": "Get discovered neighbors",
"operationId": "getInfosDiscovered-neighbors",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BrokerInfo"
}
},
"example": [
{
"cliqueId": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"brokerId": 1,
"brokerNum": 1,
"address": {
"addr": "1.2.3.4",
"port": 12344
}
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/misbehaviors": {
"get": {
"tags": [
"Infos"
],
"summary": "Get the misbehaviors of peers",
"operationId": "getInfosMisbehaviors",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PeerMisbehavior"
}
},
"example": [
{
"peer": "1.2.3.4",
"status": {
"type": "Penalty",
"value": 42
}
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
},
"post": {
"tags": [
"Infos"
],
"summary": "Ban/Unban given peers",
"operationId": "postInfosMisbehaviors",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MisbehaviorAction"
},
"examples": {
"Example0": {
"summary": "Unban",
"value": {
"type": "Unban",
"peers": [
"1.2.3.4"
]
}
},
"Example1": {
"summary": "Ban",
"value": {
"type": "Ban",
"peers": [
"1.2.3.4"
]
}
}
}
}
},
"required": true
},
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/unreachable": {
"get": {
"tags": [
"Infos"
],
"summary": "Get the unreachable brokers",
"operationId": "getInfosUnreachable",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "inet-address"
}
},
"example": [
"1.2.3.4"
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/discovery": {
"post": {
"tags": [
"Infos"
],
"summary": "Set brokers to be unreachable/reachable",
"operationId": "postInfosDiscovery",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DiscoveryAction"
},
"examples": {
"Example0": {
"summary": "Set unreachable",
"value": {
"type": "Unreachable",
"peers": [
"1.2.3.4"
]
}
},
"Example1": {
"summary": "Set reachable",
"value": {
"type": "Reachable",
"peers": [
"1.2.3.4"
]
}
}
}
}
},
"required": true
},
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/history-hashrate": {
"get": {
"tags": [
"Infos"
],
"summary": "Get history average hashrate on the given time interval",
"operationId": "getInfosHistory-hashrate",
"parameters": [
{
"name": "fromTs",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "0"
}
},
{
"name": "toTs",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "0"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HashRateResponse"
},
"example": {
"hashrate": "100 MH/s"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/current-hashrate": {
"get": {
"tags": [
"Infos"
],
"summary": "Get average hashrate from `now - timespan(millis)` to `now`",
"operationId": "getInfosCurrent-hashrate",
"parameters": [
{
"name": "timespan",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "1"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HashRateResponse"
},
"example": {
"hashrate": "100 MH/s"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/infos/current-difficulty": {
"get": {
"tags": [
"Infos"
],
"summary": "Get the average difficulty of the latest blocks from all shards",
"operationId": "getInfosCurrent-difficulty",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CurrentDifficulty"
},
"example": {
"difficulty": "224000000000000"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/blocks": {
"get": {
"tags": [
"Blockflow"
],
"summary": "List blocks on the given time interval",
"operationId": "getBlockflowBlocks",
"parameters": [
{
"name": "fromTs",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "0"
}
},
{
"name": "toTs",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "0"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlocksPerTimeStampRange"
},
"example": {
"blocks": [
[
{
"hash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"timestamp": 1611041396892,
"chainFrom": 1,
"chainTo": 2,
"height": 42,
"deps": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
],
"transactions": [
{
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"scriptExecutionOk": true,
"contractInputs": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"generatedOutputs": [
{
"type": "AssetOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
],
"nonce": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"version": 1,
"depStateHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"txsHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"target": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"ghostUncles": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"miner": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
]
}
]
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/blocks-with-events": {
"get": {
"tags": [
"Blockflow"
],
"summary": "List blocks with events on the given time interval",
"operationId": "getBlockflowBlocks-with-events",
"parameters": [
{
"name": "fromTs",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "0"
}
},
{
"name": "toTs",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int64",
"minimum": "0"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlocksAndEventsPerTimeStampRange"
},
"example": {
"blocksAndEvents": [
[
{
"block": {
"hash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"timestamp": 1611041396892,
"chainFrom": 1,
"chainTo": 2,
"height": 42,
"deps": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
],
"transactions": [
{
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"scriptExecutionOk": true,
"contractInputs": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"generatedOutputs": [
{
"type": "AssetOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
],
"nonce": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"version": 1,
"depStateHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"txsHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"target": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"ghostUncles": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"miner": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
]
},
"events": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
]
}
]
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/blocks/{block_hash}": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get a block with hash",
"operationId": "getBlockflowBlocksBlock_hash",
"parameters": [
{
"name": "block_hash",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlockEntry"
},
"example": {
"hash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"timestamp": 1611041396892,
"chainFrom": 1,
"chainTo": 2,
"height": 42,
"deps": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
],
"transactions": [
{
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"scriptExecutionOk": true,
"contractInputs": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"generatedOutputs": [
{
"type": "AssetOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
],
"nonce": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"version": 1,
"depStateHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"txsHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"target": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"ghostUncles": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"miner": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/main-chain-block-by-ghost-uncle/{ghost_uncle_hash}": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get a mainchain block by ghost uncle hash",
"operationId": "getBlockflowMain-chain-block-by-ghost-uncleGhost_uncle_hash",
"parameters": [
{
"name": "ghost_uncle_hash",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlockEntry"
},
"example": {
"hash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"timestamp": 1611041396892,
"chainFrom": 1,
"chainTo": 2,
"height": 42,
"deps": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
],
"transactions": [
{
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"scriptExecutionOk": true,
"contractInputs": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"generatedOutputs": [
{
"type": "AssetOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
],
"nonce": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"version": 1,
"depStateHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"txsHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"target": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"ghostUncles": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"miner": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/blocks-with-events/{block_hash}": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get a block and events with hash",
"operationId": "getBlockflowBlocks-with-eventsBlock_hash",
"parameters": [
{
"name": "block_hash",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlockAndEvents"
},
"example": {
"block": {
"hash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"timestamp": 1611041396892,
"chainFrom": 1,
"chainTo": 2,
"height": 42,
"deps": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
],
"transactions": [
{
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"scriptExecutionOk": true,
"contractInputs": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"generatedOutputs": [
{
"type": "AssetOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
],
"nonce": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"version": 1,
"depStateHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"txsHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"target": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"ghostUncles": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"miner": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
]
},
"events": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/is-block-in-main-chain": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Check if the block is in main chain",
"operationId": "getBlockflowIs-block-in-main-chain",
"parameters": [
{
"name": "blockHash",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "boolean"
},
"example": true
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/addresses/{address}/balance": {
"get": {
"tags": [
"Addresses"
],
"summary": "Get the balance of an address",
"operationId": "getAddressesAddressBalance",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
},
{
"name": "mempool",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "Format 1: `1000000000000000000`\n\nFormat 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000\n\nField fromPublicKeyType can be `default` or `bip340-schnorr`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Balance"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"balance": "10000000000000000000",
"balanceHint": "10 ALPH",
"lockedBalance": "5000000000000000000",
"lockedBalanceHint": "5 ALPH",
"tokenBalances": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockedTokenBalances": [
{
"id": "20aa1fcc865087d7788302d087e4bc76691218ce5d5013dd1cedaabfac19cca4",
"amount": "65000000000000000000"
}
],
"utxoNum": 3
}
},
"Example1": {
"summary": "More settings",
"value": {
"balance": "10000000000000000000",
"balanceHint": "10 ALPH",
"lockedBalance": "5000000000000000000",
"lockedBalanceHint": "5 ALPH",
"tokenBalances": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockedTokenBalances": [
{
"id": "20aa1fcc865087d7788302d087e4bc76691218ce5d5013dd1cedaabfac19cca4",
"amount": "65000000000000000000"
}
],
"utxoNum": 3
}
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/addresses/{address}/utxos": {
"get": {
"tags": [
"Addresses"
],
"summary": "Get the UTXOs of an address",
"operationId": "getAddressesAddressUtxos",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UTXOs"
},
"examples": {
"Example": {
"summary": "Default",
"value": {
"utxos": [
{
"ref": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"amount": "10000000000000000000",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"additionalData": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
}
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/addresses/{address}/group": {
"get": {
"tags": [
"Addresses"
],
"summary": "Get the group of an address",
"operationId": "getAddressesAddressGroup",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Group"
},
"example": {
"group": 2
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/hashes": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get all block's hashes at given height for given groups",
"operationId": "getBlockflowHashes",
"parameters": [
{
"name": "fromGroup",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "toGroup",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "height",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HashesAtHeight"
},
"example": {
"headers": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/chain-info": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get infos about the chain from the given groups",
"operationId": "getBlockflowChain-info",
"parameters": [
{
"name": "fromGroup",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "toGroup",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChainInfo"
},
"example": {
"currentHeight": 42
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/headers/{block_hash}": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get block header",
"operationId": "getBlockflowHeadersBlock_hash",
"parameters": [
{
"name": "block_hash",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BlockHeaderEntry"
},
"example": {
"hash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"timestamp": 1611041396892,
"chainFrom": 1,
"chainTo": 2,
"height": 42,
"deps": [
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/blockflow/raw-blocks/{block_hash}": {
"get": {
"tags": [
"Blockflow"
],
"summary": "Get raw block in hex format",
"operationId": "getBlockflowRaw-blocksBlock_hash",
"parameters": [
{
"name": "block_hash",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RawBlock"
},
"example": {
"value": "49c1050b901993b20000000000000000000000000000000000070000000000004386cda6c69b4d5aff405c10ae023d8311a90d53b337bc429fa00000000000018488701af02c77df4c7657243e3a321164f14b563c6bf6af821a0000000000023202720d0ff5ab292036c749039d90e90190bf2232b6a885a32f000000000002c856ac0bb2d363ffdca661fcb98e513cef3d3fe09f6888874a84000000000001465a437e5861962a8e23650c992429395499bf22a2e9954215d500000000000076e5076d72b10a3be4818e2ad88df4d97e43b50f1549216aa4760000000000033fde0a3e193492c1e9bb51b31718f72eb1fb94458d10369403775c91e90a5c32e6c4abe3216093814444e406f62995c247719a82476f6bc034b9508049bbd8a3f0f1d6862f0f8b218022ae0517394027dd03bf91c508fc565ab800000190edd91dee1b038d320100000080004e20bb9aca000001c4072325d841cdb7f30044dbe03c9b2c4c618d629bdcf6d5a58c596d70b83168d93e32f892774490fefa00000190efa2e16e000b010100000190edd91dee000100000000"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/build": {
"post": {
"tags": [
"Transactions"
],
"summary": "Build an unsigned transaction to a number of recipients",
"operationId": "postTransactionsBuild",
"requestBody": {
"description": "Format 1: `1000000000000000000`\n\nFormat 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000\n\nField fromPublicKeyType can be `default` or `bip340-schnorr`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildTransaction"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000"
}
]
}
},
"Example1": {
"summary": "More settings",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"fromPublicKeyType": "bip340-schnorr",
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892
}
],
"utxos": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"gasAmount": 20000,
"gasPrice": "100000000000"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildTransactionResult"
},
"example": {
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/build-multi-addresses": {
"post": {
"tags": [
"Transactions"
],
"summary": "Build an unsigned transaction with multiple addresses to a number of recipients",
"operationId": "postTransactionsBuild-multi-addresses",
"requestBody": {
"description": "Format 1: `1000000000000000000`\n\nFormat 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000\n\nField fromPublicKeyType can be `default` or `bip340-schnorr`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildMultiAddressesTransaction"
},
"examples": {
"Example": {
"summary": "Default",
"value": {
"from": [
{
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000"
}
]
}
]
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildTransactionResult"
},
"example": {
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/sweep-address/build": {
"post": {
"tags": [
"Transactions"
],
"summary": "Build unsigned transactions to send all unlocked ALPH and token balances of one address to another address",
"operationId": "postTransactionsSweep-addressBuild",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildSweepAddressTransactions"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
},
"Example1": {
"summary": "More settings",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"maxAttoAlphPerUTXO": "1000000000000000000",
"lockTime": 1611041396892,
"gasAmount": 20000,
"gasPrice": "100000000000"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildSweepAddressTransactionsResult"
},
"example": {
"unsignedTxs": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000"
}
],
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/submit": {
"post": {
"tags": [
"Transactions"
],
"summary": "Submit a signed transaction",
"operationId": "postTransactionsSubmit",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitTransaction"
},
"example": {
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"signature": "9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitTxResult"
},
"example": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/decode-unsigned-tx": {
"post": {
"tags": [
"Transactions"
],
"summary": "Decode an unsigned transaction",
"operationId": "postTransactionsDecode-unsigned-tx",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DecodeUnsignedTx"
},
"example": {
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DecodeUnsignedTxResult"
},
"example": {
"fromGroup": 1,
"toGroup": 2,
"unsignedTx": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/details/{txId}": {
"get": {
"tags": [
"Transactions"
],
"summary": "Get transaction details",
"operationId": "getTransactionsDetailsTxid",
"parameters": [
{
"name": "txId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "32-byte-hash"
}
},
{
"name": "fromGroup",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "toGroup",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Transaction"
},
"examples": {
"Example": {
"summary": "Default",
"value": {
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"scriptExecutionOk": true,
"contractInputs": [
{
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
],
"generatedOutputs": [
{
"type": "AssetOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/raw/{txId}": {
"get": {
"tags": [
"Transactions"
],
"summary": "Get raw transaction in hex format",
"operationId": "getTransactionsRawTxid",
"parameters": [
{
"name": "txId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "32-byte-hash"
}
},
{
"name": "fromGroup",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "toGroup",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RawTransaction"
},
"examples": {
"Example": {
"summary": "Default",
"value": {
"value": "00000080004e20bb9aca000001c4072325d841cdb7f30044dbe03c9b2c4c618d629bdcf6d5a58c596d70b83168d93e32f892774490fefa00000190efa2e16e000b010100000190edd91dee000100000000"
}
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/status": {
"get": {
"tags": [
"Transactions"
],
"summary": "Get tx status",
"operationId": "getTransactionsStatus",
"parameters": [
{
"name": "txId",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "32-byte-hash"
}
},
{
"name": "fromGroup",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "toGroup",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TxStatus"
},
"examples": {
"Example0": {
"value": {
"type": "Confirmed",
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"txIndex": 0,
"chainConfirmations": 1,
"fromGroupConfirmations": 2,
"toGroupConfirmations": 3
}
},
"Example1": {
"summary": "Tx is still in mempool",
"value": {
"type": "MemPooled"
}
},
"Example2": {
"summary": "Cannot find tx with the id",
"value": {
"type": "TxNotFound"
}
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/transactions/tx-id-from-outputref": {
"get": {
"tags": [
"Transactions"
],
"summary": "Get transaction id from transaction output ref",
"operationId": "getTransactionsTx-id-from-outputref",
"parameters": [
{
"name": "hint",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "32-byte-hash"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "string",
"format": "32-byte-hash"
},
"example": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69"
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/mempool/transactions": {
"get": {
"tags": [
"Mempool"
],
"summary": "List mempool transactions",
"operationId": "getMempoolTransactions",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MempoolTransactions"
}
},
"example": [
{
"fromGroup": 0,
"toGroup": 1,
"transactions": [
{
"unsigned": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"version": 1,
"networkId": 1,
"gasAmount": 20000,
"gasPrice": "100000000000",
"inputs": [
{
"outputRef": {
"hint": 23412,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
},
"unlockScript": "00d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
],
"fixedOutputs": [
{
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "2000000000000000000",
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892,
"message": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef"
}
]
},
"inputSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
],
"scriptSignatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
]
}
]
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
},
"delete": {
"tags": [
"Mempool"
],
"summary": "Remove all transactions from mempool",
"operationId": "deleteMempoolTransactions",
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/mempool/transactions/rebroadcast": {
"put": {
"tags": [
"Mempool"
],
"summary": "Rebroadcase a mempool transaction to the network",
"operationId": "putMempoolTransactionsRebroadcast",
"parameters": [
{
"name": "txId",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "32-byte-hash"
}
}
],
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/mempool/transactions/validate": {
"put": {
"tags": [
"Mempool"
],
"summary": "Validate all mempool transactions and remove invalid ones",
"operationId": "putMempoolTransactionsValidate",
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/compile-script": {
"post": {
"tags": [
"Contracts"
],
"summary": "Compile a script",
"operationId": "postContractsCompile-script",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Script"
},
"example": {
"code": "TxScript Main { let token = Token(#36cdbfabca2d71622b6) token.withdraw(@1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y, 1024) }",
"compilerOptions": {
"ignoreUnusedConstantsWarnings": true
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompileScriptResult"
},
"example": {
"version": "v0.0.1",
"name": "Main",
"bytecodeTemplate": "35d1b2a520a0da34c5eb8d712aa9cc",
"bytecodeDebugPatch": "=1-1+ef",
"fields": {
"names": [
"aa",
"bb",
"cc",
"dd",
"ee"
],
"types": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"isMutable": [
false,
true,
false,
true,
false
]
},
"functions": [
{
"name": "bar",
"usePreapprovedAssets": false,
"useAssetsInContract": false,
"isPublic": true,
"paramNames": [
"a",
"b",
"c",
"d",
"e"
],
"paramTypes": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"paramIsMutable": [
false,
true,
false,
true,
false
],
"returnTypes": [
"U256",
"I256",
"ByteVec",
"Address"
]
}
],
"warnings": [
"Found unused fields in Foo: a"
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/unsigned-tx/execute-script": {
"post": {
"tags": [
"Contracts"
],
"summary": "Build an unsigned script",
"operationId": "postContractsUnsigned-txExecute-script",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildExecuteScriptTx"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"bytecode": "35d1b2a520a0da34c5eb8d712aa9cc"
}
},
"Example1": {
"summary": "More settings",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"fromPublicKeyType": "default",
"bytecode": "35d1b2a520a0da34c5eb8d712aa9cc",
"attoAlphAmount": "1000000000000000",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"gasAmount": 20000,
"gasPrice": "100000000000"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildExecuteScriptTxResult"
},
"example": {
"fromGroup": 2,
"toGroup": 2,
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/compile-contract": {
"post": {
"tags": [
"Contracts"
],
"summary": "Compile a smart contract",
"operationId": "postContractsCompile-contract",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Contract"
},
"example": {
"code": "Contract Foo(bar: ByteVec) {\n pub fn baz(amount: U256) -> () {\nissueToken!(amount)\n}}",
"compilerOptions": {
"ignoreUnusedConstantsWarnings": true
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompileContractResult"
},
"example": {
"version": "v0.0.1",
"name": "Foo",
"bytecode": "35d1b2a520a0da34c5eb8d712aa9cc",
"bytecodeDebugPatch": "=1-1+ef",
"codeHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"codeHashDebug": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"fields": {
"names": [
"aa",
"bb",
"cc",
"dd",
"ee"
],
"types": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"isMutable": [
false,
true,
false,
true,
false
]
},
"functions": [
{
"name": "bar",
"usePreapprovedAssets": false,
"useAssetsInContract": false,
"isPublic": true,
"paramNames": [
"a",
"b",
"c",
"d",
"e"
],
"paramTypes": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"paramIsMutable": [
false,
true,
false,
true,
false
],
"returnTypes": [
"U256",
"I256",
"ByteVec",
"Address"
]
}
],
"constants": [
{
"name": "A",
"value": {
"type": "Bool",
"value": true
}
}
],
"enums": [
{
"name": "Color",
"fields": [
{
"name": "Red",
"value": {
"type": "U256",
"value": "0"
}
},
{
"name": "Blue",
"value": {
"type": "U256",
"value": "1"
}
}
]
}
],
"events": [
{
"name": "Bar",
"fieldNames": [
"a",
"b",
"d",
"e"
],
"fieldTypes": [
"Bool",
"U256",
"ByteVec",
"Address"
]
}
],
"warnings": [
"Found unused fields in Foo: a"
],
"maps": {
"names": [
"foo"
],
"types": [
"Map[U256,U256]"
]
},
"stdInterfaceId": "0001"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/compile-project": {
"post": {
"tags": [
"Contracts"
],
"summary": "Compile a project",
"operationId": "postContractsCompile-project",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project"
},
"example": {
"code": "Contract Foo() {\n pub fn foo() -> () {}\n }\n TxScript Main(id: ByteVec) {\n Foo(id).foo() \n}",
"compilerOptions": {
"ignoreUnusedConstantsWarnings": true
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompileProjectResult"
},
"example": {
"contracts": [
{
"version": "v0.0.1",
"name": "Foo",
"bytecode": "35d1b2a520a0da34c5eb8d712aa9cc",
"bytecodeDebugPatch": "=1-1+ef",
"codeHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"codeHashDebug": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"fields": {
"names": [
"aa",
"bb",
"cc",
"dd",
"ee"
],
"types": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"isMutable": [
false,
true,
false,
true,
false
]
},
"functions": [
{
"name": "bar",
"usePreapprovedAssets": false,
"useAssetsInContract": false,
"isPublic": true,
"paramNames": [
"a",
"b",
"c",
"d",
"e"
],
"paramTypes": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"paramIsMutable": [
false,
true,
false,
true,
false
],
"returnTypes": [
"U256",
"I256",
"ByteVec",
"Address"
]
}
],
"constants": [
{
"name": "A",
"value": {
"type": "Bool",
"value": true
}
}
],
"enums": [
{
"name": "Color",
"fields": [
{
"name": "Red",
"value": {
"type": "U256",
"value": "0"
}
},
{
"name": "Blue",
"value": {
"type": "U256",
"value": "1"
}
}
]
}
],
"events": [
{
"name": "Bar",
"fieldNames": [
"a",
"b",
"d",
"e"
],
"fieldTypes": [
"Bool",
"U256",
"ByteVec",
"Address"
]
}
],
"warnings": [
"Found unused fields in Foo: a"
],
"maps": {
"names": [
"foo"
],
"types": [
"Map[U256,U256]"
]
},
"stdInterfaceId": "0001"
}
],
"scripts": [
{
"version": "v0.0.1",
"name": "Main",
"bytecodeTemplate": "35d1b2a520a0da34c5eb8d712aa9cc",
"bytecodeDebugPatch": "=1-1+ef",
"fields": {
"names": [
"aa",
"bb",
"cc",
"dd",
"ee"
],
"types": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"isMutable": [
false,
true,
false,
true,
false
]
},
"functions": [
{
"name": "bar",
"usePreapprovedAssets": false,
"useAssetsInContract": false,
"isPublic": true,
"paramNames": [
"a",
"b",
"c",
"d",
"e"
],
"paramTypes": [
"Bool",
"U256",
"I256",
"ByteVec",
"Address"
],
"paramIsMutable": [
false,
true,
false,
true,
false
],
"returnTypes": [
"U256",
"I256",
"ByteVec",
"Address"
]
}
],
"warnings": [
"Found unused fields in Foo: a"
]
}
],
"structs": [
{
"name": "Foo",
"fieldNames": [
"amount",
"id"
],
"fieldTypes": [
"U256",
"ByteVec"
],
"isMutable": [
false,
true
]
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/unsigned-tx/deploy-contract": {
"post": {
"tags": [
"Contracts"
],
"summary": "Build an unsigned contract",
"operationId": "postContractsUnsigned-txDeploy-contract",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildDeployContractTx"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"bytecode": "35d1b2a520a0da34c5eb8d712aa9cc"
}
},
"Example1": {
"summary": "More settings",
"value": {
"fromPublicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"fromPublicKeyType": "bip340-schnorr",
"bytecode": "35d1b2a520a0da34c5eb8d712aa9cc",
"initialAttoAlphAmount": "2000000000000000000",
"initialTokenAmounts": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"issueTokenAmount": "2000000000000000000",
"issueTokenTo": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"gasAmount": 20000,
"gasPrice": "100000000000"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildDeployContractTxResult"
},
"example": {
"fromGroup": 2,
"toGroup": 2,
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/{address}/state": {
"get": {
"tags": [
"Contracts"
],
"summary": "Get contract state",
"operationId": "getContractsAddressState",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContractState"
},
"example": {
"address": "vYZdgzNHHp7Qh9U5Rrv5H65eSJCGQTXEC4yuQCZ7mosA",
"bytecode": "00010700000000000118",
"codeHash": "c49d951065f85d0c673d33930e8476240c010a52313f99889ae06d9f0d92d2f9",
"initialStateHash": "e195a4e597e62a6802a456224008b896566b7c961023954fab808a0f83d8ad63",
"immFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"mutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"asset": {
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "2000000000"
}
]
}
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/test-contract": {
"post": {
"tags": [
"Contracts"
],
"summary": "Test contract",
"operationId": "postContractsTest-contract",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestContract"
},
"example": {
"group": 0,
"address": "tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq",
"bytecode": "00010700000000000118",
"initialImmFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"initialMutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"initialAsset": {
"attoAlphAmount": "1000000000000000000",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "1000000000"
}
]
},
"methodIndex": 0,
"args": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"existingContracts": [
{
"address": "vYZdgzNHHp7Qh9U5Rrv5H65eSJCGQTXEC4yuQCZ7mosA",
"bytecode": "00010700000000000118",
"codeHash": "c49d951065f85d0c673d33930e8476240c010a52313f99889ae06d9f0d92d2f9",
"initialStateHash": "e195a4e597e62a6802a456224008b896566b7c961023954fab808a0f83d8ad63",
"immFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"mutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"asset": {
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "2000000000"
}
]
}
}
],
"inputAssets": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"asset": {
"attoAlphAmount": "3000000000000000000",
"tokens": [
{
"id": "20aa1fcc865087d7788302d087e4bc76691218ce5d5013dd1cedaabfac19cca4",
"amount": "3000000000"
}
]
}
}
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestContractResult"
},
"example": {
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"codeHash": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"returns": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"gasUsed": 20000,
"contracts": [
{
"address": "vYZdgzNHHp7Qh9U5Rrv5H65eSJCGQTXEC4yuQCZ7mosA",
"bytecode": "00010700000000000118",
"codeHash": "c49d951065f85d0c673d33930e8476240c010a52313f99889ae06d9f0d92d2f9",
"initialStateHash": "e195a4e597e62a6802a456224008b896566b7c961023954fab808a0f83d8ad63",
"immFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"mutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"asset": {
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "2000000000"
}
]
}
}
],
"txInputs": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"txOutputs": [
{
"type": "ContractOutput",
"hint": 1234,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "1000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"events": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
],
"debugMessages": [
{
"contractAddress": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"message": "Debugging!"
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/call-contract": {
"post": {
"tags": [
"Contracts"
],
"summary": "Call contract",
"operationId": "postContractsCall-contract",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CallContract"
},
"example": {
"group": 0,
"worldStateBlockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"address": "tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq",
"methodIndex": 0,
"args": [
{
"type": "U256",
"value": "0"
}
],
"interestedContracts": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"inputAssets": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"asset": {
"attoAlphAmount": "3000000000000000000",
"tokens": [
{
"id": "20aa1fcc865087d7788302d087e4bc76691218ce5d5013dd1cedaabfac19cca4",
"amount": "3000000000"
}
]
}
}
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CallContractResult"
},
"example": {
"type": "CallContractSucceeded",
"returns": [
{
"type": "U256",
"value": "0"
}
],
"gasUsed": 20000,
"contracts": [
{
"address": "vYZdgzNHHp7Qh9U5Rrv5H65eSJCGQTXEC4yuQCZ7mosA",
"bytecode": "00010700000000000118",
"codeHash": "c49d951065f85d0c673d33930e8476240c010a52313f99889ae06d9f0d92d2f9",
"initialStateHash": "e195a4e597e62a6802a456224008b896566b7c961023954fab808a0f83d8ad63",
"immFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"mutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"asset": {
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "2000000000"
}
]
}
}
],
"txInputs": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"txOutputs": [
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "1000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"events": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
],
"debugMessages": [
{
"contractAddress": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"message": "Debugging!"
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/multicall-contract": {
"post": {
"tags": [
"Contracts"
],
"summary": "Multiple call contract",
"operationId": "postContractsMulticall-contract",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultipleCallContract"
},
"example": {
"calls": [
{
"group": 0,
"worldStateBlockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"address": "tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq",
"methodIndex": 0,
"args": [
{
"type": "U256",
"value": "0"
}
],
"interestedContracts": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"inputAssets": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"asset": {
"attoAlphAmount": "3000000000000000000",
"tokens": [
{
"id": "20aa1fcc865087d7788302d087e4bc76691218ce5d5013dd1cedaabfac19cca4",
"amount": "3000000000"
}
]
}
}
]
}
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultipleCallContractResult"
},
"example": {
"results": [
{
"type": "CallContractSucceeded",
"returns": [
{
"type": "U256",
"value": "0"
}
],
"gasUsed": 20000,
"contracts": [
{
"address": "vYZdgzNHHp7Qh9U5Rrv5H65eSJCGQTXEC4yuQCZ7mosA",
"bytecode": "00010700000000000118",
"codeHash": "c49d951065f85d0c673d33930e8476240c010a52313f99889ae06d9f0d92d2f9",
"initialStateHash": "e195a4e597e62a6802a456224008b896566b7c961023954fab808a0f83d8ad63",
"immFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"mutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"asset": {
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "2000000000"
}
]
}
}
],
"txInputs": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"txOutputs": [
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "1000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"events": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
],
"debugMessages": [
{
"contractAddress": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"message": "Debugging!"
}
]
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/{address}/parent": {
"get": {
"tags": [
"Contracts"
],
"summary": "Get parent contract address",
"operationId": "getContractsAddressParent",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "string",
"format": "address"
},
"example": {
"parent": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/{address}/sub-contracts": {
"get": {
"tags": [
"Contracts"
],
"summary": "Get sub-contract addresses",
"operationId": "getContractsAddressSub-contracts",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
},
{
"name": "start",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubContracts"
},
"example": {
"subContracts": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"nextStart": 10
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/{address}/sub-contracts/current-count": {
"get": {
"tags": [
"Contracts"
],
"summary": "Get current value of the sub-contracts counter for a contract",
"operationId": "getContractsAddressSub-contractsCurrent-count",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int32"
},
"example": 100
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/contracts/call-tx-script": {
"post": {
"tags": [
"Contracts"
],
"summary": "Call TxScript",
"operationId": "postContractsCall-tx-script",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CallTxScript"
},
"example": {
"group": 0,
"bytecode": "0011"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CallTxScriptResult"
},
"example": {
"returns": [
{
"type": "U256",
"value": "1"
},
{
"type": "Bool",
"value": false
}
],
"gasUsed": 100000,
"contracts": [
{
"address": "vYZdgzNHHp7Qh9U5Rrv5H65eSJCGQTXEC4yuQCZ7mosA",
"bytecode": "00010700000000000118",
"codeHash": "c49d951065f85d0c673d33930e8476240c010a52313f99889ae06d9f0d92d2f9",
"initialStateHash": "e195a4e597e62a6802a456224008b896566b7c961023954fab808a0f83d8ad63",
"immFields": [
{
"type": "U256",
"value": "1000000000000000000"
}
],
"mutFields": [
{
"type": "U256",
"value": "2000000000000000000"
}
],
"asset": {
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "2000000000"
}
]
}
}
],
"txInputs": [
"uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S"
],
"txOutputs": [
{
"type": "ContractOutput",
"hint": 1,
"key": "798e9e137aec7c2d59d9655b4ffa640f301f628bf7c365083bb255f6aa5f89ef",
"attoAlphAmount": "1000000000000000000",
"address": "uomjgUz6D4tLejTkQtbNJMY8apAjTm1bgQf7em1wDV7S",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
]
}
],
"events": [],
"debugMessages": []
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/multisig/address": {
"post": {
"tags": [
"Multi-signature"
],
"summary": "Create the multisig address and unlock script",
"operationId": "postMultisigAddress",
"requestBody": {
"description": "Format 1: `1000000000000000000`\n\nFormat 2: `x.y ALPH`, where `1 ALPH = 1000000000000000000\n\nField fromPublicKeyType can be `default` or `bip340-schnorr`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildMultisigAddress"
},
"example": {
"keys": [
"d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28",
"d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
],
"mrequired": 1
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildMultisigAddressResult"
},
"example": {
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/multisig/build": {
"post": {
"tags": [
"Multi-signature"
],
"summary": "Build a multisig unsigned transaction",
"operationId": "postMultisigBuild",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildMultisig"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"fromAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"fromPublicKeys": [
"d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
],
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000"
}
]
}
},
"Example1": {
"summary": "More settings",
"value": {
"fromAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"fromPublicKeys": [
"d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
],
"destinations": [
{
"address": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"attoAlphAmount": "2000000000000000000",
"tokens": [
{
"id": "2d11fd6c12435ffb07aaed4d190a505b621b927a5f6e51b61ce0ebe186397bdd",
"amount": "42000000000000000000"
},
{
"id": "bd165d20bd063c7a023d22232a1e75bf46e904067f92b49323fe89fa0fd586bf",
"amount": "1000000000000000000000"
}
],
"lockTime": 1611041396892
}
],
"gas": 20000,
"gasPrice": "100000000000"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildTransactionResult"
},
"example": {
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/multisig/sweep": {
"post": {
"tags": [
"Multi-signature"
],
"summary": "Sweep all unlocked ALPH and token balances of a multisig address to another address",
"operationId": "postMultisigSweep",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildSweepMultisig"
},
"examples": {
"Example0": {
"summary": "Default",
"value": {
"fromAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"fromPublicKeys": [
"d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
],
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
}
},
"Example1": {
"summary": "More settings",
"value": {
"fromAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"fromPublicKeys": [
"d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
],
"toAddress": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y",
"maxAttoAlphPerUTXO": "1000000000000000000",
"lockTime": 1611041396892,
"gasAmount": 20000,
"gasPrice": "100000000000",
"utxosLimit": 10,
"targetBlockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BuildSweepAddressTransactionsResult"
},
"example": {
"unsignedTxs": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"gasAmount": 20000,
"gasPrice": "100000000000"
}
],
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/multisig/submit": {
"post": {
"tags": [
"Multi-signature"
],
"summary": "Submit a multi-signed transaction",
"operationId": "postMultisigSubmit",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitMultisig"
},
"example": {
"unsignedTx": "35d1b2a520a0da34c5eb8d712aa9cc",
"signatures": [
"9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b"
]
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubmitTxResult"
},
"example": {
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"fromGroup": 2,
"toGroup": 1
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/miners/cpu-mining": {
"post": {
"tags": [
"Miners"
],
"summary": "Execute an action on CPU miner. !!! for test only !!!",
"operationId": "postMinersCpu-mining",
"parameters": [
{
"name": "action",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"examples": {
"Start mining": {
"value": "start-mining"
},
"Stop mining": {
"value": "stop-mining"
}
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "boolean"
},
"example": true
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/miners/cpu-mining/mine-one-block": {
"post": {
"tags": [
"Miners"
],
"summary": "Mine a block on CPU miner. !!! for test only !!!",
"operationId": "postMinersCpu-miningMine-one-block",
"parameters": [
{
"name": "fromGroup",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "toGroup",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "boolean"
},
"example": true
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/miners/addresses": {
"get": {
"tags": [
"Miners"
],
"summary": "List miner's addresses",
"operationId": "getMinersAddresses",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MinerAddresses"
},
"example": {
"addresses": [
"1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
},
"put": {
"tags": [
"Miners"
],
"summary": "Update miner's addresses, but better to use user.conf instead",
"operationId": "putMinersAddresses",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MinerAddresses"
},
"example": {
"addresses": [
"1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
]
}
}
},
"required": true
},
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/events/contract/{contractAddress}": {
"get": {
"tags": [
"Events"
],
"summary": "Get events for a contract within a counter range",
"operationId": "getEventsContractContractaddress",
"parameters": [
{
"name": "contractAddress",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
},
{
"name": "start",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "group",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContractEvents"
},
"example": {
"events": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
],
"nextStart": 2
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/events/contract/{contractAddress}/current-count": {
"get": {
"tags": [
"Events"
],
"summary": "Get current value of the events counter for a contract",
"operationId": "getEventsContractContractaddressCurrent-count",
"parameters": [
{
"name": "contractAddress",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "address"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int32"
},
"example": 100
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/events/tx-id/{txId}": {
"get": {
"tags": [
"Events"
],
"summary": "Get contract events for a transaction",
"operationId": "getEventsTx-idTxid",
"parameters": [
{
"name": "txId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "32-byte-hash"
}
},
{
"name": "group",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContractEventsByTxId"
},
"example": {
"events": [
{
"blockHash": "bdaf9dc514ce7d34b6474b8ca10a3dfb93ba997cb9d5ff1ea724ebe2af48abe5",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/events/block-hash/{blockHash}": {
"get": {
"tags": [
"Events"
],
"summary": "Get contract events for a block",
"operationId": "getEventsBlock-hashBlockhash",
"parameters": [
{
"name": "blockHash",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "block-hash"
}
},
{
"name": "group",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContractEventsByBlockHash"
},
"example": {
"events": [
{
"txId": "503bfb16230888af4924aa8f8250d7d348b862e267d75d3147f1998050b6da69",
"contractAddress": "vSxdLL2kE3o6vJBdKkdgmS3W39G3ZEmFHpo2y1jnbzBq",
"eventIndex": 1,
"fields": [
{
"type": "Address",
"value": "1AujpupFP4KWeZvqA7itsHY9cLJmx4qTzojVZrg8W9y"
},
{
"type": "U256",
"value": "10"
}
]
}
]
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/utils/verify-signature": {
"post": {
"tags": [
"Utils"
],
"summary": "Verify the SecP256K1 signature of some data",
"operationId": "postUtilsVerify-signature",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VerifySignature"
},
"example": {
"data": "35d1b2a520a0da34c5eb8d712aa9cc",
"signature": "9e1a35b2931bd04e6780d01c36e3e5337941aa80f173cfe4f4e249c44ab135272b834c1a639db9c89d673a8a30524042b0469672ca845458a5a0cf2cad53221b",
"publicKey": "d1b70d2226308b46da297486adb6b4f1a8c1842cb159ac5ec04f384fe2d6f5da28"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "boolean"
},
"example": true
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/utils/target-to-hashrate": {
"post": {
"tags": [
"Utils"
],
"summary": "Convert a target to hashrate",
"operationId": "postUtilsTarget-to-hashrate",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TargetToHashrate"
},
"example": {
"target": "1b032b55"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Result"
},
"example": {
"hashrate": "355255758493400"
}
}
}
},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
},
"/utils/check-hash-indexing": {
"put": {
"tags": [
"Utils"
],
"summary": "Check and repair the indexing of block hashes",
"operationId": "putUtilsCheck-hash-indexing",
"responses": {
"200": {},
"400": {
"description": "BadRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequest"
},
"example": {
"detail": "Something bad in the request"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Unauthorized"
},
"example": {
"detail": "You shall not pass"
}
}
}
},
"404": {
"description": "NotFound",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFound"
},
"example": {
"resource": "wallet-name",
"detail": "wallet-name not found"
}
}
}
},
"500": {
"description": "InternalServerError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
},
"example": {
"detail": "Ouch"
}
}
}
},
"503": {
"description": "ServiceUnavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailable"
},
"example": {
"detail": "Self clique unsynced"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"AddressBalance": {
"title": "AddressBalance",
"type": "object",
"required": [
"address",
"balance",
"balanceHint",
"lockedBalance",
"lockedBalanceHint"
],
"properties": {
"address": {
"type": "string",
"format": "address"
},
"balance": {
"type": "string",
"format": "uint256"
},
"balanceHint": {
"type": "string",
"format": "x.x ALPH"
},
"lockedBalance": {
"type": "string",
"format": "uint256"
},
"lockedBalanceHint": {
"type": "string",
"format": "x.x ALPH"
}
}
},
"AddressInfo": {
"title": "AddressInfo",
"type": "object",
"required": [
"address",
"publicKey",
"group",
"path"
],
"properties": {
"address": {
"type": "string",
"format": "address"
},
"publicKey": {
"type": "string",
"format": "public-key"
},
"group": {
"type": "integer",
"format": "group-index"
},
"path": {
"type": "string"
}
}
},
"Addresses": {
"title": "Addresses",
"type": "object",
"required": [
"activeAddress",
"addresses"
],
"properties": {
"activeAddress": {
"type": "string",
"format": "address"
},
"addresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AddressInfo"
}
}
}
},
"AssetInput": {
"title": "AssetInput",
"type": "object",
"required": [
"outputRef",
"unlockScript"
],
"properties": {
"outputRef": {
"$ref": "#/components/schemas/OutputRef"
},
"unlockScript": {
"type": "string",
"format": "hex-string"
}
}
},
"AssetOutput": {
"title": "AssetOutput",
"type": "object",
"required": [
"hint",
"key",
"attoAlphAmount",
"address",
"tokens",
"lockTime",
"message",
"type"
],
"properties": {
"hint": {
"type": "integer",
"format": "int32"
},
"key": {
"type": "string",
"format": "32-byte-hash"
},
"attoAlphAmount": {
"type": "string",
"format": "uint256"
},
"address": {
"type": "string",
"format": "address"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"format": "hex-string"
},
"type": {
"type": "string"
}
}
},
"AssetState": {
"title": "AssetState",
"type": "object",
"required": [
"attoAlphAmount"
],
"properties": {
"attoAlphAmount": {
"type": "string",
"format": "uint256"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"BadRequest": {
"title": "BadRequest",
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"Balance": {
"title": "Balance",
"type": "object",
"required": [
"balance",
"balanceHint",
"lockedBalance",
"lockedBalanceHint",
"utxoNum"
],
"properties": {
"balance": {
"type": "string",
"format": "uint256"
},
"balanceHint": {
"type": "string",
"format": "x.x ALPH"
},
"lockedBalance": {
"type": "string",
"format": "uint256"
},
"lockedBalanceHint": {
"type": "string",
"format": "x.x ALPH"
},
"tokenBalances": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"lockedTokenBalances": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"utxoNum": {
"type": "integer",
"format": "int32"
}
}
},
"Balances": {
"title": "Balances",
"type": "object",
"required": [
"totalBalance",
"totalBalanceHint",
"balances"
],
"properties": {
"totalBalance": {
"type": "string",
"format": "uint256"
},
"totalBalanceHint": {
"type": "string",
"format": "x.x ALPH"
},
"balances": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AddressBalance"
}
}
}
},
"Ban": {
"title": "Ban",
"type": "object",
"required": [
"peers",
"type"
],
"properties": {
"peers": {
"type": "array",
"items": {
"type": "string",
"format": "inet-address"
}
},
"type": {
"type": "string"
}
}
},
"Banned": {
"title": "Banned",
"type": "object",
"required": [
"until",
"type"
],
"properties": {
"until": {
"type": "integer",
"format": "int64"
},
"type": {
"type": "string"
}
}
},
"BlockAndEvents": {
"title": "BlockAndEvents",
"type": "object",
"required": [
"block",
"events"
],
"properties": {
"block": {
"$ref": "#/components/schemas/BlockEntry"
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEventByBlockHash"
}
}
}
},
"BlockEntry": {
"title": "BlockEntry",
"type": "object",
"required": [
"hash",
"timestamp",
"chainFrom",
"chainTo",
"height",
"deps",
"transactions",
"nonce",
"version",
"depStateHash",
"txsHash",
"target",
"ghostUncles"
],
"properties": {
"hash": {
"type": "string",
"format": "block-hash"
},
"timestamp": {
"type": "integer",
"format": "int64"
},
"chainFrom": {
"type": "integer",
"format": "int32"
},
"chainTo": {
"type": "integer",
"format": "int32"
},
"height": {
"type": "integer",
"format": "int32"
},
"deps": {
"type": "array",
"items": {
"type": "string",
"format": "block-hash"
}
},
"transactions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Transaction"
}
},
"nonce": {
"type": "string",
"format": "hex-string"
},
"version": {
"type": "integer"
},
"depStateHash": {
"type": "string",
"format": "32-byte-hash"
},
"txsHash": {
"type": "string",
"format": "32-byte-hash"
},
"target": {
"type": "string",
"format": "hex-string"
},
"ghostUncles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GhostUncleBlockEntry"
}
}
}
},
"BlockHeaderEntry": {
"title": "BlockHeaderEntry",
"type": "object",
"required": [
"hash",
"timestamp",
"chainFrom",
"chainTo",
"height",
"deps"
],
"properties": {
"hash": {
"type": "string",
"format": "block-hash"
},
"timestamp": {
"type": "integer",
"format": "int64"
},
"chainFrom": {
"type": "integer",
"format": "int32"
},
"chainTo": {
"type": "integer",
"format": "int32"
},
"height": {
"type": "integer",
"format": "int32"
},
"deps": {
"type": "array",
"items": {
"type": "string",
"format": "block-hash"
}
}
}
},
"BlocksAndEventsPerTimeStampRange": {
"title": "BlocksAndEventsPerTimeStampRange",
"type": "object",
"required": [
"blocksAndEvents"
],
"properties": {
"blocksAndEvents": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockAndEvents"
}
}
}
}
},
"BlocksPerTimeStampRange": {
"title": "BlocksPerTimeStampRange",
"type": "object",
"required": [
"blocks"
],
"properties": {
"blocks": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockEntry"
}
}
}
}
},
"BrokerInfo": {
"title": "BrokerInfo",
"type": "object",
"required": [
"cliqueId",
"brokerId",
"brokerNum",
"address"
],
"properties": {
"cliqueId": {
"type": "string",
"format": "clique-id"
},
"brokerId": {
"type": "integer",
"format": "int32"
},
"brokerNum": {
"type": "integer",
"format": "int32"
},
"address": {
"type": "object",
"format": "inet-socket-address",
"required": [
"addr",
"port"
],
"properties": {
"addr": {
"type": "string"
},
"port": {
"type": "integer",
"format": "int32"
}
}
}
}
},
"BuildDeployContractTx": {
"title": "BuildDeployContractTx",
"type": "object",
"required": [
"fromPublicKey",
"bytecode"
],
"properties": {
"fromPublicKey": {
"type": "string",
"format": "hex-string"
},
"fromPublicKeyType": {
"type": "string",
"format": "hex-string"
},
"bytecode": {
"type": "string",
"format": "hex-string"
},
"initialAttoAlphAmount": {
"type": "string",
"format": "uint256"
},
"initialTokenAmounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"issueTokenAmount": {
"type": "string",
"format": "uint256"
},
"issueTokenTo": {
"type": "string",
"format": "address"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
}
}
},
"BuildDeployContractTxResult": {
"title": "BuildDeployContractTxResult",
"type": "object",
"required": [
"fromGroup",
"toGroup",
"unsignedTx",
"gasAmount",
"gasPrice",
"txId",
"contractAddress"
],
"properties": {
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
},
"unsignedTx": {
"type": "string"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"contractAddress": {
"type": "string",
"format": "address"
}
}
},
"BuildExecuteScriptTx": {
"title": "BuildExecuteScriptTx",
"type": "object",
"required": [
"fromPublicKey",
"bytecode"
],
"properties": {
"fromPublicKey": {
"type": "string",
"format": "hex-string"
},
"fromPublicKeyType": {
"type": "string",
"format": "hex-string"
},
"bytecode": {
"type": "string",
"format": "hex-string"
},
"attoAlphAmount": {
"type": "string",
"format": "uint256"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
},
"gasEstimationMultiplier": {
"type": "number",
"format": "double"
}
}
},
"BuildExecuteScriptTxResult": {
"title": "BuildExecuteScriptTxResult",
"type": "object",
"required": [
"fromGroup",
"toGroup",
"unsignedTx",
"gasAmount",
"gasPrice",
"txId"
],
"properties": {
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
},
"unsignedTx": {
"type": "string"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
}
}
},
"BuildInfo": {
"title": "BuildInfo",
"type": "object",
"required": [
"releaseVersion",
"commit"
],
"properties": {
"releaseVersion": {
"type": "string"
},
"commit": {
"type": "string"
}
}
},
"BuildMultiAddressesTransaction": {
"title": "BuildMultiAddressesTransaction",
"type": "object",
"required": [
"from"
],
"properties": {
"from": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Source"
}
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
}
}
},
"BuildMultisig": {
"title": "BuildMultisig",
"type": "object",
"required": [
"fromAddress",
"fromPublicKeys",
"destinations"
],
"properties": {
"fromAddress": {
"type": "string",
"format": "address"
},
"fromPublicKeys": {
"type": "array",
"items": {
"type": "string",
"format": "public-key"
}
},
"destinations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Destination"
}
},
"gas": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
}
}
},
"BuildMultisigAddress": {
"title": "BuildMultisigAddress",
"type": "object",
"required": [
"keys",
"mrequired"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string",
"format": "public-key"
}
},
"mrequired": {
"type": "integer",
"format": "int32"
}
}
},
"BuildMultisigAddressResult": {
"title": "BuildMultisigAddressResult",
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"format": "address"
}
}
},
"BuildSweepAddressTransactions": {
"title": "BuildSweepAddressTransactions",
"type": "object",
"required": [
"fromPublicKey",
"toAddress"
],
"properties": {
"fromPublicKey": {
"type": "string",
"format": "public-key"
},
"toAddress": {
"type": "string",
"format": "address"
},
"maxAttoAlphPerUTXO": {
"type": "string",
"format": "uint256"
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
}
}
},
"BuildSweepAddressTransactionsResult": {
"title": "BuildSweepAddressTransactionsResult",
"type": "object",
"required": [
"unsignedTxs",
"fromGroup",
"toGroup"
],
"properties": {
"unsignedTxs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SweepAddressTransaction"
}
},
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
}
}
},
"BuildSweepMultisig": {
"title": "BuildSweepMultisig",
"type": "object",
"required": [
"fromAddress",
"fromPublicKeys",
"toAddress"
],
"properties": {
"fromAddress": {
"type": "string",
"format": "address"
},
"fromPublicKeys": {
"type": "array",
"items": {
"type": "string",
"format": "public-key"
}
},
"toAddress": {
"type": "string",
"format": "address"
},
"maxAttoAlphPerUTXO": {
"type": "string",
"format": "uint256"
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"utxosLimit": {
"type": "integer",
"format": "int32"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
}
}
},
"BuildTransaction": {
"title": "BuildTransaction",
"type": "object",
"required": [
"fromPublicKey",
"destinations"
],
"properties": {
"fromPublicKey": {
"type": "string",
"format": "hex-string"
},
"fromPublicKeyType": {
"type": "string",
"format": "hex-string"
},
"destinations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Destination"
}
},
"utxos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutputRef"
}
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
}
}
},
"BuildTransactionResult": {
"title": "BuildTransactionResult",
"type": "object",
"required": [
"unsignedTx",
"gasAmount",
"gasPrice",
"txId",
"fromGroup",
"toGroup"
],
"properties": {
"unsignedTx": {
"type": "string"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
}
}
},
"CallContract": {
"title": "CallContract",
"type": "object",
"required": [
"group",
"address",
"methodIndex"
],
"properties": {
"group": {
"type": "integer",
"format": "int32"
},
"worldStateBlockHash": {
"type": "string",
"format": "block-hash"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"address": {
"type": "string",
"format": "address"
},
"callerAddress": {
"type": "string",
"format": "address"
},
"methodIndex": {
"type": "integer",
"format": "int32"
},
"args": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"interestedContracts": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
},
"inputAssets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestInputAsset"
}
}
}
},
"CallContractFailed": {
"title": "CallContractFailed",
"type": "object",
"required": [
"error",
"type"
],
"properties": {
"error": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"CallContractResult": {
"title": "CallContractResult",
"oneOf": [
{
"$ref": "#/components/schemas/CallContractFailed"
},
{
"$ref": "#/components/schemas/CallContractSucceeded"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"CallContractFailed": "#/components/schemas/CallContractFailed",
"CallContractSucceeded": "#/components/schemas/CallContractSucceeded"
}
}
},
"CallContractSucceeded": {
"title": "CallContractSucceeded",
"type": "object",
"required": [
"returns",
"gasUsed",
"contracts",
"txInputs",
"txOutputs",
"events",
"debugMessages",
"type"
],
"properties": {
"returns": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"gasUsed": {
"type": "integer",
"format": "int32"
},
"contracts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractState"
}
},
"txInputs": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
},
"txOutputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Output"
}
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEventByTxId"
}
},
"debugMessages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DebugMessage"
}
},
"type": {
"type": "string"
}
}
},
"CallTxScript": {
"title": "CallTxScript",
"type": "object",
"required": [
"group",
"bytecode"
],
"properties": {
"group": {
"type": "integer",
"format": "int32"
},
"bytecode": {
"type": "string",
"format": "hex-string"
},
"callerAddress": {
"type": "string",
"format": "address"
},
"worldStateBlockHash": {
"type": "string",
"format": "block-hash"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"inputAssets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestInputAsset"
}
},
"interestedContracts": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
}
}
},
"CallTxScriptResult": {
"title": "CallTxScriptResult",
"type": "object",
"required": [
"returns",
"gasUsed",
"contracts",
"txInputs",
"txOutputs",
"events",
"debugMessages"
],
"properties": {
"returns": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"gasUsed": {
"type": "integer",
"format": "int32"
},
"contracts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractState"
}
},
"txInputs": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
},
"txOutputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Output"
}
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEventByTxId"
}
},
"debugMessages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DebugMessage"
}
}
}
},
"ChainInfo": {
"title": "ChainInfo",
"type": "object",
"required": [
"currentHeight"
],
"properties": {
"currentHeight": {
"type": "integer",
"format": "int32"
}
}
},
"ChainParams": {
"title": "ChainParams",
"type": "object",
"required": [
"networkId",
"numZerosAtLeastInHash",
"groupNumPerBroker",
"groups"
],
"properties": {
"networkId": {
"type": "integer"
},
"numZerosAtLeastInHash": {
"type": "integer",
"format": "int32"
},
"groupNumPerBroker": {
"type": "integer",
"format": "int32"
},
"groups": {
"type": "integer",
"format": "int32"
}
}
},
"ChangeActiveAddress": {
"title": "ChangeActiveAddress",
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"format": "address"
}
}
},
"CompileContractResult": {
"title": "CompileContractResult",
"type": "object",
"required": [
"version",
"name",
"bytecode",
"bytecodeDebugPatch",
"codeHash",
"codeHashDebug",
"fields",
"functions",
"constants",
"enums",
"events",
"warnings"
],
"properties": {
"version": {
"type": "string"
},
"name": {
"type": "string"
},
"bytecode": {
"type": "string"
},
"bytecodeDebugPatch": {
"type": "string"
},
"codeHash": {
"type": "string",
"format": "32-byte-hash"
},
"codeHashDebug": {
"type": "string",
"format": "32-byte-hash"
},
"fields": {
"$ref": "#/components/schemas/FieldsSig"
},
"functions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FunctionSig"
}
},
"constants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Constant"
}
},
"enums": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Enum"
}
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventSig"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"maps": {
"$ref": "#/components/schemas/MapsSig"
},
"stdInterfaceId": {
"type": "string"
}
}
},
"CompileProjectResult": {
"title": "CompileProjectResult",
"type": "object",
"required": [
"contracts",
"scripts"
],
"properties": {
"contracts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompileContractResult"
}
},
"scripts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompileScriptResult"
}
},
"structs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StructSig"
}
},
"constants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Constant"
}
},
"enums": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Enum"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"CompileScriptResult": {
"title": "CompileScriptResult",
"type": "object",
"required": [
"version",
"name",
"bytecodeTemplate",
"bytecodeDebugPatch",
"fields",
"functions",
"warnings"
],
"properties": {
"version": {
"type": "string"
},
"name": {
"type": "string"
},
"bytecodeTemplate": {
"type": "string"
},
"bytecodeDebugPatch": {
"type": "string"
},
"fields": {
"$ref": "#/components/schemas/FieldsSig"
},
"functions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FunctionSig"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"CompilerOptions": {
"title": "CompilerOptions",
"type": "object",
"properties": {
"ignoreUnusedConstantsWarnings": {
"type": "boolean"
},
"ignoreUnusedVariablesWarnings": {
"type": "boolean"
},
"ignoreUnusedFieldsWarnings": {
"type": "boolean"
},
"ignoreUnusedPrivateFunctionsWarnings": {
"type": "boolean"
},
"ignoreUpdateFieldsCheckWarnings": {
"type": "boolean"
},
"ignoreCheckExternalCallerWarnings": {
"type": "boolean"
},
"ignoreUnusedFunctionReturnWarnings": {
"type": "boolean"
}
}
},
"Confirmed": {
"title": "Confirmed",
"type": "object",
"required": [
"blockHash",
"txIndex",
"chainConfirmations",
"fromGroupConfirmations",
"toGroupConfirmations",
"type"
],
"properties": {
"blockHash": {
"type": "string",
"format": "block-hash"
},
"txIndex": {
"type": "integer",
"format": "int32"
},
"chainConfirmations": {
"type": "integer",
"format": "int32"
},
"fromGroupConfirmations": {
"type": "integer",
"format": "int32"
},
"toGroupConfirmations": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
}
}
},
"Constant": {
"title": "Constant",
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"$ref": "#/components/schemas/Val"
}
}
},
"Contract": {
"title": "Contract",
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
},
"compilerOptions": {
"$ref": "#/components/schemas/CompilerOptions"
}
}
},
"ContractEvent": {
"title": "ContractEvent",
"type": "object",
"required": [
"blockHash",
"txId",
"eventIndex",
"fields"
],
"properties": {
"blockHash": {
"type": "string",
"format": "block-hash"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"eventIndex": {
"type": "integer",
"format": "int32"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
}
}
},
"ContractEventByBlockHash": {
"title": "ContractEventByBlockHash",
"type": "object",
"required": [
"txId",
"contractAddress",
"eventIndex",
"fields"
],
"properties": {
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"contractAddress": {
"type": "string",
"format": "address"
},
"eventIndex": {
"type": "integer",
"format": "int32"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
}
}
},
"ContractEventByTxId": {
"title": "ContractEventByTxId",
"type": "object",
"required": [
"blockHash",
"contractAddress",
"eventIndex",
"fields"
],
"properties": {
"blockHash": {
"type": "string",
"format": "block-hash"
},
"contractAddress": {
"type": "string",
"format": "address"
},
"eventIndex": {
"type": "integer",
"format": "int32"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
}
}
},
"ContractEvents": {
"title": "ContractEvents",
"type": "object",
"required": [
"events",
"nextStart"
],
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEvent"
}
},
"nextStart": {
"type": "integer",
"format": "int32"
}
}
},
"ContractEventsByBlockHash": {
"title": "ContractEventsByBlockHash",
"type": "object",
"required": [
"events"
],
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEventByBlockHash"
}
}
}
},
"ContractEventsByTxId": {
"title": "ContractEventsByTxId",
"type": "object",
"required": [
"events"
],
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEventByTxId"
}
}
}
},
"ContractOutput": {
"title": "ContractOutput",
"type": "object",
"required": [
"hint",
"key",
"attoAlphAmount",
"address",
"tokens",
"type"
],
"properties": {
"hint": {
"type": "integer",
"format": "int32"
},
"key": {
"type": "string",
"format": "32-byte-hash"
},
"attoAlphAmount": {
"type": "string",
"format": "uint256"
},
"address": {
"type": "string",
"format": "address"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"type": {
"type": "string"
}
}
},
"ContractState": {
"title": "ContractState",
"type": "object",
"required": [
"address",
"bytecode",
"codeHash",
"immFields",
"mutFields",
"asset"
],
"properties": {
"address": {
"type": "string",
"format": "address"
},
"bytecode": {
"type": "string",
"format": "contract"
},
"codeHash": {
"type": "string",
"format": "32-byte-hash"
},
"initialStateHash": {
"type": "string",
"format": "32-byte-hash"
},
"immFields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"mutFields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"asset": {
"$ref": "#/components/schemas/AssetState"
}
}
},
"CurrentDifficulty": {
"title": "CurrentDifficulty",
"type": "object",
"required": [
"difficulty"
],
"properties": {
"difficulty": {
"type": "string",
"format": "bigint"
}
}
},
"DebugMessage": {
"title": "DebugMessage",
"type": "object",
"required": [
"contractAddress",
"message"
],
"properties": {
"contractAddress": {
"type": "string",
"format": "address"
},
"message": {
"type": "string"
}
}
},
"DecodeUnsignedTx": {
"title": "DecodeUnsignedTx",
"type": "object",
"required": [
"unsignedTx"
],
"properties": {
"unsignedTx": {
"type": "string"
}
}
},
"DecodeUnsignedTxResult": {
"title": "DecodeUnsignedTxResult",
"type": "object",
"required": [
"fromGroup",
"toGroup",
"unsignedTx"
],
"properties": {
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
},
"unsignedTx": {
"$ref": "#/components/schemas/UnsignedTx"
}
}
},
"Destination": {
"title": "Destination",
"type": "object",
"required": [
"address",
"attoAlphAmount"
],
"properties": {
"address": {
"type": "string",
"format": "address"
},
"attoAlphAmount": {
"type": "string",
"format": "uint256"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"format": "hex-string"
}
}
},
"DiscoveryAction": {
"title": "DiscoveryAction",
"oneOf": [
{
"$ref": "#/components/schemas/Reachable"
},
{
"$ref": "#/components/schemas/Unreachable"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"Reachable": "#/components/schemas/Reachable",
"Unreachable": "#/components/schemas/Unreachable"
}
}
},
"Enum": {
"title": "Enum",
"type": "object",
"required": [
"name",
"fields"
],
"properties": {
"name": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EnumField"
}
}
}
},
"EnumField": {
"title": "EnumField",
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"$ref": "#/components/schemas/Val"
}
}
},
"EventSig": {
"title": "EventSig",
"type": "object",
"required": [
"name",
"fieldNames",
"fieldTypes"
],
"properties": {
"name": {
"type": "string"
},
"fieldNames": {
"type": "array",
"items": {
"type": "string"
}
},
"fieldTypes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"FieldsSig": {
"title": "FieldsSig",
"type": "object",
"required": [
"names",
"types",
"isMutable"
],
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
}
},
"types": {
"type": "array",
"items": {
"type": "string"
}
},
"isMutable": {
"type": "array",
"items": {
"type": "boolean"
}
}
}
},
"FixedAssetOutput": {
"title": "FixedAssetOutput",
"type": "object",
"required": [
"hint",
"key",
"attoAlphAmount",
"address",
"tokens",
"lockTime",
"message"
],
"properties": {
"hint": {
"type": "integer",
"format": "int32"
},
"key": {
"type": "string",
"format": "32-byte-hash"
},
"attoAlphAmount": {
"type": "string",
"format": "uint256"
},
"address": {
"type": "string",
"format": "address"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"format": "hex-string"
}
}
},
"FunctionSig": {
"title": "FunctionSig",
"type": "object",
"required": [
"name",
"usePreapprovedAssets",
"useAssetsInContract",
"isPublic",
"paramNames",
"paramTypes",
"paramIsMutable",
"returnTypes"
],
"properties": {
"name": {
"type": "string"
},
"usePreapprovedAssets": {
"type": "boolean"
},
"useAssetsInContract": {
"type": "boolean"
},
"isPublic": {
"type": "boolean"
},
"paramNames": {
"type": "array",
"items": {
"type": "string"
}
},
"paramTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"paramIsMutable": {
"type": "array",
"items": {
"type": "boolean"
}
},
"returnTypes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"GhostUncleBlockEntry": {
"title": "GhostUncleBlockEntry",
"type": "object",
"required": [
"blockHash",
"miner"
],
"properties": {
"blockHash": {
"type": "string",
"format": "block-hash"
},
"miner": {
"type": "string",
"format": "address"
}
}
},
"Group": {
"title": "Group",
"type": "object",
"required": [
"group"
],
"properties": {
"group": {
"type": "integer",
"format": "int32"
}
}
},
"HashRateResponse": {
"title": "HashRateResponse",
"type": "object",
"required": [
"hashrate"
],
"properties": {
"hashrate": {
"type": "string"
}
}
},
"HashesAtHeight": {
"title": "HashesAtHeight",
"type": "object",
"required": [
"headers"
],
"properties": {
"headers": {
"type": "array",
"items": {
"type": "string",
"format": "block-hash"
}
}
}
},
"InterCliquePeerInfo": {
"title": "InterCliquePeerInfo",
"type": "object",
"required": [
"cliqueId",
"brokerId",
"groupNumPerBroker",
"address",
"isSynced",
"clientVersion"
],
"properties": {
"cliqueId": {
"type": "string",
"format": "clique-id"
},
"brokerId": {
"type": "integer",
"format": "int32"
},
"groupNumPerBroker": {
"type": "integer",
"format": "int32"
},
"address": {
"type": "object",
"format": "inet-socket-address",
"required": [
"addr",
"port"
],
"properties": {
"addr": {
"type": "string"
},
"port": {
"type": "integer",
"format": "int32"
}
}
},
"isSynced": {
"type": "boolean"
},
"clientVersion": {
"type": "string"
}
}
},
"InternalServerError": {
"title": "InternalServerError",
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"MapsSig": {
"title": "MapsSig",
"type": "object",
"required": [
"names",
"types"
],
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
}
},
"types": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"MemPooled": {
"title": "MemPooled",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
}
}
},
"MempoolTransactions": {
"title": "MempoolTransactions",
"type": "object",
"required": [
"fromGroup",
"toGroup",
"transactions"
],
"properties": {
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
},
"transactions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransactionTemplate"
}
}
}
},
"MinerAddresses": {
"title": "MinerAddresses",
"type": "object",
"required": [
"addresses"
],
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
}
}
},
"MinerAddressesInfo": {
"title": "MinerAddressesInfo",
"type": "object",
"required": [
"addresses"
],
"properties": {
"addresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AddressInfo"
}
}
}
},
"MisbehaviorAction": {
"title": "MisbehaviorAction",
"oneOf": [
{
"$ref": "#/components/schemas/Ban"
},
{
"$ref": "#/components/schemas/Unban"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"Ban": "#/components/schemas/Ban",
"Unban": "#/components/schemas/Unban"
}
}
},
"MultipleCallContract": {
"title": "MultipleCallContract",
"type": "object",
"required": [
"calls"
],
"properties": {
"calls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CallContract"
}
}
}
},
"MultipleCallContractResult": {
"title": "MultipleCallContractResult",
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CallContractResult"
}
}
}
},
"NodeInfo": {
"title": "NodeInfo",
"type": "object",
"required": [
"buildInfo",
"upnp"
],
"properties": {
"buildInfo": {
"$ref": "#/components/schemas/BuildInfo"
},
"upnp": {
"type": "boolean"
},
"externalAddress": {
"type": "object",
"format": "inet-socket-address",
"required": [
"addr",
"port"
],
"properties": {
"addr": {
"type": "string"
},
"port": {
"type": "integer",
"format": "int32"
}
}
}
}
},
"NodeVersion": {
"title": "NodeVersion",
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "string",
"format": "semver"
}
}
},
"NotFound": {
"title": "NotFound",
"type": "object",
"required": [
"detail",
"resource"
],
"properties": {
"detail": {
"type": "string"
},
"resource": {
"type": "string"
}
}
},
"Output": {
"title": "Output",
"oneOf": [
{
"$ref": "#/components/schemas/AssetOutput"
},
{
"$ref": "#/components/schemas/ContractOutput"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"AssetOutput": "#/components/schemas/AssetOutput",
"ContractOutput": "#/components/schemas/ContractOutput"
}
}
},
"OutputRef": {
"title": "OutputRef",
"type": "object",
"required": [
"hint",
"key"
],
"properties": {
"hint": {
"type": "integer",
"format": "int32"
},
"key": {
"type": "string",
"format": "32-byte-hash"
}
}
},
"PeerAddress": {
"title": "PeerAddress",
"type": "object",
"required": [
"address",
"restPort",
"wsPort",
"minerApiPort"
],
"properties": {
"address": {
"type": "string",
"format": "inet-address"
},
"restPort": {
"type": "integer",
"format": "int32"
},
"wsPort": {
"type": "integer",
"format": "int32"
},
"minerApiPort": {
"type": "integer",
"format": "int32"
}
}
},
"PeerMisbehavior": {
"title": "PeerMisbehavior",
"type": "object",
"required": [
"peer",
"status"
],
"properties": {
"peer": {
"type": "string",
"format": "inet-address"
},
"status": {
"$ref": "#/components/schemas/PeerStatus"
}
}
},
"PeerStatus": {
"title": "PeerStatus",
"oneOf": [
{
"$ref": "#/components/schemas/Banned"
},
{
"$ref": "#/components/schemas/Penalty"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"Banned": "#/components/schemas/Banned",
"Penalty": "#/components/schemas/Penalty"
}
}
},
"Penalty": {
"title": "Penalty",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
}
}
},
"Project": {
"title": "Project",
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
},
"compilerOptions": {
"$ref": "#/components/schemas/CompilerOptions"
}
}
},
"RawBlock": {
"title": "RawBlock",
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"format": "hex-string"
}
}
},
"RawTransaction": {
"title": "RawTransaction",
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"format": "hex-string"
}
}
},
"Reachable": {
"title": "Reachable",
"type": "object",
"required": [
"peers",
"type"
],
"properties": {
"peers": {
"type": "array",
"items": {
"type": "string",
"format": "inet-address"
}
},
"type": {
"type": "string"
}
}
},
"Result": {
"title": "Result",
"type": "object",
"required": [
"hashrate"
],
"properties": {
"hashrate": {
"type": "string",
"format": "bigint"
}
}
},
"RevealMnemonic": {
"title": "RevealMnemonic",
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string"
}
}
},
"RevealMnemonicResult": {
"title": "RevealMnemonicResult",
"type": "object",
"required": [
"mnemonic"
],
"properties": {
"mnemonic": {
"type": "string"
}
}
},
"Script": {
"title": "Script",
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
},
"compilerOptions": {
"$ref": "#/components/schemas/CompilerOptions"
}
}
},
"SelfClique": {
"title": "SelfClique",
"type": "object",
"required": [
"cliqueId",
"nodes",
"selfReady",
"synced"
],
"properties": {
"cliqueId": {
"type": "string",
"format": "clique-id"
},
"nodes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PeerAddress"
}
},
"selfReady": {
"type": "boolean"
},
"synced": {
"type": "boolean"
}
}
},
"ServiceUnavailable": {
"title": "ServiceUnavailable",
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"Sign": {
"title": "Sign",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "string",
"format": "32-byte-hash"
}
}
},
"SignResult": {
"title": "SignResult",
"type": "object",
"required": [
"signature"
],
"properties": {
"signature": {
"type": "string",
"format": "signature"
}
}
},
"Source": {
"title": "Source",
"type": "object",
"required": [
"fromPublicKey",
"destinations"
],
"properties": {
"fromPublicKey": {
"type": "string",
"format": "hex-string"
},
"destinations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Destination"
}
},
"fromPublicKeyType": {
"type": "string",
"format": "hex-string"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"utxos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutputRef"
}
}
}
},
"StructSig": {
"title": "StructSig",
"type": "object",
"required": [
"name",
"fieldNames",
"fieldTypes",
"isMutable"
],
"properties": {
"name": {
"type": "string"
},
"fieldNames": {
"type": "array",
"items": {
"type": "string"
}
},
"fieldTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"isMutable": {
"type": "array",
"items": {
"type": "boolean"
}
}
}
},
"SubContracts": {
"title": "SubContracts",
"type": "object",
"required": [
"subContracts",
"nextStart"
],
"properties": {
"subContracts": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
},
"nextStart": {
"type": "integer",
"format": "int32"
}
}
},
"SubmitMultisig": {
"title": "SubmitMultisig",
"type": "object",
"required": [
"unsignedTx",
"signatures"
],
"properties": {
"unsignedTx": {
"type": "string"
},
"signatures": {
"type": "array",
"items": {
"type": "string",
"format": "signature"
}
}
}
},
"SubmitTransaction": {
"title": "SubmitTransaction",
"type": "object",
"required": [
"unsignedTx",
"signature"
],
"properties": {
"unsignedTx": {
"type": "string"
},
"signature": {
"type": "string",
"format": "signature"
}
}
},
"SubmitTxResult": {
"title": "SubmitTxResult",
"type": "object",
"required": [
"txId",
"fromGroup",
"toGroup"
],
"properties": {
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"fromGroup": {
"type": "integer",
"format": "int32"
},
"toGroup": {
"type": "integer",
"format": "int32"
}
}
},
"Sweep": {
"title": "Sweep",
"type": "object",
"required": [
"toAddress"
],
"properties": {
"toAddress": {
"type": "string",
"format": "address"
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"utxosLimit": {
"type": "integer",
"format": "int32"
},
"targetBlockHash": {
"type": "string",
"format": "block-hash"
}
}
},
"SweepAddressTransaction": {
"title": "SweepAddressTransaction",
"type": "object",
"required": [
"txId",
"unsignedTx",
"gasAmount",
"gasPrice"
],
"properties": {
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"unsignedTx": {
"type": "string"
},
"gasAmount": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
}
}
},
"TargetToHashrate": {
"title": "TargetToHashrate",
"type": "object",
"required": [
"target"
],
"properties": {
"target": {
"type": "string",
"format": "hex-string"
}
}
},
"TestContract": {
"title": "TestContract",
"type": "object",
"required": [
"bytecode"
],
"properties": {
"group": {
"type": "integer",
"format": "int32"
},
"blockHash": {
"type": "string",
"format": "block-hash"
},
"blockTimeStamp": {
"type": "integer",
"format": "int64"
},
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"address": {
"type": "string",
"format": "address"
},
"callerAddress": {
"type": "string",
"format": "address"
},
"bytecode": {
"type": "string",
"format": "contract"
},
"initialImmFields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"initialMutFields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"initialAsset": {
"$ref": "#/components/schemas/AssetState"
},
"methodIndex": {
"type": "integer",
"format": "int32"
},
"args": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"existingContracts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractState"
}
},
"inputAssets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestInputAsset"
}
}
}
},
"TestContractResult": {
"title": "TestContractResult",
"type": "object",
"required": [
"address",
"codeHash",
"returns",
"gasUsed",
"contracts",
"txInputs",
"txOutputs",
"events",
"debugMessages"
],
"properties": {
"address": {
"type": "string",
"format": "address"
},
"codeHash": {
"type": "string",
"format": "32-byte-hash"
},
"returns": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"gasUsed": {
"type": "integer",
"format": "int32"
},
"contracts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractState"
}
},
"txInputs": {
"type": "array",
"items": {
"type": "string",
"format": "address"
}
},
"txOutputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Output"
}
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContractEventByTxId"
}
},
"debugMessages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DebugMessage"
}
}
}
},
"TestInputAsset": {
"title": "TestInputAsset",
"type": "object",
"required": [
"address",
"asset"
],
"properties": {
"address": {
"type": "string",
"format": "address"
},
"asset": {
"$ref": "#/components/schemas/AssetState"
}
}
},
"Token": {
"title": "Token",
"type": "object",
"required": [
"id",
"amount"
],
"properties": {
"id": {
"type": "string",
"format": "32-byte-hash"
},
"amount": {
"type": "string",
"format": "uint256"
}
}
},
"Transaction": {
"title": "Transaction",
"type": "object",
"required": [
"unsigned",
"scriptExecutionOk",
"contractInputs",
"generatedOutputs",
"inputSignatures",
"scriptSignatures"
],
"properties": {
"unsigned": {
"$ref": "#/components/schemas/UnsignedTx"
},
"scriptExecutionOk": {
"type": "boolean"
},
"contractInputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutputRef"
}
},
"generatedOutputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Output"
}
},
"inputSignatures": {
"type": "array",
"items": {
"type": "string",
"format": "hex-string"
}
},
"scriptSignatures": {
"type": "array",
"items": {
"type": "string",
"format": "hex-string"
}
}
}
},
"TransactionTemplate": {
"title": "TransactionTemplate",
"type": "object",
"required": [
"unsigned",
"inputSignatures",
"scriptSignatures"
],
"properties": {
"unsigned": {
"$ref": "#/components/schemas/UnsignedTx"
},
"inputSignatures": {
"type": "array",
"items": {
"type": "string",
"format": "hex-string"
}
},
"scriptSignatures": {
"type": "array",
"items": {
"type": "string",
"format": "hex-string"
}
}
}
},
"Transfer": {
"title": "Transfer",
"type": "object",
"required": [
"destinations"
],
"properties": {
"destinations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Destination"
}
},
"gas": {
"type": "integer",
"format": "gas"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"utxosLimit": {
"type": "integer",
"format": "int32"
}
}
},
"TransferResult": {
"title": "TransferResult",
"type": "object",
"required": [
"txId",
"fromGroup",
"toGroup"
],
"properties": {
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"fromGroup": {
"type": "integer",
"format": "group-index"
},
"toGroup": {
"type": "integer",
"format": "group-index"
}
}
},
"TransferResults": {
"title": "TransferResults",
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransferResult"
}
}
}
},
"TxNotFound": {
"title": "TxNotFound",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
}
}
},
"TxStatus": {
"title": "TxStatus",
"oneOf": [
{
"$ref": "#/components/schemas/Confirmed"
},
{
"$ref": "#/components/schemas/MemPooled"
},
{
"$ref": "#/components/schemas/TxNotFound"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"Confirmed": "#/components/schemas/Confirmed",
"MemPooled": "#/components/schemas/MemPooled",
"TxNotFound": "#/components/schemas/TxNotFound"
}
}
},
"UTXO": {
"title": "UTXO",
"type": "object",
"required": [
"ref",
"amount"
],
"properties": {
"ref": {
"$ref": "#/components/schemas/OutputRef"
},
"amount": {
"type": "string",
"format": "uint256"
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
},
"lockTime": {
"type": "integer",
"format": "int64"
},
"additionalData": {
"type": "string",
"format": "hex-string"
}
}
},
"UTXOs": {
"title": "UTXOs",
"type": "object",
"required": [
"utxos"
],
"properties": {
"utxos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UTXO"
}
}
}
},
"Unauthorized": {
"title": "Unauthorized",
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"Unban": {
"title": "Unban",
"type": "object",
"required": [
"peers",
"type"
],
"properties": {
"peers": {
"type": "array",
"items": {
"type": "string",
"format": "inet-address"
}
},
"type": {
"type": "string"
}
}
},
"Unreachable": {
"title": "Unreachable",
"type": "object",
"required": [
"peers",
"type"
],
"properties": {
"peers": {
"type": "array",
"items": {
"type": "string",
"format": "inet-address"
}
},
"type": {
"type": "string"
}
}
},
"UnsignedTx": {
"title": "UnsignedTx",
"type": "object",
"required": [
"txId",
"version",
"networkId",
"gasAmount",
"gasPrice",
"inputs",
"fixedOutputs"
],
"properties": {
"txId": {
"type": "string",
"format": "32-byte-hash"
},
"version": {
"type": "integer"
},
"networkId": {
"type": "integer"
},
"scriptOpt": {
"type": "string",
"format": "script"
},
"gasAmount": {
"type": "integer",
"format": "int32"
},
"gasPrice": {
"type": "string",
"format": "uint256"
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssetInput"
}
},
"fixedOutputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FixedAssetOutput"
}
}
}
},
"Val": {
"title": "Val",
"oneOf": [
{
"$ref": "#/components/schemas/ValAddress"
},
{
"$ref": "#/components/schemas/ValArray"
},
{
"$ref": "#/components/schemas/ValBool"
},
{
"$ref": "#/components/schemas/ValByteVec"
},
{
"$ref": "#/components/schemas/ValI256"
},
{
"$ref": "#/components/schemas/ValU256"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"ValAddress": "#/components/schemas/ValAddress",
"ValArray": "#/components/schemas/ValArray",
"ValBool": "#/components/schemas/ValBool",
"ValByteVec": "#/components/schemas/ValByteVec",
"ValI256": "#/components/schemas/ValI256",
"ValU256": "#/components/schemas/ValU256"
}
}
},
"ValAddress": {
"title": "ValAddress",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "string",
"format": "address"
},
"type": {
"type": "string"
}
}
},
"ValArray": {
"title": "ValArray",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Val"
}
},
"type": {
"type": "string"
}
}
},
"ValBool": {
"title": "ValBool",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "boolean"
},
"type": {
"type": "string"
}
}
},
"ValByteVec": {
"title": "ValByteVec",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "string",
"format": "hex-string"
},
"type": {
"type": "string"
}
}
},
"ValI256": {
"title": "ValI256",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "string",
"format": "bigint"
},
"type": {
"type": "string"
}
}
},
"ValU256": {
"title": "ValU256",
"type": "object",
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "string",
"format": "uint256"
},
"type": {
"type": "string"
}
}
},
"VerifySignature": {
"title": "VerifySignature",
"type": "object",
"required": [
"data",
"signature",
"publicKey"
],
"properties": {
"data": {
"type": "string",
"format": "hex-string"
},
"signature": {
"type": "string",
"format": "signature"
},
"publicKey": {
"type": "string",
"format": "public-key"
}
}
},
"WalletCreation": {
"title": "WalletCreation",
"type": "object",
"required": [
"password",
"walletName"
],
"properties": {
"password": {
"type": "string"
},
"walletName": {
"type": "string"
},
"isMiner": {
"type": "boolean"
},
"mnemonicPassphrase": {
"type": "string"
},
"mnemonicSize": {
"type": "integer"
}
}
},
"WalletCreationResult": {
"title": "WalletCreationResult",
"type": "object",
"required": [
"walletName",
"mnemonic"
],
"properties": {
"walletName": {
"type": "string"
},
"mnemonic": {
"type": "string"
}
}
},
"WalletDeletion": {
"title": "WalletDeletion",
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string"
}
}
},
"WalletRestore": {
"title": "WalletRestore",
"type": "object",
"required": [
"password",
"mnemonic",
"walletName"
],
"properties": {
"password": {
"type": "string"
},
"mnemonic": {
"type": "string"
},
"walletName": {
"type": "string"
},
"isMiner": {
"type": "boolean"
},
"mnemonicPassphrase": {
"type": "string"
}
}
},
"WalletRestoreResult": {
"title": "WalletRestoreResult",
"type": "object",
"required": [
"walletName"
],
"properties": {
"walletName": {
"type": "string"
}
}
},
"WalletStatus": {
"title": "WalletStatus",
"type": "object",
"required": [
"walletName",
"locked"
],
"properties": {
"walletName": {
"type": "string"
},
"locked": {
"type": "boolean"
}
}
},
"WalletUnlock": {
"title": "WalletUnlock",
"type": "object",
"required": [
"password"
],
"properties": {
"password": {
"type": "string"
},
"mnemonicPassphrase": {
"type": "string"
}
}
}
}
}
}