This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 8080 "dependencies" : {
8181 "@nodeutils/defaults-deep" : " ^1.1.0" ,
8282 "async" : " ^2.6.1" ,
83+ "base32.js" : " ~0.1.0" ,
8384 "big.js" : " ^5.2.2" ,
8485 "binary-querystring" : " ~0.1.2" ,
8586 "bl" : " ^2.1.2" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ const waterfall = require('async/waterfall')
77const Keychain = require ( 'libp2p-keychain' )
88const defaultsDeep = require ( '@nodeutils/defaults-deep' )
99const NoKeychain = require ( './no-keychain' )
10+
11+ const IPNS = require ( '../ipns' )
12+ const OfflineDatastore = require ( '../ipns/routing/offline-datastore' )
13+
1014/*
1115 * Load stuff from Repo into memory
1216 */
@@ -95,6 +99,13 @@ module.exports = function preStart (self) {
9599
96100 cb ( )
97101 } ,
102+ // Setup offline routing for IPNS.
103+ ( cb ) => {
104+ const offlineDatastore = new OfflineDatastore ( self . _repo )
105+
106+ self . _ipns = new IPNS ( offlineDatastore , self )
107+ cb ( )
108+ } ,
98109 ( cb ) => self . pin . _load ( cb )
99110 ] , callback )
100111 }
Original file line number Diff line number Diff line change 33const { Key } = require ( 'interface-datastore' )
44const { encodeBase32 } = require ( './utils' )
55
6+ << < << << HEAD
67const errcode = require ( 'err-code' )
78const debug = require ( 'debug' )
89const log = debug ( 'jsipfs:ipns:offline-datastore' )
910log . error = debug ( 'jsipfs:ipns:offline-datastore:error' )
1011
12+ === = ===
13+ >>> > >>> refactor : ipns routing logic moved to instantiation
1114// Offline datastore aims to mimic the same encoding as routing when storing records
1215// to the local datastore
1316class OfflineDatastore {
You can’t perform that action at this time.
0 commit comments