summaryrefslogtreecommitdiff
path: root/daemon/algod/api/algod.oas2.json
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/algod/api/algod.oas2.json')
-rw-r--r--daemon/algod/api/algod.oas2.json324
1 files changed, 290 insertions, 34 deletions
diff --git a/daemon/algod/api/algod.oas2.json b/daemon/algod/api/algod.oas2.json
index 46e15396f..57b719d5a 100644
--- a/daemon/algod/api/algod.oas2.json
+++ b/daemon/algod/api/algod.oas2.json
@@ -462,59 +462,224 @@
}
}
},
- "/v2/register-participation-keys/{address}": {
+ "/v2/participation": {
+
+ "get": {
+
+ "tags": [
+ "private"
+ ],
+
+ "description": "Return a list of participation keys",
+ "produces": [
+ "application/json"
+ ],
+ "schemes": [
+ "http"
+ ],
+ "summary": "Return a list of participation keys",
+ "operationId": "GetParticipationKeys",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "$ref": "#/responses/ParticipationKeysResponse"
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "401": {
+ "description": "Invalid API Token",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "404": {
+ "description": "Application Not Found",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "500": {
+ "description": "Internal Error",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "default": {
+ "description": "Unknown Error"
+ }
+ }
+ },
+
+
"post": {
- "description": "Generate (or renew) and register participation keys on the node for a given account address.",
+
"tags": [
"private"
],
- "operationId": "RegisterParticipationKeys",
+
+ "consumes": [
+ "application/msgpack"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "schemes": [
+ "http"
+ ],
+ "summary": "Add a participation key to the node",
+ "operationId": "AddParticipationKey",
"parameters": [
{
- "type": "string",
- "description": "The `account-id` to update, or `all` to update all accounts.",
- "name": "address",
- "in": "path",
- "required": true
+ "description": "The participation key to add to the node",
+ "name": "participationkey",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ ],
+
+ "responses": {
+ "200": {
+ "$ref": "#/responses/PostParticipationResponse"
},
- {
- "type": "integer",
- "default": 1000,
- "description": "The fee to use when submitting key registration transactions. Defaults to the suggested fee.",
- "name": "fee",
- "in": "query"
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
},
- {
- "type": "integer",
- "description": "value to use for two-level participation key.",
- "name": "key-dilution",
- "in": "query"
+ "401": {
+ "description": "Invalid API Token",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
},
- {
- "type": "integer",
- "description": "The last round for which the generated participation keys will be valid.",
- "name": "round-last-valid",
- "in": "query"
+ "500": {
+ "description": "Internal Error",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
},
- {
- "type": "boolean",
- "description": "Don't wait for transaction to commit before returning response.",
- "name": "no-wait",
- "in": "query"
+ "503": {
+ "description": "Service Temporarily Unavailable",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "default": {
+ "description": "Unknown Error"
+ }
+ }
+
+ }
+
+ },
+ "/v2/participation/{participation-id}": {
+ "delete": {
+
+ "tags": [
+ "private"
+ ],
+
+ "description": "Delete a given participation key by id",
+ "produces": [
+ "application/json"
+ ],
+
+ "schemes": [
+ "http"
+ ],
+ "summary": "Delete a given participation key by id",
+ "operationId": "DeleteParticipationKeyByID",
+ "responses": {
+ "200": {
+ "$ref": "#/responses/DeleteParticipationIdResponse"
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "401": {
+ "description": "Invalid API Token",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "500": {
+ "description": "Internal Error",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "default": {
+ "description": "Unknown Error"
}
+ }
+
+ },
+
+ "get": {
+
+ "tags": [
+ "private"
+ ],
+
+ "description": "Given a participation id, return information about that participation key",
+ "produces": [
+ "application/json"
],
+ "schemes": [
+ "http"
+ ],
+ "summary": "Get participation key info by id",
+ "operationId": "GetParticipationKeyByID",
"responses": {
"200": {
"description": "OK",
- "$ref": "#/responses/PostTransactionsResponse"
+ "$ref": "#/responses/ParticipationKeyResponse"
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "401": {
+ "description": "Invalid API Token",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "404": {
+ "description": "Application Not Found",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "500": {
+ "description": "Internal Error",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "default": {
+ "description": "Unknown Error"
}
}
},
"parameters": [
{
"type": "string",
- "description": "Account address where keys will be registered.",
- "name": "address",
+ "name": "participation-id",
"in": "path",
"required": true
}
@@ -1496,6 +1661,52 @@
}
}
},
+ "ParticipationKey": {
+ "description": "Represents a participation key used by the node.",
+ "type": "object",
+ "required": [
+ "id",
+ "key",
+ "address"
+ ],
+ "properties": {
+ "id": {
+ "description": "The key's ParticipationID.",
+ "type": "string"
+ },
+ "address": {
+ "description": "Address the key was generated for.",
+ "type": "string",
+ "x-algorand-format": "Address"
+ },
+ "effective-first-valid": {
+ "description": "When registered, this is the first round it may be used.",
+ "type": "integer",
+ "x-algorand-format": "uint64"
+ },
+ "effective-last-valid": {
+ "description": "When registered, this is the last round it may be used.",
+ "type": "integer",
+ "x-algorand-format": "uint64"
+ },
+ "last-vote": {
+ "description": "Round when this key was last used to vote.",
+ "type": "integer"
+ },
+ "last-block-proposal": {
+ "description": "Round when this key was last used to propose a block.",
+ "type": "integer"
+ },
+ "last-state-proof": {
+ "description": "Round when this key was last used to generate a state proof.",
+ "type": "integer"
+ },
+ "key": {
+ "description": "Key information stored on the account.",
+ "$ref": "#/definitions/AccountParticipation"
+ }
+ }
+ },
"TealKeyValueStore": {
"description": "Represents a key-value store for use in an application.",
"type": "array",
@@ -1529,7 +1740,7 @@
],
"properties": {
"type": {
- "description": "\\[tt\\] value type.",
+ "description": "\\[tt\\] value type. Value `1` refers to **bytes**, value `2` refers to **uint**",
"type": "integer"
},
"bytes": {
@@ -1657,7 +1868,7 @@
"$ref": "#/definitions/ApplicationStateSchema"
},
"global-state-schema": {
- "description": "[\\lsch\\] global schema",
+ "description": "[\\gsch\\] global schema",
"$ref": "#/definitions/ApplicationStateSchema"
},
"global-state": {
@@ -2366,6 +2577,51 @@
}
}
},
+
+ "ParticipationKeysResponse": {
+ "description": "A list of participation keys",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ParticipationKey"
+ }
+ }
+ },
+ "ParticipationKeyResponse": {
+ "description": "A detailed description of a participation id",
+ "schema": {
+ "type": "object",
+ "required": [
+ "participationKey"
+ ],
+ "properties": {
+ "participationKey": {
+ "description": "Detailed description of a participation key",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "DeleteParticipationIdResponse" : {
+ "description": "Participation key got deleted by ID"
+ },
+ "PostParticipationResponse" : {
+ "description": "Participation ID of the submission",
+ "schema": {
+ "type": "object",
+ "required": [
+ "partId"
+ ],
+ "properties": {
+ "partId": {
+ "description": "encoding of the participation id.",
+ "type": "string"
+ }
+ }
+ }
+
+ },
+
"PostTransactionsResponse": {
"description": "Transaction ID of the submission.",
"schema": {