openapi: 3.1.0
info:
title: neoprism-node
description: ""
license:
name: ""
version: 0.4.0
servers:
- url: http://localhost:8080
description: Local
- url: https://neoprism.patlo.dev
description: Public - mainnet
- url: https://neoprism-preprod.patlo.dev
description: Public - preprod
paths:
/1.0/identifiers/{did}:
get:
tags:
- Indexer API
summary: Universal Resolver driver endpoint for resolving DIDs, designed for use behind a Universal Resolver proxy.
description: This endpoint implements the Universal Resolver driver interface. It is intended to be used as a backend for the Universal Resolver proxy, enabling DID resolution via the Universal Resolver ecosystem. The response format and behavior are compatible with Universal Resolver expectations.
operationId: universal_resolver_did
parameters:
- name: did
in: path
description: The Decentralized Identifier (DID) to resolve using the Universal Resolver driver.
required: true
schema:
$ref: '#/components/schemas/Did'
responses:
"200":
description: Successfully resolved the DID. Returns the DID Resolution Result.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"400":
description: The provided DID is invalid.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"404":
description: The DID does not exist in the index.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"410":
description: The DID has been deactivated.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"500":
description: An unexpected error occurred during resolution.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
/api/_system/health:
get:
tags:
- System API
operationId: health
responses:
"200":
description: Healthy
content:
text/plain:
schema:
type: string
example: Ok
/api/_system/metadata:
get:
tags:
- System API
operationId: app_meta
responses:
"200":
description: Healthy
content:
application/json:
schema:
$ref: '#/components/schemas/AppMeta'
/api/did-data/{did}:
get:
tags:
- Indexer API
summary: Returns the DIDData protobuf message for a given DID, encoded in hexadecimal.
description: The returned data is a protobuf message compatible with the legacy prism-node implementation. The object is encoded in hexadecimal format. This endpoint is useful for testing and verifying compatibility with existing operations already anchored on the blockchain.
operationId: did_data
parameters:
- name: did
in: path
description: The Decentralized Identifier (DID) for which to retrieve the DIDData protobuf message.
required: true
schema:
$ref: '#/components/schemas/Did'
responses:
"200":
description: Successfully retrieved the DIDData protobuf message, encoded as a hexadecimal string.
content:
text/plain:
schema:
type: string
"400":
description: The provided DID is invalid.
"404":
description: The DID does not exist in the index.
"500":
description: An unexpected error occurred while retrieving DIDData.
/api/dids/{did}:
get:
tags:
- Indexer API
summary: Resolves a W3C Decentralized Identifier (DID) according to the DID Resolution specification.
description: This endpoint is fully compliant with the W3C DID Resolution specification. It returns a DID Resolution Result object, including metadata and the resolved DID Document, following the standard resolution process.
operationId: resolve_did
parameters:
- name: did
in: path
description: The Decentralized Identifier (DID) to resolve.
required: true
schema:
$ref: '#/components/schemas/Did'
responses:
"200":
description: Successfully resolved the DID. Returns the DID Resolution Result.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"400":
description: The provided DID is invalid.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"404":
description: The DID does not exist in the index.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"410":
description: The DID has been deactivated.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
"500":
description: An unexpected error occurred during resolution.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
/api/indexer-stats:
get:
tags:
- Indexer API
summary: Retrieves statistics about the indexer's latest processed slot and block.
operationId: indexer_stats
responses:
"200":
description: Successfully retrieved indexer statistics, including the latest processed slot and block numbers.
content:
application/json:
schema:
$ref: '#/components/schemas/IndexerStats'
/api/signed-operation-submissions:
post:
tags:
- Submitter API
operationId: submit_signed_operations
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SignedOperationSubmissionRequest'
required: true
responses:
"200":
description: Operations submitted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SignedOperationSubmissionResponse'
components:
schemas:
AppMeta:
type: object
required:
- version
- mode
properties:
mode:
$ref: '#/components/schemas/AppMetaRunMode'
version:
type: string
AppMetaRunMode:
type: string
enum:
- Indexer
- Submitter
- Standalone
Base64UrlStrNoPad:
type: string
description: |-
# Example
```
use identus_apollo::base64::Base64UrlStrNoPad;
let b = b"hello world";
let b64 = Base64UrlStrNoPad::from(b);
assert!(b64.to_string() == "aGVsbG8gd29ybGQ");
```
BlockNo:
type: integer
format: int64
example: 42
minimum: 0
Did:
type: string
example: did:example:123456789abcdefghi
DidDocument:
type: object
required:
- context
- id
- verificationMethod
properties:
assertionMethod:
type:
- array
- "null"
items:
$ref: '#/components/schemas/VerificationMethodOrRef'
authentication:
type:
- array
- "null"
items:
$ref: '#/components/schemas/VerificationMethodOrRef'
capabilityDelegation:
type:
- array
- "null"
items:
$ref: '#/components/schemas/VerificationMethodOrRef'
capabilityInvocation:
type:
- array
- "null"
items:
$ref: '#/components/schemas/VerificationMethodOrRef'
context:
type: array
items:
type: string
id:
$ref: '#/components/schemas/Did'
keyAgreement:
type:
- array
- "null"
items:
$ref: '#/components/schemas/VerificationMethodOrRef'
service:
type:
- array
- "null"
items:
$ref: '#/components/schemas/Service'
verificationMethod:
type: array
items:
$ref: '#/components/schemas/VerificationMethod'
DidDocumentMetadata:
type: object
properties:
canonicalId:
oneOf:
- type: "null"
- $ref: '#/components/schemas/Did'
created:
type:
- string
- "null"
format: date-time
deactivated:
type:
- boolean
- "null"
updated:
type:
- string
- "null"
format: date-time
versionId:
type:
- string
- "null"
DidResolutionError:
type: object
required:
- type
properties:
detail:
type:
- string
- "null"
title:
type:
- string
- "null"
type:
$ref: '#/components/schemas/DidResolutionErrorCode'
DidResolutionErrorCode:
type: string
enum:
- https://www.w3.org/ns/did#INVALID_DID
- https://www.w3.org/ns/did#INVALID_DID_DOCUMENT
- https://www.w3.org/ns/did#NOT_FOUND
- https://www.w3.org/ns/did#REPRESENTATION_NOT_SUPPORTED
- https://www.w3.org/ns/did#INVALID_DID_URL
- https://www.w3.org/ns/did#METHOD_NOT_SUPPORTED
- https://www.w3.org/ns/did#INVALID_OPTIONS
- https://www.w3.org/ns/did#INTERNAL_ERROR
- https://w3id.org/security#INVALID_PUBLIC_KEY
- https://w3id.org/security#INVALID_PUBLIC_KEY_LENGTH
- https://w3id.org/security#INVALID_PUBLIC_KEY_TYPE
- https://w3id.org/security#UNSUPPORTED_PUBLIC_KEY_TYPE
- https://w3id.org/security#INVALID_VERIFICATION_METHOD_URL
- https://w3id.org/security#INVALID_CONTROLLED_IDENTIFIER_DOCUMENT_ID
- https://w3id.org/security#INVALID_CONTROLLED_IDENTIFIER_DOCUMENT
- https://w3id.org/security#INVALID_VERIFICATION_METHOD
- https://w3id.org/security#INVALID_RELATIONSHIP_FOR_VERIFICATION_METHOD
DidResolutionMetadata:
type: object
properties:
contentType:
type:
- string
- "null"
error:
oneOf:
- type: "null"
- $ref: '#/components/schemas/DidResolutionError'
IndexerStats:
type: object
properties:
last_prism_block_number:
oneOf:
- type: "null"
- $ref: '#/components/schemas/BlockNo'
last_prism_slot_number:
oneOf:
- type: "null"
- $ref: '#/components/schemas/SlotNo'
Jwk:
type: object
required:
- kty
- crv
properties:
crv:
type: string
kty:
type: string
x:
oneOf:
- type: "null"
- $ref: '#/components/schemas/Base64UrlStrNoPad'
"y":
oneOf:
- type: "null"
- $ref: '#/components/schemas/Base64UrlStrNoPad'
ResolutionResult:
type: object
required:
- didResolutionMetadata
- didDocumentMetadata
properties:
didDocument:
oneOf:
- type: "null"
- $ref: '#/components/schemas/DidDocument'
didDocumentMetadata:
$ref: '#/components/schemas/DidDocumentMetadata'
didResolutionMetadata:
$ref: '#/components/schemas/DidResolutionMetadata'
Service:
type: object
required:
- id
- type
- serviceEndpoint
properties:
id:
type: string
serviceEndpoint:
$ref: '#/components/schemas/ServiceEndpoint'
type:
$ref: '#/components/schemas/ServiceType'
ServiceEndpoint:
oneOf:
- $ref: '#/components/schemas/StringOrMap'
- type: array
items:
$ref: '#/components/schemas/StringOrMap'
ServiceType:
oneOf:
- type: string
- type: array
items:
type: string
SignedOperationSubmissionRequest:
type: object
required:
- signed_operations
properties:
signed_operations:
type: array
items:
$ref: '#/components/schemas/SignedPrismOperationHexStr'
SignedOperationSubmissionResponse:
type: object
required:
- tx_id
properties:
tx_id:
$ref: '#/components/schemas/TxId'
SignedPrismOperationHexStr:
type: string
description: A hexadecimal string representing a SignedPrismOperation
example: 0a086d61737465722d30124630440220442eec28ec60464acd8df155e73f88a1c7faf4549975582ff0601449525aba31022019257250071818066b377b83a8b1765df1b7dc21d9bccfc7d5da036801d3ba0e1a420a400a3e123c0a086d61737465722d3010014a2e0a09736563703235366b3112210398e61c14328a6a844eec6dc084b825ae8525f10204e9244aaf61260bd221a457
SlotNo:
type: integer
format: int64
example: 8086
minimum: 0
StringOrMap:
oneOf:
- type: string
- type: object
additionalProperties: {}
propertyNames:
type: string
TxId:
type: string
example: 5ab0cf7e4c7cd4b63ba84a4fe299409be12ba85607cb6d1a149e80bc2eac070d
VerificationMethod:
type: object
required:
- id
- type
- controller
properties:
controller:
type: string
id:
type: string
publicKeyJwk:
oneOf:
- type: "null"
- $ref: '#/components/schemas/Jwk'
type:
type: string
VerificationMethodOrRef:
oneOf:
- $ref: '#/components/schemas/VerificationMethod'
- type: string