Add ipfs.config getters

This commit is contained in:
fsmanuel 2019-04-18 00:41:05 +02:00
parent 5820d71b2c
commit f945b378e2

View File

@ -11,6 +11,14 @@ class IPFS {
this._config = config; this._config = config;
} }
get config() {
return this._config;
}
get peerId() {
return this._ipfsAPI.id();
}
catAndMerge(data, deserialize) { catAndMerge(data, deserialize) {
// if no hash details are found simply return the data; nothing to merge // if no hash details are found simply return the data; nothing to merge
if (!data.hashSize || data.hashSize === 0) { if (!data.hashSize || data.hashSize === 0) {