Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.78 KB

ANS-101.md

File metadata and controls

46 lines (29 loc) · 1.78 KB

AS-101: Gateway Capabilities Endpoint

Status: Draft

Version: -

Abstract

This document describes a HTTP endpoint and schema that Arweave Gateways should expose to allow users of the gateway to determine the capabilities of the gateway.

Motivation

As the ecosystem of gateways onto the Arweave blockchain grows, these gateways will provide different capabilities. Users of the gateway, need to be able to determine if the gateway supports the capabilities they need to run a particular app or use for a particular purpose.

Specification

1. HTTP Endpoint

Gateways that conforming to this specification MUST expose a HTTP endpoint that responds to a GET request at the path /info/capabilities with a JSON document conforming to the schema in section 2, which accurately lists the capabilities supported by the gateway.

2. Response Schema

The JSON document returned by the endpoint MUST be an object with a capabilities key, which is an array of capability objects.

A capability object has the following schema at a minimum -

  • name capability name. This MUST be a globally unique name.
  • version capability version. This MUST be a semver version string.

Capability objects MAY conform to additional schema particular to that capability.

Example response body: ( names, versions, and capability objects are examples only. )

{
  "capabilities": [
    { "name": "arql", "version": "1.0.0" },
    { "name": "graphql", "version": "1.0.0" },
    { "name": "arweave-id-lookup", "verson": "1.0.0" },
    { "name": "post-bundled-tx-json", "version": "1.0.0" },
    { "name": "post-delegated-tx", "version": "1.0.0", "maxFee": "0.00125" },
    { "name": "push-on-event-api", "version": "1.0.0", "platforms": ["push-android", "push-ios", "web-push-firefox", "webhook" ] }
  ]
}