Skip to content

Vault

GET/api/v1/vault/attestations
GET
/api/v1/vault/attestations

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: unlock_at, unlocked_at, created_at. Default: -created_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/vault/attestations"
{  "attestations": [    {      "attestation_id": "string",      "content_type": "string",      "created_at": "2019-08-24T14:15:22Z",      "lock_type": "time_lock",      "status": "locked",      "unlock_at": "2019-08-24T14:15:22Z"    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/vault/attestations
POST
/api/v1/vault/attestations

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/vault/attestations" \  -H "Content-Type: application/json" \  -d '{    "content": {      "data": "string",      "type": "string"    },    "lock_config": {      "type": "time_lock"    }  }'
{  "attestation_id": "string",  "content_hash": "string",  "holder_shares": [    "string"  ],  "key_commitment": "string",  "lock_proof": {    "leaves": [      {        "hash": "string",        "label": "string"      }    ],    "merkle_root": "string"  },  "locked_at": "2019-08-24T14:15:22Z",  "share_threshold": 0,  "status": "locked",  "unlock_scheduled": "2019-08-24T14:15:22Z"}
GET/api/v1/vault/attestations/{attestation_id}/history
GET
/api/v1/vault/attestations/{attestation_id}/history

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

attestation_id*string

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: timestamp. Default: timestamp.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/vault/attestations/string/history"
{  "attestation_id": "string",  "events": [    {      "actor": "string",      "details": null,      "event_id": "string",      "event_type": "string",      "timestamp": "2019-08-24T14:15:22Z"    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/vault/attestations/{attestation_id}/lottery/enter
POST
/api/v1/vault/attestations/{attestation_id}/lottery/enter

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

attestation_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/vault/attestations/string/lottery/enter" \  -H "Content-Type: application/json" \  -d '{    "entry_count": 0  }'
{  "attestation_id": "string",  "content_key": "string",  "current_probability": 0.1,  "entries_purchased": 0,  "revealed": true,  "status": "locked",  "total_entries": 0}
GET/api/v1/vault/attestations/{attestation_id}/status
GET
/api/v1/vault/attestations/{attestation_id}/status

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

attestation_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/vault/attestations/string/status"
{  "attestation_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "lock_type": "time_lock",  "lottery_status": null,  "owner": "string",  "status": "locked",  "time_remaining_seconds": 0,  "unlock_at": "2019-08-24T14:15:22Z",  "unlock_progress": {    "signatures_collected": 0,    "signatures_required": 0,    "signers": [      {        "signed_at": "2019-08-24T14:15:22Z",        "signer": "string"      }    ]  }}
POST/api/v1/vault/attestations/{attestation_id}/unlock
POST
/api/v1/vault/attestations/{attestation_id}/unlock

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

attestation_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/vault/attestations/string/unlock" \  -H "Content-Type: application/json" \  -d '{}'
{  "attestation_id": "string",  "message": "string",  "revealed": null,  "signatures_collected": 0,  "signatures_required": 0,  "status": "locked",  "unlock_method": "string",  "unlock_proof": null,  "unlocked_at": "2019-08-24T14:15:22Z"}
POST/api/v1/vault/attestations/{attestation_id}/witness
POST
/api/v1/vault/attestations/{attestation_id}/witness

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

attestation_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/vault/attestations/string/witness" \  -H "Content-Type: application/json" \  -d '{}'
{  "attestation_id": "string",  "current": 0,  "required": 0,  "signature_valid": true,  "witness": "string",  "witnessed_at": "2019-08-24T14:15:22Z"}