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> | |
<title>Hello, WebVR! - A-Frame</title> | |
<meta name="description" content="Hello, WebVR! - A-Frame"> | |
<script type="text/javascript" src="lib/aframe.min.js" charset="utf-8"></script> | |
<script type="text/javascript" src="lib/orbitdb.min.js" charset="utf-8"></script> | |
<script type="text/javascript" src="lib/ipfs-browser-daemon.min.js" charset="utf-8"></script> | |
</head> | |
<body> |
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
'use strict' | |
const path = require('path') | |
const AccessController = require('./access-controller') | |
class OrbitDBAccessController extends AccessController { | |
constructor (orbitdb) { | |
super() | |
this._orbitdb = orbitdb | |
this._db = 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
/* Sketch of how muport identities could be used in OrbitDB */ | |
const identitySignerFn = async (id, data) => { | |
// One can check here too that identity-to-be-signed is actually | |
// the same muport identity | |
if (id !== muport.getDid()) throw new Error("Trying to sign with a different identity!") | |
return await muport.sign(data) | |
} | |
const identityVerifierFn = async (identity) => { |
OlderNewer