diff --git a/main.ts b/main.ts index 1e34968..2a25e90 100644 --- a/main.ts +++ b/main.ts @@ -32,7 +32,7 @@ interface VendorExtensionTransform { interface RequiredFieldTransform { schemaName: string; // e.g., "ApplicationParams" - The OpenAPI schema name - fieldName: string; // e.g., "approval-program" - The field name to transform + fieldName: string | string[]; // e.g., "approval-program" or ["approval-program", "clear-state-program"] - The field name(s) to transform makeRequired: boolean; // true = add to required array, false = remove from required array } @@ -48,6 +48,35 @@ interface FilterEndpoint { methods?: string[]; // HTTP methods to apply to (default: ["get"]) } +interface FieldRename { + from: string; // Original field name + to: string; // New field name + schemaName?: string; // Optional: specific schema name to target +} + +interface CustomSchema { + name: string; // Schema name + schema: Record; // Schema definition object + linkToProperties?: string[]; // Optional: property names to update with this schema reference +} + +interface SchemaRename { + from: string; // Original schema name + to: string; // New schema name +} + +interface SchemaFieldRename { + schemaName: string; // Schema name to target + fieldRenames: { from: string; to: string }[]; // Field renames to apply +} + +interface EndpointTagTransform { + path: string; // Exact path to match (e.g., "/v2/teal/dryrun") + methods?: string[]; // HTTP methods to apply to (default: all methods on the path) + addTags?: string[]; // Tags to add to the endpoint + removeTags?: string[]; // Tags to remove from the endpoint +} + interface ProcessingConfig { sourceUrl: string; outputPath: string; @@ -58,8 +87,58 @@ interface ProcessingConfig { fieldTransforms?: FieldTransform[]; msgpackOnlyEndpoints?: FilterEndpoint[]; jsonOnlyEndpoints?: FilterEndpoint[]; - // If true, strip APIVn prefixes from component schemas and update refs (KMD) - stripKmdApiVersionPrefixes?: boolean; + customSchemas?: CustomSchema[]; + // Schema renames to apply + schemaRenames?: SchemaRename[]; + // Schema field renames to apply (actual field name changes) + schemaFieldRenames?: SchemaFieldRename[]; + // Field names to remove from all schemas (e.g., ["error", "message"]) + removeSchemaFields?: string[]; + // Make all properties required in all schemas + makeAllFieldsRequired?: boolean; + // Endpoint tag transforms to add/remove tags from specific endpoints + endpointTagTransforms?: EndpointTagTransform[]; +} + +// ===== OAS2 PRE-PROCESSING ===== + +interface OAS2Spec { + swagger?: string; + definitions?: Record; + responses?: Record; + parameters?: Record; + [key: string]: any; +} + +/** + * Pre-process OAS2 spec to move inline schemas to definitions. + * This ensures the swagger converter preserves schema $refs instead of inlining them. + */ +export function extractInlineSchemas(spec: OAS2Spec): void { + if (!spec.swagger) return; + + if (!spec.definitions) spec.definitions = {}; + + if (spec.responses) { + for (const [name, response] of Object.entries(spec.responses)) { + if (response?.schema && !response.schema.$ref) { + spec.definitions[name] = response.schema; + response.schema = { $ref: `#/definitions/${name}` }; + console.log(`ℹ️ Extracted response schema: ${name}`); + } + } + } + + if (spec.parameters) { + for (const [name, param] of Object.entries(spec.parameters as Record)) { + if (param?.schema && !param.schema.$ref) { + const schemaName = `${name}Body`; + spec.definitions[schemaName] = param.schema; + param.schema = { $ref: `#/definitions/${schemaName}` }; + console.log(`ℹ️ Extracted parameter schema: ${schemaName}`); + } + } + } } // ===== TRANSFORMATIONS ===== @@ -210,26 +289,46 @@ function transformVendorExtensions(spec: OpenAPISpec, transforms: VendorExtensio } /** - * Fix field naming - Add field rename extensions for better Rust ergonomics + * Fix field naming - Add field rename extensions for better ergonomics */ function fixFieldNaming(spec: OpenAPISpec): number { let fixedCount = 0; // Properties that should be renamed for better developer experience - const fieldRenames = [ + const fieldRenames: FieldRename[] = [ { from: "application-index", to: "app_id" }, { from: "app-index", to: "app_id" }, { from: "created-application-index", to: "created_app_id" }, { from: "asset-index", to: "asset_id" }, { from: "created-asset-index", to: "created_asset_id" }, + { from: "index", to: "id", schemaName: "Asset" }, { from: "blockTxids", to: "block_tx_ids" }, ]; - const processObject = (obj: any): void => { + const processObject = (obj: any, schemaName?: string): void => { if (!obj || typeof obj !== "object") return; if (Array.isArray(obj)) { - obj.forEach((o) => processObject(o)); + obj.forEach((o) => processObject(o, schemaName)); + return; + } + + // Process schemas and track schema names + if (obj.schemas && typeof obj.schemas === "object") { + for (const [name, schemaDef] of Object.entries(obj.schemas)) { + processObject(schemaDef, name); + } + } + + // Process responses and track response names + if (obj.responses && typeof obj.responses === "object") { + for (const [name, responseDef] of Object.entries(obj.responses)) { + processObject(responseDef, name); + } + } + + // If we processed either schemas or responses, return early to avoid double processing + if ((obj.schemas && typeof obj.schemas === "object") || (obj.responses && typeof obj.responses === "object")) { return; } @@ -237,7 +336,16 @@ function fixFieldNaming(spec: OpenAPISpec): number { if (obj.properties && typeof obj.properties === "object") { for (const [propName, propDef] of Object.entries(obj.properties as Record)) { if (propDef && typeof propDef === "object") { - const rename = fieldRenames.find((r) => r.from === propName); + const rename = fieldRenames.find((r) => { + // Check if field name matches + if (r.from !== propName) return false; + + // If rename has a schema restriction, check if we're in the correct schema + if (r.schemaName && r.schemaName !== schemaName) return false; + + return true; + }); + if (rename) { propDef["x-algokit-field-rename"] = rename.to; fixedCount++; @@ -246,10 +354,10 @@ function fixFieldNaming(spec: OpenAPISpec): number { } } - // Recursively process nested objects + // Recursively process nested objects (preserve schema name context) for (const value of Object.values(obj)) { if (value && typeof value === "object") { - processObject(value); + processObject(value, schemaName); } } }; @@ -415,30 +523,54 @@ function transformProperties(spec: OpenAPISpec, transforms: FieldTransform[]): n return transformedCount; } - const processObject = (obj: any, currentPath: string[] = []): void => { + const processObject = (obj: any, currentPath: string[] = [], parent: any = null): void => { if (!obj || typeof obj !== "object") return; if (Array.isArray(obj)) { - obj.forEach((item, index) => processObject(item, [...currentPath, index.toString()])); + obj.forEach((item, index) => processObject(item, [...currentPath, index.toString()], obj)); return; } // Check each configured transformation for (const transform of transforms) { - const targetPath = `properties.${transform.fieldName}`; const fullPath = currentPath.join("."); - // Check if current path matches the target property path - if (fullPath.endsWith(targetPath)) { + // Handle dot-notation in fieldName (e.g., "account-id.schema" or "foreign-assets.items") + const fieldParts = transform.fieldName.split("."); + const baseName = fieldParts[0]; + + // Build possible match patterns + const targetPath = `properties.${transform.fieldName}`; + const parameterPath = `components.parameters.${transform.fieldName}`; + + // Check if current path matches the target property path or parameter path + const isPropertyMatch = fullPath.endsWith(targetPath); + const isParameterMatch = fullPath.endsWith(parameterPath); + + // Check if this is an inline parameter with matching name + let isInlineParameterMatch = false; + if (fieldParts.length === 1 && obj.name === baseName) { + // Simple case: the object itself has name="account-id" + isInlineParameterMatch = true; + } else if (fieldParts.length === 2 && parent && parent.name === baseName) { + // Nested case: parent has name="account-id" and we're at the nested property (e.g., "schema") + const lastPathPart = currentPath[currentPath.length - 1]; + if (lastPathPart === fieldParts[1]) { + isInlineParameterMatch = true; + } + } + + if (isPropertyMatch || isParameterMatch || isInlineParameterMatch) { // If schemaName is specified, check if we're in the correct schema context - if (transform.schemaName) { + // (only applies to properties, not parameters) + if (transform.schemaName && isPropertyMatch) { const schemaPath = `components.schemas.${transform.schemaName}.properties.${transform.fieldName}`; if (!fullPath.endsWith(schemaPath)) { continue; // Skip this transform if not in the specified schema } } - // Remove specified items from this property + // Remove specified items from this property/parameter if (transform.removeItems) { for (const itemToRemove of transform.removeItems) { if (obj.hasOwnProperty(itemToRemove)) { @@ -448,7 +580,7 @@ function transformProperties(spec: OpenAPISpec, transforms: FieldTransform[]): n } } - // Add specified items to this property + // Add specified items to this property/parameter if (transform.addItems) { for (const [key, value] of Object.entries(transform.addItems)) { obj[key] = value; @@ -461,7 +593,7 @@ function transformProperties(spec: OpenAPISpec, transforms: FieldTransform[]): n // Recursively process nested objects for (const [key, value] of Object.entries(obj)) { if (value && typeof value === "object") { - processObject(value, [...currentPath, key]); + processObject(value, [...currentPath, key], obj); } } }; @@ -491,33 +623,38 @@ function transformRequiredFields(spec: OpenAPISpec, requiredFieldTransforms: Req continue; } + // Normalize fieldName to an array for consistent processing + const fieldNames = Array.isArray(config.fieldName) ? config.fieldName : [config.fieldName]; + // Initialize required array if it doesn't exist and we're making a field required if (config.makeRequired && !schema.required) { schema.required = []; } - if (config.makeRequired) { - // Make field required: add to required array if not already present - if (!schema.required.includes(config.fieldName)) { - schema.required.push(config.fieldName); - transformedCount++; - console.log(`ℹ️ Made ${config.fieldName} required in ${config.schemaName}`); - } - } else { - // Make field optional: remove from required array - if (schema.required && Array.isArray(schema.required)) { - const originalLength = schema.required.length; - schema.required = schema.required.filter((field: string) => field !== config.fieldName); - - // If the required array is now empty, remove it entirely - if (schema.required.length === 0) { - delete schema.required; + for (const fieldName of fieldNames) { + if (config.makeRequired) { + // Make field required: add to required array if not already present + if (!schema.required.includes(fieldName)) { + schema.required.push(fieldName); + transformedCount++; + console.log(`ℹ️ Made ${fieldName} required in ${config.schemaName}`); } + } else { + // Make field optional: remove from required array + if (schema.required && Array.isArray(schema.required)) { + const originalLength = schema.required.length; + schema.required = schema.required.filter((field: string) => field !== fieldName); + + // If the required array is now empty, remove it entirely + if (schema.required.length === 0) { + delete schema.required; + } - const removedCount = originalLength - (schema.required?.length || 0); - if (removedCount > 0) { - transformedCount += removedCount; - console.log(`ℹ️ Made ${config.fieldName} optional in ${config.schemaName}`); + const removedCount = originalLength - (schema.required?.length || 0); + if (removedCount > 0) { + transformedCount += removedCount; + console.log(`ℹ️ Made ${fieldName} optional in ${config.schemaName}`); + } } } } @@ -638,55 +775,108 @@ function resolveRef(spec: OpenAPISpec, ref: string): any { } /** - * Strip APIVn prefix from component schema names and update all $ref usages (KMD-specific) - * Adds x-algokit-original-name and x-algokit-version metadata for traceability. + * Create a new custom schema and add it to the OpenAPI spec + */ +function createCustomSchema(spec: OpenAPISpec, schemaName: string, schemaDefinition: any): number { + let createdCount = 0; + + if (!spec.components) { + spec.components = {}; + } + if (!spec.components.schemas) { + spec.components.schemas = {}; + } + + // Only add if it doesn't already exist + if (!spec.components.schemas[schemaName]) { + spec.components.schemas[schemaName] = schemaDefinition; + createdCount++; + console.log(`ℹ️ Created new schema: ${schemaName}`); + } else { + console.warn(`⚠️ Schema ${schemaName} already exists, skipping creation`); + } + + return createdCount; +} + +/** + * Update property references to use a custom schema */ -function stripKmdApiVersionPrefixes(spec: OpenAPISpec): { - renamed: number; - collisions: number; -} { +function linkSchemaToProperties(spec: OpenAPISpec, propertyName: string, schemaName: string): number { + let updatedCount = 0; + + const updatePropertyReferences = (obj: any): void => { + if (!obj || typeof obj !== "object") return; + + if (Array.isArray(obj)) { + for (const item of obj) updatePropertyReferences(item); + return; + } + + // Check if this is a properties object containing our target property + if (obj.properties && obj.properties[propertyName]) { + const property = obj.properties[propertyName]; + + // Check if it's currently using an empty object schema or inline schema + if (property.type === "object" && (!property.properties || Object.keys(property.properties).length === 0)) { + // Replace with schema reference + obj.properties[propertyName] = { + $ref: `#/components/schemas/${schemaName}`, + }; + updatedCount++; + console.log(`ℹ️ Updated ${propertyName} property to reference ${schemaName} schema`); + } + } + + // Recursively check all object values + for (const value of Object.values(obj)) { + updatePropertyReferences(value); + } + }; + + updatePropertyReferences(spec); + return updatedCount; +} + +/** + * Rename component schemas and update all $ref usages according to configuration. + * Adds x-algokit-original-name metadata for traceability. + */ +function renameSchemas(spec: OpenAPISpec, renames: SchemaRename[]): number { let renamed = 0; - let collisions = 0; const components = spec.components; - if (!components || !components.schemas) { - return { renamed, collisions }; + if (!components || !components.schemas || !renames?.length) { + return renamed; } const schemas = components.schemas as Record; const oldToNewName: Record = {}; const newSchemas: Record = {}; - const versionPrefix = /^APIV(\d+)(.+)$/; // e.g., APIV1DELETEMultisigResponse + // Build rename map from configuration + const renameMap = new Map(renames.map((r) => [r.from, r])); // 1) Build rename map and new schemas object for (const [name, schema] of Object.entries(schemas)) { - const match = name.match(versionPrefix); - if (!match) { - if (newSchemas[name]) { - collisions++; - newSchemas[`${name}__DUP`] = schema; - } else { - newSchemas[name] = schema; - } - continue; - } - - const version = Number(match[1]); - const base = match[2]; // e.g., DELETEMultisigResponse - let target = base; + const renameConfig = renameMap.get(name); - // Avoid collisions: if target already exists, suffix with V - if (newSchemas[target] || Object.values(oldToNewName).includes(target)) { - target = `${base}V${version}`; - collisions++; + if (!renameConfig) { + // No rename configured, keep as-is + newSchemas[name] = schema; + continue; } - // Record mapping and add metadata (in case in future new versions of the spec are added) + const target = renameConfig.to; oldToNewName[name] = target; const schemaCopy = { ...(schema as any) }; schemaCopy["x-algokit-original-name"] = name; - schemaCopy["x-algokit-kmd-api-version"] = version; + + // Update description + if (schemaCopy.description && typeof schemaCopy.description === "string") { + schemaCopy.description = schemaCopy.description.replace(new RegExp(name, "g"), target).replace(/\nfriendly:.+$/, ""); + } + newSchemas[target] = schemaCopy; renamed++; } @@ -695,7 +885,7 @@ function stripKmdApiVersionPrefixes(spec: OpenAPISpec): { components.schemas = newSchemas as any; if (renamed === 0) { - return { renamed, collisions }; + return renamed; } // 2) Update all $ref occurrences pointing to old schema names @@ -719,7 +909,284 @@ function stripKmdApiVersionPrefixes(spec: OpenAPISpec): { updateRefs(spec); - return { renamed, collisions }; + return renamed; +} + +/** + * Rename fields within schemas (actual field name changes, not just metadata) + */ +function renameSchemaFields(spec: OpenAPISpec, fieldRenames: SchemaFieldRename[]): number { + let renamedCount = 0; + + if (!spec.components?.schemas || !fieldRenames || fieldRenames.length === 0) { + return renamedCount; + } + + const schemas = spec.components.schemas as Record; + + for (const config of fieldRenames) { + const schema = schemas[config.schemaName]; + + if (!schema || typeof schema !== "object" || !schema.properties) { + console.warn(`⚠️ Schema '${config.schemaName}' not found or has no properties, skipping field renames`); + continue; + } + + for (const rename of config.fieldRenames) { + if (!schema.properties.hasOwnProperty(rename.from)) { + console.warn(`⚠️ Field '${rename.from}' not found in schema '${config.schemaName}', skipping rename`); + continue; + } + + // Rename the field + schema.properties[rename.to] = schema.properties[rename.from]; + delete schema.properties[rename.from]; + + // Update required array if it exists + if (schema.required && Array.isArray(schema.required)) { + const index = schema.required.indexOf(rename.from); + if (index !== -1) { + schema.required[index] = rename.to; + } + } + + renamedCount++; + console.log(`ℹ️ Renamed field '${rename.from}' to '${rename.to}' in schema '${config.schemaName}'`); + } + } + + return renamedCount; +} + +/** + * Remove specified fields from all schemas in the spec + */ +function removeSchemaFields(spec: OpenAPISpec, fieldsToRemove: string[]): number { + let removedCount = 0; + + if (!spec.components?.schemas || !fieldsToRemove || fieldsToRemove.length === 0) { + return removedCount; + } + + const schemas = spec.components.schemas as Record; + + for (const [schemaName, schema] of Object.entries(schemas)) { + if (!schema || typeof schema !== "object" || !schema.properties) { + continue; + } + + for (const fieldName of fieldsToRemove) { + if (schema.properties.hasOwnProperty(fieldName)) { + delete schema.properties[fieldName]; + removedCount++; + console.log(`ℹ️ Removed field '${fieldName}' from schema '${schemaName}'`); + } + } + } + + return removedCount; +} + +/** + * Make all properties required in all schemas + */ +function makeAllFieldsRequired(spec: OpenAPISpec): number { + let modifiedCount = 0; + + if (!spec.components?.schemas) { + return modifiedCount; + } + + const schemas = spec.components.schemas as Record; + + for (const [schemaName, schema] of Object.entries(schemas)) { + if (!schema || typeof schema !== "object" || !schema.properties) { + continue; + } + + const propertyNames = Object.keys(schema.properties); + + if (propertyNames.length === 0) { + continue; + } + + // Initialize required array if it doesn't exist + if (!schema.required) { + schema.required = []; + } + + // Add all properties to required array if not already present + let addedCount = 0; + for (const propertyName of propertyNames) { + if (!schema.required.includes(propertyName)) { + schema.required.push(propertyName); + addedCount++; + } + } + + if (addedCount > 0) { + modifiedCount += addedCount; + console.log(`ℹ️ Made ${addedCount} field(s) required in schema '${schemaName}'`); + } + } + + return modifiedCount; +} + +/** + * Transform endpoint tags by adding or removing tags from specific endpoints + */ +function transformEndpointTags(spec: OpenAPISpec, transforms: EndpointTagTransform[]): number { + let modifiedCount = 0; + + if (!spec.paths || !transforms?.length) { + return modifiedCount; + } + + const allMethods = ["get", "post", "put", "delete", "patch", "head", "options", "trace"]; + + for (const transform of transforms) { + const pathObj = spec.paths[transform.path]; + if (!pathObj) { + console.warn(`⚠️ Path ${transform.path} not found in spec for tag transform`); + continue; + } + + const methods = transform.methods || allMethods; + + for (const method of methods) { + const operation = pathObj[method]; + if (!operation) { + continue; + } + + // Initialize tags array if it doesn't exist + if (!operation.tags) { + operation.tags = []; + } + + // Remove tags if specified + if (transform.removeTags && transform.removeTags.length > 0) { + const originalLength = operation.tags.length; + operation.tags = operation.tags.filter((tag: string) => !transform.removeTags!.includes(tag)); + const removedCount = originalLength - operation.tags.length; + if (removedCount > 0) { + modifiedCount += removedCount; + console.log(`ℹ️ Removed ${removedCount} tag(s) from ${transform.path} (${method})`); + } + } + + // Add tags if specified + if (transform.addTags && transform.addTags.length > 0) { + for (const tag of transform.addTags) { + if (!operation.tags.includes(tag)) { + operation.tags.push(tag); + modifiedCount++; + console.log(`ℹ️ Added tag '${tag}' to ${transform.path} (${method})`); + } + } + } + } + } + + return modifiedCount; +} + +/** + * Remove schemas that have no properties and update all references to them + */ +function removeEmptySchemas(spec: OpenAPISpec): { removedSchemas: number; updatedReferences: number } { + let removedSchemas = 0; + let updatedReferences = 0; + + if (!spec.components?.schemas) { + return { removedSchemas, updatedReferences }; + } + + const schemas = spec.components.schemas as Record; + const emptySchemasToRemove: string[] = []; + + // Find schemas with empty properties + for (const [schemaName, schema] of Object.entries(schemas)) { + if ( + schema && + typeof schema === "object" && + schema.properties && + typeof schema.properties === "object" && + Object.keys(schema.properties).length === 0 + ) { + emptySchemasToRemove.push(schemaName); + console.log(`ℹ️ Found empty schema: ${schemaName}`); + } + } + + if (emptySchemasToRemove.length === 0) { + return { removedSchemas, updatedReferences }; + } + + // Function to recursively find and replace schema references + const replaceSchemaReferences = (obj: any, parent: any = null, parentKey: string = ""): void => { + if (!obj || typeof obj !== "object") return; + + if (Array.isArray(obj)) { + obj.forEach((item, index) => replaceSchemaReferences(item, obj, index.toString())); + return; + } + + // Check if this is a "content" object that contains a reference to an empty schema + if (parentKey === "content" && obj && typeof obj === "object") { + // Check each media type in the content object + for (const [mediaType, mediaTypeObj] of Object.entries(obj)) { + if ( + mediaTypeObj && + typeof mediaTypeObj === "object" && + (mediaTypeObj as any).schema && + typeof (mediaTypeObj as any).schema === "object" + ) { + const schema = (mediaTypeObj as any).schema; + if (schema.$ref && typeof schema.$ref === "string") { + const refMatch = schema.$ref.match(/^#\/components\/schemas\/(.+)$/); + if (refMatch && emptySchemasToRemove.includes(refMatch[1])) { + // This references an empty schema, replace the entire content object with {} + if (parent && parent[parentKey]) { + parent[parentKey] = {}; + updatedReferences++; + console.log(`ℹ️ Replaced content object referencing empty schema '${refMatch[1]}' with {}`); + return; // Don't process further since we replaced the whole content object + } + } + } + } + } + } + + // Recursively process nested objects + for (const [key, value] of Object.entries(obj)) { + if (value && typeof value === "object") { + replaceSchemaReferences(value, obj, key); + } + } + }; + + // Process all paths to find and replace references + if (spec.paths) { + replaceSchemaReferences(spec.paths); + } + + // Process all components to find and replace references (except schemas themselves) + if (spec.components) { + const { schemas: _, ...otherComponents } = spec.components; + replaceSchemaReferences(otherComponents); + } + + // Remove the empty schemas + for (const schemaName of emptySchemasToRemove) { + delete schemas[schemaName]; + removedSchemas++; + console.log(`ℹ️ Removed empty schema: ${schemaName}`); + } + + return { removedSchemas, updatedReferences }; } // ===== MAIN PROCESSOR ===== @@ -735,6 +1202,27 @@ class OpenAPIProcessor { ["ana ccount", "an account"], ["since eposh", "since epoch"], ["* update\\n* update\\n* delete", "* update\\n* delete"], + ["APIV1POSTWalletRenameRequest is the", "The"], + ["APIV1POSTWalletRequest is the", "The"], + ["APIV1DELETEKeyRequest is the", "The"], + ["APIV1DELETEMultisigRequest is the", "The"], + ["APIV1POSTKeyExportRequest is the", "The"], + ["APIV1POSTMasterKeyExportRequest is the", "The"], + ["APIV1POSTMultisigExportRequest is the", "The"], + ["APIV1POSTKeyRequest is the", "The"], + ["APIV1POSTKeyImportRequest is the", "The"], + ["APIV1POSTMultisigImportRequest is the", "The"], + ["APIV1POSTWalletInitRequest is the", "The"], + ["APIV1POSTKeyListRequest is the", "The"], + ["APIV1POSTMultisigListRequest is the", "The"], + ["APIV1POSTWalletReleaseRequest is the", "The"], + ["APIV1POSTWalletRenameRequest is the", "The"], + ["APIV1POSTWalletRenewRequest is the", "The"], + ["APIV1POSTMultisigTransactionSignRequest is the", "The"], + ["APIV1POSTProgramSignRequest is the", "The"], + ["APIV1POSTTransactionSignRequest is the", "The"], + ["APIV1POSTWalletInfoRequest is the", "The"], + ["APIV1POSTMultisigProgramSignRequest is the", "The"], ]; return patches.reduce((text, [find, replace]) => text.replaceAll(find, replace), content); @@ -819,6 +1307,9 @@ class OpenAPIProcessor { // Fetch and parse the spec let spec = await this.fetchSpec(); + // Pre-process OAS2 to prevent swagger converter from inlining response schemas + extractInlineSchemas(spec as OAS2Spec); + // Convert to OpenAPI 3.0 if needed spec = await this.convertToOpenAPI3(spec); @@ -827,49 +1318,73 @@ class OpenAPIProcessor { // Apply transformations console.log("ℹ️ Applying transformations..."); - // 0. KMD-only: strip APIVn prefixes before other transforms if requested - if (this.config.stripKmdApiVersionPrefixes) { - const { renamed, collisions } = stripKmdApiVersionPrefixes(spec); + // Rename schemas if configured (e.g., strip APIVn prefixes from KMD) + if (this.config.schemaRenames && this.config.schemaRenames.length > 0) { + const renamed = renameSchemas(spec, this.config.schemaRenames); if (renamed > 0) { - console.log(`ℹ️ Stripped APIVn prefix from ${renamed} schemas (collisions resolved: ${collisions})`); + console.log(`ℹ️ Renamed ${renamed} schemas`); } } - // 1. Fix missing descriptions + // Rename schema fields if configured (e.g., MultisigSig field names in KMD) + if (this.config.schemaFieldRenames && this.config.schemaFieldRenames.length > 0) { + const renamedCount = renameSchemaFields(spec, this.config.schemaFieldRenames); + console.log(`ℹ️ Renamed ${renamedCount} fields in schemas`); + } + + // Remove specified schema fields if configured (KMD error/message cleanup) + if (this.config.removeSchemaFields && this.config.removeSchemaFields.length > 0) { + const removedCount = removeSchemaFields(spec, this.config.removeSchemaFields); + console.log(`ℹ️ Removed ${removedCount} fields from schemas`); + + // After removing properties, check for and remove schemas that now have no properties + const { removedSchemas, updatedReferences } = removeEmptySchemas(spec); + if (removedSchemas > 0) { + console.log(`ℹ️ Removed ${removedSchemas} empty schemas and updated ${updatedReferences} references`); + } + } + + // Fix missing descriptions const descriptionCount = fixMissingDescriptions(spec); console.log(`ℹ️ Fixed ${descriptionCount} missing descriptions`); - // 2. Fix pydantic recursion error + // Fix pydantic recursion error const pydanticCount = fixPydanticRecursionError(spec); console.log(`ℹ️ Fixed ${pydanticCount} pydantic recursion errors`); - // 3. Fix field naming + // Fix field naming const fieldNamingCount = fixFieldNaming(spec); console.log(`ℹ️ Added field rename extensions to ${fieldNamingCount} properties`); - // 4. Fix TealValue bytes fields + // Fix TealValue bytes fields const tealValueCount = fixTealValueBytes(spec); console.log(`ℹ️ Added bytes base64 extensions to ${tealValueCount} TealValue.bytes properties`); - // 5. Fix bigint properties + // Fix bigint properties const bigIntCount = fixBigInt(spec); console.log(`ℹ️ Added x-algokit-bigint to ${bigIntCount} properties`); - // 6. Transform required fields if configured + // Make all fields required if configured + if (this.config.makeAllFieldsRequired) { + const madeRequiredCount = makeAllFieldsRequired(spec); + console.log(`ℹ️ Made ${madeRequiredCount} fields required across all schemas`); + } + + // Transform required fields if configured let transformedFieldsCount = 0; if (this.config.requiredFieldTransforms && this.config.requiredFieldTransforms.length > 0) { transformedFieldsCount = transformRequiredFields(spec, this.config.requiredFieldTransforms); console.log(`ℹ️ Transformed ${transformedFieldsCount} required field states`); } - // 7. Transform properties if configured + // Transform properties if configured let transformedPropertiesCount = 0; if (this.config.fieldTransforms && this.config.fieldTransforms.length > 0) { transformedPropertiesCount = transformProperties(spec, this.config.fieldTransforms); console.log(`ℹ️ Applied ${transformedPropertiesCount} property transformations (additions/removals)`); } - // 8. Transform vendor extensions if configured + // Transform vendor extensions if configured if (this.config.vendorExtensionTransforms && this.config.vendorExtensionTransforms.length > 0) { const transformCounts = transformVendorExtensions(spec, this.config.vendorExtensionTransforms); @@ -884,18 +1399,44 @@ class OpenAPIProcessor { } } - // 9. Enforce msgpack-only endpoints if configured + // Enforce msgpack-only endpoints if configured if (this.config.msgpackOnlyEndpoints && this.config.msgpackOnlyEndpoints.length > 0) { const msgpackCount = enforceEndpointFormat(spec, this.config.msgpackOnlyEndpoints, "msgpack"); console.log(`ℹ️ Enforced msgpack-only format for ${msgpackCount} endpoint parameters/responses`); } - // 10. Enforce json-only endpoints if configured + // Enforce json-only endpoints if configured if (this.config.jsonOnlyEndpoints && this.config.jsonOnlyEndpoints.length > 0) { const jsonCount = enforceEndpointFormat(spec, this.config.jsonOnlyEndpoints, "json"); console.log(`ℹ️ Enforced json-only format for ${jsonCount} endpoint parameters/responses`); } + // Create custom schemas if configured + if (this.config.customSchemas && this.config.customSchemas.length > 0) { + let customSchemaCount = 0; + let linkedPropertiesCount = 0; + for (const customSchema of this.config.customSchemas) { + customSchemaCount += createCustomSchema(spec, customSchema.name, customSchema.schema); + + // Link properties to this schema if specified + if (customSchema.linkToProperties && customSchema.linkToProperties.length > 0) { + for (const propertyName of customSchema.linkToProperties) { + linkedPropertiesCount += linkSchemaToProperties(spec, propertyName, customSchema.name); + } + } + } + console.log(`ℹ️ Created ${customSchemaCount} custom schemas`); + if (linkedPropertiesCount > 0) { + console.log(`ℹ️ Linked ${linkedPropertiesCount} properties to custom schemas`); + } + } + + // Transform endpoint tags if configured + if (this.config.endpointTagTransforms && this.config.endpointTagTransforms.length > 0) { + const tagCount = transformEndpointTags(spec, this.config.endpointTagTransforms); + console.log(`ℹ️ Applied ${tagCount} endpoint tag transformations`); + } + // Save the processed spec await SwaggerParser.validate(JSON.parse(JSON.stringify(spec))); console.log("✅ Specification is valid"); @@ -982,6 +1523,13 @@ async function processAlgodSpec() { const config: ProcessingConfig = { sourceUrl: `https://raw.githubusercontent.com/algorand/go-algorand/${stableTag}/daemon/algod/api/algod.oas2.json`, outputPath: join(process.cwd(), "specs", "algod.oas3.json"), + requiredFieldTransforms: [ + { + schemaName: "Genesis", + fieldName: "timestamp", + makeRequired: false, + }, + ], fieldTransforms: [ { fieldName: "action", @@ -1083,6 +1631,39 @@ async function processAlgodSpec() { format: "byte", }, }, + { + fieldName: "bytes", + schemaName: "AvmValue", + addItems: { + format: "byte", + }, + }, + { + fieldName: "bytes", + schemaName: "EvalDelta", + addItems: { + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", + format: "byte", + }, + }, + { + fieldName: "address", + addItems: { + "x-algorand-format": "Address", + }, + }, + { + fieldName: "txid", + addItems: { + "x-algokit-field-rename": "txId", + }, + }, + { + fieldName: "tx-id", + addItems: { + "x-algokit-field-rename": "txId", + }, + }, ], vendorExtensionTransforms: [ { @@ -1134,6 +1715,27 @@ async function processAlgodSpec() { targetValue: "GetBlockTxIds", removeSource: false, }, + { + sourceProperty: "operationId", + sourceValue: "SimulateTransaction", + targetProperty: "operationId", + targetValue: "SimulateTransactions", + removeSource: false, + }, + { + sourceProperty: "operationId", + sourceValue: "WaitForBlock", + targetProperty: "operationId", + targetValue: "StatusAfterBlock", + removeSource: false, + }, + { + sourceProperty: "x-go-type", + sourceValue: "basics.Address", + targetProperty: "x-algorand-format", + targetValue: "Address", + removeSource: false, + }, ], msgpackOnlyEndpoints: [ // Align with Go and JS SDKs that hardcode these to msgpack @@ -1150,6 +1752,47 @@ async function processAlgodSpec() { { path: "/v2/accounts/{address}", methods: ["get"] }, { path: "/v2/accounts/{address}/assets/{asset-id}", methods: ["get"] }, ], + customSchemas: [ + { + name: "SourceMap", + schema: { + type: "object", + required: ["version", "sources", "names", "mappings"], + properties: { + version: { + type: "integer", + }, + sources: { + description: 'A list of original sources used by the "mappings" entry.', + type: "array", + items: { + type: "string", + }, + }, + names: { + description: 'A list of symbol names used by the "mappings" entry.', + type: "array", + items: { + type: "string", + }, + }, + mappings: { + description: "A string with the encoded mapping data.", + type: "string", + }, + }, + description: "Source map for the program", + }, + linkToProperties: ["sourcemap"], + }, + ], + endpointTagTransforms: [ + // Mark dryrun endpoint has been superseded by simulate + { path: "/v2/teal/dryrun", methods: ["post"], addTags: ["skip"] }, + { path: "/metrics", methods: ["get"], addTags: ["skip"] }, + { path: "/swagger.json", methods: ["get"], addTags: ["skip"] }, + { path: "/v2/blocks/{round}/logs", methods: ["get"], addTags: ["skip"] }, + ], }; await processAlgorandSpec(config); @@ -1163,7 +1806,105 @@ async function processKmdSpec() { const config: ProcessingConfig = { sourceUrl: `https://raw.githubusercontent.com/algorand/go-algorand/${stableTag}/daemon/kmd/api/swagger.json`, outputPath: join(process.cwd(), "specs", "kmd.oas3.json"), - stripKmdApiVersionPrefixes: true, + schemaRenames: [ + { from: "APIV1DELETEKeyResponse", to: "DeleteKeyResponse" }, + { from: "APIV1DELETEMultisigResponse", to: "DeleteMultisigResponse" }, + { from: "APIV1GETWalletsResponse", to: "ListWalletsResponse" }, + { from: "APIV1POSTKeyExportResponse", to: "ExportKeyResponse" }, + { from: "APIV1POSTKeyImportResponse", to: "ImportKeyResponse" }, + { from: "APIV1POSTKeyListResponse", to: "ListKeysResponse" }, + { from: "APIV1POSTKeyResponse", to: "GenerateKeyResponse" }, + { from: "APIV1POSTMasterKeyExportResponse", to: "ExportMasterKeyResponse" }, + { from: "APIV1POSTMultisigExportResponse", to: "ExportMultisigResponse" }, + { from: "APIV1POSTMultisigImportResponse", to: "ImportMultisigResponse" }, + { from: "APIV1POSTMultisigListResponse", to: "ListMultisigResponse" }, + { from: "APIV1POSTMultisigProgramSignResponse", to: "SignProgramMultisigResponse" }, + { from: "APIV1POSTMultisigTransactionSignResponse", to: "SignMultisigResponse" }, + { from: "APIV1POSTProgramSignResponse", to: "SignProgramResponse" }, + { from: "APIV1POSTTransactionSignResponse", to: "SignTransactionResponse" }, + { from: "APIV1POSTWalletInfoResponse", to: "WalletInfoResponse" }, + { from: "APIV1POSTWalletInitResponse", to: "InitWalletHandleTokenResponse" }, + { from: "APIV1POSTWalletReleaseResponse", to: "ReleaseWalletHandleTokenResponse" }, + { from: "APIV1POSTWalletRenameResponse", to: "RenameWalletResponse" }, + { from: "APIV1POSTWalletRenewResponse", to: "RenewWalletHandleTokenResponse" }, + { from: "APIV1POSTWalletResponse", to: "CreateWalletResponse" }, + { from: "APIV1Wallet", to: "Wallet" }, + { from: "APIV1WalletHandle", to: "WalletHandle" }, + // These are renamed, so we can use the original name for a customised type + { from: "SignMultisigRequest", to: "SignMultisigTxnRequest" }, + { from: "SignTransactionRequest", to: "SignTxnRequest" }, + ], + schemaFieldRenames: [ + { + schemaName: "MultisigSig", + fieldRenames: [ + { from: "Subsigs", to: "subsig" }, + { from: "Threshold", to: "thr" }, + { from: "Version", to: "v" }, + ], + }, + { + schemaName: "MultisigSubsig", + fieldRenames: [ + { from: "Key", to: "pk" }, + { from: "Sig", to: "s" }, + ], + }, + ], + removeSchemaFields: ["error", "message", "display_mnemonic"], + makeAllFieldsRequired: true, + requiredFieldTransforms: [ + { + schemaName: "CreateWalletRequest", + fieldName: ["master_derivation_key", "wallet_driver_name"], + makeRequired: false, + }, + { + schemaName: "SignTxnRequest", + fieldName: ["wallet_password", "public_key"], + makeRequired: false, + }, + { + schemaName: "SignProgramMultisigRequest", + fieldName: ["wallet_password", "partial_multisig", "use_legacy_msig"], + makeRequired: false, + }, + { + schemaName: "SignMultisigTxnRequest", + fieldName: ["wallet_password", "partial_multisig", "signer"], + makeRequired: false, + }, + { + schemaName: "DeleteKeyRequest", + fieldName: ["wallet_password"], + makeRequired: false, + }, + { + schemaName: "DeleteMultisigRequest", + fieldName: ["wallet_password"], + makeRequired: false, + }, + { + schemaName: "ExportKeyRequest", + fieldName: ["wallet_password"], + makeRequired: false, + }, + { + schemaName: "ExportMasterKeyRequest", + fieldName: ["wallet_password"], + makeRequired: false, + }, + { + schemaName: "SignProgramRequest", + fieldName: ["wallet_password"], + makeRequired: false, + }, + { + schemaName: "MultisigSubsig", + fieldName: ["s"], // TODO: NC - Confirm if this is correct + makeRequired: false, + }, + ], fieldTransforms: [ { fieldName: "private_key", @@ -1173,6 +1914,73 @@ async function processKmdSpec() { "x-algokit-bytes-base64": true, }, }, + { + schemaName: "MultisigSig", + fieldName: "subsig", + addItems: { + "x-algokit-field-rename": "subsignatures", + }, + }, + { + schemaName: "MultisigSig", + fieldName: "thr", + addItems: { + "x-algokit-field-rename": "threshold", + }, + }, + { + schemaName: "MultisigSig", + fieldName: "v", + addItems: { + "x-algokit-field-rename": "version", + }, + }, + { + schemaName: "MultisigSubsig", + fieldName: "pk", + addItems: { + "x-algokit-field-rename": "publicKey", + }, + }, + { + schemaName: "MultisigSubsig", + fieldName: "s", + addItems: { + "x-algokit-field-rename": "signature", + }, + }, + { + schemaName: "SignProgramRequest", + fieldName: "data", + addItems: { + "x-algokit-field-rename": "program", + }, + }, + { + schemaName: "SignProgramMultisigRequest", + fieldName: "data", + addItems: { + "x-algokit-field-rename": "program", + }, + }, + { + fieldName: "addresses.items", + addItems: { + "x-algorand-format": "Address", + }, + }, + { + fieldName: "pks", + addItems: { + "x-algokit-field-rename": "publicKeys", + }, + }, + { + fieldName: "wallet_driver_name", + addItems: { + default: "sqlite", + }, + }, ], vendorExtensionTransforms: [ { @@ -1182,7 +1990,29 @@ async function processKmdSpec() { targetValue: true, removeSource: false, }, + { + sourceProperty: "operationId", + sourceValue: "ListMultisg", + targetProperty: "operationId", + targetValue: "ListMultisig", + removeSource: false, + }, + { + sourceProperty: "operationId", + sourceValue: "InitWalletHandleToken", + targetProperty: "operationId", + targetValue: "InitWalletHandle", + removeSource: false, + }, + { + sourceProperty: "x-go-name", + sourceValue: "Address", + targetProperty: "x-algorand-format", + targetValue: "Address", + removeSource: false, + }, ], + endpointTagTransforms: [{ path: "/swagger.json", methods: ["get"], addTags: ["skip"] }], }; await processAlgorandSpec(config); @@ -1244,6 +2074,24 @@ async function processIndexerSpec() { "x-algokit-bigint": true, }, }, + { + fieldName: "account-id.schema", + addItems: { + "x-algorand-format": "Address", + }, + }, + { + fieldName: "account-id", + addItems: { + "x-algokit-field-rename": "account", + }, + }, + { + fieldName: "txid", + addItems: { + "x-algokit-field-rename": "txId", + }, + }, ], vendorExtensionTransforms: [ { @@ -1267,6 +2115,20 @@ async function processIndexerSpec() { targetValue: true, removeSource: true, }, + { + sourceProperty: "x-algorand-foramt", + sourceValue: "uint64", + targetProperty: "x-algorand-format", + targetValue: "uint64", + removeSource: true, + }, + { + sourceProperty: "operationId", + sourceValue: "lookupTransaction", + targetProperty: "operationId", + targetValue: "lookupTransactionByID", + removeSource: false, + }, ], }; diff --git a/package-lock.json b/package-lock.json index 6641614..473dd3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -534,6 +534,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -669,9 +670,9 @@ } }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/specs/algod.oas3.json b/specs/algod.oas3.json index 629768e..fe15b20 100644 --- a/specs/algod.oas3.json +++ b/specs/algod.oas3.json @@ -81,7 +81,8 @@ "get": { "tags": [ "public", - "common" + "common", + "skip" ], "summary": "Return metrics about algod functioning.", "operationId": "Metrics", @@ -128,7 +129,8 @@ "get": { "tags": [ "public", - "common" + "common", + "skip" ], "summary": "Gets the current swagger spec.", "description": "Returns the entire swagger spec in json.", @@ -257,9 +259,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, { "name": "exclude", @@ -352,9 +356,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, { "name": "asset-id", @@ -389,24 +395,7 @@ "content": { "application/json": { "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "asset-holding": { - "$ref": "#/components/schemas/AssetHolding" - }, - "created-asset": { - "$ref": "#/components/schemas/AssetParams" - } - } + "$ref": "#/components/schemas/AccountAssetResponse" } } } @@ -466,9 +455,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, { "name": "limit", @@ -495,28 +486,7 @@ "content": { "application/json": { "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "asset-holdings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AccountAssetHolding" - } - } - } + "$ref": "#/components/schemas/AccountAssetsInformationResponse" } } } @@ -576,9 +546,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, { "name": "application-id", @@ -613,46 +585,12 @@ "content": { "application/json": { "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "app-local-state": { - "$ref": "#/components/schemas/ApplicationLocalState" - }, - "created-app": { - "$ref": "#/components/schemas/ApplicationParams" - } - } + "$ref": "#/components/schemas/AccountApplicationResponse" } }, "application/msgpack": { "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "app-local-state": { - "$ref": "#/components/schemas/ApplicationLocalState" - }, - "created-app": { - "$ref": "#/components/schemas/ApplicationParams" - } - } + "$ref": "#/components/schemas/AccountApplicationResponse" } } } @@ -727,9 +665,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, { "name": "max", @@ -760,27 +700,7 @@ "content": { "application/msgpack": { "schema": { - "required": [ - "top-transactions", - "total-transactions" - ], - "type": "object", - "properties": { - "top-transactions": { - "type": "array", - "description": "An array of signed transaction objects.", - "items": { - "type": "object", - "properties": {}, - "x-algokit-signed-txn": true - } - }, - "total-transactions": { - "type": "integer", - "description": "Total number of transactions in the pool." - } - }, - "description": "PendingTransactions is an array of signed transactions exactly as they were submitted." + "$ref": "#/components/schemas/PendingTransactionsResponse" } } } @@ -882,24 +802,7 @@ "content": { "application/msgpack": { "schema": { - "required": [ - "block" - ], - "type": "object", - "properties": { - "block": { - "type": "object", - "properties": {}, - "description": "Block header data.", - "x-algorand-format": "BlockHeader" - }, - "cert": { - "type": "object", - "properties": {}, - "description": "Optional certificate object. This is only included when the format is set to message pack.", - "x-algorand-format": "BlockCertificate" - } - } + "$ref": "#/components/schemas/BlockResponse" } } } @@ -981,20 +884,7 @@ "content": { "application/json": { "schema": { - "required": [ - "blockTxids" - ], - "type": "object", - "properties": { - "blockTxids": { - "type": "array", - "description": "Block transaction IDs.", - "items": { - "type": "string" - }, - "x-algokit-field-rename": "block_tx_ids" - } - } + "$ref": "#/components/schemas/BlockTxidsResponse" } } } @@ -1076,16 +966,7 @@ "content": { "application/json": { "schema": { - "required": [ - "blockHash" - ], - "type": "object", - "properties": { - "blockHash": { - "type": "string", - "description": "Block header hash." - } - } + "$ref": "#/components/schemas/BlockHashResponse" } } } @@ -1168,7 +1049,8 @@ "schema": { "pattern": "[A-Z0-9]+", "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, { "name": "hashtype", @@ -1257,7 +1139,8 @@ "get": { "tags": [ "public", - "nonparticipating" + "nonparticipating", + "skip" ], "summary": "Get all of the logs from outer and inner app calls in the given round", "description": "Get all of the logs from outer and inner app calls in the given round", @@ -1284,18 +1167,7 @@ "content": { "application/json": { "schema": { - "required": [ - "logs" - ], - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AppCallLogs" - } - } - } + "$ref": "#/components/schemas/BlockLogsResponse" } } } @@ -1357,33 +1229,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current_round", - "online-money", - "total-money" - ], - "type": "object", - "properties": { - "current_round": { - "type": "integer", - "description": "Round", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "online-money": { - "type": "integer", - "description": "OnlineMoney", - "x-go-type": "uint64", - "x-algokit-bigint": true - }, - "total-money": { - "type": "integer", - "description": "TotalMoney", - "x-go-type": "uint64", - "x-algokit-bigint": true - } - }, - "description": "Supply represents the current supply of MicroAlgos in the system" + "$ref": "#/components/schemas/SupplyResponse" } } } @@ -1420,10 +1266,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParticipationKey" - } + "$ref": "#/components/schemas/ParticipationKeysResponse" } } } @@ -1499,16 +1342,7 @@ "content": { "application/json": { "schema": { - "required": [ - "partId" - ], - "type": "object", - "properties": { - "partId": { - "type": "string", - "description": "encoding of the participation ID." - } - } + "$ref": "#/components/schemas/PostParticipationResponse" } } } @@ -1588,9 +1422,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, { "name": "dilution", @@ -1968,144 +1804,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-time", - "last-round", - "last-version", - "next-version", - "next-version-round", - "next-version-supported", - "stopped-at-unsupported-round", - "time-since-last-round" - ], - "type": "object", - "properties": { - "catchup-time": { - "type": "integer", - "description": "CatchupTime in nanoseconds", - "x-go-type": "int64", - "x-algokit-bigint": true - }, - "last-round": { - "type": "integer", - "description": "LastRound indicates the last round seen", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "last-version": { - "type": "string", - "description": "LastVersion indicates the last consensus version supported" - }, - "next-version": { - "type": "string", - "description": "NextVersion of consensus protocol to use" - }, - "next-version-round": { - "type": "integer", - "description": "NextVersionRound is the round at which the next consensus version will apply", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "next-version-supported": { - "type": "boolean", - "description": "NextVersionSupported indicates whether the next consensus version is supported by this node" - }, - "stopped-at-unsupported-round": { - "type": "boolean", - "description": "StoppedAtUnsupportedRound indicates that the node does not support the new rounds and has stopped making progress" - }, - "time-since-last-round": { - "type": "integer", - "description": "TimeSinceLastRound in nanoseconds", - "x-go-type": "int64", - "x-algokit-bigint": true - }, - "last-catchpoint": { - "type": "string", - "description": "The last catchpoint seen by the node" - }, - "catchpoint": { - "type": "string", - "description": "The current catchpoint that is being caught up to" - }, - "catchpoint-total-accounts": { - "type": "integer", - "description": "The total number of accounts included in the current catchpoint", - "x-go-type": "uint64" - }, - "catchpoint-processed-accounts": { - "type": "integer", - "description": "The number of accounts from the current catchpoint that have been processed so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-verified-accounts": { - "type": "integer", - "description": "The number of accounts from the current catchpoint that have been verified so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-total-kvs": { - "type": "integer", - "description": "The total number of key-values (KVs) included in the current catchpoint", - "x-go-type": "uint64" - }, - "catchpoint-processed-kvs": { - "type": "integer", - "description": "The number of key-values (KVs) from the current catchpoint that have been processed so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-verified-kvs": { - "type": "integer", - "description": "The number of key-values (KVs) from the current catchpoint that have been verified so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-total-blocks": { - "type": "integer", - "description": "The total number of blocks that are required to complete the current catchpoint catchup", - "x-go-type": "uint64" - }, - "catchpoint-acquired-blocks": { - "type": "integer", - "description": "The number of blocks that have already been obtained by the node as part of the catchup", - "x-go-type": "uint64" - }, - "upgrade-delay": { - "type": "integer", - "description": "Upgrade delay", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "upgrade-node-vote": { - "type": "boolean", - "description": "This node's upgrade vote" - }, - "upgrade-votes-required": { - "type": "integer", - "description": "Yes votes required for consensus upgrade" - }, - "upgrade-votes": { - "type": "integer", - "description": "Total votes cast for consensus upgrade" - }, - "upgrade-yes-votes": { - "type": "integer", - "description": "Yes votes cast for consensus upgrade" - }, - "upgrade-no-votes": { - "type": "integer", - "description": "No votes cast for consensus upgrade" - }, - "upgrade-next-protocol-vote-before": { - "type": "integer", - "description": "Next protocol round", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "upgrade-vote-rounds": { - "type": "integer", - "description": "Total voting rounds for current upgrade" - } - }, - "description": "NodeStatus contains the information about a node status" + "$ref": "#/components/schemas/NodeStatusResponse" } } }, @@ -2146,7 +1845,7 @@ ], "summary": "Gets the node status after waiting for a round after the given round.", "description": "Waits for a block to appear after round {round} and returns the node's status at the time. There is a 1 minute timeout, when reached the current status is returned regardless of whether or not it is the round after the given round.", - "operationId": "WaitForBlock", + "operationId": "StatusAfterBlock", "parameters": [ { "name": "round", @@ -2168,144 +1867,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-time", - "last-round", - "last-version", - "next-version", - "next-version-round", - "next-version-supported", - "stopped-at-unsupported-round", - "time-since-last-round" - ], - "type": "object", - "properties": { - "catchup-time": { - "type": "integer", - "description": "CatchupTime in nanoseconds", - "x-go-type": "int64", - "x-algokit-bigint": true - }, - "last-round": { - "type": "integer", - "description": "LastRound indicates the last round seen", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "last-version": { - "type": "string", - "description": "LastVersion indicates the last consensus version supported" - }, - "next-version": { - "type": "string", - "description": "NextVersion of consensus protocol to use" - }, - "next-version-round": { - "type": "integer", - "description": "NextVersionRound is the round at which the next consensus version will apply", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "next-version-supported": { - "type": "boolean", - "description": "NextVersionSupported indicates whether the next consensus version is supported by this node" - }, - "stopped-at-unsupported-round": { - "type": "boolean", - "description": "StoppedAtUnsupportedRound indicates that the node does not support the new rounds and has stopped making progress" - }, - "time-since-last-round": { - "type": "integer", - "description": "TimeSinceLastRound in nanoseconds", - "x-go-type": "int64", - "x-algokit-bigint": true - }, - "last-catchpoint": { - "type": "string", - "description": "The last catchpoint seen by the node" - }, - "catchpoint": { - "type": "string", - "description": "The current catchpoint that is being caught up to" - }, - "catchpoint-total-accounts": { - "type": "integer", - "description": "The total number of accounts included in the current catchpoint", - "x-go-type": "uint64" - }, - "catchpoint-processed-accounts": { - "type": "integer", - "description": "The number of accounts from the current catchpoint that have been processed so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-verified-accounts": { - "type": "integer", - "description": "The number of accounts from the current catchpoint that have been verified so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-total-kvs": { - "type": "integer", - "description": "The total number of key-values (KVs) included in the current catchpoint", - "x-go-type": "uint64" - }, - "catchpoint-processed-kvs": { - "type": "integer", - "description": "The number of key-values (KVs) from the current catchpoint that have been processed so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-verified-kvs": { - "type": "integer", - "description": "The number of key-values (KVs) from the current catchpoint that have been verified so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-total-blocks": { - "type": "integer", - "description": "The total number of blocks that are required to complete the current catchpoint catchup", - "x-go-type": "uint64" - }, - "catchpoint-acquired-blocks": { - "type": "integer", - "description": "The number of blocks that have already been obtained by the node as part of the catchup", - "x-go-type": "uint64" - }, - "upgrade-delay": { - "type": "integer", - "description": "Upgrade delay", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "upgrade-node-vote": { - "type": "boolean", - "description": "This node's upgrade vote" - }, - "upgrade-votes-required": { - "type": "integer", - "description": "Yes votes required for consensus upgrade" - }, - "upgrade-votes": { - "type": "integer", - "description": "Total votes cast for consensus upgrade" - }, - "upgrade-yes-votes": { - "type": "integer", - "description": "Yes votes cast for consensus upgrade" - }, - "upgrade-no-votes": { - "type": "integer", - "description": "No votes cast for consensus upgrade" - }, - "upgrade-next-protocol-vote-before": { - "type": "integer", - "description": "Next protocol round", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "upgrade-vote-rounds": { - "type": "integer", - "description": "Total voting rounds for current upgrade" - } - }, - "description": "NodeStatus contains the information about a node status" + "$ref": "#/components/schemas/NodeStatusResponse" } } }, @@ -2384,16 +1946,7 @@ "content": { "application/json": { "schema": { - "required": [ - "txId" - ], - "type": "object", - "properties": { - "txId": { - "type": "string", - "description": "encoding of the transaction hash." - } - } + "$ref": "#/components/schemas/PostTransactionsResponse" } } } @@ -2530,7 +2083,7 @@ "nonparticipating" ], "summary": "Simulates a raw transaction or transaction group as it would be evaluated on the network. The simulation will use blockchain state from the latest committed round.", - "operationId": "SimulateTransaction", + "operationId": "SimulateTransactions", "parameters": [ { "name": "format", @@ -2562,41 +2115,7 @@ "content": { "application/msgpack": { "schema": { - "required": [ - "last-round", - "txn-groups", - "version" - ], - "type": "object", - "properties": { - "version": { - "type": "integer", - "description": "The version of this response object.", - "x-go-type": "uint64" - }, - "last-round": { - "type": "integer", - "description": "The round immediately preceding this simulation. State changes through this round were used to run this simulation.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "txn-groups": { - "type": "array", - "description": "A result object for each transaction group that was simulated.", - "items": { - "$ref": "#/components/schemas/SimulateTransactionGroupResult" - } - }, - "eval-overrides": { - "$ref": "#/components/schemas/SimulationEvalOverrides" - }, - "exec-trace-config": { - "$ref": "#/components/schemas/SimulateTraceConfig" - }, - "initial-states": { - "$ref": "#/components/schemas/SimulateInitialStates" - } - } + "$ref": "#/components/schemas/SimulateResponse" } } } @@ -2663,50 +2182,7 @@ "content": { "application/json": { "schema": { - "required": [ - "consensus-version", - "fee", - "genesis-hash", - "genesis-id", - "last-round", - "min-fee" - ], - "type": "object", - "properties": { - "consensus-version": { - "type": "string", - "description": "ConsensusVersion indicates the consensus protocol version\nas of LastRound." - }, - "fee": { - "type": "integer", - "description": "Fee is the suggested transaction fee\nFee is in units of micro-Algos per byte.\nFee may fall to zero but transactions must still have a fee of\nat least MinTxnFee for the current network protocol.", - "x-go-type": "uint64", - "x-algokit-bigint": true - }, - "genesis-hash": { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", - "type": "string", - "description": "GenesisHash is the hash of the genesis block.", - "format": "byte" - }, - "genesis-id": { - "type": "string", - "description": "GenesisID is an ID listed in the genesis block." - }, - "last-round": { - "type": "integer", - "description": "LastRound indicates the last round seen", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "min-fee": { - "type": "integer", - "description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.", - "x-go-type": "uint64", - "x-algokit-bigint": true - } - }, - "description": "TransactionParams contains the parameters that help a client construct\na new transaction." + "$ref": "#/components/schemas/TransactionParametersResponse" } } } @@ -2787,27 +2263,7 @@ "content": { "application/msgpack": { "schema": { - "required": [ - "top-transactions", - "total-transactions" - ], - "type": "object", - "properties": { - "top-transactions": { - "type": "array", - "description": "An array of signed transaction objects.", - "items": { - "type": "object", - "properties": {}, - "x-algokit-signed-txn": true - } - }, - "total-transactions": { - "type": "integer", - "description": "Total number of transactions in the pool." - } - }, - "description": "PendingTransactions is an array of signed transactions exactly as they were submitted." + "$ref": "#/components/schemas/PendingTransactionsResponse" } } } @@ -2867,7 +2323,8 @@ "schema": { "pattern": "[A-Z0-9]+", "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, { "name": "format", @@ -3078,18 +2535,7 @@ "content": { "application/msgpack": { "schema": { - "required": [ - "Deltas" - ], - "type": "object", - "properties": { - "Deltas": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LedgerStateDeltaForTransactionGroup" - } - } - } + "$ref": "#/components/schemas/TransactionGroupLedgerStateDeltasForRoundResponse" } } } @@ -3560,18 +3006,7 @@ "content": { "application/json": { "schema": { - "required": [ - "boxes" - ], - "type": "object", - "properties": { - "boxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxDescriptor" - } - } - } + "$ref": "#/components/schemas/BoxesResponse" } } } @@ -3803,18 +3238,7 @@ "content": { "application/json": { "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The minimum sync round for the ledger.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/GetSyncRoundResponse" } } } @@ -4039,26 +3463,7 @@ "content": { "application/json": { "schema": { - "required": [ - "hash", - "result" - ], - "type": "object", - "properties": { - "hash": { - "type": "string", - "description": "base32 SHA512_256 of program bytes (Address style)" - }, - "result": { - "type": "string", - "description": "base64 encoded program bytes" - }, - "sourcemap": { - "type": "object", - "properties": {}, - "description": "JSON of the source map" - } - } + "$ref": "#/components/schemas/CompileResponse" } } } @@ -4132,16 +3537,7 @@ "content": { "application/json": { "schema": { - "required": [ - "result" - ], - "type": "object", - "properties": { - "result": { - "type": "string", - "description": "disassembled Teal code" - } - } + "$ref": "#/components/schemas/DisassembleResponse" } } } @@ -4229,17 +3625,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-message" - ], - "type": "object", - "properties": { - "catchup-message": { - "type": "string", - "description": "Catchup start response string" - } - }, - "description": "An catchpoint start response." + "$ref": "#/components/schemas/CatchpointStartResponse" } } }, @@ -4249,17 +3635,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-message" - ], - "type": "object", - "properties": { - "catchup-message": { - "type": "string", - "description": "Catchup start response string" - } - }, - "description": "An catchpoint start response." + "$ref": "#/components/schemas/CatchpointStartResponse" } } }, @@ -4339,17 +3715,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-message" - ], - "type": "object", - "properties": { - "catchup-message": { - "type": "string", - "description": "Catchup abort response string" - } - }, - "description": "An catchpoint abort response." + "$ref": "#/components/schemas/CatchpointAbortResponse" } } }, @@ -4396,7 +3762,8 @@ "post": { "tags": [ "public", - "nonparticipating" + "nonparticipating", + "skip" ], "summary": "Provide debugging information for a transaction (or group).", "description": "Executes TEAL program(s) in context and returns debugging information about the execution. This endpoint is only enabled when a node's configuration file sets EnableDeveloperAPI to true.", @@ -4423,27 +3790,7 @@ "content": { "application/json": { "schema": { - "required": [ - "error", - "protocol-version", - "txns" - ], - "type": "object", - "properties": { - "txns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DryrunTxnResult" - } - }, - "error": { - "type": "string" - }, - "protocol-version": { - "type": "string", - "description": "Protocol version is the protocol version Dryrun was operated under." - } - } + "$ref": "#/components/schemas/DryrunResponse" } } } @@ -4529,17 +3876,7 @@ "content": { "application/json": { "schema": { - "required": [ - "offset" - ], - "type": "object", - "properties": { - "offset": { - "type": "integer", - "description": "Timestamp offset in seconds.", - "x-go-type": "uint64" - } - } + "$ref": "#/components/schemas/GetBlockTimeStampOffsetResponse" } } } @@ -4695,8 +4032,7 @@ "id", "network", "proto", - "rwd", - "timestamp" + "rwd" ], "type": "object", "properties": { @@ -4776,7 +4112,8 @@ "properties": { "address": { "type": "string", - "description": "the account public key" + "description": "the account public key", + "x-algorand-format": "Address" }, "amount": { "type": "integer", @@ -4994,6 +4331,7 @@ "type": "integer", "description": "unique asset identifier", "x-go-type": "basics.AssetIndex", + "x-algokit-field-rename": "id", "x-algokit-bigint": true }, "params": { @@ -5316,7 +4654,8 @@ "bytes": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", - "description": "bytes value." + "description": "bytes value.", + "format": "byte" }, "uint": { "type": "integer", @@ -5360,7 +4699,8 @@ "type": "object", "properties": { "address": { - "type": "string" + "type": "string", + "x-algorand-format": "Address" }, "delta": { "$ref": "#/components/schemas/StateDelta" @@ -5398,7 +4738,9 @@ }, "bytes": { "type": "string", - "description": "\\[bs\\] bytes value." + "description": "\\[bs\\] bytes value.", + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", + "format": "byte" }, "uint": { "type": "integer", @@ -6551,300 +5893,764 @@ } }, "description": "Proof of transaction in a block." - } - }, - "responses": { + }, "GetBlockTimeStampOffsetResponse": { - "description": "Response containing the timestamp offset in seconds", - "content": { - "application/json": { - "schema": { - "required": [ - "offset" - ], - "type": "object", - "properties": { - "offset": { - "type": "integer", - "description": "Timestamp offset in seconds.", - "x-go-type": "uint64" - } - } - } + "required": [ + "offset" + ], + "type": "object", + "properties": { + "offset": { + "type": "integer", + "description": "Timestamp offset in seconds.", + "x-go-type": "uint64" } } }, "GetSyncRoundResponse": { - "description": "Response containing the ledger's minimum sync round", - "content": { - "application/json": { - "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The minimum sync round for the ledger.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - } - } - } - } - } - }, - "LedgerStateDeltaForTransactionGroupResponse": { - "description": "Response containing a ledger state delta for a single transaction group.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LedgerStateDelta" - } + "required": [ + "round" + ], + "type": "object", + "properties": { + "round": { + "type": "integer", + "description": "The minimum sync round for the ledger.", + "x-go-type": "basics.Round", + "x-algokit-bigint": true } } }, "TransactionGroupLedgerStateDeltasForRoundResponse": { - "description": "Response containing all ledger state deltas for transaction groups, with their associated Ids, in a single round.", - "content": { - "application/json": { - "schema": { - "required": [ - "Deltas" - ], - "type": "object", - "properties": { - "Deltas": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LedgerStateDeltaForTransactionGroup" - } - } - } - } - } - } - }, - "LedgerStateDeltaResponse": { - "description": "Contains ledger deltas", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LedgerStateDelta" - } - } - } - }, - "LightBlockHeaderProofResponse": { - "description": "Proof of a light block header.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LightBlockHeaderProof" - } - } - } - }, - "StateProofResponse": { - "description": "StateProofResponse wraps the StateProof type in a response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StateProof" - } - } - } - }, - "AccountResponse": { - "description": "AccountResponse wraps the Account type in a response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Account" + "required": [ + "Deltas" + ], + "type": "object", + "properties": { + "Deltas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LedgerStateDeltaForTransactionGroup" } } } }, "AccountAssetResponse": { - "description": "AccountAssetResponse describes the account's asset holding and asset parameters (if either exist) for a specific asset ID. Asset parameters will only be returned if the provided address is the asset's creator.", - "content": { - "application/json": { - "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "asset-holding": { - "$ref": "#/components/schemas/AssetHolding" - }, - "created-asset": { - "$ref": "#/components/schemas/AssetParams" - } - } - } + "required": [ + "round" + ], + "type": "object", + "properties": { + "round": { + "type": "integer", + "description": "The round for which this information is relevant.", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "asset-holding": { + "$ref": "#/components/schemas/AssetHolding" + }, + "created-asset": { + "$ref": "#/components/schemas/AssetParams" } } }, "AccountAssetsInformationResponse": { - "description": "AccountAssetsInformationResponse contains a list of assets held by an account.", - "content": { - "application/json": { - "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "asset-holdings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AccountAssetHolding" - } - } - } + "required": [ + "round" + ], + "type": "object", + "properties": { + "round": { + "type": "integer", + "description": "The round for which this information is relevant.", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + }, + "asset-holdings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountAssetHolding" } } } }, "AccountApplicationResponse": { - "description": "AccountApplicationResponse describes the account's application local state and global state (AppLocalState and AppParams, if either exists) for a specific application ID. Global state will only be returned if the provided address is the application's creator.", - "content": { - "application/json": { - "schema": { - "required": [ - "round" - ], - "type": "object", - "properties": { - "round": { - "type": "integer", - "description": "The round for which this information is relevant.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "app-local-state": { - "$ref": "#/components/schemas/ApplicationLocalState" - }, - "created-app": { - "$ref": "#/components/schemas/ApplicationParams" - } - } - } + "required": [ + "round" + ], + "type": "object", + "properties": { + "round": { + "type": "integer", + "description": "The round for which this information is relevant.", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "app-local-state": { + "$ref": "#/components/schemas/ApplicationLocalState" + }, + "created-app": { + "$ref": "#/components/schemas/ApplicationParams" } } }, "BlockResponse": { - "description": "Encoded block object.", - "content": { - "application/json": { - "schema": { - "required": [ - "block" - ], - "type": "object", - "properties": { - "block": { - "type": "object", - "properties": {}, - "description": "Block header data.", - "x-algorand-format": "BlockHeader" - }, - "cert": { - "type": "object", - "properties": {}, - "description": "Optional certificate object. This is only included when the format is set to message pack.", - "x-algorand-format": "BlockCertificate" - } - } - } + "required": [ + "block" + ], + "type": "object", + "properties": { + "block": { + "type": "object", + "properties": {}, + "description": "Block header data.", + "x-algorand-format": "BlockHeader" + }, + "cert": { + "type": "object", + "properties": {}, + "description": "Optional certificate object. This is only included when the format is set to message pack.", + "x-algorand-format": "BlockCertificate" } } }, "BlockTxidsResponse": { - "description": "Top level transaction IDs in a block.", - "content": { - "application/json": { - "schema": { - "required": [ - "blockTxids" - ], - "type": "object", - "properties": { - "blockTxids": { - "type": "array", - "description": "Block transaction IDs.", - "items": { - "type": "string" - }, - "x-algokit-field-rename": "block_tx_ids" - } - } - } + "required": [ + "blockTxids" + ], + "type": "object", + "properties": { + "blockTxids": { + "type": "array", + "description": "Block transaction IDs.", + "items": { + "type": "string" + }, + "x-algokit-field-rename": "block_tx_ids" } } }, "BlockHashResponse": { - "description": "Hash of a block header.", - "content": { - "application/json": { - "schema": { - "required": [ - "blockHash" - ], - "type": "object", - "properties": { - "blockHash": { - "type": "string", - "description": "Block header hash." - } - } - } - } - } - }, - "TransactionProofResponse": { - "description": "Proof of transaction in a block.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionProof" - } + "required": [ + "blockHash" + ], + "type": "object", + "properties": { + "blockHash": { + "type": "string", + "description": "Block header hash." } } }, "CatchpointStartResponse": { - "content": { - "application/json": { - "schema": { - "required": [ - "catchup-message" - ], + "required": [ + "catchup-message" + ], + "type": "object", + "properties": { + "catchup-message": { + "type": "string", + "description": "Catchup start response string" + } + }, + "description": "An catchpoint start response." + }, + "CatchpointAbortResponse": { + "required": [ + "catchup-message" + ], + "type": "object", + "properties": { + "catchup-message": { + "type": "string", + "description": "Catchup abort response string" + } + }, + "description": "An catchpoint abort response." + }, + "NodeStatusResponse": { + "required": [ + "catchup-time", + "last-round", + "last-version", + "next-version", + "next-version-round", + "next-version-supported", + "stopped-at-unsupported-round", + "time-since-last-round" + ], + "type": "object", + "properties": { + "catchup-time": { + "type": "integer", + "description": "CatchupTime in nanoseconds", + "x-go-type": "int64", + "x-algokit-bigint": true + }, + "last-round": { + "type": "integer", + "description": "LastRound indicates the last round seen", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "last-version": { + "type": "string", + "description": "LastVersion indicates the last consensus version supported" + }, + "next-version": { + "type": "string", + "description": "NextVersion of consensus protocol to use" + }, + "next-version-round": { + "type": "integer", + "description": "NextVersionRound is the round at which the next consensus version will apply", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "next-version-supported": { + "type": "boolean", + "description": "NextVersionSupported indicates whether the next consensus version is supported by this node" + }, + "stopped-at-unsupported-round": { + "type": "boolean", + "description": "StoppedAtUnsupportedRound indicates that the node does not support the new rounds and has stopped making progress" + }, + "time-since-last-round": { + "type": "integer", + "description": "TimeSinceLastRound in nanoseconds", + "x-go-type": "int64", + "x-algokit-bigint": true + }, + "last-catchpoint": { + "type": "string", + "description": "The last catchpoint seen by the node" + }, + "catchpoint": { + "type": "string", + "description": "The current catchpoint that is being caught up to" + }, + "catchpoint-total-accounts": { + "type": "integer", + "description": "The total number of accounts included in the current catchpoint", + "x-go-type": "uint64" + }, + "catchpoint-processed-accounts": { + "type": "integer", + "description": "The number of accounts from the current catchpoint that have been processed so far as part of the catchup", + "x-go-type": "uint64" + }, + "catchpoint-verified-accounts": { + "type": "integer", + "description": "The number of accounts from the current catchpoint that have been verified so far as part of the catchup", + "x-go-type": "uint64" + }, + "catchpoint-total-kvs": { + "type": "integer", + "description": "The total number of key-values (KVs) included in the current catchpoint", + "x-go-type": "uint64" + }, + "catchpoint-processed-kvs": { + "type": "integer", + "description": "The number of key-values (KVs) from the current catchpoint that have been processed so far as part of the catchup", + "x-go-type": "uint64" + }, + "catchpoint-verified-kvs": { + "type": "integer", + "description": "The number of key-values (KVs) from the current catchpoint that have been verified so far as part of the catchup", + "x-go-type": "uint64" + }, + "catchpoint-total-blocks": { + "type": "integer", + "description": "The total number of blocks that are required to complete the current catchpoint catchup", + "x-go-type": "uint64" + }, + "catchpoint-acquired-blocks": { + "type": "integer", + "description": "The number of blocks that have already been obtained by the node as part of the catchup", + "x-go-type": "uint64" + }, + "upgrade-delay": { + "type": "integer", + "description": "Upgrade delay", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "upgrade-node-vote": { + "type": "boolean", + "description": "This node's upgrade vote" + }, + "upgrade-votes-required": { + "type": "integer", + "description": "Yes votes required for consensus upgrade" + }, + "upgrade-votes": { + "type": "integer", + "description": "Total votes cast for consensus upgrade" + }, + "upgrade-yes-votes": { + "type": "integer", + "description": "Yes votes cast for consensus upgrade" + }, + "upgrade-no-votes": { + "type": "integer", + "description": "No votes cast for consensus upgrade" + }, + "upgrade-next-protocol-vote-before": { + "type": "integer", + "description": "Next protocol round", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "upgrade-vote-rounds": { + "type": "integer", + "description": "Total voting rounds for current upgrade" + } + }, + "description": "NodeStatus contains the information about a node status" + }, + "PendingTransactionsResponse": { + "required": [ + "top-transactions", + "total-transactions" + ], + "type": "object", + "properties": { + "top-transactions": { + "type": "array", + "description": "An array of signed transaction objects.", + "items": { "type": "object", - "properties": { - "catchup-message": { - "type": "string", - "description": "Catchup start response string" - } - }, - "description": "An catchpoint start response." + "properties": {}, + "x-algokit-signed-txn": true + } + }, + "total-transactions": { + "type": "integer", + "description": "Total number of transactions in the pool." + } + }, + "description": "PendingTransactions is an array of signed transactions exactly as they were submitted." + }, + "ParticipationKeysResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParticipationKey" + } + }, + "PostParticipationResponse": { + "required": [ + "partId" + ], + "type": "object", + "properties": { + "partId": { + "type": "string", + "description": "encoding of the participation ID." + } + } + }, + "PostTransactionsResponse": { + "required": [ + "txId" + ], + "type": "object", + "properties": { + "txId": { + "type": "string", + "description": "encoding of the transaction hash." + } + } + }, + "SimulateResponse": { + "required": [ + "last-round", + "txn-groups", + "version" + ], + "type": "object", + "properties": { + "version": { + "type": "integer", + "description": "The version of this response object.", + "x-go-type": "uint64" + }, + "last-round": { + "type": "integer", + "description": "The round immediately preceding this simulation. State changes through this round were used to run this simulation.", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "txn-groups": { + "type": "array", + "description": "A result object for each transaction group that was simulated.", + "items": { + "$ref": "#/components/schemas/SimulateTransactionGroupResult" + } + }, + "eval-overrides": { + "$ref": "#/components/schemas/SimulationEvalOverrides" + }, + "exec-trace-config": { + "$ref": "#/components/schemas/SimulateTraceConfig" + }, + "initial-states": { + "$ref": "#/components/schemas/SimulateInitialStates" + } + } + }, + "BlockLogsResponse": { + "required": [ + "logs" + ], + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppCallLogs" + } + } + } + }, + "SupplyResponse": { + "required": [ + "current_round", + "online-money", + "total-money" + ], + "type": "object", + "properties": { + "current_round": { + "type": "integer", + "description": "Round", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "online-money": { + "type": "integer", + "description": "OnlineMoney", + "x-go-type": "uint64", + "x-algokit-bigint": true + }, + "total-money": { + "type": "integer", + "description": "TotalMoney", + "x-go-type": "uint64", + "x-algokit-bigint": true + } + }, + "description": "Supply represents the current supply of MicroAlgos in the system" + }, + "TransactionParametersResponse": { + "required": [ + "consensus-version", + "fee", + "genesis-hash", + "genesis-id", + "last-round", + "min-fee" + ], + "type": "object", + "properties": { + "consensus-version": { + "type": "string", + "description": "ConsensusVersion indicates the consensus protocol version\nas of LastRound." + }, + "fee": { + "type": "integer", + "description": "Fee is the suggested transaction fee\nFee is in units of micro-Algos per byte.\nFee may fall to zero but transactions must still have a fee of\nat least MinTxnFee for the current network protocol.", + "x-go-type": "uint64", + "x-algokit-bigint": true + }, + "genesis-hash": { + "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", + "type": "string", + "description": "GenesisHash is the hash of the genesis block.", + "format": "byte" + }, + "genesis-id": { + "type": "string", + "description": "GenesisID is an ID listed in the genesis block." + }, + "last-round": { + "type": "integer", + "description": "LastRound indicates the last round seen", + "x-go-type": "basics.Round", + "x-algokit-bigint": true + }, + "min-fee": { + "type": "integer", + "description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.", + "x-go-type": "uint64", + "x-algokit-bigint": true + } + }, + "description": "TransactionParams contains the parameters that help a client construct\na new transaction." + }, + "BoxesResponse": { + "required": [ + "boxes" + ], + "type": "object", + "properties": { + "boxes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoxDescriptor" + } + } + } + }, + "CompileResponse": { + "required": [ + "hash", + "result" + ], + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "base32 SHA512_256 of program bytes (Address style)" + }, + "result": { + "type": "string", + "description": "base64 encoded program bytes" + }, + "sourcemap": { + "$ref": "#/components/schemas/SourceMap" + } + } + }, + "DisassembleResponse": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "disassembled Teal code" + } + } + }, + "DryrunResponse": { + "required": [ + "error", + "protocol-version", + "txns" + ], + "type": "object", + "properties": { + "txns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DryrunTxnResult" + } + }, + "error": { + "type": "string" + }, + "protocol-version": { + "type": "string", + "description": "Protocol version is the protocol version Dryrun was operated under." + } + } + }, + "SourceMap": { + "type": "object", + "required": [ + "version", + "sources", + "names", + "mappings" + ], + "properties": { + "version": { + "type": "integer" + }, + "sources": { + "description": "A list of original sources used by the \"mappings\" entry.", + "type": "array", + "items": { + "type": "string" + } + }, + "names": { + "description": "A list of symbol names used by the \"mappings\" entry.", + "type": "array", + "items": { + "type": "string" + } + }, + "mappings": { + "description": "A string with the encoded mapping data.", + "type": "string" + } + }, + "description": "Source map for the program" + } + }, + "responses": { + "GetBlockTimeStampOffsetResponse": { + "description": "Response containing the timestamp offset in seconds", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBlockTimeStampOffsetResponse" + } + } + } + }, + "GetSyncRoundResponse": { + "description": "Response containing the ledger's minimum sync round", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSyncRoundResponse" + } + } + } + }, + "LedgerStateDeltaForTransactionGroupResponse": { + "description": "Response containing a ledger state delta for a single transaction group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LedgerStateDelta" + } + } + } + }, + "TransactionGroupLedgerStateDeltasForRoundResponse": { + "description": "Response containing all ledger state deltas for transaction groups, with their associated Ids, in a single round.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionGroupLedgerStateDeltasForRoundResponse" + } + } + } + }, + "LedgerStateDeltaResponse": { + "description": "Contains ledger deltas", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LedgerStateDelta" + } + } + } + }, + "LightBlockHeaderProofResponse": { + "description": "Proof of a light block header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LightBlockHeaderProof" + } + } + } + }, + "StateProofResponse": { + "description": "StateProofResponse wraps the StateProof type in a response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StateProof" + } + } + } + }, + "AccountResponse": { + "description": "AccountResponse wraps the Account type in a response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + } + }, + "AccountAssetResponse": { + "description": "AccountAssetResponse describes the account's asset holding and asset parameters (if either exist) for a specific asset ID. Asset parameters will only be returned if the provided address is the asset's creator.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountAssetResponse" + } + } + } + }, + "AccountAssetsInformationResponse": { + "description": "AccountAssetsInformationResponse contains a list of assets held by an account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountAssetsInformationResponse" + } + } + } + }, + "AccountApplicationResponse": { + "description": "AccountApplicationResponse describes the account's application local state and global state (AppLocalState and AppParams, if either exists) for a specific application ID. Global state will only be returned if the provided address is the application's creator.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountApplicationResponse" + } + } + } + }, + "BlockResponse": { + "description": "Encoded block object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockResponse" + } + } + } + }, + "BlockTxidsResponse": { + "description": "Top level transaction IDs in a block.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockTxidsResponse" + } + } + } + }, + "BlockHashResponse": { + "description": "Hash of a block header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockHashResponse" + } + } + } + }, + "TransactionProofResponse": { + "description": "Proof of transaction in a block.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionProof" + } + } + } + }, + "CatchpointStartResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CatchpointStartResponse" } } }, @@ -6854,17 +6660,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-message" - ], - "type": "object", - "properties": { - "catchup-message": { - "type": "string", - "description": "Catchup abort response string" - } - }, - "description": "An catchpoint abort response." + "$ref": "#/components/schemas/CatchpointAbortResponse" } } }, @@ -6874,144 +6670,7 @@ "content": { "application/json": { "schema": { - "required": [ - "catchup-time", - "last-round", - "last-version", - "next-version", - "next-version-round", - "next-version-supported", - "stopped-at-unsupported-round", - "time-since-last-round" - ], - "type": "object", - "properties": { - "catchup-time": { - "type": "integer", - "description": "CatchupTime in nanoseconds", - "x-go-type": "int64", - "x-algokit-bigint": true - }, - "last-round": { - "type": "integer", - "description": "LastRound indicates the last round seen", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "last-version": { - "type": "string", - "description": "LastVersion indicates the last consensus version supported" - }, - "next-version": { - "type": "string", - "description": "NextVersion of consensus protocol to use" - }, - "next-version-round": { - "type": "integer", - "description": "NextVersionRound is the round at which the next consensus version will apply", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "next-version-supported": { - "type": "boolean", - "description": "NextVersionSupported indicates whether the next consensus version is supported by this node" - }, - "stopped-at-unsupported-round": { - "type": "boolean", - "description": "StoppedAtUnsupportedRound indicates that the node does not support the new rounds and has stopped making progress" - }, - "time-since-last-round": { - "type": "integer", - "description": "TimeSinceLastRound in nanoseconds", - "x-go-type": "int64", - "x-algokit-bigint": true - }, - "last-catchpoint": { - "type": "string", - "description": "The last catchpoint seen by the node" - }, - "catchpoint": { - "type": "string", - "description": "The current catchpoint that is being caught up to" - }, - "catchpoint-total-accounts": { - "type": "integer", - "description": "The total number of accounts included in the current catchpoint", - "x-go-type": "uint64" - }, - "catchpoint-processed-accounts": { - "type": "integer", - "description": "The number of accounts from the current catchpoint that have been processed so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-verified-accounts": { - "type": "integer", - "description": "The number of accounts from the current catchpoint that have been verified so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-total-kvs": { - "type": "integer", - "description": "The total number of key-values (KVs) included in the current catchpoint", - "x-go-type": "uint64" - }, - "catchpoint-processed-kvs": { - "type": "integer", - "description": "The number of key-values (KVs) from the current catchpoint that have been processed so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-verified-kvs": { - "type": "integer", - "description": "The number of key-values (KVs) from the current catchpoint that have been verified so far as part of the catchup", - "x-go-type": "uint64" - }, - "catchpoint-total-blocks": { - "type": "integer", - "description": "The total number of blocks that are required to complete the current catchpoint catchup", - "x-go-type": "uint64" - }, - "catchpoint-acquired-blocks": { - "type": "integer", - "description": "The number of blocks that have already been obtained by the node as part of the catchup", - "x-go-type": "uint64" - }, - "upgrade-delay": { - "type": "integer", - "description": "Upgrade delay", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "upgrade-node-vote": { - "type": "boolean", - "description": "This node's upgrade vote" - }, - "upgrade-votes-required": { - "type": "integer", - "description": "Yes votes required for consensus upgrade" - }, - "upgrade-votes": { - "type": "integer", - "description": "Total votes cast for consensus upgrade" - }, - "upgrade-yes-votes": { - "type": "integer", - "description": "Yes votes cast for consensus upgrade" - }, - "upgrade-no-votes": { - "type": "integer", - "description": "No votes cast for consensus upgrade" - }, - "upgrade-next-protocol-vote-before": { - "type": "integer", - "description": "Next protocol round", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "upgrade-vote-rounds": { - "type": "integer", - "description": "Total voting rounds for current upgrade" - } - }, - "description": "NodeStatus contains the information about a node status" + "$ref": "#/components/schemas/NodeStatusResponse" } } }, @@ -7022,27 +6681,7 @@ "content": { "application/json": { "schema": { - "required": [ - "top-transactions", - "total-transactions" - ], - "type": "object", - "properties": { - "top-transactions": { - "type": "array", - "description": "An array of signed transaction objects.", - "items": { - "type": "object", - "properties": {}, - "x-algokit-signed-txn": true - } - }, - "total-transactions": { - "type": "integer", - "description": "Total number of transactions in the pool." - } - }, - "description": "PendingTransactions is an array of signed transactions exactly as they were submitted." + "$ref": "#/components/schemas/PendingTransactionsResponse" } } } @@ -7052,10 +6691,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParticipationKey" - } + "$ref": "#/components/schemas/ParticipationKeysResponse" } } } @@ -7075,16 +6711,7 @@ "content": { "application/json": { "schema": { - "required": [ - "partId" - ], - "type": "object", - "properties": { - "partId": { - "type": "string", - "description": "encoding of the participation ID." - } - } + "$ref": "#/components/schemas/PostParticipationResponse" } } } @@ -7094,16 +6721,7 @@ "content": { "application/json": { "schema": { - "required": [ - "txId" - ], - "type": "object", - "properties": { - "txId": { - "type": "string", - "description": "encoding of the transaction hash." - } - } + "$ref": "#/components/schemas/PostTransactionsResponse" } } } @@ -7113,41 +6731,7 @@ "content": { "application/json": { "schema": { - "required": [ - "last-round", - "txn-groups", - "version" - ], - "type": "object", - "properties": { - "version": { - "type": "integer", - "description": "The version of this response object.", - "x-go-type": "uint64" - }, - "last-round": { - "type": "integer", - "description": "The round immediately preceding this simulation. State changes through this round were used to run this simulation.", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "txn-groups": { - "type": "array", - "description": "A result object for each transaction group that was simulated.", - "items": { - "$ref": "#/components/schemas/SimulateTransactionGroupResult" - } - }, - "eval-overrides": { - "$ref": "#/components/schemas/SimulationEvalOverrides" - }, - "exec-trace-config": { - "$ref": "#/components/schemas/SimulateTraceConfig" - }, - "initial-states": { - "$ref": "#/components/schemas/SimulateInitialStates" - } - } + "$ref": "#/components/schemas/SimulateResponse" } } } @@ -7157,18 +6741,7 @@ "content": { "application/json": { "schema": { - "required": [ - "logs" - ], - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AppCallLogs" - } - } - } + "$ref": "#/components/schemas/BlockLogsResponse" } } } @@ -7178,33 +6751,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current_round", - "online-money", - "total-money" - ], - "type": "object", - "properties": { - "current_round": { - "type": "integer", - "description": "Round", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "online-money": { - "type": "integer", - "description": "OnlineMoney", - "x-go-type": "uint64", - "x-algokit-bigint": true - }, - "total-money": { - "type": "integer", - "description": "TotalMoney", - "x-go-type": "uint64", - "x-algokit-bigint": true - } - }, - "description": "Supply represents the current supply of MicroAlgos in the system" + "$ref": "#/components/schemas/SupplyResponse" } } } @@ -7214,50 +6761,7 @@ "content": { "application/json": { "schema": { - "required": [ - "consensus-version", - "fee", - "genesis-hash", - "genesis-id", - "last-round", - "min-fee" - ], - "type": "object", - "properties": { - "consensus-version": { - "type": "string", - "description": "ConsensusVersion indicates the consensus protocol version\nas of LastRound." - }, - "fee": { - "type": "integer", - "description": "Fee is the suggested transaction fee\nFee is in units of micro-Algos per byte.\nFee may fall to zero but transactions must still have a fee of\nat least MinTxnFee for the current network protocol.", - "x-go-type": "uint64", - "x-algokit-bigint": true - }, - "genesis-hash": { - "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", - "type": "string", - "description": "GenesisHash is the hash of the genesis block.", - "format": "byte" - }, - "genesis-id": { - "type": "string", - "description": "GenesisID is an ID listed in the genesis block." - }, - "last-round": { - "type": "integer", - "description": "LastRound indicates the last round seen", - "x-go-type": "basics.Round", - "x-algokit-bigint": true - }, - "min-fee": { - "type": "integer", - "description": "The minimum transaction fee (not per byte) required for the\ntxn to validate for the current network protocol.", - "x-go-type": "uint64", - "x-algokit-bigint": true - } - }, - "description": "TransactionParams contains the parameters that help a client construct\na new transaction." + "$ref": "#/components/schemas/TransactionParametersResponse" } } } @@ -7277,18 +6781,7 @@ "content": { "application/json": { "schema": { - "required": [ - "boxes" - ], - "type": "object", - "properties": { - "boxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxDescriptor" - } - } - } + "$ref": "#/components/schemas/BoxesResponse" } } } @@ -7318,26 +6811,7 @@ "content": { "application/json": { "schema": { - "required": [ - "hash", - "result" - ], - "type": "object", - "properties": { - "hash": { - "type": "string", - "description": "base32 SHA512_256 of program bytes (Address style)" - }, - "result": { - "type": "string", - "description": "base64 encoded program bytes" - }, - "sourcemap": { - "type": "object", - "properties": {}, - "description": "JSON of the source map" - } - } + "$ref": "#/components/schemas/CompileResponse" } } } @@ -7347,16 +6821,7 @@ "content": { "application/json": { "schema": { - "required": [ - "result" - ], - "type": "object", - "properties": { - "result": { - "type": "string", - "description": "disassembled Teal code" - } - } + "$ref": "#/components/schemas/DisassembleResponse" } } } @@ -7366,27 +6831,7 @@ "content": { "application/json": { "schema": { - "required": [ - "error", - "protocol-version", - "txns" - ], - "type": "object", - "properties": { - "txns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DryrunTxnResult" - } - }, - "error": { - "type": "string" - }, - "protocol-version": { - "type": "string", - "description": "Protocol version is the protocol version Dryrun was operated under." - } - } + "$ref": "#/components/schemas/DryrunResponse" } } } @@ -7488,9 +6933,11 @@ "schema": { "pattern": "[A-Z0-9]{58}", "type": "string", - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, - "x-go-type": "basics.Address" + "x-go-type": "basics.Address", + "x-algorand-format": "Address" }, "asset-id": { "name": "asset-id", @@ -7543,7 +6990,8 @@ "x-go-name": "TxID" }, "x-algorand-format": "Address", - "x-go-name": "TxID" + "x-go-name": "TxID", + "x-algokit-field-rename": "txId" }, "tx-type": { "name": "tx-type", diff --git a/specs/indexer.oas3.json b/specs/indexer.oas3.json index 9573acc..698f66d 100644 --- a/specs/indexer.oas3.json +++ b/specs/indexer.oas3.json @@ -174,28 +174,7 @@ "content": { "application/json": { "schema": { - "required": [ - "accounts", - "current-round" - ], - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Account" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AccountsResponse" } } } @@ -205,19 +184,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -227,19 +194,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -261,8 +216,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, { "name": "round", @@ -309,21 +266,7 @@ "content": { "application/json": { "schema": { - "required": [ - "account", - "current-round" - ], - "type": "object", - "properties": { - "account": { - "$ref": "#/components/schemas/Account" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/AccountResponse" } } } @@ -333,19 +276,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -355,19 +286,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -377,19 +296,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -411,8 +318,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, { "name": "asset-id", @@ -454,28 +363,7 @@ "content": { "application/json": { "schema": { - "required": [ - "assets", - "current-round" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AssetHolding" - } - } - } + "$ref": "#/components/schemas/AssetHoldingsResponse" } } } @@ -485,19 +373,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -507,19 +383,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -529,19 +393,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -563,8 +415,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, { "name": "asset-id", @@ -606,28 +460,7 @@ "content": { "application/json": { "schema": { - "required": [ - "assets", - "current-round" - ], - "type": "object", - "properties": { - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AssetsResponse" } } } @@ -637,19 +470,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -659,19 +480,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -681,19 +490,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -715,8 +512,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, { "name": "application-id", @@ -758,28 +557,7 @@ "content": { "application/json": { "schema": { - "required": [ - "apps-local-states", - "current-round" - ], - "type": "object", - "properties": { - "apps-local-states": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationLocalState" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/ApplicationLocalStatesResponse" } } } @@ -789,19 +567,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -811,19 +577,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -833,19 +587,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -867,8 +609,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, { "name": "application-id", @@ -910,28 +654,7 @@ "content": { "application/json": { "schema": { - "required": [ - "applications", - "current-round" - ], - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Application" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/ApplicationsResponse" } } } @@ -941,19 +664,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -963,19 +674,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -985,19 +684,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1075,7 +762,8 @@ "description": "Lookup the specific transaction by ID.", "schema": { "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, { "name": "round", @@ -1159,8 +847,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, { "name": "rekey-to", @@ -1177,28 +867,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round", - "transactions" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - } + "$ref": "#/components/schemas/TransactionsResponse" } } } @@ -1208,19 +877,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1230,19 +887,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1306,28 +951,7 @@ "content": { "application/json": { "schema": { - "required": [ - "applications", - "current-round" - ], - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Application" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/ApplicationsResponse" } } } @@ -1337,19 +961,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1389,20 +1001,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round" - ], - "type": "object", - "properties": { - "application": { - "$ref": "#/components/schemas/Application" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/ApplicationResponse" } } } @@ -1412,19 +1011,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1434,19 +1021,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1495,28 +1070,7 @@ "content": { "application/json": { "schema": { - "required": [ - "application-id", - "boxes" - ], - "type": "object", - "properties": { - "application-id": { - "type": "integer", - "description": "\\[appidx\\] application index.", - "x-algokit-bigint": true - }, - "boxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxDescriptor" - } - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/BoxesResponse" } } } @@ -1526,19 +1080,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1548,19 +1090,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1570,19 +1100,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1634,19 +1152,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1656,19 +1162,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1678,19 +1172,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1737,7 +1219,8 @@ "description": "Lookup the specific transaction by ID.", "schema": { "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, { "name": "min-round", @@ -1774,33 +1257,7 @@ "content": { "application/json": { "schema": { - "required": [ - "application-id", - "current-round" - ], - "type": "object", - "properties": { - "application-id": { - "type": "integer", - "description": "\\[appidx\\] application index.", - "x-algokit-bigint": true - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "log-data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationLogData" - } - } - } + "$ref": "#/components/schemas/ApplicationLogsResponse" } } } @@ -1880,28 +1337,7 @@ "content": { "application/json": { "schema": { - "required": [ - "assets", - "current-round" - ], - "type": "object", - "properties": { - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AssetsResponse" } } } @@ -1911,19 +1347,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1933,19 +1357,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -1985,21 +1397,7 @@ "content": { "application/json": { "schema": { - "required": [ - "asset", - "current-round" - ], - "type": "object", - "properties": { - "asset": { - "$ref": "#/components/schemas/Asset" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/AssetResponse" } } } @@ -2009,19 +1407,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2031,19 +1417,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2053,19 +1427,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2139,28 +1501,7 @@ "content": { "application/json": { "schema": { - "required": [ - "balances", - "current-round" - ], - "type": "object", - "properties": { - "balances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MiniAssetHolding" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AssetBalancesResponse" } } } @@ -2170,19 +1511,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2192,19 +1521,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2282,7 +1599,8 @@ "description": "Lookup the specific transaction by ID.", "schema": { "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, { "name": "round", @@ -2406,28 +1724,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round", - "transactions" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - } + "$ref": "#/components/schemas/TransactionsResponse" } } } @@ -2437,19 +1734,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2459,19 +1744,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2592,28 +1865,7 @@ "content": { "application/json": { "schema": { - "required": [ - "blocks", - "current-round" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "blocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Block" - } - } - } + "$ref": "#/components/schemas/BlockHeadersResponse" } } } @@ -2623,19 +1875,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2645,19 +1885,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2708,19 +1936,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2730,19 +1946,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2756,7 +1960,7 @@ "lookup" ], "description": "Lookup a single transaction.", - "operationId": "lookupTransaction", + "operationId": "lookupTransactionByID", "parameters": [ { "name": "txid", @@ -2764,7 +1968,8 @@ "required": true, "schema": { "type": "string" - } + }, + "x-algokit-field-rename": "txId" } ], "responses": { @@ -2773,21 +1978,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round", - "transaction" - ], - "type": "object", - "properties": { - "transaction": { - "$ref": "#/components/schemas/Transaction" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/TransactionResponse" } } } @@ -2797,19 +1988,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2819,19 +1998,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2841,19 +2008,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -2941,7 +2096,8 @@ "description": "Lookup the specific transaction by ID.", "schema": { "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, { "name": "round", @@ -3074,28 +2230,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round", - "transactions" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - } + "$ref": "#/components/schemas/TransactionsResponse" } } } @@ -3105,19 +2240,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -3127,19 +2250,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -3563,7 +2674,8 @@ "properties": { "txid": { "type": "string", - "description": "Transaction ID" + "description": "Transaction ID", + "x-algokit-field-rename": "txId" }, "logs": { "type": "array", @@ -3587,6 +2699,7 @@ "index": { "type": "integer", "description": "unique asset identifier", + "x-algokit-field-rename": "id", "x-algokit-bigint": true }, "deleted": { @@ -4982,7 +4095,7 @@ }, "merkle-array-index": { "type": "integer", - "x-algorand-foramt": "uint64" + "x-algorand-format": "uint64" }, "proof": { "$ref": "#/components/schemas/MerkleArrayProof" @@ -5080,6 +4193,333 @@ "x-algorand-format": "uint16" } } + }, + "AccountResponse": { + "required": [ + "account", + "current-round" + ], + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/Account" + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + } + } + }, + "AssetHoldingsResponse": { + "required": [ + "assets", + "current-round" + ], + "type": "object", + "properties": { + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetHolding" + } + } + } + }, + "AccountsResponse": { + "required": [ + "accounts", + "current-round" + ], + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Account" + } + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + } + } + }, + "AssetBalancesResponse": { + "required": [ + "balances", + "current-round" + ], + "type": "object", + "properties": { + "balances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MiniAssetHolding" + } + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + } + } + }, + "ApplicationResponse": { + "required": [ + "current-round" + ], + "type": "object", + "properties": { + "application": { + "$ref": "#/components/schemas/Application" + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + } + } + }, + "ApplicationsResponse": { + "required": [ + "applications", + "current-round" + ], + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Application" + } + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + } + } + }, + "ApplicationLogsResponse": { + "required": [ + "application-id", + "current-round" + ], + "type": "object", + "properties": { + "application-id": { + "type": "integer", + "description": "\\[appidx\\] application index.", + "x-algokit-bigint": true + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + }, + "log-data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationLogData" + } + } + } + }, + "ApplicationLocalStatesResponse": { + "required": [ + "apps-local-states", + "current-round" + ], + "type": "object", + "properties": { + "apps-local-states": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationLocalState" + } + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + } + } + }, + "AssetResponse": { + "required": [ + "asset", + "current-round" + ], + "type": "object", + "properties": { + "asset": { + "$ref": "#/components/schemas/Asset" + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + } + } + }, + "BoxesResponse": { + "required": [ + "application-id", + "boxes" + ], + "type": "object", + "properties": { + "application-id": { + "type": "integer", + "description": "\\[appidx\\] application index.", + "x-algokit-bigint": true + }, + "boxes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BoxDescriptor" + } + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + } + } + }, + "ErrorResponse": { + "required": [ + "message" + ], + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": {} + }, + "message": { + "type": "string" + } + } + }, + "AssetsResponse": { + "required": [ + "assets", + "current-round" + ], + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + } + } + }, + "BlockHeadersResponse": { + "required": [ + "blocks", + "current-round" + ], + "type": "object", + "properties": { + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + }, + "blocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Block" + } + } + } + }, + "TransactionResponse": { + "required": [ + "current-round", + "transaction" + ], + "type": "object", + "properties": { + "transaction": { + "$ref": "#/components/schemas/Transaction" + }, + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + } + } + }, + "TransactionsResponse": { + "required": [ + "current-round", + "transactions" + ], + "type": "object", + "properties": { + "current-round": { + "type": "integer", + "description": "Round at which the results were computed.", + "x-algokit-bigint": true + }, + "next-token": { + "type": "string", + "description": "Used for pagination, when making another request provide this token with the next parameter." + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transaction" + } + } + } } }, "responses": { @@ -5088,21 +4528,7 @@ "content": { "application/json": { "schema": { - "required": [ - "account", - "current-round" - ], - "type": "object", - "properties": { - "account": { - "$ref": "#/components/schemas/Account" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/AccountResponse" } } } @@ -5112,28 +4538,7 @@ "content": { "application/json": { "schema": { - "required": [ - "assets", - "current-round" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AssetHolding" - } - } - } + "$ref": "#/components/schemas/AssetHoldingsResponse" } } } @@ -5143,28 +4548,7 @@ "content": { "application/json": { "schema": { - "required": [ - "accounts", - "current-round" - ], - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Account" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AccountsResponse" } } } @@ -5174,28 +4558,7 @@ "content": { "application/json": { "schema": { - "required": [ - "balances", - "current-round" - ], - "type": "object", - "properties": { - "balances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MiniAssetHolding" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AssetBalancesResponse" } } } @@ -5205,20 +4568,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round" - ], - "type": "object", - "properties": { - "application": { - "$ref": "#/components/schemas/Application" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/ApplicationResponse" } } } @@ -5228,28 +4578,7 @@ "content": { "application/json": { "schema": { - "required": [ - "applications", - "current-round" - ], - "type": "object", - "properties": { - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Application" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/ApplicationsResponse" } } } @@ -5259,33 +4588,7 @@ "content": { "application/json": { "schema": { - "required": [ - "application-id", - "current-round" - ], - "type": "object", - "properties": { - "application-id": { - "type": "integer", - "description": "\\[appidx\\] application index.", - "x-algokit-bigint": true - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "log-data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationLogData" - } - } - } + "$ref": "#/components/schemas/ApplicationLogsResponse" } } } @@ -5295,28 +4598,7 @@ "content": { "application/json": { "schema": { - "required": [ - "apps-local-states", - "current-round" - ], - "type": "object", - "properties": { - "apps-local-states": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationLocalState" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/ApplicationLocalStatesResponse" } } } @@ -5326,21 +4608,7 @@ "content": { "application/json": { "schema": { - "required": [ - "asset", - "current-round" - ], - "type": "object", - "properties": { - "asset": { - "$ref": "#/components/schemas/Asset" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/AssetResponse" } } } @@ -5350,28 +4618,7 @@ "content": { "application/json": { "schema": { - "required": [ - "application-id", - "boxes" - ], - "type": "object", - "properties": { - "application-id": { - "type": "integer", - "description": "\\[appidx\\] application index.", - "x-algokit-bigint": true - }, - "boxes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BoxDescriptor" - } - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/BoxesResponse" } } } @@ -5391,19 +4638,7 @@ "content": { "application/json": { "schema": { - "required": [ - "message" - ], - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": {} - }, - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/ErrorResponse" } } } @@ -5413,28 +4648,7 @@ "content": { "application/json": { "schema": { - "required": [ - "assets", - "current-round" - ], - "type": "object", - "properties": { - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - } - } + "$ref": "#/components/schemas/AssetsResponse" } } } @@ -5454,28 +4668,7 @@ "content": { "application/json": { "schema": { - "required": [ - "blocks", - "current-round" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "blocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Block" - } - } - } + "$ref": "#/components/schemas/BlockHeadersResponse" } } } @@ -5495,21 +4688,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round", - "transaction" - ], - "type": "object", - "properties": { - "transaction": { - "$ref": "#/components/schemas/Transaction" - }, - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - } - } + "$ref": "#/components/schemas/TransactionResponse" } } } @@ -5519,28 +4698,7 @@ "content": { "application/json": { "schema": { - "required": [ - "current-round", - "transactions" - ], - "type": "object", - "properties": { - "current-round": { - "type": "integer", - "description": "Round at which the results were computed.", - "x-algokit-bigint": true - }, - "next-token": { - "type": "string", - "description": "Used for pagination, when making another request provide this token with the next parameter." - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - } + "$ref": "#/components/schemas/TransactionsResponse" } } } @@ -5595,8 +4753,10 @@ "description": "account string", "required": true, "schema": { - "type": "string" - } + "type": "string", + "x-algorand-format": "Address" + }, + "x-algokit-field-rename": "account" }, "address": { "name": "address", @@ -5853,7 +5013,8 @@ "description": "Lookup the specific transaction by ID.", "schema": { "type": "string" - } + }, + "x-algokit-field-rename": "txId" }, "tx-type": { "name": "tx-type", diff --git a/specs/kmd.oas3.json b/specs/kmd.oas3.json index 029b87a..ee16681 100644 --- a/specs/kmd.oas3.json +++ b/specs/kmd.oas3.json @@ -39,7 +39,10 @@ "description": "Unknown Error", "content": {} } - } + }, + "tags": [ + "skip" + ] } }, "/v1/key": { @@ -63,7 +66,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyResponse" + "$ref": "#/components/schemas/GenerateKeyResponse" } } } @@ -88,13 +91,7 @@ "responses": { "200": { "description": "Response to `DELETE /v1/key`", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DELETEKeyResponse" - } - } - } + "content": {} } }, "x-codegen-request-body-name": "Delete Key Request" @@ -121,7 +118,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyExportResponse" + "$ref": "#/components/schemas/ExportKeyResponse" } } } @@ -151,7 +148,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyImportResponse" + "$ref": "#/components/schemas/ImportKeyResponse" } } } @@ -181,7 +178,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyListResponse" + "$ref": "#/components/schemas/ListKeysResponse" } } } @@ -211,7 +208,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMasterKeyExportResponse" + "$ref": "#/components/schemas/ExportMasterKeyResponse" } } } @@ -238,13 +235,7 @@ "responses": { "200": { "description": "Response to POST /v1/multisig/delete", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DELETEMultisigResponse" - } - } - } + "content": {} } }, "x-codegen-request-body-name": "Delete Multisig Request" @@ -271,7 +262,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigExportResponse" + "$ref": "#/components/schemas/ExportMultisigResponse" } } } @@ -301,7 +292,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigImportResponse" + "$ref": "#/components/schemas/ImportMultisigResponse" } } } @@ -314,7 +305,7 @@ "post": { "summary": "List multisig accounts", "description": "Lists all of the multisig accounts whose preimages this wallet stores", - "operationId": "ListMultisg", + "operationId": "ListMultisig", "requestBody": { "content": { "application/json": { @@ -331,7 +322,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigListResponse" + "$ref": "#/components/schemas/ListMultisigResponse" } } } @@ -349,7 +340,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignMultisigRequest" + "$ref": "#/components/schemas/SignMultisigTxnRequest" } } }, @@ -361,7 +352,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigTransactionSignResponse" + "$ref": "#/components/schemas/SignMultisigResponse" } } } @@ -391,7 +382,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigProgramSignResponse" + "$ref": "#/components/schemas/SignProgramMultisigResponse" } } } @@ -421,7 +412,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTProgramSignResponse" + "$ref": "#/components/schemas/SignProgramResponse" } } } @@ -439,7 +430,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignTransactionRequest" + "$ref": "#/components/schemas/SignTxnRequest" } } }, @@ -451,7 +442,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTTransactionSignResponse" + "$ref": "#/components/schemas/SignTransactionResponse" } } } @@ -481,7 +472,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletResponse" + "$ref": "#/components/schemas/CreateWalletResponse" } } } @@ -511,7 +502,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletInfoResponse" + "$ref": "#/components/schemas/WalletInfoResponse" } } } @@ -524,7 +515,7 @@ "post": { "summary": "Initialize a wallet handle token", "description": "Unlock the wallet and return a wallet handle token that can be used for subsequent operations. These tokens expire periodically and must be renewed. You can `POST` the token to `/v1/wallet/info` to see how much time remains until expiration, and renew it with `/v1/wallet/renew`. When you're done, you can invalidate the token with `/v1/wallet/release`.\n", - "operationId": "InitWalletHandleToken", + "operationId": "InitWalletHandle", "requestBody": { "content": { "application/json": { @@ -541,7 +532,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletInitResponse" + "$ref": "#/components/schemas/InitWalletHandleTokenResponse" } } } @@ -568,13 +559,7 @@ "responses": { "200": { "description": "Response to `POST /v1/wallet/release`", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/POSTWalletReleaseResponse" - } - } - } + "content": {} } }, "x-codegen-request-body-name": "Release Wallet Handle Token Request" @@ -601,7 +586,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletRenameResponse" + "$ref": "#/components/schemas/RenameWalletResponse" } } } @@ -631,7 +616,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletRenewResponse" + "$ref": "#/components/schemas/RenewWalletHandleTokenResponse" } } } @@ -661,7 +646,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GETWalletsResponse" + "$ref": "#/components/schemas/ListWalletsResponse" } } } @@ -702,51 +687,9 @@ }, "components": { "schemas": { - "DELETEKeyResponse": { - "type": "object", - "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - } - }, - "description": "APIV1DELETEKeyResponse is the response to `DELETE /v1/key`\nfriendly:DeleteKeyResponse", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", - "x-algokit-original-name": "APIV1DELETEKeyResponse", - "x-algokit-kmd-api-version": 1 - }, - "DELETEMultisigResponse": { - "type": "object", - "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - } - }, - "description": "APIV1DELETEMultisigResponse is the response to POST /v1/multisig/delete`\nfriendly:DeleteMultisigResponse", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", - "x-algokit-original-name": "APIV1DELETEMultisigResponse", - "x-algokit-kmd-api-version": 1 - }, - "GETWalletsResponse": { + "ListWalletsResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "wallets": { "type": "array", "items": { @@ -755,129 +698,96 @@ "x-go-name": "Wallets" } }, - "description": "APIV1GETWalletsResponse is the response to `GET /v1/wallets`\nfriendly:ListWalletsResponse", + "description": "ListWalletsResponse is the response to `GET /v1/wallets`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1GETWalletsResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "wallets" + ] }, - "POSTKeyExportResponse": { + "ExportKeyResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "private_key": { "type": "string", "x-algokit-bytes-base64": true } }, - "description": "APIV1POSTKeyExportResponse is the response to `POST /v1/key/export`\nfriendly:ExportKeyResponse", + "description": "ExportKeyResponse is the response to `POST /v1/key/export`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTKeyExportResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "private_key" + ] }, - "POSTKeyImportResponse": { + "ImportKeyResponse": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" - }, - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" + "x-go-name": "Address", + "x-algorand-format": "Address" } }, - "description": "APIV1POSTKeyImportResponse is the response to `POST /v1/key/import`\nfriendly:ImportKeyResponse", + "description": "ImportKeyResponse is the response to `POST /v1/key/import`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTKeyImportResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "address" + ] }, - "POSTKeyListResponse": { + "ListKeysResponse": { "type": "object", "properties": { "addresses": { "type": "array", "items": { - "type": "string" + "type": "string", + "x-algorand-format": "Address" }, "x-go-name": "Addresses" - }, - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" } }, - "description": "APIV1POSTKeyListResponse is the response to `POST /v1/key/list`\nfriendly:ListKeysResponse", + "description": "ListKeysResponse is the response to `POST /v1/key/list`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTKeyListResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "addresses" + ] }, - "POSTKeyResponse": { + "GenerateKeyResponse": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" - }, - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" + "x-go-name": "Address", + "x-algorand-format": "Address" } }, - "description": "APIV1POSTKeyResponse is the response to `POST /v1/key`\nfriendly:GenerateKeyResponse", + "description": "GenerateKeyResponse is the response to `POST /v1/key`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTKeyResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "address" + ] }, - "POSTMasterKeyExportResponse": { + "ExportMasterKeyResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, "master_derivation_key": { "$ref": "#/components/schemas/MasterDerivationKey" - }, - "message": { - "type": "string", - "x-go-name": "Message" } }, - "description": "APIV1POSTMasterKeyExportResponse is the response to `POST /v1/master-key/export`\nfriendly:ExportMasterKeyResponse", + "description": "ExportMasterKeyResponse is the response to `POST /v1/master-key/export`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTMasterKeyExportResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "master_derivation_key" + ] }, - "POSTMultisigExportResponse": { + "ExportMultisigResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "multisig_version": { "type": "integer", "format": "uint8", @@ -888,7 +798,8 @@ "items": { "$ref": "#/components/schemas/PublicKey" }, - "x-go-name": "PKs" + "x-go-name": "PKs", + "x-algokit-field-rename": "publicKeys" }, "threshold": { "type": "integer", @@ -896,67 +807,53 @@ "x-go-name": "Threshold" } }, - "description": "APIV1POSTMultisigExportResponse is the response to `POST /v1/multisig/export`\nfriendly:ExportMultisigResponse", + "description": "ExportMultisigResponse is the response to `POST /v1/multisig/export`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTMultisigExportResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "multisig_version", + "pks", + "threshold" + ] }, - "POSTMultisigImportResponse": { + "ImportMultisigResponse": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" - }, - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" + "x-go-name": "Address", + "x-algorand-format": "Address" } }, - "description": "APIV1POSTMultisigImportResponse is the response to `POST /v1/multisig/import`\nfriendly:ImportMultisigResponse", + "description": "ImportMultisigResponse is the response to `POST /v1/multisig/import`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTMultisigImportResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "address" + ] }, - "POSTMultisigListResponse": { + "ListMultisigResponse": { "type": "object", "properties": { "addresses": { "type": "array", "items": { - "type": "string" + "type": "string", + "x-algorand-format": "Address" }, "x-go-name": "Addresses" - }, - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" } }, - "description": "APIV1POSTMultisigListResponse is the response to `POST /v1/multisig/list`\nfriendly:ListMultisigResponse", + "description": "ListMultisigResponse is the response to `POST /v1/multisig/list`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTMultisigListResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "addresses" + ] }, - "POSTMultisigProgramSignResponse": { + "SignProgramMultisigResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "multisig": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", @@ -964,22 +861,16 @@ "x-go-name": "Multisig" } }, - "description": "APIV1POSTMultisigProgramSignResponse is the response to `POST /v1/multisig/signdata`\nfriendly:SignProgramMultisigResponse", + "description": "SignProgramMultisigResponse is the response to `POST /v1/multisig/signdata`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTMultisigProgramSignResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "multisig" + ] }, - "POSTMultisigTransactionSignResponse": { + "SignMultisigResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "multisig": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", @@ -987,22 +878,16 @@ "x-go-name": "Multisig" } }, - "description": "APIV1POSTMultisigTransactionSignResponse is the response to `POST /v1/multisig/sign`\nfriendly:SignMultisigResponse", + "description": "SignMultisigResponse is the response to `POST /v1/multisig/sign`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTMultisigTransactionSignResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "multisig" + ] }, - "POSTProgramSignResponse": { + "SignProgramResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "sig": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", @@ -1010,22 +895,16 @@ "x-go-name": "Signature" } }, - "description": "APIV1POSTProgramSignResponse is the response to `POST /v1/data/sign`\nfriendly:SignProgramResponse", + "description": "SignProgramResponse is the response to `POST /v1/data/sign`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTProgramSignResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "sig" + ] }, - "POSTTransactionSignResponse": { + "SignTransactionResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "signed_transaction": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", @@ -1033,128 +912,83 @@ "x-go-name": "SignedTransaction" } }, - "description": "APIV1POSTTransactionSignResponse is the response to `POST /v1/transaction/sign`\nfriendly:SignTransactionResponse", + "description": "SignTransactionResponse is the response to `POST /v1/transaction/sign`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTTransactionSignResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "signed_transaction" + ] }, - "POSTWalletInfoResponse": { + "WalletInfoResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "wallet_handle": { "$ref": "#/components/schemas/WalletHandle" } }, - "description": "APIV1POSTWalletInfoResponse is the response to `POST /v1/wallet/info`\nfriendly:WalletInfoResponse", + "description": "WalletInfoResponse is the response to `POST /v1/wallet/info`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTWalletInfoResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "wallet_handle" + ] }, - "POSTWalletInitResponse": { + "InitWalletHandleTokenResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "wallet_handle_token": { "type": "string", "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTWalletInitResponse is the response to `POST /v1/wallet/init`\nfriendly:InitWalletHandleTokenResponse", + "description": "InitWalletHandleTokenResponse is the response to `POST /v1/wallet/init`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTWalletInitResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "wallet_handle_token" + ] }, - "POSTWalletReleaseResponse": { - "type": "object", - "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - } - }, - "description": "APIV1POSTWalletReleaseResponse is the response to `POST /v1/wallet/release`\nfriendly:ReleaseWalletHandleTokenResponse", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", - "x-algokit-original-name": "APIV1POSTWalletReleaseResponse", - "x-algokit-kmd-api-version": 1 - }, - "POSTWalletRenameResponse": { + "RenameWalletResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "wallet": { "$ref": "#/components/schemas/Wallet" } }, - "description": "APIV1POSTWalletRenameResponse is the response to `POST /v1/wallet/rename`\nfriendly:RenameWalletResponse", + "description": "RenameWalletResponse is the response to `POST /v1/wallet/rename`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTWalletRenameResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "wallet" + ] }, - "POSTWalletRenewResponse": { + "RenewWalletHandleTokenResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "wallet_handle": { "$ref": "#/components/schemas/WalletHandle" } }, - "description": "APIV1POSTWalletRenewResponse is the response to `POST /v1/wallet/renew`\nfriendly:RenewWalletHandleTokenResponse", + "description": "RenewWalletHandleTokenResponse is the response to `POST /v1/wallet/renew`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTWalletRenewResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "wallet_handle" + ] }, - "POSTWalletResponse": { + "CreateWalletResponse": { "type": "object", "properties": { - "error": { - "type": "boolean", - "x-go-name": "Error" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, "wallet": { "$ref": "#/components/schemas/Wallet" } }, - "description": "APIV1POSTWalletResponse is the response to `POST /v1/wallet`\nfriendly:CreateWalletResponse", + "description": "CreateWalletResponse is the response to `POST /v1/wallet`", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1POSTWalletResponse", - "x-algokit-kmd-api-version": 1 + "required": [ + "wallet" + ] }, "Wallet": { "type": "object", @@ -1188,10 +1022,17 @@ "x-go-name": "SupportedTransactions" } }, - "description": "APIV1Wallet is the API's representation of a wallet", + "description": "Wallet is the API's representation of a wallet", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1Wallet", - "x-algokit-kmd-api-version": 1 + "required": [ + "driver_name", + "driver_version", + "id", + "mnemonic_ux", + "name", + "supported_txs" + ] }, "WalletHandle": { "type": "object", @@ -1205,10 +1046,13 @@ "$ref": "#/components/schemas/Wallet" } }, - "description": "APIV1WalletHandle includes the wallet the handle corresponds to\nand the number of number of seconds to expiration", + "description": "WalletHandle includes the wallet the handle corresponds to\nand the number of number of seconds to expiration", "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", "x-algokit-original-name": "APIV1WalletHandle", - "x-algokit-kmd-api-version": 1 + "required": [ + "expires_seconds", + "wallet" + ] }, "CreateWalletRequest": { "type": "object", @@ -1218,7 +1062,8 @@ }, "wallet_driver_name": { "type": "string", - "x-go-name": "WalletDriverName" + "x-go-name": "WalletDriverName", + "default": "sqlite" }, "wallet_name": { "type": "string", @@ -1229,16 +1074,21 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTWalletRequest is the request for `POST /v1/wallet`", + "description": "The request for `POST /v1/wallet`", "x-go-name": "APIV1POSTWalletRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_name", + "wallet_password" + ] }, "DeleteKeyRequest": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" + "x-go-name": "Address", + "x-algorand-format": "Address" }, "wallet_handle_token": { "type": "string", @@ -1249,16 +1099,21 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1DELETEKeyRequest is the request for `DELETE /v1/key`", + "description": "The request for `DELETE /v1/key`", "x-go-name": "APIV1DELETEKeyRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "address", + "wallet_handle_token" + ] }, "DeleteMultisigRequest": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" + "x-go-name": "Address", + "x-algorand-format": "Address" }, "wallet_handle_token": { "type": "string", @@ -1269,9 +1124,13 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1DELETEMultisigRequest is the request for `DELETE /v1/multisig`", + "description": "The request for `DELETE /v1/multisig`", "x-go-name": "APIV1DELETEMultisigRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "address", + "wallet_handle_token" + ] }, "Digest": { "title": "Digest represents a 32-byte value holding the 256-bit Hash digest.", @@ -1287,7 +1146,8 @@ "properties": { "address": { "type": "string", - "x-go-name": "Address" + "x-go-name": "Address", + "x-algorand-format": "Address" }, "wallet_handle_token": { "type": "string", @@ -1298,9 +1158,13 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTKeyExportRequest is the request for `POST /v1/key/export`", + "description": "The request for `POST /v1/key/export`", "x-go-name": "APIV1POSTKeyExportRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "address", + "wallet_handle_token" + ] }, "ExportMasterKeyRequest": { "type": "object", @@ -1314,41 +1178,48 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTMasterKeyExportRequest is the request for `POST /v1/master-key/export`", + "description": "The request for `POST /v1/master-key/export`", "x-go-name": "APIV1POSTMasterKeyExportRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, "ExportMultisigRequest": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" + "x-go-name": "Address", + "x-algorand-format": "Address" }, "wallet_handle_token": { "type": "string", "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTMultisigExportRequest is the request for `POST /v1/multisig/export`", + "description": "The request for `POST /v1/multisig/export`", "x-go-name": "APIV1POSTMultisigExportRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "address", + "wallet_handle_token" + ] }, "GenerateKeyRequest": { "type": "object", "properties": { - "display_mnemonic": { - "type": "boolean", - "x-go-name": "DisplayMnemonic" - }, "wallet_handle_token": { "type": "string", "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTKeyRequest is the request for `POST /v1/key`", + "description": "The request for `POST /v1/key`", "x-go-name": "APIV1POSTKeyRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, "ImportKeyRequest": { "type": "object", @@ -1362,9 +1233,13 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTKeyImportRequest is the request for `POST /v1/key/import`", + "description": "The request for `POST /v1/key/import`", "x-go-name": "APIV1POSTKeyImportRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "private_key", + "wallet_handle_token" + ] }, "ImportMultisigRequest": { "type": "object", @@ -1379,7 +1254,8 @@ "items": { "$ref": "#/components/schemas/PublicKey" }, - "x-go-name": "PKs" + "x-go-name": "PKs", + "x-algokit-field-rename": "publicKeys" }, "threshold": { "type": "integer", @@ -1391,9 +1267,15 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTMultisigImportRequest is the request for `POST /v1/multisig/import`", + "description": "The request for `POST /v1/multisig/import`", "x-go-name": "APIV1POSTMultisigImportRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "multisig_version", + "pks", + "threshold", + "wallet_handle_token" + ] }, "InitWalletHandleTokenRequest": { "type": "object", @@ -1407,9 +1289,13 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTWalletInitRequest is the request for `POST /v1/wallet/init`", + "description": "The request for `POST /v1/wallet/init`", "x-go-name": "APIV1POSTWalletInitRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_id", + "wallet_password" + ] }, "ListKeysRequest": { "type": "object", @@ -1419,9 +1305,12 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTKeyListRequest is the request for `POST /v1/key/list`", + "description": "The request for `POST /v1/key/list`", "x-go-name": "APIV1POSTKeyListRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, "ListMultisigRequest": { "type": "object", @@ -1431,9 +1320,12 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTMultisigListRequest is the request for `POST /v1/multisig/list`", + "description": "The request for `POST /v1/multisig/list`", "x-go-name": "APIV1POSTMultisigListRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, "ListWalletsRequest": { "type": "object", @@ -1453,36 +1345,49 @@ "MultisigSig": { "type": "object", "properties": { - "Subsigs": { + "subsig": { "type": "array", "items": { "$ref": "#/components/schemas/MultisigSubsig" - } + }, + "x-algokit-field-rename": "subsignatures" }, - "Threshold": { + "thr": { "type": "integer", - "format": "uint8" + "format": "uint8", + "x-algokit-field-rename": "threshold" }, - "Version": { + "v": { "type": "integer", - "format": "uint8" + "format": "uint8", + "x-algokit-field-rename": "version" } }, "description": "MultisigSig is the structure that holds multiple Subsigs", - "x-go-package": "github.com/algorand/go-algorand/crypto" + "x-go-package": "github.com/algorand/go-algorand/crypto", + "required": [ + "subsig", + "thr", + "v" + ] }, "MultisigSubsig": { "type": "object", "properties": { - "Key": { - "$ref": "#/components/schemas/PublicKey" + "pk": { + "$ref": "#/components/schemas/PublicKey", + "x-algokit-field-rename": "publicKey" }, - "Sig": { - "$ref": "#/components/schemas/Signature" + "s": { + "$ref": "#/components/schemas/Signature", + "x-algokit-field-rename": "signature" } }, "description": "MultisigSubsig is a struct that holds a pair of public key and signatures\nsignatures may be empty", - "x-go-package": "github.com/algorand/go-algorand/crypto" + "x-go-package": "github.com/algorand/go-algorand/crypto", + "required": [ + "pk" + ] }, "PrivateKey": { "$ref": "#/components/schemas/ed25519PrivateKey" @@ -1498,9 +1403,12 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTWalletReleaseRequest is the request for `POST /v1/wallet/release`", + "description": "The request for `POST /v1/wallet/release`", "x-go-name": "APIV1POSTWalletReleaseRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, "RenameWalletRequest": { "type": "object", @@ -1518,9 +1426,14 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTWalletRenameRequest is the request for `POST /v1/wallet/rename`", + "description": "The request for `POST /v1/wallet/rename`", "x-go-name": "APIV1POSTWalletRenameRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_id", + "wallet_name", + "wallet_password" + ] }, "RenewWalletHandleTokenRequest": { "type": "object", @@ -1530,11 +1443,14 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTWalletRenewRequest is the request for `POST /v1/wallet/renew`", + "description": "The request for `POST /v1/wallet/renew`", "x-go-name": "APIV1POSTWalletRenewRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, - "SignMultisigRequest": { + "SignMultisigTxnRequest": { "type": "object", "properties": { "partial_multisig": { @@ -1561,22 +1477,30 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTMultisigTransactionSignRequest is the request for `POST /v1/multisig/sign`", + "description": "The request for `POST /v1/multisig/sign`", "x-go-name": "APIV1POSTMultisigTransactionSignRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "x-algokit-original-name": "SignMultisigRequest", + "required": [ + "public_key", + "transaction", + "wallet_handle_token" + ] }, "SignProgramMultisigRequest": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" + "x-go-name": "Address", + "x-algorand-format": "Address" }, "data": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", "format": "byte", - "x-go-name": "Program" + "x-go-name": "Program", + "x-algokit-field-rename": "program" }, "partial_multisig": { "$ref": "#/components/schemas/MultisigSig" @@ -1597,22 +1521,30 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTMultisigProgramSignRequest is the request for `POST /v1/multisig/signprogram`", + "description": "The request for `POST /v1/multisig/signprogram`", "x-go-name": "APIV1POSTMultisigProgramSignRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "address", + "data", + "public_key", + "wallet_handle_token" + ] }, "SignProgramRequest": { "type": "object", "properties": { "address": { "type": "string", - "x-go-name": "Address" + "x-go-name": "Address", + "x-algorand-format": "Address" }, "data": { "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", "type": "string", "format": "byte", - "x-go-name": "Program" + "x-go-name": "Program", + "x-algokit-field-rename": "program" }, "wallet_handle_token": { "type": "string", @@ -1623,11 +1555,16 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTProgramSignRequest is the request for `POST /v1/program/sign`", + "description": "The request for `POST /v1/program/sign`", "x-go-name": "APIV1POSTProgramSignRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "address", + "data", + "wallet_handle_token" + ] }, - "SignTransactionRequest": { + "SignTxnRequest": { "type": "object", "properties": { "public_key": { @@ -1649,9 +1586,14 @@ "x-go-name": "WalletPassword" } }, - "description": "APIV1POSTTransactionSignRequest is the request for `POST /v1/transaction/sign`", + "description": "The request for `POST /v1/transaction/sign`", "x-go-name": "APIV1POSTTransactionSignRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "x-algokit-original-name": "SignTransactionRequest", + "required": [ + "transaction", + "wallet_handle_token" + ] }, "Signature": { "$ref": "#/components/schemas/ed25519Signature" @@ -1678,7 +1620,10 @@ } }, "description": "VersionsResponse is the response to `GET /versions`\nfriendly:VersionsResponse", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "versions" + ] }, "WalletInfoRequest": { "type": "object", @@ -1688,9 +1633,12 @@ "x-go-name": "WalletHandleToken" } }, - "description": "APIV1POSTWalletInfoRequest is the request for `POST /v1/wallet/info`", + "description": "The request for `POST /v1/wallet/info`", "x-go-name": "APIV1POSTWalletInfoRequest", - "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi" + "x-go-package": "github.com/algorand/go-algorand/daemon/kmd/lib/kmdapi", + "required": [ + "wallet_handle_token" + ] }, "ed25519PrivateKey": { "type": "array", @@ -1724,37 +1672,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletResponse" + "$ref": "#/components/schemas/CreateWalletResponse" } } } }, "DeleteKeyResponse": { "description": "Response to `DELETE /v1/key`", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DELETEKeyResponse" - } - } - } + "content": {} }, "DeleteMultisigResponse": { "description": "Response to POST /v1/multisig/delete", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DELETEMultisigResponse" - } - } - } + "content": {} }, "ExportKeyResponse": { "description": "Response to `POST /v1/key/export`", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyExportResponse" + "$ref": "#/components/schemas/ExportKeyResponse" } } } @@ -1764,7 +1700,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMasterKeyExportResponse" + "$ref": "#/components/schemas/ExportMasterKeyResponse" } } } @@ -1774,7 +1710,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigExportResponse" + "$ref": "#/components/schemas/ExportMultisigResponse" } } } @@ -1784,7 +1720,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyResponse" + "$ref": "#/components/schemas/GenerateKeyResponse" } } } @@ -1794,7 +1730,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyImportResponse" + "$ref": "#/components/schemas/ImportKeyResponse" } } } @@ -1804,7 +1740,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigImportResponse" + "$ref": "#/components/schemas/ImportMultisigResponse" } } } @@ -1814,7 +1750,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletInitResponse" + "$ref": "#/components/schemas/InitWalletHandleTokenResponse" } } } @@ -1824,7 +1760,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTKeyListResponse" + "$ref": "#/components/schemas/ListKeysResponse" } } } @@ -1834,7 +1770,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigListResponse" + "$ref": "#/components/schemas/ListMultisigResponse" } } } @@ -1844,27 +1780,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GETWalletsResponse" + "$ref": "#/components/schemas/ListWalletsResponse" } } } }, "ReleaseWalletHandleTokenResponse": { "description": "Response to `POST /v1/wallet/release`", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/POSTWalletReleaseResponse" - } - } - } + "content": {} }, "RenameWalletResponse": { "description": "Response to `POST /v1/wallet/rename`", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletRenameResponse" + "$ref": "#/components/schemas/RenameWalletResponse" } } } @@ -1874,7 +1804,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletRenewResponse" + "$ref": "#/components/schemas/RenewWalletHandleTokenResponse" } } } @@ -1884,7 +1814,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigTransactionSignResponse" + "$ref": "#/components/schemas/SignMultisigResponse" } } } @@ -1894,7 +1824,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTMultisigProgramSignResponse" + "$ref": "#/components/schemas/SignProgramMultisigResponse" } } } @@ -1904,7 +1834,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTProgramSignResponse" + "$ref": "#/components/schemas/SignProgramResponse" } } } @@ -1914,7 +1844,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTTransactionSignResponse" + "$ref": "#/components/schemas/SignTransactionResponse" } } } @@ -1934,7 +1864,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/POSTWalletInfoResponse" + "$ref": "#/components/schemas/WalletInfoResponse" } } }