AtomicNet ABC Proxy Service

Proxy service for the ABC ledger: register an ABC account against an AtomicNet ID, look up account information, memorialize a digest and verify that a digest was memorialized, sign a digest and verify a signature, and create and faucet accounts on the ABC testnet. Fourteen operations secured with OAuth 2.0 client credentials.

OpenAPI Specification

polysign-abc-proxy-service-openapi.json Raw ↑
{"info": {"description": "This document lists all AtomicNet ABC Proxy Service APIs for development use.", "license": {"name": "PolySign License", "url": "https://polysign.io/licenses/LICENSE-1.0"}, "title": "AtomicNet ABC Proxy Service", "version": "5fddf272a23655e1582a8a157a8d0ac8e0d517e2"}, "components": {"securitySchemes": {"OAuth2": {"type": "oauth2", "description": "OAuth 2.0 with the client credentials grant flow.", "flows": {"clientCredentials": {"tokenUrl": "/v1/auth/token", "scopes": {"participant": "Grants access to participant."}}}}}, "schemas": {"ABCAccount": {"type": "object", "properties": {"public_key": {"type": "string", "description": "The ABC account public key."}, "role": {"type": "string", "description": "Role of the AtomicNet node in the protocol."}, "private_key": {"type": "string", "default": null, "nullable": true, "description": "The ABC account private key."}, "account_id": {"type": "string", "description": "Identifier of the ABC account."}, "atomicnet_id": {"type": "string", "format": "uuid", "description": "Identifier of the AtomicNet Participant."}}, "required": ["account_id", "atomicnet_id", "public_key", "role"], "description": "Dataclass for ABC account schema."}, "AbcSignature": {"type": "object", "properties": {"schema_version": {"type": "integer", "default": 1, "nullable": true, "description": "Version for the message schema."}, "digest_type": {"type": "string", "description": "The ABC digest type."}, "signature": {"type": "string", "description": "Signature of the digest."}, "digest": {"type": "string", "description": "The digest to be signed."}, "abc_account_id": {"type": "string", "description": "Identifier of the ABC account."}}, "required": ["abc_account_id", "digest", "digest_type", "signature"]}, "ABCMemorialRequest": {"type": "object", "properties": {"signature": {"description": "Signature for the associated digest.", "allOf": [{"$ref": "#/components/schemas/AbcSignature"}]}, "digest": {"type": "string", "description": "The data digest to be memorialized."}, "payload": {"type": "string", "default": null, "nullable": true, "description": "The (sideband) data payload."}, "txn_fee": {"type": "integer", "default": null, "nullable": true, "description": "The memorial transaction fee."}, "memorial_type": {"type": "string", "default": null, "nullable": true, "description": "The memorial type."}, "atomicnet_id": {"type": "string", "format": "uuid", "description": "Identifier of the AtomicNet Participant."}}, "required": ["atomicnet_id", "digest", "signature"], "description": "Dataclass for ABC memorial request schema."}, "ABCVerifyMemorialResponse": {"type": "object", "properties": {"block_height": {"type": "integer", "description": "The block height of the memorialized digest."}, "status": {"type": "string", "description": "The status of memorial."}}, "required": ["block_height", "status"], "description": "Dataclass for ABC check memorial response schema."}, "AbcSigningRequest": {"type": "object", "properties": {"digest": {"type": "string", "description": "The data digest to be signed."}, "atomicnet_id": {"type": "string", "format": "uuid", "description": "Identifier of the AtomicNet node."}}, "required": ["atomicnet_id", "digest"], "description": "ABC digest signing request object."}, "AbcSignature1": {"type": "object", "properties": {"schema_version": {"type": "integer", "default": 1, "nullable": true, "description": "Version for the message schema."}, "digest_type": {"type": "string", "description": "The ABC digest type."}, "signature": {"type": "string", "description": "Signature of the digest."}, "digest": {"type": "string", "description": "The digest to be signed."}, "abc_account_id": {"type": "string", "description": "Identifier of the ABC account."}}, "required": ["abc_account_id", "digest", "digest_type", "signature"]}, "ABCVerifySignatureRequest": {"type": "object", "properties": {"digest": {"type": "string", "description": "The expected data digest that was signed."}, "signature": {"description": "Signature for the associated digest.", "allOf": [{"$ref": "#/components/schemas/AbcSignature"}]}, "atomicnet_id": {"type": "string", "format": "uuid", "default": null, "nullable": true, "description": "Identifier of the AtomicNet Participant. If specified, will be checked to belong to the ABC account id."}}, "required": ["digest", "signature"], "description": "Dataclass for ABC verify signature request schema."}, "ABCCreateAccountRequest": {"type": "object", "properties": {"role": {"type": "string", "description": "Role of the account."}, "atomicnet_id": {"type": "string", "format": "uuid", "description": "Identifier of the AtomicNet Participant."}}, "required": ["atomicnet_id", "role"], "description": "ABC create testnet account request schema."}, "ABCCreateAccountResponse": {"type": "object", "properties": {"account_id": {"type": "string", "description": "Account id of the created abc account."}}, "required": ["account_id"], "description": "ABC create testnet account response schema."}, "Ping": {"type": "object", "properties": {"alive": {"type": "boolean"}}}, "Version": {"type": "object", "properties": {"build_time": {"type": "string"}, "version": {"type": "string"}}}, "DeepPing": {"type": "object", "properties": {"alive": {"type": "boolean"}, "database_reachable": {"type": "boolean"}}, "required": ["alive", "database_reachable"]}}}, "security": [{"OAuth2": ["participant"]}], "paths": {"/v1/auth/token": {"post": {"tags": ["authentication"], "summary": "Get access token.", "parameters": [{"in": "header", "name": "authorization", "description": "Base64 encode the client ID and secret.", "schema": {"type": "string"}, "required": true, "example": "Basic <Base64 encoded 'client_id:secret'>"}, {"in": "header", "name": "accept", "description": "Response format.", "schema": {"type": "string"}, "example": "application/json"}, {"in": "header", "name": "cache-control", "description": "Cache or not.", "schema": {"type": "string"}, "example": "no-cache"}], "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"type": "object", "required": ["grant_type", "scope"], "properties": {"grant_type": {"description": "Grant type", "type": "string", "example": "client_credentials"}, "scope": {"description": "At least one custom scope", "type": "string", "example": "participant"}}, "example": "grant_type=client_credentials&scope=participant"}}}}, "responses": {"200": {"description": "The access token.", "content": {"application/json": {"schema": {"type": "object", "required": ["access_token", "token_type", "expires_in", "scope"], "properties": {"access_token": {"type": "string"}, "token_type": {"type": "string"}, "expires_in": {"type": "integer"}, "scope": {"type": "string"}, "refresh_token": {"type": "string"}, "id_token": {"type": "string"}}}}}}, "401": {"description": "HTTP 401 Unauthorized.", "content": {"application/json;charset=UTF-8": {"schema": {"type": "object", "required": ["error", "error_description"], "properties": {"error": {"type": "string"}, "error_description": {"type": "string"}}}}}}}}}, "/v1/abc_accounts/{atomicnet_id}": {"get": {"summary": "Get registered ABC account details by AtomicNet ID.", "tags": ["ABC Accounts"], "parameters": [{"name": "atomicnet_id", "in": "path", "description": "Identifier of the AtomicNet Participant.", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "ABC account details", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCAccount"}}}}}}}, "/v1/abc_accounts/info/{abc_account_id}": {"get": {"summary": "Get ABC account information.", "tags": ["ABC Accounts"], "parameters": [{"name": "abc_account_id", "in": "path", "description": "Identifier of the ABC account.", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "ABCAccountInfo"}}}}, "/v1/abc_accounts/": {"put": {"summary": "Register an abc account.", "tags": ["ABC Accounts"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCAccount"}}}}, "responses": {"200": {"description": "Empty"}}}}, "/v1/abc_memorials/": {"put": {"summary": "Memorialize a digest using abc account for the given AtomicNet id.", "tags": ["ABC Memorials"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCMemorialRequest"}}}}, "responses": {"200": {"description": "Empty"}}}}, "/v1/abc_memorials/{digest}": {"get": {"summary": "Verify if the digest is memorialized to ABC.", "tags": ["ABC Memorials"], "parameters": [{"name": "digest", "in": "path", "description": "The digest to be checked", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "The ABC memorialization response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCVerifyMemorialResponse"}}}}}}}, "/v1/abc_signing/": {"put": {"summary": "Sign a digest using ABC account for the given AtomicNet id.", "tags": ["ABC Signing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AbcSigningRequest"}}}}, "responses": {"200": {"description": "The signature for the request.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AbcSignature1"}}}}}}, "get": {"summary": "Verify the signature.", "tags": ["ABC Signing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCVerifySignatureRequest"}}}}, "responses": {"200": {"description": "Empty"}}}}, "/v1/abc_testnet/": {"put": {"summary": "Create an account on ABC testnet.", "tags": ["ABC Testnet"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCCreateAccountRequest"}}}}, "responses": {"200": {"description": "The created account.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ABCCreateAccountResponse"}}}}, "500": {"description": "Account could not be created on the ABC"}}}}, "/v1/abc_testnet/faucet/{abc_account_id}": {"get": {"summary": "Faucet an account on ABC testnet.", "tags": ["ABC Testnet"], "parameters": [{"name": "abc_account_id", "in": "path", "description": "Identifier of the ABC account.", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Empty"}}}}, "/v1/system/circuit_breakers": {"get": {"summary": "Get the status of all circuit breakers on the server.", "tags": ["system"], "responses": {"200": {"description": "Map of breakers to their statuses", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/v1/system/ping": {"get": {"summary": "Basic health check.", "tags": ["system"], "responses": {"200": {"description": "System status", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Ping"}}}}}}}, "/v1/system/version": {"get": {"summary": "Get the version of the server.", "tags": ["system"], "responses": {"200": {"description": "Version", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Version"}}}}}}}, "/v1/system/deep_ping": {"get": {"summary": "Deep health check.", "tags": ["system"], "responses": {"200": {"description": "Deep system status", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeepPing"}}}}}}}}, "openapi": "3.0.3"}