This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
definition: { | |
protocol: "https://protocol.example", | |
types: { | |
community: { | |
schema: "https://protocol.example/community", | |
dataFormats: ["application/json"] | |
}, | |
member: { | |
schema: "https://protocol.example/member", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchProfiles = async () => { | |
const managedIdentities = await IdentityAgentManager.listIdentities(); | |
const promises = await Promise.all(managedIdentities.map(async identity => { | |
const agent = IdentityAgentManager.getAgent(); | |
const web5 = new Web5({ agent, connectedDid: identity.did }); | |
const queryResult = await web5.dwn.records.query({ | |
message: { | |
filter: { | |
schema: profileProtocol.types.displayName.schema, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
definition: { | |
protocol: "https://identity.foundation/protocols/person", | |
types: { | |
name: { | |
schema: "https://identity.foundation/schemas/person-name", | |
dataFormats: ["application/json"] | |
/* | |
{ | |
first: "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"protocol":"identity.foundation/protocols/profile", | |
"definition":{ | |
"types":{ | |
"bio":{ | |
"schema":"identity.foundation/protocols/profile/bio" | |
}, | |
"image":{ | |
"dataFormats":[ | |
"image/png", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"method": "ProtocolsConfigure", | |
"definition": { | |
"protocol": "https://identity.foundation/protocols/credentials", | |
"types": { | |
"manifest": { | |
"schema": "https://identity.foundation/credential-manifest/manifest", | |
"dataFormat": [ | |
"application/json" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"method": "ProtocolsConfigure", | |
"protocol": "https://tbd.website/protocols/photoProtocol", | |
"protocolVersion": "1.0.0", | |
"protocolDefinition": { | |
"labels": { | |
"album": { | |
"schema": "https://tbd.website/protocols/photoProtocol/Album", | |
"dataFormat": [ | |
"application/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interface": "Protocols" | |
"method": "Configure", | |
"definition": { | |
"protocol": "https://tbd.website/protocols/tbdex", | |
"types": { | |
"request": { | |
"schema": "https://tbd.website/protocols/tbdex/RequestForQuote", | |
"dataFormat": [ | |
"application/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let result | |
for (let endpoint of endpoints) { | |
try { | |
const url = parseURL(endpoint); | |
result = await this.#transports[url?.protocol?.slice(0, -1)]?.send(url.href, request); | |
} | |
catch(e){ | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"background_color": "#ffffff", | |
"categories": [ | |
"social", | |
"news", | |
"magazines" | |
], | |
"description": "Get breaking news, politics, trending music, world events, sports scores, and the latest global news stories as they unfold - all with less data.", | |
"display": "standalone", | |
"gcm_sender_id": "49625052041", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title></title> | |
<script type="module"> | |
window.addEventListener('beforeinstallprompt', (event) => { | |
// Prevent the mini-infobar from appearing on mobile. |