Skip to content

Instantly share code, notes, and snippets.

View csuwildcat's full-sized avatar

Daniel Buchner csuwildcat

View GitHub Profile
{
definition: {
protocol: "https://protocol.example",
types: {
community: {
schema: "https://protocol.example/community",
dataFormats: ["application/json"]
},
member: {
schema: "https://protocol.example/member",
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,
{
definition: {
protocol: "https://identity.foundation/protocols/person",
types: {
name: {
schema: "https://identity.foundation/schemas/person-name",
dataFormats: ["application/json"]
/*
{
first: "",
{
"protocol":"identity.foundation/protocols/profile",
"definition":{
"types":{
"bio":{
"schema":"identity.foundation/protocols/profile/bio"
},
"image":{
"dataFormats":[
"image/png",
{
"method": "ProtocolsConfigure",
"definition": {
"protocol": "https://identity.foundation/protocols/credentials",
"types": {
"manifest": {
"schema": "https://identity.foundation/credential-manifest/manifest",
"dataFormat": [
"application/json"
]
{
"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"
{
"interface": "Protocols"
"method": "Configure",
"definition": {
"protocol": "https://tbd.website/protocols/tbdex",
"types": {
"request": {
"schema": "https://tbd.website/protocols/tbdex/RequestForQuote",
"dataFormat": [
"application/json"
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){
}
};
{
"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",
<!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.