Skip to content

Commit

Permalink
Removed deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
macterra committed Mar 27, 2024
1 parent d8f1437 commit e89d229
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 70 deletions.
12 changes: 0 additions & 12 deletions gatekeeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { base58btc } from 'multiformats/bases/base58';
import fs from 'fs';
import canonicalize from 'canonicalize';
import { createHelia } from 'helia';
import { FsBlockstore } from 'blockstore-fs';
import { performance } from 'perf_hooks';

import * as cipher from './cipher.js';
import config from './config.js';

Expand Down Expand Up @@ -84,8 +81,6 @@ let ipfs = null;

export async function start() {
if (!ipfs) {
const blockstore = new FsBlockstore(`${dataFolder}/ipfs`);
//helia = await createHelia({ blockstore });
helia = await createHelia();
ipfs = json(helia);
}
Expand Down Expand Up @@ -120,13 +115,6 @@ function submitTxn(did, registry, operation, time, ordinal = 0) {
}

export async function anchorSeed(seed) {
// let t0, t1;

// t0 = performance.now();
// const cid = await ipfs.add(JSON.parse(canonicalize(seed)));
// t1 = performance.now();
// console.log("Adding seed to IPFS took " + (t1 - t0) + " milliseconds.");

const cid = await ipfs.add(JSON.parse(canonicalize(seed)));
const did = `${config.didPrefix}:${cid.toString(base58btc)}`;
const db = loadDb();
Expand Down
4 changes: 1 addition & 3 deletions hyperswarm-mediator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import b4a from 'b4a';
import { sha256 } from '@noble/hashes/sha256';
import fs from 'fs';
import asyncLib from 'async';

import * as gatekeeper from './gatekeeper-sdk.js';
import * as cipher from './cipher.js';
import config from './config.js';

import { EventEmitter } from 'events';

EventEmitter.defaultMaxListeners = 100;

const protocol = '/MDIP/v22.03.21';
Expand Down
55 changes: 0 additions & 55 deletions ipfs.js

This file was deleted.

0 comments on commit e89d229

Please sign in to comment.