curl --request GET \
--url https://api.baselayer.com/.well-known/did.jsonimport requests
url = "https://api.baselayer.com/.well-known/did.json"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.baselayer.com/.well-known/did.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.baselayer.com/.well-known/did.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/.well-known/did.json"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/.well-known/did.json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/.well-known/did.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/jws-2020/v1"
],
"id": "did:web:registry.baselayer.com",
"verificationMethod": [
{
"id": "did:web:registry.baselayer.com#kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k",
"type": "JsonWebKey2020",
"controller": "did:web:registry.baselayer.com",
"publicKeyJwk": {
"kty": "OKP",
"crv": "Ed25519",
"x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo",
"kid": "kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k",
"alg": "EdDSA",
"use": "sig"
}
}
],
"assertionMethod": [
"did:web:registry.baselayer.com#kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k"
]
}{
"type": "invalid_host_header",
"code": 6317,
"message": "The request's Host header is missing, repeated or malformed; send exactly one Host of the form host[:port].",
"metadata": {}
}{
"type": "resource_not_found",
"code": 1,
"message": "Could not locate the resource for the given URI.",
"metadata": {}
}{
"type": "validation_failed",
"code": 7112,
"message": "The request is invalid.",
"metadata": {}
}Resolve the credential issuer's DID document
The W3C DID document for the Baselayer credential issuer whose registry host the request names: production and sandbox each publish their own on their own host. It carries the same keys as the host’s JWT VC Issuer Metadata, for did-aware tooling; credentials name an https issuer, so verifiers resolve keys through /.well-known/jwt-vc-issuer. Keys publish ahead of activation and remain published through rotation overlap, so verifier caches stay warm. Unauthenticated; cacheable for one hour.
curl --request GET \
--url https://api.baselayer.com/.well-known/did.jsonimport requests
url = "https://api.baselayer.com/.well-known/did.json"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.baselayer.com/.well-known/did.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.baselayer.com/.well-known/did.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/.well-known/did.json"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/.well-known/did.json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/.well-known/did.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/jws-2020/v1"
],
"id": "did:web:registry.baselayer.com",
"verificationMethod": [
{
"id": "did:web:registry.baselayer.com#kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k",
"type": "JsonWebKey2020",
"controller": "did:web:registry.baselayer.com",
"publicKeyJwk": {
"kty": "OKP",
"crv": "Ed25519",
"x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo",
"kid": "kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k",
"alg": "EdDSA",
"use": "sig"
}
}
],
"assertionMethod": [
"did:web:registry.baselayer.com#kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k"
]
}{
"type": "invalid_host_header",
"code": 6317,
"message": "The request's Host header is missing, repeated or malformed; send exactly one Host of the form host[:port].",
"metadata": {}
}{
"type": "resource_not_found",
"code": 1,
"message": "Could not locate the resource for the given URI.",
"metadata": {}
}{
"type": "validation_failed",
"code": 7112,
"message": "The request is invalid.",
"metadata": {}
}Response
The issuer's DID document (W3C DID core).
The issuer's did:web document, resolved at /.well-known/did.json.
Renders the published rotation set: one verification method per
pending, active, or retiring key, every one referenced from
assertionMethod since counterparties verify credential signatures
(assertions) against these keys. Wire names are the W3C forms, hence
the aliases.