{ "openapi": "3.0.0", "paths": { "/api/account/close": { "post": { "operationId": "closeAccount", "summary": "", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloseAccountRequest" } } } }, "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Transaction" } } } } }, "tags": ["account"] } }, "/api/account/create": { "post": { "operationId": "createAccount", "summary": "", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAccountRequest" } } } }, "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Transaction" } } } } }, "tags": ["account"] } }, "/api/account/info/{environment}/{index}/{accountId}/{mint}": { "get": { "operationId": "getAccountInfo", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "mint", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "commitment", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/Commitment" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountInfo" } } } } }, "tags": ["account"] } }, "/api/account/balance/{environment}/{index}/{accountId}": { "get": { "operationId": "getBalance", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "commitment", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/Commitment" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BalanceResponse" } } } } }, "tags": ["account"] } }, "/api/account/history/{environment}/{index}/{accountId}/{mint}": { "get": { "operationId": "getHistory", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "mint", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "commitment", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/Commitment" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HistoryResponse" } } } } } }, "tags": ["account"] } }, "/api/account/token-accounts/{environment}/{index}/{accountId}/{mint}": { "get": { "operationId": "getTokenAccounts", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "mint", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "commitment", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/Commitment" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } } }, "tags": ["account"] } }, "/api/airdrop": { "post": { "operationId": "requestAirdrop", "summary": "", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestAirdropRequest" } } } }, "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestAirdropResponse" } } } } }, "tags": ["airdrop"] } }, "/api/app/{environment}/{index}/config": { "get": { "operationId": "getAppConfig", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppConfig" } } } } }, "tags": ["app"] } }, "/api/app/{environment}/{index}/health": { "get": { "operationId": "getAppHealth", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppHealth" } } } } }, "tags": ["app"] } }, "/api/transaction/kinetic-transaction/{environment}/{index}": { "get": { "operationId": "getKineticTransaction", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "reference", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "signature", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Transaction" } } } } } }, "tags": ["transaction"] } }, "/api/transaction/latest-blockhash/{environment}/{index}": { "get": { "operationId": "getLatestBlockhash", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LatestBlockhashResponse" } } } } }, "tags": ["transaction"] } }, "/api/transaction/minimum-rent-exemption-balance/{environment}/{index}": { "get": { "operationId": "getMinimumRentExemptionBalance", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "dataLength", "in": "query", "required": true, "schema": { "type": "integer" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MinimumRentExemptionBalanceResponse" } } } } }, "tags": ["transaction"] } }, "/api/transaction/make-transfer": { "post": { "operationId": "makeTransfer", "summary": "", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MakeTransferRequest" } } } }, "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Transaction" } } } } }, "tags": ["transaction"] } }, "/api/transaction/transaction/{environment}/{index}/{signature}": { "get": { "operationId": "getTransaction", "summary": "", "parameters": [ { "name": "environment", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "integer" } }, { "name": "signature", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "commitment", "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/Commitment" } } ], "responses": { "default": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTransactionResponse" } } } } }, "tags": ["transaction"] } } }, "info": { "title": "@kin-kinetic/api", "description": "The OpenAPI definition of the Kinetic API", "version": "1.0.0-rc.18", "contact": {} }, "tags": [ { "name": "kinetic", "description": "" } ], "servers": [ { "url": "http://localhost:3000" }, { "url": "https://sandbox.kinetic.host" } ], "components": { "schemas": { "Commitment": { "type": "string", "enum": ["Confirmed", "Finalized", "Processed"] }, "CloseAccountRequest": { "type": "object", "properties": { "commitment": { "$ref": "#/components/schemas/Commitment" }, "account": { "type": "string" }, "environment": { "type": "string" }, "index": { "type": "integer" }, "mint": { "type": "string" }, "reference": { "type": "string", "nullable": true }, "referenceId": { "type": "string", "nullable": true, "deprecated": true }, "referenceType": { "type": "string", "nullable": true, "deprecated": true } }, "required": ["commitment", "account", "environment", "index", "mint"] }, "TransactionErrorType": { "type": "string", "enum": ["BadNonce", "InvalidAccount", "SomeError", "Timeout", "Unknown", "WebhookFailed"] }, "TransactionError": { "type": "object", "properties": { "id": { "type": "string" }, "logs": { "type": "array", "items": { "type": "string" } }, "message": { "type": "string" }, "type": { "$ref": "#/components/schemas/TransactionErrorType" }, "instruction": { "type": "integer" } }, "required": ["id", "logs", "message", "type", "instruction"] }, "TransactionStatus": { "type": "string", "enum": ["Committed", "Confirmed", "Failed", "Finalized", "Processing"] }, "Transaction": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "createdAt": { "format": "date-time", "type": "string", "nullable": true }, "updatedAt": { "format": "date-time", "type": "string", "nullable": true }, "amount": { "type": "string", "nullable": true }, "decimals": { "type": "integer", "nullable": true }, "destination": { "type": "string", "nullable": true }, "errors": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/TransactionError" } }, "explorerUrl": { "type": "string", "nullable": true }, "feePayer": { "type": "string", "nullable": true }, "ip": { "type": "string", "nullable": true }, "mint": { "type": "string", "nullable": true }, "processingDuration": { "type": "integer", "nullable": true }, "reference": { "type": "string", "nullable": true }, "signature": { "type": "string", "nullable": true }, "solanaCommitted": { "format": "date-time", "type": "string", "nullable": true }, "solanaCommittedDuration": { "type": "integer", "nullable": true }, "solanaFinalized": { "format": "date-time", "type": "string", "nullable": true }, "solanaFinalizedDuration": { "type": "integer", "nullable": true }, "solanaStart": { "format": "date-time", "type": "string", "nullable": true }, "solanaTransaction": { "type": "object", "nullable": true }, "source": { "type": "string", "nullable": true }, "status": { "nullable": true, "$ref": "#/components/schemas/TransactionStatus" }, "totalDuration": { "type": "integer", "nullable": true }, "tx": { "type": "string", "nullable": true }, "ua": { "type": "string", "nullable": true }, "webhookEventStart": { "format": "date-time", "type": "string", "nullable": true }, "webhookEventEnd": { "format": "date-time", "type": "string", "nullable": true }, "webhookEventDuration": { "type": "integer", "nullable": true }, "webhookVerifyStart": { "format": "date-time", "type": "string", "nullable": true }, "webhookVerifyEnd": { "format": "date-time", "type": "string", "nullable": true }, "webhookVerifyDuration": { "type": "integer", "nullable": true } } }, "CreateAccountRequest": { "type": "object", "properties": { "commitment": { "$ref": "#/components/schemas/Commitment" }, "environment": { "type": "string" }, "index": { "type": "integer" }, "lastValidBlockHeight": { "type": "integer" }, "mint": { "type": "string" }, "reference": { "type": "string", "nullable": true }, "referenceId": { "type": "string", "nullable": true, "deprecated": true }, "referenceType": { "type": "string", "nullable": true, "deprecated": true }, "tx": { "type": "string" } }, "required": ["commitment", "environment", "index", "lastValidBlockHeight", "mint", "tx"] }, "TokenInfo": { "type": "object", "properties": { "account": { "type": "string" }, "balance": { "type": "string", "nullable": true }, "closeAuthority": { "type": "string", "nullable": true }, "decimals": { "type": "integer", "default": "0" }, "mint": { "type": "string" }, "owner": { "type": "string", "nullable": true } }, "required": ["account", "decimals", "mint"] }, "AccountInfo": { "type": "object", "properties": { "account": { "type": "string" }, "isMint": { "type": "boolean" }, "isOwner": { "type": "boolean" }, "isTokenAccount": { "type": "boolean" }, "owner": { "type": "string", "nullable": true }, "program": { "type": "string", "nullable": true }, "tokens": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/TokenInfo" } } }, "required": ["account", "isMint", "isOwner", "isTokenAccount"] }, "BalanceToken": { "type": "object", "properties": { "account": { "type": "string" }, "balance": { "type": "string" }, "decimals": { "type": "integer", "default": "0" }, "mint": { "type": "string" } }, "required": ["account", "balance", "decimals", "mint"] }, "BalanceResponse": { "type": "object", "properties": { "balance": { "type": "string" }, "mints": { "type": "object" }, "tokens": { "type": "array", "items": { "$ref": "#/components/schemas/BalanceToken" } } }, "required": ["balance", "mints", "tokens"] }, "ConfirmedSignatureInfo": { "type": "object", "properties": { "signature": { "type": "string" }, "slot": { "type": "integer", "nullable": true }, "err": { "type": "string", "nullable": true }, "memo": { "type": "string", "nullable": true }, "blockTime": { "type": "integer", "nullable": true } }, "required": ["signature"] }, "HistoryResponse": { "type": "object", "properties": { "account": { "type": "string" }, "history": { "type": "array", "items": { "$ref": "#/components/schemas/ConfirmedSignatureInfo" } } }, "required": ["account", "history"] }, "RequestAirdropRequest": { "type": "object", "properties": { "account": { "type": "string" }, "amount": { "type": "string", "nullable": true }, "commitment": { "$ref": "#/components/schemas/Commitment" }, "environment": { "type": "string" }, "index": { "type": "integer" }, "mint": { "type": "string" } }, "required": ["account", "commitment", "environment", "index", "mint"] }, "RequestAirdropResponse": { "type": "object", "properties": { "signature": { "type": "string" } }, "required": ["signature"] }, "AppConfigApp": { "type": "object", "properties": { "index": { "type": "integer" }, "name": { "type": "string" } }, "required": ["index", "name"] }, "AppConfigApi": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" } }, "required": ["name", "version"] }, "ClusterType": { "type": "string", "enum": ["Custom", "SolanaDevnet", "SolanaMainnet", "SolanaTestnet"] }, "AppConfigCluster": { "type": "object", "properties": { "endpoint": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/components/schemas/ClusterType" } }, "required": ["endpoint", "id", "name", "type"] }, "AppConfigEnvironment": { "type": "object", "properties": { "name": { "type": "string" }, "explorer": { "type": "string" }, "cluster": { "$ref": "#/components/schemas/AppConfigCluster" } }, "required": ["name", "explorer", "cluster"] }, "AppConfigMint": { "type": "object", "properties": { "addMemo": { "type": "boolean" }, "airdrop": { "type": "boolean" }, "airdropAmount": { "type": "integer", "nullable": true }, "airdropMax": { "type": "integer", "nullable": true }, "decimals": { "type": "integer" }, "feePayer": { "type": "string" }, "logoUrl": { "type": "string" }, "name": { "type": "string" }, "programId": { "type": "string" }, "publicKey": { "type": "string" }, "symbol": { "type": "string" } }, "required": [ "addMemo", "airdrop", "decimals", "feePayer", "logoUrl", "name", "programId", "publicKey", "symbol" ] }, "AppConfig": { "type": "object", "properties": { "app": { "$ref": "#/components/schemas/AppConfigApp" }, "api": { "$ref": "#/components/schemas/AppConfigApi" }, "environment": { "$ref": "#/components/schemas/AppConfigEnvironment" }, "mint": { "$ref": "#/components/schemas/AppConfigMint" }, "mints": { "type": "array", "items": { "$ref": "#/components/schemas/AppConfigMint" } } }, "required": ["app", "api", "environment", "mint", "mints"] }, "AppHealth": { "type": "object", "properties": { "isSolanaOk": { "type": "boolean" }, "isKineticOk": { "type": "boolean" }, "time": { "format": "date-time", "type": "string" } }, "required": ["isSolanaOk", "isKineticOk", "time"] }, "LatestBlockhashResponse": { "type": "object", "properties": { "blockhash": { "type": "string" }, "lastValidBlockHeight": { "type": "integer" } }, "required": ["blockhash", "lastValidBlockHeight"] }, "MinimumRentExemptionBalanceResponse": { "type": "object", "properties": { "lamports": { "type": "integer" } }, "required": ["lamports"] }, "MakeTransferRequest": { "type": "object", "properties": { "commitment": { "$ref": "#/components/schemas/Commitment" }, "environment": { "type": "string" }, "index": { "type": "integer" }, "mint": { "type": "string" }, "lastValidBlockHeight": { "type": "integer" }, "reference": { "type": "string", "nullable": true }, "referenceId": { "type": "string", "nullable": true, "deprecated": true }, "referenceType": { "type": "string", "nullable": true, "deprecated": true }, "tx": { "type": "string" } }, "required": ["commitment", "environment", "index", "mint", "lastValidBlockHeight", "tx"] }, "ConfirmationStatus": { "type": "string", "enum": ["processed", "confirmed", "finalized"] }, "SignatureStatus": { "type": "object", "properties": { "slot": { "type": "integer", "nullable": true }, "confirmations": { "type": "integer", "nullable": true }, "err": { "type": "object", "nullable": true }, "confirmationStatus": { "nullable": true, "$ref": "#/components/schemas/ConfirmationStatus" } } }, "TransactionData": { "type": "object", "properties": { "message": { "type": "object" }, "signatures": { "type": "array", "items": { "type": "string" } } }, "required": ["message", "signatures"] }, "CompiledInstruction": { "type": "object", "properties": { "programIdIndex": { "type": "integer" }, "accounts": { "type": "array", "items": { "type": "integer" } }, "data": { "type": "string" } }, "required": ["programIdIndex", "accounts", "data"] }, "CompiledInnerInstruction": { "type": "object", "properties": { "index": { "type": "integer" }, "instructions": { "type": "array", "items": { "$ref": "#/components/schemas/CompiledInstruction" } } }, "required": ["index", "instructions"] }, "TokenAmount": { "type": "object", "properties": { "amount": { "type": "string" }, "decimals": { "type": "integer" }, "uiAmount": { "type": "integer", "nullable": true }, "uiAmountString": { "type": "string", "nullable": true } }, "required": ["amount", "decimals"] }, "TokenBalance": { "type": "object", "properties": { "accountIndex": { "type": "integer" }, "mint": { "type": "string" }, "owner": { "type": "string", "nullable": true }, "uiTokenAmount": { "$ref": "#/components/schemas/TokenAmount" } }, "required": ["accountIndex", "mint", "uiTokenAmount"] }, "ConfirmedTransactionMeta": { "type": "object", "properties": { "fee": { "type": "integer", "nullable": true }, "innerInstructions": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/CompiledInnerInstruction" } }, "preBalances": { "nullable": true, "type": "array", "items": { "type": "integer" } }, "postBalances": { "type": "array", "items": { "type": "integer" } }, "logMessages": { "nullable": true, "type": "array", "items": { "type": "string" } }, "preTokenBalances": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/TokenBalance" } }, "postTokenBalances": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/TokenBalance" } }, "err": { "type": "object", "nullable": true } }, "required": ["postBalances"] }, "TransactionResponse": { "type": "object", "properties": { "slot": { "type": "integer", "nullable": true }, "transaction": { "$ref": "#/components/schemas/TransactionData" }, "meta": { "$ref": "#/components/schemas/ConfirmedTransactionMeta" }, "blockTime": { "type": "integer", "nullable": true } }, "required": ["transaction", "meta"] }, "GetTransactionResponse": { "type": "object", "properties": { "signature": { "type": "string" }, "status": { "$ref": "#/components/schemas/SignatureStatus" }, "transaction": { "$ref": "#/components/schemas/TransactionResponse" } }, "required": ["signature", "status", "transaction"] } } } }