├── .gitignore ├── README.md ├── ipld-blogs ├── .gitignore ├── README.md ├── ipld_node.js ├── named_link.js ├── nested_data.js ├── package-lock.json ├── package.json └── publication.js ├── ipns-tutorial ├── .gitignore ├── README.md ├── index.js ├── package-lock.json └── package.json └── multiformats_tut ├── .gitignore ├── README.md ├── multiaddr_tut.js ├── multibase_tut.js ├── multicodec_tut.js ├── multihash_tut.js ├── multistream_tut.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ultimate-ipfs-series 2 | An Ultimate tutorial series to learn about IPFS, IPLD, Multiformats, Libp2p and Filecoin 3 | 4 | This repository is a consolidated list of resources you can follow to learn about IPFS. 5 | To keep the things simple and managable, all the resources are grouped and presented in form of a series of blog posts(6 posts): 6 | - [**Understanding IPFS in Depth(1/6): A Beginner to Advanced Guide**](https://hackernoon.com/understanding-ipfs-in-depth-1-5-a-beginner-to-advanced-guide-e937675a8c8a): In this part, we will try to understand What IPFS is, Why do we need it and What we can do with it. We will cover all the underlying components of IPFS in brief(which will be explained in depth in further parts) and see how they work together. If you want a short summary and don’t want to understand what’s happening “under the hood”, then this part is for you 😊 7 | - [**Understanding IPFS in Depth(2/6): What is InterPlanetary Linked Data(IPLD)?**](https://hackernoon.com/understanding-ipfs-in-depth-2-6-what-is-interplanetary-linked-data-ipld-c8c01551517b): In this part, we will dive into the data model of the content-addressable web. We will explore the details and specs of IPLD and play with it to get more familiar with it. 8 | - [**Understanding IPFS in Depth(3/6): What is InterPlanetary Naming System(IPNS)?**](https://hackernoon.com/understanding-ipfs-in-depth-3-6-what-is-interplanetary-naming-system-ipns-9aca71e4c13b): In this part, we will dive into the naming System of the distributed web. We will discuss it’s working, specs and play with it. We will also compare it to today’s naming system, aka the DNS. We will create a list of pros and cons of IPNS vs DNS. 9 | - [**Understanding IPFS in Depth(4/6): What is MultiFormats?**](https://hackernoon.com/understanding-ipfs-in-depth-4-6-what-is-multiformats-cf25eef83966): In this part, we will talk about Why we need Multiformat, How it works and What you as a user/developer can do with it? 10 | - [**Understanding IPFS in Depth(5/6): What is Libp2p?**](https://medium.com/@vaibhavsaini_67863/understanding-ipfs-in-depth-5-6-what-is-libp2p-f8bf7724d452): In this part, we will study the networking Layer of IPFS and what it contributes to the awesomeness of IPFS. We will go through it’s working, specs and play around with it to understand it more clearly. 11 | - [**Understanding IPFS in Depth(6/6): What is Filecoin?**](https://medium.com/swlh/ultimate-guide-to-filecoin-breaking-down-filecoin-whitepaper-economics-9212541a5895): In this part, we discuss the incentivization layer of IPFS, filecoin. We discuss it’s whitepaper and it’s implementation specs including DSN(Distributed Storage Network), Proof-of-replication, Proof of Storage, Data storage and retrieval markets and Smart contract implementation on Filecoin protocol. We also discuss some flaws in filecoin protocol which are not mentioned in the whitepaper and suggest some improvements in filecoin protocol. 12 | -------------------------------------------------------------------------------- /ipld-blogs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /ipld-blogs/README.md: -------------------------------------------------------------------------------- 1 | # Understanding IPLD(InterPlanetary Linked Data) 2 | This tutorial is a part of Medium Article Series ***"Understanding IPFS in Depth"*** authored by [**vasa**](https://vaibhavsaini.com). 3 | 4 | You can read the full article here: [*Understanding IPFS in Depth(2/6): What is InterPlanetary Linked Data(IPLD)?*](https://medium.com/towardsblockchain/understanding-ipfs-in-depth-2-6-what-is-interplanetary-linked-data-ipld-c8c01551517b). 5 | 6 | ## Running this tutorial 7 | * Run `npm install` to install the dependencies. 8 | * Run `node tut1.js` to creating an IPLD format node. 9 | * Run `node tut2.js` to create 2 nodes and linking second node to first node using named link. 10 | * Run `node tut3,js` to fetch the value of a node using links. 11 | * Run `node ipld-blogs.js` to run the medium type publication tutorial. 12 | -------------------------------------------------------------------------------- /ipld-blogs/ipld_node.js: -------------------------------------------------------------------------------- 1 | //Initiate ipfs and CID instance 2 | const ipfsClient = require('ipfs-http-client'); 3 | const CID = require('cids'); 4 | 5 | //Connecting ipfs http client instance to local IPFS peer. 6 | const ipfs = new ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' }); 7 | 8 | /* 9 | Creating an IPLD format node: 10 | ipfs.dag.put(dagNode, [options], [callback]) 11 | For more information see: 12 | https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/DAG.md#ipfsdagputdagnode-options-callback 13 | */ 14 | 15 | ipfs.dag.put({ name: "vasa" }, { format: 'dag-cbor', hashAlg: 'sha2-256' }, (err, cid) => { 16 | if (err) { 17 | console.log("ERR\n", err); 18 | } 19 | 20 | //featching multihash buffer from cid object. 21 | const multihash = cid.multihash; 22 | 23 | //passing multihash buffer to CID object to convert multihash to a readable format 24 | const cids = new CID(1, 'dag-cbor', multihash); 25 | 26 | //Printing out the cid in a readable format 27 | console.log(cids.toBaseEncodedString()); 28 | //bafyreiekjzonwkqd7vcfescxlhvuyn6atdvgevirauupbkncpyebllcuh4 29 | }); 30 | -------------------------------------------------------------------------------- /ipld-blogs/named_link.js: -------------------------------------------------------------------------------- 1 | //Initiate ipfs and CID instance 2 | const ipfsClient = require('ipfs-http-client'); 3 | const CID = require('cids'); 4 | 5 | //Connecting ipfs http client instance to local IPFS peer. 6 | const ipfs = new ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' }); 7 | 8 | /* 9 | Creating an IPLD format node: 10 | ipfs.dag.put(dagNode, [options], [callback]) 11 | For more information see: 12 | https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/DAG.md#ipfsdagputdagnode-options-callback 13 | */ 14 | async function linkNodes() { 15 | let vasa = await ipfs.dag.put({ name: 'vasa' }); 16 | 17 | //Linking secondNode to vasa using named link. 18 | let secondNode = await ipfs.dag.put({ linkToVasa: vasa }); 19 | 20 | //featching multihash buffer from cid object. 21 | const multihash = secondNode.multihash; 22 | 23 | //passing multihash buffer to CID object to convert multihash to a readable format 24 | const cids = new CID(1, 'dag-cbor', multihash); 25 | 26 | //Printing out the cid in a readable format 27 | console.log(cids.toBaseEncodedString()); 28 | //bafyreigwftw565twi6kw3azu7hgz2lxoev3um6cjpgbn6lunqp6f3ewpve 29 | } 30 | 31 | linkNodes(); 32 | -------------------------------------------------------------------------------- /ipld-blogs/nested_data.js: -------------------------------------------------------------------------------- 1 | //Initiate ipfs and CID instance 2 | const ipfsClient = require('ipfs-http-client'); 3 | const CID = require('cids'); 4 | 5 | //Connecting ipfs http client instance to local IPFS peer. 6 | const ipfs = new ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' }); 7 | 8 | function errOrLog(err, result) { 9 | if (err) { 10 | console.error('error: ' + err) 11 | } else { 12 | console.log(result) 13 | } 14 | } 15 | 16 | async function createAndFeatchNodes() { 17 | let vasa = await ipfs.dag.put({ name: 'vasa' }); 18 | 19 | //Linking secondNode to vasa using named link. 20 | let secondNode = await ipfs.dag.put({ 21 | publication: { 22 | authors: { 23 | authorName: vasa 24 | } 25 | } 26 | }); 27 | 28 | //featching multihash buffer from cid object. 29 | const multihash = secondNode.multihash; 30 | 31 | //passing multihash buffer to CID object to convert multihash to a readable format 32 | const cids = new CID(1, 'dag-cbor', multihash); 33 | 34 | //Featching the value using links 35 | ipfs.dag.get(cids.toBaseEncodedString() + '/publication/authors/authorName/name', errOrLog); 36 | /* prints { value: 'vasa', remainderPath: '' } */ 37 | } 38 | createAndFeatchNodes(); -------------------------------------------------------------------------------- /ipld-blogs/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipld-blogs", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "asn1.js": { 8 | "version": "5.0.1", 9 | "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.0.1.tgz", 10 | "integrity": "sha512-aO8EaEgbgqq77IEw+1jfx5c9zTbzvkfuRBuZsSsPnTHMkmd5AI4J6OtITLZFa381jReeaQL67J0GBTUu0+ZTVw==", 11 | "requires": { 12 | "bn.js": "^4.0.0", 13 | "inherits": "^2.0.1", 14 | "minimalistic-assert": "^1.0.0" 15 | } 16 | }, 17 | "async": { 18 | "version": "2.6.2", 19 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", 20 | "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", 21 | "requires": { 22 | "lodash": "^4.17.11" 23 | } 24 | }, 25 | "balanced-match": { 26 | "version": "1.0.0", 27 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 28 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 29 | }, 30 | "base-x": { 31 | "version": "3.0.5", 32 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.5.tgz", 33 | "integrity": "sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA==", 34 | "requires": { 35 | "safe-buffer": "^5.0.1" 36 | } 37 | }, 38 | "bignumber.js": { 39 | "version": "8.0.2", 40 | "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.0.2.tgz", 41 | "integrity": "sha512-EiuvFrnbv0jFixEQ9f58jo7X0qI2lNGIr/MxntmVzQc5JUweDSh8y8hbTCAomFtqwUPIOWcLXP0VEOSZTG7FFw==" 42 | }, 43 | "bindings": { 44 | "version": "1.4.0", 45 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.4.0.tgz", 46 | "integrity": "sha512-7znEVX22Djn+nYjxCWKDne0RRloa9XfYa84yk3s+HkE3LpDYZmhArYr9O9huBoHY3/oXispx5LorIX7Sl2CgSQ==", 47 | "requires": { 48 | "file-uri-to-path": "1.0.0" 49 | } 50 | }, 51 | "bip66": { 52 | "version": "1.1.5", 53 | "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", 54 | "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", 55 | "requires": { 56 | "safe-buffer": "^5.0.1" 57 | } 58 | }, 59 | "bl": { 60 | "version": "2.2.0", 61 | "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", 62 | "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", 63 | "requires": { 64 | "readable-stream": "^2.3.5", 65 | "safe-buffer": "^5.1.1" 66 | }, 67 | "dependencies": { 68 | "readable-stream": { 69 | "version": "2.3.6", 70 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 71 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 72 | "requires": { 73 | "core-util-is": "~1.0.0", 74 | "inherits": "~2.0.3", 75 | "isarray": "~1.0.0", 76 | "process-nextick-args": "~2.0.0", 77 | "safe-buffer": "~5.1.1", 78 | "string_decoder": "~1.1.1", 79 | "util-deprecate": "~1.0.1" 80 | } 81 | } 82 | } 83 | }, 84 | "blakejs": { 85 | "version": "1.1.0", 86 | "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", 87 | "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" 88 | }, 89 | "bn.js": { 90 | "version": "4.11.8", 91 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", 92 | "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" 93 | }, 94 | "borc": { 95 | "version": "2.1.0", 96 | "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.0.tgz", 97 | "integrity": "sha512-hKTxeYt3AIzIG45epJHv8xJYSF0ktp7nZgFsqi5cPzoL3T8qKMPeUlqydORy6j3NWZvRDANx30PjpTmGho69Gw==", 98 | "requires": { 99 | "bignumber.js": "^8.0.1", 100 | "commander": "^2.15.0", 101 | "ieee754": "^1.1.8", 102 | "iso-url": "~0.4.4", 103 | "json-text-sequence": "~0.1.0" 104 | } 105 | }, 106 | "brace-expansion": { 107 | "version": "1.1.11", 108 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 109 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 110 | "requires": { 111 | "balanced-match": "^1.0.0", 112 | "concat-map": "0.0.1" 113 | } 114 | }, 115 | "brorand": { 116 | "version": "1.1.0", 117 | "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", 118 | "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" 119 | }, 120 | "browserify-aes": { 121 | "version": "1.2.0", 122 | "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", 123 | "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", 124 | "requires": { 125 | "buffer-xor": "^1.0.3", 126 | "cipher-base": "^1.0.0", 127 | "create-hash": "^1.1.0", 128 | "evp_bytestokey": "^1.0.3", 129 | "inherits": "^2.0.1", 130 | "safe-buffer": "^5.0.1" 131 | } 132 | }, 133 | "bs58": { 134 | "version": "4.0.1", 135 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 136 | "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", 137 | "requires": { 138 | "base-x": "^3.0.2" 139 | } 140 | }, 141 | "buffer-alloc": { 142 | "version": "1.2.0", 143 | "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", 144 | "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", 145 | "requires": { 146 | "buffer-alloc-unsafe": "^1.1.0", 147 | "buffer-fill": "^1.0.0" 148 | } 149 | }, 150 | "buffer-alloc-unsafe": { 151 | "version": "1.1.0", 152 | "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", 153 | "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" 154 | }, 155 | "buffer-fill": { 156 | "version": "1.0.0", 157 | "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", 158 | "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" 159 | }, 160 | "buffer-from": { 161 | "version": "1.1.1", 162 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 163 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 164 | }, 165 | "buffer-xor": { 166 | "version": "1.0.3", 167 | "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", 168 | "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" 169 | }, 170 | "builtin-status-codes": { 171 | "version": "3.0.0", 172 | "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", 173 | "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" 174 | }, 175 | "cids": { 176 | "version": "0.5.7", 177 | "resolved": "https://registry.npmjs.org/cids/-/cids-0.5.7.tgz", 178 | "integrity": "sha512-SlAz4p8XMEW3mhwiYbzfjn+5+Y//+kIuHqzRUytK0a3uGBnsjJb76xHliehv0HcVMCjRKv2vZnPTwd4QX+IcMA==", 179 | "requires": { 180 | "class-is": "^1.1.0", 181 | "multibase": "~0.6.0", 182 | "multicodec": "~0.2.7", 183 | "multihashes": "~0.4.14" 184 | }, 185 | "dependencies": { 186 | "base-x": { 187 | "version": "3.0.4", 188 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.4.tgz", 189 | "integrity": "sha512-UYOadoSIkEI/VrRGSG6qp93rp2WdokiAiNYDfGW5qURAY8GiAQkvMbwNNSDYiVJopqv4gCna7xqf4rrNGp+5AA==", 190 | "requires": { 191 | "safe-buffer": "^5.0.1" 192 | } 193 | }, 194 | "multibase": { 195 | "version": "0.6.0", 196 | "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.0.tgz", 197 | "integrity": "sha512-R9bNLQhbD7MsitPm1NeY7w9sDgu6d7cuj25snAWH7k5PSNPSwIQQBpcpj8jx1W96dLbdigZqmUWOdQRMnAmgjA==", 198 | "requires": { 199 | "base-x": "3.0.4" 200 | } 201 | } 202 | } 203 | }, 204 | "cipher-base": { 205 | "version": "1.0.4", 206 | "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", 207 | "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", 208 | "requires": { 209 | "inherits": "^2.0.1", 210 | "safe-buffer": "^5.0.1" 211 | } 212 | }, 213 | "class-is": { 214 | "version": "1.1.0", 215 | "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", 216 | "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" 217 | }, 218 | "commander": { 219 | "version": "2.19.0", 220 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", 221 | "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" 222 | }, 223 | "concat-map": { 224 | "version": "0.0.1", 225 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 226 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 227 | }, 228 | "core-util-is": { 229 | "version": "1.0.2", 230 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 231 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 232 | }, 233 | "create-hash": { 234 | "version": "1.2.0", 235 | "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", 236 | "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", 237 | "requires": { 238 | "cipher-base": "^1.0.1", 239 | "inherits": "^2.0.1", 240 | "md5.js": "^1.3.4", 241 | "ripemd160": "^2.0.1", 242 | "sha.js": "^2.4.0" 243 | } 244 | }, 245 | "create-hmac": { 246 | "version": "1.1.7", 247 | "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", 248 | "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", 249 | "requires": { 250 | "cipher-base": "^1.0.3", 251 | "create-hash": "^1.1.0", 252 | "inherits": "^2.0.1", 253 | "ripemd160": "^2.0.0", 254 | "safe-buffer": "^5.0.1", 255 | "sha.js": "^2.4.8" 256 | } 257 | }, 258 | "debug": { 259 | "version": "4.1.1", 260 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 261 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 262 | "requires": { 263 | "ms": "^2.1.1" 264 | } 265 | }, 266 | "delimit-stream": { 267 | "version": "0.1.0", 268 | "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", 269 | "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=" 270 | }, 271 | "detect-node": { 272 | "version": "2.0.4", 273 | "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", 274 | "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" 275 | }, 276 | "drbg.js": { 277 | "version": "1.0.1", 278 | "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", 279 | "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", 280 | "requires": { 281 | "browserify-aes": "^1.0.6", 282 | "create-hash": "^1.1.2", 283 | "create-hmac": "^1.1.4" 284 | } 285 | }, 286 | "elliptic": { 287 | "version": "6.4.1", 288 | "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", 289 | "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", 290 | "requires": { 291 | "bn.js": "^4.4.0", 292 | "brorand": "^1.0.1", 293 | "hash.js": "^1.0.0", 294 | "hmac-drbg": "^1.0.0", 295 | "inherits": "^2.0.1", 296 | "minimalistic-assert": "^1.0.0", 297 | "minimalistic-crypto-utils": "^1.0.0" 298 | } 299 | }, 300 | "end-of-stream": { 301 | "version": "1.4.1", 302 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", 303 | "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", 304 | "requires": { 305 | "once": "^1.4.0" 306 | } 307 | }, 308 | "err-code": { 309 | "version": "1.1.2", 310 | "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", 311 | "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" 312 | }, 313 | "evp_bytestokey": { 314 | "version": "1.0.3", 315 | "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", 316 | "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", 317 | "requires": { 318 | "md5.js": "^1.3.4", 319 | "safe-buffer": "^5.1.1" 320 | } 321 | }, 322 | "file-uri-to-path": { 323 | "version": "1.0.0", 324 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 325 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 326 | }, 327 | "flatmap": { 328 | "version": "0.0.3", 329 | "resolved": "https://registry.npmjs.org/flatmap/-/flatmap-0.0.3.tgz", 330 | "integrity": "sha1-Hxik2TgVLUlZZfnJWNkjqy3WabQ=" 331 | }, 332 | "fs-constants": { 333 | "version": "1.0.0", 334 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 335 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" 336 | }, 337 | "fs.realpath": { 338 | "version": "1.0.0", 339 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 340 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 341 | }, 342 | "glob": { 343 | "version": "7.1.3", 344 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 345 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 346 | "requires": { 347 | "fs.realpath": "^1.0.0", 348 | "inflight": "^1.0.4", 349 | "inherits": "2", 350 | "minimatch": "^3.0.4", 351 | "once": "^1.3.0", 352 | "path-is-absolute": "^1.0.0" 353 | } 354 | }, 355 | "hash-base": { 356 | "version": "3.0.4", 357 | "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", 358 | "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", 359 | "requires": { 360 | "inherits": "^2.0.1", 361 | "safe-buffer": "^5.0.1" 362 | } 363 | }, 364 | "hash.js": { 365 | "version": "1.1.7", 366 | "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", 367 | "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", 368 | "requires": { 369 | "inherits": "^2.0.3", 370 | "minimalistic-assert": "^1.0.1" 371 | } 372 | }, 373 | "hmac-drbg": { 374 | "version": "1.0.1", 375 | "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", 376 | "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", 377 | "requires": { 378 | "hash.js": "^1.0.3", 379 | "minimalistic-assert": "^1.0.0", 380 | "minimalistic-crypto-utils": "^1.0.1" 381 | } 382 | }, 383 | "ieee754": { 384 | "version": "1.1.12", 385 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", 386 | "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" 387 | }, 388 | "inflight": { 389 | "version": "1.0.6", 390 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 391 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 392 | "requires": { 393 | "once": "^1.3.0", 394 | "wrappy": "1" 395 | } 396 | }, 397 | "inherits": { 398 | "version": "2.0.3", 399 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 400 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 401 | }, 402 | "ip": { 403 | "version": "1.1.5", 404 | "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", 405 | "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" 406 | }, 407 | "ip-regex": { 408 | "version": "2.1.0", 409 | "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", 410 | "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" 411 | }, 412 | "ipfs-block": { 413 | "version": "0.8.0", 414 | "resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.8.0.tgz", 415 | "integrity": "sha512-znNtFRxXlJYP1/Q4u0tGFJUceH9pNww8WA+zair6T3y7d28m+vtUDJGn96M7ZlFFSkByQyQsAiq2ssNhKtMzxw==", 416 | "requires": { 417 | "cids": "~0.5.5", 418 | "class-is": "^1.1.0" 419 | } 420 | }, 421 | "ipfs-http-client": { 422 | "version": "29.1.1", 423 | "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-29.1.1.tgz", 424 | "integrity": "sha512-aAjqZ9RwnpQECkMO058YjWG79U4w4wEKvHfVdXMhgkXDFkErxRpSqoCvwIVozbTU34NwEjWsZ9WoG0lr2FtgvA==", 425 | "requires": { 426 | "async": "^2.6.1", 427 | "bignumber.js": "^8.0.2", 428 | "bl": "^2.1.2", 429 | "bs58": "^4.0.1", 430 | "cids": "~0.5.5", 431 | "concat-stream": "^2.0.0", 432 | "debug": "^4.1.0", 433 | "detect-node": "^2.0.4", 434 | "end-of-stream": "^1.4.1", 435 | "err-code": "^1.1.2", 436 | "flatmap": "0.0.3", 437 | "glob": "^7.1.3", 438 | "ipfs-block": "~0.8.0", 439 | "ipfs-unixfs": "~0.1.16", 440 | "ipld-dag-cbor": "~0.13.0", 441 | "ipld-dag-pb": "~0.15.0", 442 | "is-ipfs": "~0.4.7", 443 | "is-pull-stream": "0.0.0", 444 | "is-stream": "^1.1.0", 445 | "libp2p-crypto": "~0.16.0", 446 | "lodash": "^4.17.11", 447 | "lru-cache": "^5.1.1", 448 | "multiaddr": "^6.0.0", 449 | "multibase": "~0.6.0", 450 | "multihashes": "~0.4.14", 451 | "ndjson": "^1.5.0", 452 | "once": "^1.4.0", 453 | "peer-id": "~0.12.1", 454 | "peer-info": "~0.15.0", 455 | "promisify-es6": "^1.0.3", 456 | "pull-defer": "~0.2.3", 457 | "pull-pushable": "^2.2.0", 458 | "pull-stream-to-stream": "^1.3.4", 459 | "pump": "^3.0.0", 460 | "qs": "^6.5.2", 461 | "readable-stream": "^3.0.6", 462 | "stream-http": "^3.0.0", 463 | "stream-to-pull-stream": "^1.7.2", 464 | "streamifier": "~0.1.1", 465 | "tar-stream": "^1.6.2", 466 | "through2": "^3.0.0" 467 | }, 468 | "dependencies": { 469 | "base-x": { 470 | "version": "3.0.4", 471 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.4.tgz", 472 | "integrity": "sha512-UYOadoSIkEI/VrRGSG6qp93rp2WdokiAiNYDfGW5qURAY8GiAQkvMbwNNSDYiVJopqv4gCna7xqf4rrNGp+5AA==", 473 | "requires": { 474 | "safe-buffer": "^5.0.1" 475 | } 476 | }, 477 | "concat-stream": { 478 | "version": "2.0.0", 479 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", 480 | "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", 481 | "requires": { 482 | "buffer-from": "^1.0.0", 483 | "inherits": "^2.0.3", 484 | "readable-stream": "^3.0.2", 485 | "typedarray": "^0.0.6" 486 | } 487 | }, 488 | "ipld-dag-pb": { 489 | "version": "0.15.2", 490 | "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.15.2.tgz", 491 | "integrity": "sha512-9mzeYW4FneGROH+/PXMbXsfy3cUsMYHaI6vUu8nNpSTyQdGF+fa1ViA+jvqWzM8zXYwG4OOSCAAADssJeELAvw==", 492 | "requires": { 493 | "async": "^2.6.1", 494 | "bs58": "^4.0.1", 495 | "cids": "~0.5.4", 496 | "class-is": "^1.1.0", 497 | "is-ipfs": "~0.4.2", 498 | "multihashing-async": "~0.5.1", 499 | "protons": "^1.0.1", 500 | "pull-stream": "^3.6.9", 501 | "pull-traverse": "^1.0.3", 502 | "stable": "~0.1.8" 503 | } 504 | }, 505 | "libp2p-crypto": { 506 | "version": "0.16.0", 507 | "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.0.tgz", 508 | "integrity": "sha512-Msu7PIumcVRO8LajSGs6uVZpC7bOiJVWu0a8iFMZ6mdbasI+A6accAmP/NjJ5WBcEdxzwjzQGNP23bQQzPoqqg==", 509 | "requires": { 510 | "asn1.js": "^5.0.1", 511 | "async": "^2.6.1", 512 | "browserify-aes": "^1.2.0", 513 | "bs58": "^4.0.1", 514 | "iso-random-stream": "^1.1.0", 515 | "keypair": "^1.0.1", 516 | "libp2p-crypto-secp256k1": "~0.2.3", 517 | "multihashing-async": "~0.5.1", 518 | "node-forge": "~0.7.6", 519 | "pem-jwk": "^2.0.0", 520 | "protons": "^1.0.1", 521 | "rsa-pem-to-jwk": "^1.1.3", 522 | "tweetnacl": "^1.0.0", 523 | "ursa-optional": "~0.9.10" 524 | } 525 | }, 526 | "lru-cache": { 527 | "version": "5.1.1", 528 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", 529 | "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", 530 | "requires": { 531 | "yallist": "^3.0.2" 532 | } 533 | }, 534 | "multiaddr": { 535 | "version": "6.0.4", 536 | "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.4.tgz", 537 | "integrity": "sha512-oi7ImOEwPTRjHSOeOe0DgoxHLChHniME2on8G00fUwD88k4R2J2yrpd5643M9c8EqVuyvjy/e/zAZofpKIISyw==", 538 | "requires": { 539 | "bs58": "^4.0.1", 540 | "class-is": "^1.1.0", 541 | "ip": "^1.1.5", 542 | "is-ip": "^2.0.0", 543 | "varint": "^5.0.0" 544 | } 545 | }, 546 | "multibase": { 547 | "version": "0.6.0", 548 | "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.0.tgz", 549 | "integrity": "sha512-R9bNLQhbD7MsitPm1NeY7w9sDgu6d7cuj25snAWH7k5PSNPSwIQQBpcpj8jx1W96dLbdigZqmUWOdQRMnAmgjA==", 550 | "requires": { 551 | "base-x": "3.0.4" 552 | } 553 | }, 554 | "peer-info": { 555 | "version": "0.15.1", 556 | "resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.15.1.tgz", 557 | "integrity": "sha512-Y91Q2tZRC0CpSTPd1UebhGqniOrOAk/aj60uYUcWJXCoLTAnGu+4LJGoiay8ayudS6ice7l3SKhgL/cS62QacA==", 558 | "requires": { 559 | "mafmt": "^6.0.2", 560 | "multiaddr": "^6.0.3", 561 | "peer-id": "~0.12.2", 562 | "unique-by": "^1.0.0" 563 | } 564 | }, 565 | "pem-jwk": { 566 | "version": "2.0.0", 567 | "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz", 568 | "integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==", 569 | "requires": { 570 | "asn1.js": "^5.0.1" 571 | } 572 | }, 573 | "through2": { 574 | "version": "3.0.0", 575 | "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.0.tgz", 576 | "integrity": "sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ==", 577 | "requires": { 578 | "readable-stream": "2 || 3", 579 | "xtend": "~4.0.1" 580 | } 581 | }, 582 | "yallist": { 583 | "version": "3.0.3", 584 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", 585 | "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" 586 | } 587 | } 588 | }, 589 | "ipfs-unixfs": { 590 | "version": "0.1.16", 591 | "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-0.1.16.tgz", 592 | "integrity": "sha512-TX9Dyu77MxpLzGh/LcQne95TofOyvOeW0oOi72aBMMcV1ItP3684e6NTG9KY1qzdrC+ZUR8kT7y18J058n8KXg==", 593 | "requires": { 594 | "protons": "^1.0.1" 595 | } 596 | }, 597 | "ipld-dag-cbor": { 598 | "version": "0.13.1", 599 | "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.13.1.tgz", 600 | "integrity": "sha512-96KKh5XUq9LrWE/TQ/BOJ5FcQx7UZ892N76ufDdovq+fIwZ4/YpPRTAVssLUuN3crATHoGu80TVZMgevsuTCdQ==", 601 | "requires": { 602 | "borc": "^2.1.0", 603 | "bs58": "^4.0.1", 604 | "cids": "~0.5.5", 605 | "is-circular": "^1.0.2", 606 | "multihashes": "~0.4.14", 607 | "multihashing-async": "~0.5.1", 608 | "traverse": "~0.6.6" 609 | } 610 | }, 611 | "is-circular": { 612 | "version": "1.0.2", 613 | "resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz", 614 | "integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==" 615 | }, 616 | "is-ip": { 617 | "version": "2.0.0", 618 | "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-2.0.0.tgz", 619 | "integrity": "sha1-aO6gfooKCpTC0IDdZ0xzGrKkYas=", 620 | "requires": { 621 | "ip-regex": "^2.0.0" 622 | } 623 | }, 624 | "is-ipfs": { 625 | "version": "0.4.8", 626 | "resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.4.8.tgz", 627 | "integrity": "sha512-xIKUeA24IFMfkmeAPEOZL448X7a08c/KzAGQp1e/QxC9bx/NNEdT/ohob3SW6eJO2UwJNjsbfMeNZ2B+Dk2Fdg==", 628 | "requires": { 629 | "bs58": "4.0.1", 630 | "cids": "~0.5.6", 631 | "multibase": "~0.6.0", 632 | "multihashes": "~0.4.13" 633 | }, 634 | "dependencies": { 635 | "base-x": { 636 | "version": "3.0.4", 637 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.4.tgz", 638 | "integrity": "sha512-UYOadoSIkEI/VrRGSG6qp93rp2WdokiAiNYDfGW5qURAY8GiAQkvMbwNNSDYiVJopqv4gCna7xqf4rrNGp+5AA==", 639 | "requires": { 640 | "safe-buffer": "^5.0.1" 641 | } 642 | }, 643 | "multibase": { 644 | "version": "0.6.0", 645 | "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.0.tgz", 646 | "integrity": "sha512-R9bNLQhbD7MsitPm1NeY7w9sDgu6d7cuj25snAWH7k5PSNPSwIQQBpcpj8jx1W96dLbdigZqmUWOdQRMnAmgjA==", 647 | "requires": { 648 | "base-x": "3.0.4" 649 | } 650 | } 651 | } 652 | }, 653 | "is-promise": { 654 | "version": "1.0.1", 655 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", 656 | "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=" 657 | }, 658 | "is-pull-stream": { 659 | "version": "0.0.0", 660 | "resolved": "https://registry.npmjs.org/is-pull-stream/-/is-pull-stream-0.0.0.tgz", 661 | "integrity": "sha1-o7w9HG0wVRUcRr3m85nv7SFEDKk=" 662 | }, 663 | "is-stream": { 664 | "version": "1.1.0", 665 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", 666 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" 667 | }, 668 | "isarray": { 669 | "version": "1.0.0", 670 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 671 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 672 | }, 673 | "iso-random-stream": { 674 | "version": "1.1.0", 675 | "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.0.tgz", 676 | "integrity": "sha512-ywSWt0KrWcsaK0jVoVJIR30rLyjg9Rw3k2Sm/qp+3tdtSV0SNH7L7KilKnENcENOSoJxDFvpt2idvuMMQohdCQ==" 677 | }, 678 | "iso-url": { 679 | "version": "0.4.6", 680 | "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.6.tgz", 681 | "integrity": "sha512-YQO7+aIe6l1aSJUKOx+Vrv08DlhZeLFIVfehG2L29KLSEb9RszqPXilxJRVpp57px36BddKR5ZsebacO5qG0tg==" 682 | }, 683 | "js-sha3": { 684 | "version": "0.8.0", 685 | "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", 686 | "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" 687 | }, 688 | "json-stringify-safe": { 689 | "version": "5.0.1", 690 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 691 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 692 | }, 693 | "json-text-sequence": { 694 | "version": "0.1.1", 695 | "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", 696 | "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", 697 | "requires": { 698 | "delimit-stream": "0.1.0" 699 | } 700 | }, 701 | "keypair": { 702 | "version": "1.0.1", 703 | "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.1.tgz", 704 | "integrity": "sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs=" 705 | }, 706 | "libp2p-crypto-secp256k1": { 707 | "version": "0.2.3", 708 | "resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.2.3.tgz", 709 | "integrity": "sha512-DFrK89VdboacqM3vqWV8yt8FH9Ni181JJAOU2tRkJfUN9tNEV7VfZEg390NJxEQQbLsyH4HZ7on3QTpPHMHQZQ==", 710 | "requires": { 711 | "async": "^2.6.1", 712 | "multihashing-async": "~0.5.1", 713 | "nodeify": "^1.0.1", 714 | "safe-buffer": "^5.1.2", 715 | "secp256k1": "^3.6.1" 716 | } 717 | }, 718 | "lodash": { 719 | "version": "4.17.15", 720 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 721 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" 722 | }, 723 | "looper": { 724 | "version": "3.0.0", 725 | "resolved": "https://registry.npmjs.org/looper/-/looper-3.0.0.tgz", 726 | "integrity": "sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k=" 727 | }, 728 | "mafmt": { 729 | "version": "6.0.6", 730 | "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.6.tgz", 731 | "integrity": "sha512-tbLpK8eZsGmjxo6HjSNQOrOiClXprErbdnmO/5VY3R4g0zWUELgvMjJQr3WTlh6MXMZqJqwmz6FsEyJEcU2Xnw==", 732 | "requires": { 733 | "multiaddr": "^6.0.4" 734 | }, 735 | "dependencies": { 736 | "multiaddr": { 737 | "version": "6.0.4", 738 | "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.4.tgz", 739 | "integrity": "sha512-oi7ImOEwPTRjHSOeOe0DgoxHLChHniME2on8G00fUwD88k4R2J2yrpd5643M9c8EqVuyvjy/e/zAZofpKIISyw==", 740 | "requires": { 741 | "bs58": "^4.0.1", 742 | "class-is": "^1.1.0", 743 | "ip": "^1.1.5", 744 | "is-ip": "^2.0.0", 745 | "varint": "^5.0.0" 746 | } 747 | } 748 | } 749 | }, 750 | "md5.js": { 751 | "version": "1.3.5", 752 | "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", 753 | "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", 754 | "requires": { 755 | "hash-base": "^3.0.0", 756 | "inherits": "^2.0.1", 757 | "safe-buffer": "^5.1.2" 758 | } 759 | }, 760 | "minimalistic-assert": { 761 | "version": "1.0.1", 762 | "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", 763 | "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" 764 | }, 765 | "minimalistic-crypto-utils": { 766 | "version": "1.0.1", 767 | "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", 768 | "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" 769 | }, 770 | "minimatch": { 771 | "version": "3.0.4", 772 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 773 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 774 | "requires": { 775 | "brace-expansion": "^1.1.7" 776 | } 777 | }, 778 | "minimist": { 779 | "version": "1.2.0", 780 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", 781 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" 782 | }, 783 | "ms": { 784 | "version": "2.1.1", 785 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 786 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 787 | }, 788 | "multicodec": { 789 | "version": "0.2.7", 790 | "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.2.7.tgz", 791 | "integrity": "sha512-96xc9zs7bsclMW0Po9ERnRFqcsWHY8OZ8JW/I8DeHG58YYJZy3cBGI00Ze7hz9Ix56DNHMTSxEj9cgoZByruMg==", 792 | "requires": { 793 | "varint": "^5.0.0" 794 | } 795 | }, 796 | "multihashes": { 797 | "version": "0.4.14", 798 | "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.14.tgz", 799 | "integrity": "sha512-V/g/EIN6nALXfS/xHUAgtfPP3mn3sPIF/i9beuGKf25QXS2QZYCpeVJbDPEannkz32B2fihzCe2D/KMrbcmefg==", 800 | "requires": { 801 | "bs58": "^4.0.1", 802 | "varint": "^5.0.0" 803 | } 804 | }, 805 | "multihashing-async": { 806 | "version": "0.5.2", 807 | "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz", 808 | "integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==", 809 | "requires": { 810 | "blakejs": "^1.1.0", 811 | "js-sha3": "~0.8.0", 812 | "multihashes": "~0.4.13", 813 | "murmurhash3js": "^3.0.1", 814 | "nodeify": "^1.0.1" 815 | } 816 | }, 817 | "murmurhash3js": { 818 | "version": "3.0.1", 819 | "resolved": "https://registry.npmjs.org/murmurhash3js/-/murmurhash3js-3.0.1.tgz", 820 | "integrity": "sha1-Ppg+W0fCoG9DpxMXTn5DXKBEuZg=" 821 | }, 822 | "nan": { 823 | "version": "2.12.1", 824 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", 825 | "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" 826 | }, 827 | "ndjson": { 828 | "version": "1.5.0", 829 | "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz", 830 | "integrity": "sha1-rmA7NrE0vOw0e0UkIrC/mNWDLsg=", 831 | "requires": { 832 | "json-stringify-safe": "^5.0.1", 833 | "minimist": "^1.2.0", 834 | "split2": "^2.1.0", 835 | "through2": "^2.0.3" 836 | } 837 | }, 838 | "node-forge": { 839 | "version": "0.7.6", 840 | "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", 841 | "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" 842 | }, 843 | "nodeify": { 844 | "version": "1.0.1", 845 | "resolved": "https://registry.npmjs.org/nodeify/-/nodeify-1.0.1.tgz", 846 | "integrity": "sha1-ZKtpp7268DzhB7TwM1yHwLnpGx0=", 847 | "requires": { 848 | "is-promise": "~1.0.0", 849 | "promise": "~1.3.0" 850 | } 851 | }, 852 | "object-assign": { 853 | "version": "2.1.1", 854 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", 855 | "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" 856 | }, 857 | "once": { 858 | "version": "1.4.0", 859 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 860 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 861 | "requires": { 862 | "wrappy": "1" 863 | } 864 | }, 865 | "optimist": { 866 | "version": "0.3.7", 867 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", 868 | "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", 869 | "requires": { 870 | "wordwrap": "~0.0.2" 871 | } 872 | }, 873 | "path-is-absolute": { 874 | "version": "1.0.1", 875 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 876 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 877 | }, 878 | "peer-id": { 879 | "version": "0.12.2", 880 | "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.2.tgz", 881 | "integrity": "sha512-pked3yPLcOcprH21OnYbJAzk9OgI/TDEqjJ0IfRJSVB/61ZyqU5VKO7cw7hul+YD8nTD79wM79xFRWN3f6otNg==", 882 | "requires": { 883 | "async": "^2.6.1", 884 | "class-is": "^1.1.0", 885 | "libp2p-crypto": "~0.16.0", 886 | "multihashes": "~0.4.13" 887 | }, 888 | "dependencies": { 889 | "libp2p-crypto": { 890 | "version": "0.16.0", 891 | "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.0.tgz", 892 | "integrity": "sha512-Msu7PIumcVRO8LajSGs6uVZpC7bOiJVWu0a8iFMZ6mdbasI+A6accAmP/NjJ5WBcEdxzwjzQGNP23bQQzPoqqg==", 893 | "requires": { 894 | "asn1.js": "^5.0.1", 895 | "async": "^2.6.1", 896 | "browserify-aes": "^1.2.0", 897 | "bs58": "^4.0.1", 898 | "iso-random-stream": "^1.1.0", 899 | "keypair": "^1.0.1", 900 | "libp2p-crypto-secp256k1": "~0.2.3", 901 | "multihashing-async": "~0.5.1", 902 | "node-forge": "~0.7.6", 903 | "pem-jwk": "^2.0.0", 904 | "protons": "^1.0.1", 905 | "rsa-pem-to-jwk": "^1.1.3", 906 | "tweetnacl": "^1.0.0", 907 | "ursa-optional": "~0.9.10" 908 | } 909 | }, 910 | "pem-jwk": { 911 | "version": "2.0.0", 912 | "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz", 913 | "integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==", 914 | "requires": { 915 | "asn1.js": "^5.0.1" 916 | } 917 | } 918 | } 919 | }, 920 | "process-nextick-args": { 921 | "version": "2.0.0", 922 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", 923 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" 924 | }, 925 | "promise": { 926 | "version": "1.3.0", 927 | "resolved": "https://registry.npmjs.org/promise/-/promise-1.3.0.tgz", 928 | "integrity": "sha1-5cyaTIJ45GZP/twBx9qEhCsEAXU=", 929 | "requires": { 930 | "is-promise": "~1" 931 | } 932 | }, 933 | "promisify-es6": { 934 | "version": "1.0.3", 935 | "resolved": "https://registry.npmjs.org/promisify-es6/-/promisify-es6-1.0.3.tgz", 936 | "integrity": "sha512-N9iVG+CGJsI4b4ZGazjwLnxErD2d9Pe4DPvvXSxYA9tFNu8ymXME4Qs5HIQ0LMJpNM7zj+m0NlNnNeqFpKzqnA==" 937 | }, 938 | "protocol-buffers-schema": { 939 | "version": "3.3.2", 940 | "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz", 941 | "integrity": "sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w==" 942 | }, 943 | "protons": { 944 | "version": "1.0.1", 945 | "resolved": "https://registry.npmjs.org/protons/-/protons-1.0.1.tgz", 946 | "integrity": "sha512-+0ZKnfVs+4c43tbAQ5j0Mck8wPcLnlxUYzKQoB4iDW4ocdXGnN4P+0dDbgX1FTpoY9+7P2Tn2scJyHHqj+S/lQ==", 947 | "requires": { 948 | "protocol-buffers-schema": "^3.3.1", 949 | "safe-buffer": "^5.1.1", 950 | "signed-varint": "^2.0.1", 951 | "varint": "^5.0.0" 952 | } 953 | }, 954 | "pull-defer": { 955 | "version": "0.2.3", 956 | "resolved": "https://registry.npmjs.org/pull-defer/-/pull-defer-0.2.3.tgz", 957 | "integrity": "sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==" 958 | }, 959 | "pull-pushable": { 960 | "version": "2.2.0", 961 | "resolved": "https://registry.npmjs.org/pull-pushable/-/pull-pushable-2.2.0.tgz", 962 | "integrity": "sha1-Xy867UethpGfAbEqLpnW8b13ZYE=" 963 | }, 964 | "pull-stream": { 965 | "version": "3.6.9", 966 | "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.9.tgz", 967 | "integrity": "sha512-hJn4POeBrkttshdNl0AoSCVjMVSuBwuHocMerUdoZ2+oIUzrWHFTwJMlbHND7OiKLVgvz6TFj8ZUVywUMXccbw==" 968 | }, 969 | "pull-stream-to-stream": { 970 | "version": "1.3.4", 971 | "resolved": "https://registry.npmjs.org/pull-stream-to-stream/-/pull-stream-to-stream-1.3.4.tgz", 972 | "integrity": "sha1-P4HYIWvRjSv9GhmBkEcRgOJzg5k=" 973 | }, 974 | "pull-traverse": { 975 | "version": "1.0.3", 976 | "resolved": "https://registry.npmjs.org/pull-traverse/-/pull-traverse-1.0.3.tgz", 977 | "integrity": "sha1-dPtde+f6a9enjpeTPhmbeUWGaTg=" 978 | }, 979 | "pump": { 980 | "version": "3.0.0", 981 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 982 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 983 | "requires": { 984 | "end-of-stream": "^1.1.0", 985 | "once": "^1.3.1" 986 | } 987 | }, 988 | "qs": { 989 | "version": "6.6.0", 990 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.6.0.tgz", 991 | "integrity": "sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA==" 992 | }, 993 | "readable-stream": { 994 | "version": "3.0.6", 995 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.0.6.tgz", 996 | "integrity": "sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==", 997 | "requires": { 998 | "inherits": "^2.0.3", 999 | "string_decoder": "^1.1.1", 1000 | "util-deprecate": "^1.0.1" 1001 | } 1002 | }, 1003 | "ripemd160": { 1004 | "version": "2.0.2", 1005 | "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", 1006 | "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", 1007 | "requires": { 1008 | "hash-base": "^3.0.0", 1009 | "inherits": "^2.0.1" 1010 | } 1011 | }, 1012 | "rsa-pem-to-jwk": { 1013 | "version": "1.1.3", 1014 | "resolved": "https://registry.npmjs.org/rsa-pem-to-jwk/-/rsa-pem-to-jwk-1.1.3.tgz", 1015 | "integrity": "sha1-JF52vbfnI0z+58oDLTG1TDj6uY4=", 1016 | "requires": { 1017 | "object-assign": "^2.0.0", 1018 | "rsa-unpack": "0.0.6" 1019 | } 1020 | }, 1021 | "rsa-unpack": { 1022 | "version": "0.0.6", 1023 | "resolved": "https://registry.npmjs.org/rsa-unpack/-/rsa-unpack-0.0.6.tgz", 1024 | "integrity": "sha1-9Q69VqYoN45jHylxYQJs6atO3bo=", 1025 | "requires": { 1026 | "optimist": "~0.3.5" 1027 | } 1028 | }, 1029 | "safe-buffer": { 1030 | "version": "5.1.2", 1031 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1032 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1033 | }, 1034 | "secp256k1": { 1035 | "version": "3.6.2", 1036 | "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz", 1037 | "integrity": "sha512-90nYt7yb0LmI4A2jJs1grglkTAXrBwxYAjP9bpeKjvJKOjG2fOeH/YI/lchDMIvjrOasd5QXwvV2jwN168xNng==", 1038 | "requires": { 1039 | "bindings": "^1.2.1", 1040 | "bip66": "^1.1.3", 1041 | "bn.js": "^4.11.3", 1042 | "create-hash": "^1.1.2", 1043 | "drbg.js": "^1.0.1", 1044 | "elliptic": "^6.2.3", 1045 | "nan": "^2.2.1", 1046 | "safe-buffer": "^5.1.0" 1047 | } 1048 | }, 1049 | "sha.js": { 1050 | "version": "2.4.11", 1051 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", 1052 | "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", 1053 | "requires": { 1054 | "inherits": "^2.0.1", 1055 | "safe-buffer": "^5.0.1" 1056 | } 1057 | }, 1058 | "signed-varint": { 1059 | "version": "2.0.1", 1060 | "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz", 1061 | "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=", 1062 | "requires": { 1063 | "varint": "~5.0.0" 1064 | } 1065 | }, 1066 | "split2": { 1067 | "version": "2.2.0", 1068 | "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", 1069 | "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", 1070 | "requires": { 1071 | "through2": "^2.0.2" 1072 | } 1073 | }, 1074 | "stable": { 1075 | "version": "0.1.8", 1076 | "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", 1077 | "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" 1078 | }, 1079 | "stream-http": { 1080 | "version": "3.0.0", 1081 | "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.0.0.tgz", 1082 | "integrity": "sha512-JELJfd+btL9GHtxU3+XXhg9NLYrKFnhybfvRuDghtyVkOFydz3PKNT1df07AMr88qW03WHF+FSV0PySpXignCA==", 1083 | "requires": { 1084 | "builtin-status-codes": "^3.0.0", 1085 | "inherits": "^2.0.1", 1086 | "readable-stream": "^3.0.6", 1087 | "xtend": "^4.0.0" 1088 | } 1089 | }, 1090 | "stream-to-pull-stream": { 1091 | "version": "1.7.2", 1092 | "resolved": "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.2.tgz", 1093 | "integrity": "sha1-dXYJrhzr0zx0MtSvvjH/eGULnd4=", 1094 | "requires": { 1095 | "looper": "^3.0.0", 1096 | "pull-stream": "^3.2.3" 1097 | } 1098 | }, 1099 | "streamifier": { 1100 | "version": "0.1.1", 1101 | "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", 1102 | "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=" 1103 | }, 1104 | "string_decoder": { 1105 | "version": "1.1.1", 1106 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1107 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1108 | "requires": { 1109 | "safe-buffer": "~5.1.0" 1110 | } 1111 | }, 1112 | "tar-stream": { 1113 | "version": "1.6.2", 1114 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", 1115 | "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", 1116 | "requires": { 1117 | "bl": "^1.0.0", 1118 | "buffer-alloc": "^1.2.0", 1119 | "end-of-stream": "^1.0.0", 1120 | "fs-constants": "^1.0.0", 1121 | "readable-stream": "^2.3.0", 1122 | "to-buffer": "^1.1.1", 1123 | "xtend": "^4.0.0" 1124 | }, 1125 | "dependencies": { 1126 | "bl": { 1127 | "version": "1.2.2", 1128 | "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", 1129 | "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", 1130 | "requires": { 1131 | "readable-stream": "^2.3.5", 1132 | "safe-buffer": "^5.1.1" 1133 | } 1134 | }, 1135 | "readable-stream": { 1136 | "version": "2.3.6", 1137 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 1138 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 1139 | "requires": { 1140 | "core-util-is": "~1.0.0", 1141 | "inherits": "~2.0.3", 1142 | "isarray": "~1.0.0", 1143 | "process-nextick-args": "~2.0.0", 1144 | "safe-buffer": "~5.1.1", 1145 | "string_decoder": "~1.1.1", 1146 | "util-deprecate": "~1.0.1" 1147 | } 1148 | } 1149 | } 1150 | }, 1151 | "through2": { 1152 | "version": "2.0.5", 1153 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", 1154 | "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", 1155 | "requires": { 1156 | "readable-stream": "~2.3.6", 1157 | "xtend": "~4.0.1" 1158 | }, 1159 | "dependencies": { 1160 | "readable-stream": { 1161 | "version": "2.3.6", 1162 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 1163 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 1164 | "requires": { 1165 | "core-util-is": "~1.0.0", 1166 | "inherits": "~2.0.3", 1167 | "isarray": "~1.0.0", 1168 | "process-nextick-args": "~2.0.0", 1169 | "safe-buffer": "~5.1.1", 1170 | "string_decoder": "~1.1.1", 1171 | "util-deprecate": "~1.0.1" 1172 | } 1173 | } 1174 | } 1175 | }, 1176 | "to-buffer": { 1177 | "version": "1.1.1", 1178 | "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", 1179 | "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" 1180 | }, 1181 | "traverse": { 1182 | "version": "0.6.6", 1183 | "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", 1184 | "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" 1185 | }, 1186 | "tweetnacl": { 1187 | "version": "1.0.1", 1188 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.1.tgz", 1189 | "integrity": "sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A==" 1190 | }, 1191 | "typedarray": { 1192 | "version": "0.0.6", 1193 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 1194 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" 1195 | }, 1196 | "unique-by": { 1197 | "version": "1.0.0", 1198 | "resolved": "https://registry.npmjs.org/unique-by/-/unique-by-1.0.0.tgz", 1199 | "integrity": "sha1-UiDIa6e8Vy+3E610ZRRwy2RCEr0=" 1200 | }, 1201 | "ursa-optional": { 1202 | "version": "0.9.10", 1203 | "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.9.10.tgz", 1204 | "integrity": "sha512-RvEbhnxlggX4MXon7KQulTFiJQtLJZpSb9ZSa7ZTkOW0AzqiVTaLjI4vxaSzJBDH9dwZ3ltZadFiBaZslp6haA==", 1205 | "requires": { 1206 | "bindings": "^1.3.0", 1207 | "nan": "^2.11.1" 1208 | } 1209 | }, 1210 | "util-deprecate": { 1211 | "version": "1.0.2", 1212 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1213 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1214 | }, 1215 | "varint": { 1216 | "version": "5.0.0", 1217 | "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", 1218 | "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" 1219 | }, 1220 | "wordwrap": { 1221 | "version": "0.0.3", 1222 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 1223 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" 1224 | }, 1225 | "wrappy": { 1226 | "version": "1.0.2", 1227 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1228 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1229 | }, 1230 | "xtend": { 1231 | "version": "4.0.1", 1232 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", 1233 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" 1234 | } 1235 | } 1236 | } 1237 | -------------------------------------------------------------------------------- /ipld-blogs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipld-blogs", 3 | "version": "1.0.0", 4 | "description": "A sample blog management system using IPLD", 5 | "main": "index.js", 6 | "dependencies": { 7 | "cids": "^0.5.7", 8 | "ipfs-http-client": "^29.1.1" 9 | }, 10 | "devDependencies": {}, 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "author": "vasa", 15 | "license": "MIT", 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/vasa-develop/ipld-blogs.git" 19 | }, 20 | "keywords": [ 21 | "ipld", 22 | "ipfs", 23 | "vasa", 24 | "towardsblockchain", 25 | "ipfscloud" 26 | ], 27 | "bugs": { 28 | "url": "https://github.com/vasa-develop/ipld-blogs/issues" 29 | }, 30 | "homepage": "https://github.com/vasa-develop/ipld-blogs#readme" 31 | } 32 | -------------------------------------------------------------------------------- /ipld-blogs/publication.js: -------------------------------------------------------------------------------- 1 | /* 2 | PUBLICATION SYSTEM 3 | Adding new Author 4 | An author will have 5 | -> name 6 | -> profile 7 | Creating A Blog 8 | A Blog will have a: 9 | -> author 10 | -> content 11 | -> tags 12 | -> timeOfPublish 13 | Read a Blog 14 | What more we could do with this? 15 | Try Listing all Blogs for an author. 16 | Send me solution at hi@simpleaswater.com and get SimpleAsWater T-Shirts 17 | */ 18 | 19 | //Initiate ipfs and CID instance 20 | const ipfsClient = require('ipfs-http-client'); 21 | const CID = require('cids'); 22 | 23 | //Connecting ipfs http client instance to local IPFS peer. 24 | const ipfs = new ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' }); 25 | 26 | //Create an Author 27 | async function addNewAuthor(name) { 28 | //creating blog author object 29 | var newAuthor = await ipfs.dag.put({ 30 | name: name, 31 | profile: "@SimpleAsWater | @TowardsBlockChain, an MIT CIC incubated startup | https://vaibhavsaini.com" 32 | }); 33 | 34 | console.log("Added new Author " + name + ": " + newAuthor); 35 | 36 | return newAuthor; 37 | } 38 | 39 | //Creating a Blog 40 | async function createBlog(author, content, tags) { 41 | 42 | //creating blog object 43 | var post = await ipfs.dag.put({ 44 | author: author, 45 | content: content, 46 | tags: tags, 47 | timeOfPublish: Date() 48 | }); 49 | 50 | //Fetching multihash buffer from cid object. 51 | const multihash = post.multihash; 52 | 53 | //passing multihash buffer to CID object to convert multihash to a readable format 54 | const cids = new CID(1, 'dag-cbor', multihash); 55 | 56 | console.log("Published a new Post by " + author + ": " + cids.toBaseEncodedString()); 57 | 58 | return cids.toBaseEncodedString(); 59 | 60 | } 61 | 62 | //Read a blog 63 | async function readBlog(postCID) { 64 | ipfs.dag.get(postCID, (err, result) => { 65 | if (err) { 66 | console.error('Error while reading post: ' + err) 67 | } else { 68 | console.log("Post Details\n", result); 69 | return result; 70 | } 71 | }); 72 | } 73 | 74 | 75 | function startPublication() { 76 | addNewAuthor("vasa").then((newAuthor) => { 77 | createBlog(newAuthor, "my first post", ["ipfs", "ipld", "vasa", "towardsblockchain"]).then((postCID) => { 78 | readBlog(postCID); 79 | }) 80 | }); 81 | } 82 | 83 | startPublication(); -------------------------------------------------------------------------------- /ipns-tutorial/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /ipns-tutorial/README.md: -------------------------------------------------------------------------------- 1 | # Understanding IPNS(InterPlanetary Naming System) 2 | This tutorial is a part of Medium Article Series ***"Understanding IPFS in Depth"*** authored by [**vasa**](https://vaibhavsaini.com). 3 | 4 | You can read the full article here: [*Understanding IPFS in Depth(3/6): What is InterPlanetary Naming System(IPNS)?*](https://hackernoon.com/understanding-ipfs-in-depth-3-6-what-is-interplanetary-naming-system-ipns-9aca71e4c13b). 5 | 6 | ## Running this tutorial 7 | * Run `npm install` to install the dependencies. 8 | * Run `node index.js` to run the ipns tutorial. 9 | -------------------------------------------------------------------------------- /ipns-tutorial/index.js: -------------------------------------------------------------------------------- 1 | const ipns = require('ipns'); 2 | const crypto = require('libp2p-crypto'); //for generating RSA keypair 3 | 4 | 5 | function generateRsaKeypair(){ 6 | //generating an 2048 bit RSA keypair 7 | crypto.keys.generateKeyPair('RSA', 2048, async(err, keypair) => { 8 | if(err){ 9 | console.log('error ', err); 10 | } 11 | else{ 12 | console.log("\nGenerated new RSA Keypair\n"); 13 | createIpnsRecord(keypair); 14 | } 15 | }); 16 | } 17 | 18 | 19 | /* 20 | Creating an IPNS record with a lifetime 21 | 22 | ipns.create(privateKey, value, sequenceNumber, lifetime, [callback]) 23 | 24 | privateKey (PrivKey RSA Instance): key to be used for cryptographic operations. 25 | value (string): ipfs path of the object to be published. 26 | sequenceNumber (Number): number representing the current version of the record. 27 | lifetime (string): lifetime of the record (in milliseconds). 28 | callback (function): operation result. 29 | */ 30 | function createIpnsRecord(keypair){ 31 | let sequenceNumber = 0; 32 | let lifetime = 1000000; //1000000 milliseconds 33 | let value = 'QmYVd8qstdXtTd1quwv4nJen6XprykxQRLo67Jy7WyiLMB'; //hash to my website 34 | var recordData; 35 | ipns.create(keypair, value, sequenceNumber, lifetime, (err, entryData) => { 36 | if(!err){ 37 | //Created new IPNS record 38 | console.log("\nGenerated new IPNS record\n"); 39 | console.log(entryData); 40 | validateIpnsRecord(entryData, keypair); 41 | } 42 | }); 43 | } 44 | 45 | /* 46 | Creating an IPNS record with a fixed expiration datetime. 47 | 48 | ipns.createWithExpiration(rsa, value, sequenceNumber, expiration, [callback]) 49 | 50 | privateKey (PrivKey RSA Instance): key to be used for cryptographic operations. 51 | value (string): ipfs path of the object to be published. 52 | sequenceNumber (Number): number representing the current version of the record. 53 | expiration (Date): Date object. 54 | callback (function): operation result. 55 | 56 | */ 57 | function createIpnsRecordWithExpiration(keypair){ 58 | ipns.createWithExpiration(keypair, value, sequenceNumber, expiration, (err, entryData)=>{ 59 | if(!err){ 60 | validateIpnsRecord(entryData); 61 | } 62 | }); 63 | } 64 | 65 | 66 | /* 67 | Validate an IPNS record previously stored in a protocol buffer. 68 | 69 | ipns.validate(publicKey, ipnsEntry, [callback]) 70 | 71 | publicKey (PubKey RSA Instance): key to be used for cryptographic operations. 72 | ipnsEntry (Object): ipns entry record (obtained using the create function). 73 | callback (function): operation result. 74 | */ 75 | function validateIpnsRecord(entryData, keypair){ 76 | ipns.validate(keypair.public, entryData, (err)=>{ 77 | //if no err then the validation was successful 78 | if(!err){ 79 | console.log('\nIPNS Record Validation Successful\n'); 80 | } 81 | }); 82 | } 83 | 84 | generateRsaKeypair(); -------------------------------------------------------------------------------- /ipns-tutorial/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipns-tutorial", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "asmcrypto.js": { 8 | "version": "2.3.2", 9 | "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz", 10 | "integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA==" 11 | }, 12 | "asn1.js": { 13 | "version": "5.0.1", 14 | "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.0.1.tgz", 15 | "integrity": "sha512-aO8EaEgbgqq77IEw+1jfx5c9zTbzvkfuRBuZsSsPnTHMkmd5AI4J6OtITLZFa381jReeaQL67J0GBTUu0+ZTVw==", 16 | "requires": { 17 | "bn.js": "^4.0.0", 18 | "inherits": "^2.0.1", 19 | "minimalistic-assert": "^1.0.0" 20 | } 21 | }, 22 | "async": { 23 | "version": "2.6.2", 24 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", 25 | "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", 26 | "requires": { 27 | "lodash": "^4.17.11" 28 | } 29 | }, 30 | "base-x": { 31 | "version": "3.0.5", 32 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.5.tgz", 33 | "integrity": "sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA==", 34 | "requires": { 35 | "safe-buffer": "^5.0.1" 36 | } 37 | }, 38 | "base32-encode": { 39 | "version": "1.1.1", 40 | "resolved": "https://registry.npmjs.org/base32-encode/-/base32-encode-1.1.1.tgz", 41 | "integrity": "sha512-eqa0BeGghj3guezlasdHJhr3+J5ZbbQvxeprkcDMbRQrjlqOT832IUDT4Al4ofAwekFYMqkkM9KMUHs9Cu0HKA==" 42 | }, 43 | "bindings": { 44 | "version": "1.5.0", 45 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 46 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 47 | "requires": { 48 | "file-uri-to-path": "1.0.0" 49 | } 50 | }, 51 | "bip66": { 52 | "version": "1.1.5", 53 | "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", 54 | "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", 55 | "requires": { 56 | "safe-buffer": "^5.0.1" 57 | } 58 | }, 59 | "blakejs": { 60 | "version": "1.1.0", 61 | "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", 62 | "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" 63 | }, 64 | "bn.js": { 65 | "version": "4.11.8", 66 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", 67 | "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" 68 | }, 69 | "brorand": { 70 | "version": "1.1.0", 71 | "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", 72 | "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" 73 | }, 74 | "browserify-aes": { 75 | "version": "1.2.0", 76 | "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", 77 | "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", 78 | "requires": { 79 | "buffer-xor": "^1.0.3", 80 | "cipher-base": "^1.0.0", 81 | "create-hash": "^1.1.0", 82 | "evp_bytestokey": "^1.0.3", 83 | "inherits": "^2.0.1", 84 | "safe-buffer": "^5.0.1" 85 | } 86 | }, 87 | "bs58": { 88 | "version": "4.0.1", 89 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 90 | "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", 91 | "requires": { 92 | "base-x": "^3.0.2" 93 | } 94 | }, 95 | "buffer-xor": { 96 | "version": "1.0.3", 97 | "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", 98 | "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" 99 | }, 100 | "cipher-base": { 101 | "version": "1.0.4", 102 | "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", 103 | "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", 104 | "requires": { 105 | "inherits": "^2.0.1", 106 | "safe-buffer": "^5.0.1" 107 | } 108 | }, 109 | "class-is": { 110 | "version": "1.1.0", 111 | "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", 112 | "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" 113 | }, 114 | "create-hash": { 115 | "version": "1.2.0", 116 | "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", 117 | "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", 118 | "requires": { 119 | "cipher-base": "^1.0.1", 120 | "inherits": "^2.0.1", 121 | "md5.js": "^1.3.4", 122 | "ripemd160": "^2.0.1", 123 | "sha.js": "^2.4.0" 124 | } 125 | }, 126 | "create-hmac": { 127 | "version": "1.1.7", 128 | "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", 129 | "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", 130 | "requires": { 131 | "cipher-base": "^1.0.3", 132 | "create-hash": "^1.1.0", 133 | "inherits": "^2.0.1", 134 | "ripemd160": "^2.0.0", 135 | "safe-buffer": "^5.0.1", 136 | "sha.js": "^2.4.8" 137 | } 138 | }, 139 | "debug": { 140 | "version": "4.1.1", 141 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 142 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 143 | "requires": { 144 | "ms": "^2.1.1" 145 | } 146 | }, 147 | "drbg.js": { 148 | "version": "1.0.1", 149 | "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", 150 | "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", 151 | "requires": { 152 | "browserify-aes": "^1.0.6", 153 | "create-hash": "^1.1.2", 154 | "create-hmac": "^1.1.4" 155 | } 156 | }, 157 | "elliptic": { 158 | "version": "6.4.1", 159 | "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", 160 | "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", 161 | "requires": { 162 | "bn.js": "^4.4.0", 163 | "brorand": "^1.0.1", 164 | "hash.js": "^1.0.0", 165 | "hmac-drbg": "^1.0.0", 166 | "inherits": "^2.0.1", 167 | "minimalistic-assert": "^1.0.0", 168 | "minimalistic-crypto-utils": "^1.0.0" 169 | } 170 | }, 171 | "err-code": { 172 | "version": "1.1.2", 173 | "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", 174 | "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" 175 | }, 176 | "evp_bytestokey": { 177 | "version": "1.0.3", 178 | "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", 179 | "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", 180 | "requires": { 181 | "md5.js": "^1.3.4", 182 | "safe-buffer": "^5.1.1" 183 | } 184 | }, 185 | "file-uri-to-path": { 186 | "version": "1.0.0", 187 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 188 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 189 | }, 190 | "hash-base": { 191 | "version": "3.0.4", 192 | "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", 193 | "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", 194 | "requires": { 195 | "inherits": "^2.0.1", 196 | "safe-buffer": "^5.0.1" 197 | } 198 | }, 199 | "hash.js": { 200 | "version": "1.1.7", 201 | "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", 202 | "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", 203 | "requires": { 204 | "inherits": "^2.0.3", 205 | "minimalistic-assert": "^1.0.1" 206 | } 207 | }, 208 | "hmac-drbg": { 209 | "version": "1.0.1", 210 | "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", 211 | "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", 212 | "requires": { 213 | "hash.js": "^1.0.3", 214 | "minimalistic-assert": "^1.0.0", 215 | "minimalistic-crypto-utils": "^1.0.1" 216 | } 217 | }, 218 | "inherits": { 219 | "version": "2.0.3", 220 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 221 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 222 | }, 223 | "interface-datastore": { 224 | "version": "0.6.0", 225 | "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-0.6.0.tgz", 226 | "integrity": "sha512-aDbjWsEdTHd2Yc2A8QOeAEWMwlWDwumVX24bE0/AE7XxfDveWuDUKP7HQito0u1c80FZmR+y/Op14um+cG0CSw==", 227 | "requires": { 228 | "async": "^2.6.1", 229 | "class-is": "^1.1.0", 230 | "err-code": "^1.1.2", 231 | "pull-defer": "~0.2.3", 232 | "pull-stream": "^3.6.9", 233 | "uuid": "^3.2.2" 234 | } 235 | }, 236 | "ipns": { 237 | "version": "0.5.0", 238 | "resolved": "https://registry.npmjs.org/ipns/-/ipns-0.5.0.tgz", 239 | "integrity": "sha512-Uf/VWftFnCI0UtjL8VyGRgq62k5PrRzJrA0G43WoIuw7FNk6ggrt+3KAzhlukbYtlHYhOLWwF5eLDllqvurE6g==", 240 | "requires": { 241 | "base32-encode": "^1.1.0", 242 | "debug": "^4.1.1", 243 | "interface-datastore": "~0.6.0", 244 | "left-pad": "^1.3.0", 245 | "libp2p-crypto": "~0.16.0", 246 | "multihashes": "~0.4.14", 247 | "peer-id": "~0.12.2", 248 | "protons": "^1.0.1", 249 | "timestamp-nano": "^1.0.0" 250 | } 251 | }, 252 | "is-promise": { 253 | "version": "1.0.1", 254 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", 255 | "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=" 256 | }, 257 | "iso-random-stream": { 258 | "version": "1.1.0", 259 | "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.0.tgz", 260 | "integrity": "sha512-ywSWt0KrWcsaK0jVoVJIR30rLyjg9Rw3k2Sm/qp+3tdtSV0SNH7L7KilKnENcENOSoJxDFvpt2idvuMMQohdCQ==" 261 | }, 262 | "js-sha3": { 263 | "version": "0.8.0", 264 | "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", 265 | "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" 266 | }, 267 | "keypair": { 268 | "version": "1.0.1", 269 | "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.1.tgz", 270 | "integrity": "sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs=" 271 | }, 272 | "left-pad": { 273 | "version": "1.3.0", 274 | "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", 275 | "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==" 276 | }, 277 | "libp2p-crypto": { 278 | "version": "0.16.1", 279 | "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.1.tgz", 280 | "integrity": "sha512-+fxqy+cDjwOKK4KTj44WQmjPE5ep2eR5uAIQWHl/+RKvRSor3+RAY53VWkAecgAEvjX2AswxBsoCIJK1Qk5aIQ==", 281 | "requires": { 282 | "asmcrypto.js": "^2.3.2", 283 | "asn1.js": "^5.0.1", 284 | "async": "^2.6.1", 285 | "bn.js": "^4.11.8", 286 | "browserify-aes": "^1.2.0", 287 | "bs58": "^4.0.1", 288 | "iso-random-stream": "^1.1.0", 289 | "keypair": "^1.0.1", 290 | "libp2p-crypto-secp256k1": "~0.3.0", 291 | "multihashing-async": "~0.5.1", 292 | "node-forge": "~0.7.6", 293 | "pem-jwk": "^2.0.0", 294 | "protons": "^1.0.1", 295 | "rsa-pem-to-jwk": "^1.1.3", 296 | "tweetnacl": "^1.0.0", 297 | "ursa-optional": "~0.9.10" 298 | } 299 | }, 300 | "libp2p-crypto-secp256k1": { 301 | "version": "0.3.0", 302 | "resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.3.0.tgz", 303 | "integrity": "sha512-+rF3S5p2pzS4JLDwVE6gLWZeaKkpl4NkYwG+0knV6ot29UcRSb73OyCWl07r1h5+g9E3KZC3wpsu+RIK5w8zQA==", 304 | "requires": { 305 | "async": "^2.6.1", 306 | "bs58": "^4.0.1", 307 | "multihashing-async": "~0.5.1", 308 | "nodeify": "^1.0.1", 309 | "safe-buffer": "^5.1.2", 310 | "secp256k1": "^3.6.1" 311 | } 312 | }, 313 | "lodash": { 314 | "version": "4.17.15", 315 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 316 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" 317 | }, 318 | "md5.js": { 319 | "version": "1.3.5", 320 | "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", 321 | "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", 322 | "requires": { 323 | "hash-base": "^3.0.0", 324 | "inherits": "^2.0.1", 325 | "safe-buffer": "^5.1.2" 326 | } 327 | }, 328 | "minimalistic-assert": { 329 | "version": "1.0.1", 330 | "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", 331 | "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" 332 | }, 333 | "minimalistic-crypto-utils": { 334 | "version": "1.0.1", 335 | "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", 336 | "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" 337 | }, 338 | "ms": { 339 | "version": "2.1.1", 340 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 341 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 342 | }, 343 | "multihashes": { 344 | "version": "0.4.14", 345 | "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.14.tgz", 346 | "integrity": "sha512-V/g/EIN6nALXfS/xHUAgtfPP3mn3sPIF/i9beuGKf25QXS2QZYCpeVJbDPEannkz32B2fihzCe2D/KMrbcmefg==", 347 | "requires": { 348 | "bs58": "^4.0.1", 349 | "varint": "^5.0.0" 350 | } 351 | }, 352 | "multihashing-async": { 353 | "version": "0.5.2", 354 | "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz", 355 | "integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==", 356 | "requires": { 357 | "blakejs": "^1.1.0", 358 | "js-sha3": "~0.8.0", 359 | "multihashes": "~0.4.13", 360 | "murmurhash3js": "^3.0.1", 361 | "nodeify": "^1.0.1" 362 | } 363 | }, 364 | "murmurhash3js": { 365 | "version": "3.0.1", 366 | "resolved": "https://registry.npmjs.org/murmurhash3js/-/murmurhash3js-3.0.1.tgz", 367 | "integrity": "sha1-Ppg+W0fCoG9DpxMXTn5DXKBEuZg=" 368 | }, 369 | "nan": { 370 | "version": "2.12.1", 371 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", 372 | "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" 373 | }, 374 | "node-forge": { 375 | "version": "0.7.6", 376 | "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", 377 | "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" 378 | }, 379 | "nodeify": { 380 | "version": "1.0.1", 381 | "resolved": "https://registry.npmjs.org/nodeify/-/nodeify-1.0.1.tgz", 382 | "integrity": "sha1-ZKtpp7268DzhB7TwM1yHwLnpGx0=", 383 | "requires": { 384 | "is-promise": "~1.0.0", 385 | "promise": "~1.3.0" 386 | } 387 | }, 388 | "object-assign": { 389 | "version": "2.1.1", 390 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", 391 | "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" 392 | }, 393 | "optimist": { 394 | "version": "0.3.7", 395 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", 396 | "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", 397 | "requires": { 398 | "wordwrap": "~0.0.2" 399 | } 400 | }, 401 | "peer-id": { 402 | "version": "0.12.2", 403 | "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.2.tgz", 404 | "integrity": "sha512-pked3yPLcOcprH21OnYbJAzk9OgI/TDEqjJ0IfRJSVB/61ZyqU5VKO7cw7hul+YD8nTD79wM79xFRWN3f6otNg==", 405 | "requires": { 406 | "async": "^2.6.1", 407 | "class-is": "^1.1.0", 408 | "libp2p-crypto": "~0.16.0", 409 | "multihashes": "~0.4.13" 410 | } 411 | }, 412 | "pem-jwk": { 413 | "version": "2.0.0", 414 | "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz", 415 | "integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==", 416 | "requires": { 417 | "asn1.js": "^5.0.1" 418 | } 419 | }, 420 | "promise": { 421 | "version": "1.3.0", 422 | "resolved": "https://registry.npmjs.org/promise/-/promise-1.3.0.tgz", 423 | "integrity": "sha1-5cyaTIJ45GZP/twBx9qEhCsEAXU=", 424 | "requires": { 425 | "is-promise": "~1" 426 | } 427 | }, 428 | "protocol-buffers-schema": { 429 | "version": "3.3.2", 430 | "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz", 431 | "integrity": "sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w==" 432 | }, 433 | "protons": { 434 | "version": "1.0.1", 435 | "resolved": "https://registry.npmjs.org/protons/-/protons-1.0.1.tgz", 436 | "integrity": "sha512-+0ZKnfVs+4c43tbAQ5j0Mck8wPcLnlxUYzKQoB4iDW4ocdXGnN4P+0dDbgX1FTpoY9+7P2Tn2scJyHHqj+S/lQ==", 437 | "requires": { 438 | "protocol-buffers-schema": "^3.3.1", 439 | "safe-buffer": "^5.1.1", 440 | "signed-varint": "^2.0.1", 441 | "varint": "^5.0.0" 442 | } 443 | }, 444 | "pull-defer": { 445 | "version": "0.2.3", 446 | "resolved": "https://registry.npmjs.org/pull-defer/-/pull-defer-0.2.3.tgz", 447 | "integrity": "sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==" 448 | }, 449 | "pull-stream": { 450 | "version": "3.6.9", 451 | "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.9.tgz", 452 | "integrity": "sha512-hJn4POeBrkttshdNl0AoSCVjMVSuBwuHocMerUdoZ2+oIUzrWHFTwJMlbHND7OiKLVgvz6TFj8ZUVywUMXccbw==" 453 | }, 454 | "ripemd160": { 455 | "version": "2.0.2", 456 | "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", 457 | "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", 458 | "requires": { 459 | "hash-base": "^3.0.0", 460 | "inherits": "^2.0.1" 461 | } 462 | }, 463 | "rsa-pem-to-jwk": { 464 | "version": "1.1.3", 465 | "resolved": "https://registry.npmjs.org/rsa-pem-to-jwk/-/rsa-pem-to-jwk-1.1.3.tgz", 466 | "integrity": "sha1-JF52vbfnI0z+58oDLTG1TDj6uY4=", 467 | "requires": { 468 | "object-assign": "^2.0.0", 469 | "rsa-unpack": "0.0.6" 470 | } 471 | }, 472 | "rsa-unpack": { 473 | "version": "0.0.6", 474 | "resolved": "https://registry.npmjs.org/rsa-unpack/-/rsa-unpack-0.0.6.tgz", 475 | "integrity": "sha1-9Q69VqYoN45jHylxYQJs6atO3bo=", 476 | "requires": { 477 | "optimist": "~0.3.5" 478 | } 479 | }, 480 | "safe-buffer": { 481 | "version": "5.1.2", 482 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 483 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 484 | }, 485 | "secp256k1": { 486 | "version": "3.6.2", 487 | "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz", 488 | "integrity": "sha512-90nYt7yb0LmI4A2jJs1grglkTAXrBwxYAjP9bpeKjvJKOjG2fOeH/YI/lchDMIvjrOasd5QXwvV2jwN168xNng==", 489 | "requires": { 490 | "bindings": "^1.2.1", 491 | "bip66": "^1.1.3", 492 | "bn.js": "^4.11.3", 493 | "create-hash": "^1.1.2", 494 | "drbg.js": "^1.0.1", 495 | "elliptic": "^6.2.3", 496 | "nan": "^2.2.1", 497 | "safe-buffer": "^5.1.0" 498 | } 499 | }, 500 | "sha.js": { 501 | "version": "2.4.11", 502 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", 503 | "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", 504 | "requires": { 505 | "inherits": "^2.0.1", 506 | "safe-buffer": "^5.0.1" 507 | } 508 | }, 509 | "signed-varint": { 510 | "version": "2.0.1", 511 | "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz", 512 | "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=", 513 | "requires": { 514 | "varint": "~5.0.0" 515 | } 516 | }, 517 | "timestamp-nano": { 518 | "version": "1.0.0", 519 | "resolved": "https://registry.npmjs.org/timestamp-nano/-/timestamp-nano-1.0.0.tgz", 520 | "integrity": "sha512-NO/1CZigzlCWQiWdIGv8ebXt6Uk77zdLz2NE7KcZRU5Egj2+947lzUpk30xQUQlq5dRY25j7ZulG4RfA2DHYfA==" 521 | }, 522 | "tweetnacl": { 523 | "version": "1.0.1", 524 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.1.tgz", 525 | "integrity": "sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A==" 526 | }, 527 | "ursa-optional": { 528 | "version": "0.9.10", 529 | "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.9.10.tgz", 530 | "integrity": "sha512-RvEbhnxlggX4MXon7KQulTFiJQtLJZpSb9ZSa7ZTkOW0AzqiVTaLjI4vxaSzJBDH9dwZ3ltZadFiBaZslp6haA==", 531 | "requires": { 532 | "bindings": "^1.3.0", 533 | "nan": "^2.11.1" 534 | } 535 | }, 536 | "uuid": { 537 | "version": "3.3.2", 538 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", 539 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" 540 | }, 541 | "varint": { 542 | "version": "5.0.0", 543 | "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", 544 | "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" 545 | }, 546 | "wordwrap": { 547 | "version": "0.0.3", 548 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 549 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" 550 | } 551 | } 552 | } 553 | -------------------------------------------------------------------------------- /ipns-tutorial/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipns-tutorial", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "vasa", 10 | "license": "ISC", 11 | "dependencies": { 12 | "ipns": "^0.5.0", 13 | "libp2p-crypto": "^0.16.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /multiformats_tut/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /multiformats_tut/README.md: -------------------------------------------------------------------------------- 1 | # Understanding Multiformats 2 | This tutorial is a part of Medium Article Series ***"Understanding IPFS in Depth"*** authored by [**vasa**](https://vaibhavsaini.com). 3 | 4 | You can read the full article here: [*Understanding IPFS in Depth(4/6): What is MultiFormats?*](https://hackernoon.com/understanding-ipfs-in-depth-4-6-what-is-multiformats-cf25eef83966). 5 | 6 | ## Prerequisite 7 | 8 | Make sure that you have NodeJs installed. 9 | 10 | * [node](https://nodejs.org): version >= 8.0.0 11 | 12 | To test your installation, run the below command. 13 | 14 | ``` 15 | node --version 16 | 17 | //vXX.XX.X 18 | ``` 19 | 20 | ## Running this tutorial 21 | * Run `npm install` to install the dependencies. 22 | * Run `node multiaddr_tut.js` to run the tutorial on Multiaddr 23 | 24 | 25 | ## Bug, Fixes & Contributions 26 | We always welcome bug reports, bug fixes & contributions(PRs). 27 | - Add your bug reports [here](https://github.com/vasa-develop/ultimate-ipfs-series/issues/new) 28 | - Add your bug fixes and contributions(PRs) [here](https://github.com/vasa-develop/ultimate-ipfs-series/compare) 29 | -------------------------------------------------------------------------------- /multiformats_tut/multiaddr_tut.js: -------------------------------------------------------------------------------- 1 | var Multiaddr = require('multiaddr') 2 | 3 | var home = new Multiaddr('/ip4/127.0.0.1/tcp/80') 4 | // 5 | 6 | console.log(home.buffer) 7 | // 8 | 9 | console.log(home.toString()) 10 | // '/ip4/127.0.0.1/tcp/80' 11 | 12 | console.dir(home.protos()) 13 | // [ { code: 4, size: 32, name: 'ip4', resolvable: false, path: false }, 14 | // { code: 6, size: 16, name: 'tcp', resolvable: false, path: false } ] 15 | 16 | console.dir(home.nodeAddress()) 17 | // { family: 4, address: '127.0.0.1', port: '80' } 18 | 19 | var proxy = new Multiaddr('/ip4/192.168.2.1/tcp/3128') 20 | // 21 | 22 | var full = proxy.encapsulate(home) 23 | // 24 | 25 | console.log(full.toString()) 26 | // '/ip4/192.168.2.1/tcp/3128/ip4/127.0.0.1/tcp/80' -------------------------------------------------------------------------------- /multiformats_tut/multibase_tut.js: -------------------------------------------------------------------------------- 1 | const multibase = require('multibase') 2 | 3 | //Encodes a buffer into one of the supported encodings, prefixing it with the multibase code 4 | const encodedBuf = multibase.encode('base58btc', new Buffer.from('hey, how is it going')) 5 | console.log(encodedBuf) 6 | // 7 | 8 | //Checks if buffer or string is encoded 9 | const value = multibase.isEncoded(encodedBuf) 10 | console.log(value) 11 | // base58btc 12 | 13 | //Decodes a buffer or string 14 | const decodedBuf = multibase.decode(encodedBuf) 15 | console.log(decodedBuf.toString()) 16 | // hey, how is it going -------------------------------------------------------------------------------- /multiformats_tut/multicodec_tut.js: -------------------------------------------------------------------------------- 1 | const multicodec = require('multicodec') 2 | 3 | const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer) 4 | console.log(prefixedProtobuf) -------------------------------------------------------------------------------- /multiformats_tut/multihash_tut.js: -------------------------------------------------------------------------------- 1 | var multihash = require('multihashes') 2 | 3 | var buf = new Buffer.from('0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33', 'hex') 4 | console.log(buf) 5 | // < Buffer 0b ee c7 b5 ea 3f 0f db c9 5d 0d d4 7f 3c 5b c2 75 da 8a 33 > 6 | 7 | var encoded = multihash.encode(buf, 'sha1') 8 | console.log(encoded) 9 | // 10 | 11 | var decoded = multihash.decode(encoded) 12 | console.log(decoded) 13 | /** 14 | { 15 | code: 17, 16 | name: 'sha1', 17 | length: 20, 18 | digest: 19 | 20 | } 21 | */ -------------------------------------------------------------------------------- /multiformats_tut/multistream_tut.js: -------------------------------------------------------------------------------- 1 | const multistream = require('multistream-select') 2 | 3 | // encode some json 4 | const buf = new Buffer(JSON.stringify({ hello: 'world' })) 5 | 6 | const prefixedBuf = multistream.addPrefix('json', buf) // prepends multicodec ('json') 7 | console.log(prefixedBuf) 8 | // 9 | 10 | console.log(prefixedBuf.toString('hex')) 11 | // 062f6a736f6e2f7b2268656c6c6f223a22776f726c64227d 12 | 13 | // let's get the Codec and then get the data back 14 | 15 | const codec = multicodec.getCodec(prefixedBuf) 16 | console.log(codec) 17 | // json 18 | 19 | console.log(multistream.rmPrefix(prefixedBuf).toString()) 20 | // "{ \"hello\": \"world\" } -------------------------------------------------------------------------------- /multiformats_tut/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiformats_tut", 3 | "version": "1.0.0", 4 | "description": "A tutorial for Multiformats. Learn more about Multiformats: Understanding IPFS in Depth(4/6): What is MultiFormats?", 5 | "main": "multiaddr_tut.js", 6 | "dependencies": { 7 | "multiaddr": "^6.1.0", 8 | "multibase": "^0.6.0", 9 | "multihashes": "^0.4.14" 10 | }, 11 | "devDependencies": {}, 12 | "scripts": { 13 | "test": "echo \"Error: no test specified\" && exit 1" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/vasa-develop/ultimate-ipfs-series.git" 18 | }, 19 | "keywords": [ 20 | "multiformats", 21 | "ipfs", 22 | "clusterlabs", 23 | "multihash", 24 | "multiaddr", 25 | "multicodec", 26 | "multistream", 27 | "multistream-select", 28 | "multikey", 29 | "multigram" 30 | ], 31 | "author": "vasa-develop", 32 | "license": "MIT", 33 | "bugs": { 34 | "url": "https://github.com/vasa-develop/ultimate-ipfs-series/issues" 35 | }, 36 | "homepage": "https://github.com/vasa-develop/ultimate-ipfs-series#readme" 37 | } 38 | --------------------------------------------------------------------------------