This file contains hidden or 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>Page Content</title> | |
| <meta name="x401" content="LicensedDealer"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
This file contains hidden or 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
| protocols = (() => { | |
| const definitions = {}; | |
| const functions = { | |
| alias: (path, map) => { | |
| // Handling alias definitions, store the protocol URI with each alias | |
| for (const alias in map) { | |
| definitions[alias] = map[alias]; | |
| console.log(`Alias '${alias}' added with protocol URI: ${map[alias].protocol}`); | |
| } |
This file contains hidden or 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
| https://dweb/${DID}/read/protocols/encodeURIComponent(this.profileProtocolUri)/avatar |
This file contains hidden or 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
| { | |
| published: true, | |
| protocol: 'https://areweweb5yet.com/protocols/blog', | |
| types: { | |
| follow: { | |
| schema: "https://areweweb5yet.com/protocols/follow", | |
| dataFormats: ["application/json"] | |
| }, | |
| post: { | |
| schema: "https://areweweb5yet.com/protocols/post", |
This file contains hidden or 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 { Web5 } from '@web5/api'; | |
| import { DidJwk, DidDht, BearerDid } from '@web5/dids'; | |
| import { DwnRegistrar } from '@web5/agent'; | |
| import { Web5UserAgent } from '@web5/user-agent'; | |
| let initialize; | |
| const instances = {}; | |
| const didLabelRegex = /(?:[^@]*@)?(did:[a-z0-9]+:[a-zA-Z0-9-]+)/; | |
| const storage = { |
This file contains hidden or 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
| class AppChannel { | |
| static channels = {}; | |
| constructor(name, options = {}) { | |
| this.name = name; | |
| this.sender = new BroadcastChannel(name); | |
| this.receiver = new BroadcastChannel(name); | |
| this.store = options.store || false; | |
| this.data = null; |
This file contains hidden or 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
| console.log('Hello world!') |
This file contains hidden or 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 { UniversalResolver, DidDht, DidWeb } from '@web5/dids'; | |
| if (self instanceof ServiceWorkerGlobalScope) { | |
| const DidResolver = new UniversalResolver({ didResolvers: [DidDht, DidWeb] }); | |
| const didUrlRegex = /^https?:\/\/dweb\/(([^\/]+)\/.*)?$/; | |
| const httpToHttpsRegex = /^http:/; | |
| const trailingSlashRegex = /\/$/; | |
| self.addEventListener('fetch', event => { |
This file contains hidden or 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
| { | |
| "uri": "https://slick.app", | |
| "schemas": { | |
| "invite": "https://slick.app/schemas/invite", | |
| "community": "https://slick.app/schemas/community", | |
| "details": "https://slick.app/schemas/details", | |
| "channel": "https://slick.app/schemas/channel", | |
| "message": "https://slick.app/schemas/message", | |
| "reaction": "https://slick.app/schemas/reaction", | |
| "admin": "https://slick.app/schemas/admin", |
This file contains hidden or 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
| { | |
| types: { | |
| invitation: { | |
| schema: "https://example.com/protocols/signdocs/invitation" | |
| dataFormats: ['application/json'] | |
| } | |
| }, | |
| structure: { | |
| invitation: { | |
| $actions: [ |
NewerOlder