You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// needed for instantiation of ipfs const initIPFS = async (IPFS, ORBITDB) => {
// Create IPFS instance // const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', } //const ipfs = await Ipfs.create(ipfsOptions)
// Create OrbitDB instance //const orbitdb = await OrbitDB.createInstance(ipfs)
} initIPFS() async function createDb(){ // Create database instance
// Create IPFS instance const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', } const ipfs = await Ipfs.create(ipfsOptions) const orbitdb = await OrbitDB.createInstance(ipfs) const db = await orbitdb.keyvalue('route1') const address = db.address console.log(address) console.log(db.address.toString()) await db.put('2022-07-01T10:49:07', '49.41185089/8.67646861') await db.put('2022-07-01T10:49:12', '49.41166303/8.67652893') const value = db.all console.log(value) } createDb()
|