How to use the ipfs-log.getIpfsHash function in ipfs-log

To help you get started, we’ve selected a few ipfs-log examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github orbitdb / orbit-db / src / OrbitDB.js View on Github external
.then((res) => {
          Log.getIpfsHash(this._ipfs, this._logs[channel]).then((listHash) => {
            this.lastWrite = listHash;
            Cache.set(channel, listHash);

            // Cache the payload
            let op = JSON.parse(JSON.stringify(res.op));
            Object.assign(op, { hash: res.node.payload });
            if(op.key === null) Object.assign(op, { key: res.node.payload });
            this._cached.push(op);

            this.events[channel].emit('write', channel, listHash);
            resolve(res.node.payload);
          })
        }).catch(reject);
    });
github orbitdb / orbit-db / src / oplog / OperationsLog.js View on Github external
      .then(() => Log.getIpfsHash(this._ipfs, this))
      .then((hash) => Cache.set(this.name, hash))
github orbitdb / orbit-db / src / stores / Store.js View on Github external
        .then(() => Log.getIpfsHash(this._ipfs, this._oplog))
        .then((hash) => logHash = hash)

ipfs-log

Append-only log CRDT on IPFS

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis