diff --git a/openapi/Swarm.yaml b/openapi/Swarm.yaml index 61b446d1095..ec8050228d1 100644 --- a/openapi/Swarm.yaml +++ b/openapi/Swarm.yaml @@ -1913,6 +1913,44 @@ paths: default: description: Default response + "/rchash/{depth}/{anchor1}/{anchor2}": + get: + summary: Get reserve commitment hash with sample proofs + tags: + - RChash + parameters: + - in: path + name: depth + schema: + type: integer + minimum: 0 + default: 0 + required: true + description: The storage depth. + - in: path + name: anchor1 + schema: + $ref: "#/components/schemas/HexString" + required: true + description: The first anchor. + - in: path + name: anchor2 + schema: + $ref: "#/components/schemas/HexString" + required: true + description: The second anchor. + responses: + "200": + description: Reserve sample response + content: + application/json: + schema: + $ref: "SwarmCommon.yaml#/components/schemas/ApiRCHashResponse" + "500": + $ref: "SwarmCommon.yaml#/components/responses/500" + default: + description: Default response + components: securitySchemes: basicAuth: diff --git a/openapi/SwarmCommon.yaml b/openapi/SwarmCommon.yaml index 82066bf23dc..eccb03e9946 100644 --- a/openapi/SwarmCommon.yaml +++ b/openapi/SwarmCommon.yaml @@ -866,6 +866,83 @@ components: items: $ref: "#/components/schemas/StatusSnapshotResponse" + ApiChunkInclusionProof: + type: object + properties: + chunkSpan: + minimum: 0 + type: integer + postageProof: + $ref: '#/components/schemas/ApiPostageProof' + proofSegments: + items: + type: string + nullable: true + type: array + proofSegments2: + items: + type: string + nullable: true + type: array + proofSegments3: + items: + type: string + nullable: true + type: array + proveSegment: + type: string + proveSegment2: + type: string + socProof: + items: + $ref: '#/components/schemas/ApiSOCProof' + nullable: true + type: array + + ApiChunkInclusionProofs: + type: object + properties: + proof1: + $ref: '#/components/schemas/ApiChunkInclusionProof' + proof2: + $ref: '#/components/schemas/ApiChunkInclusionProof' + proofLast: + $ref: '#/components/schemas/ApiChunkInclusionProof' + + ApiPostageProof: + type: object + properties: + index: + type: string + postageId: + type: string + signature: + type: string + timeStamp: + type: string + + ApiRCHashResponse: + type: object + properties: + duration: + type: integer + hash: + $ref: '#/components/schemas/SwarmAddress' + proofs: + $ref: '#/components/schemas/ApiChunkInclusionProofs' + + ApiSOCProof: + type: object + properties: + chunkAddr: + type: string + identifier: + type: string + signature: + type: string + signer: + type: string + headers: SwarmTag: description: "Tag UID"