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
$ npm run test:browser | |
> @web5/[email protected] test:browser | |
> karma start karma.conf.cjs | |
START: | |
16 11 2023 08:21:44.758:INFO [esbuild]: Compiling to C:\Users\DANIEL~1\AppData\Local\Temp\6e4f1eb204b7584be7b660a3b65c3a40-bundle.js... | |
X [ERROR] Could not resolve "@web5/agent" |
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": "http://binary-protocol.xyz", | |
"published": true, | |
"types": { | |
"image": { | |
"dataFormats": ["image/gif", "image/png", "image/jpeg"] | |
} | |
}, | |
"structure": { | |
"image": {} |
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
import type { PortableDid } from '@web5/dids'; | |
import type { ManagedIdentity } from '@web5/agent'; | |
const fs = require('fs').promises; | |
import { expect } from 'chai'; | |
import { TestManagedAgent } from '@web5/agent'; | |
import { DwnApi } from '../src/dwn-api.js'; | |
import { testDwnUrl } from './test-config.js'; |
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":{ | |
"published":true, | |
"protocol":"https://protocol.example", | |
"types":{ | |
"album":{ | |
"schema":"https://protocol.example/album", | |
"dataFormats":[ | |
"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", | |
"definition": { | |
"protocol": "https://identity.foundation/protocols/credentials", | |
"types": { | |
"issuanceTransaction": { | |
"schema": "https://identity.foundation/presentation-exchange/presentation-definition", | |
"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
{ | |
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" | |
] |