ipfs-demo 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +16 -0
  2. package/package.json +70 -0
package/index.js ADDED
@@ -0,0 +1,16 @@
1
+ const { create } = require("ipfs-http-client");
2
+ const ipfsClient = async () => {
3
+ const ipfs = await create({
4
+ host: "ipfs.infura.io",
5
+ port: 5001,
6
+ protocol: "https",
7
+ });
8
+ return ipfs;
9
+ };
10
+ const addText = async () => {
11
+ const ipfs = await ipfsClient();
12
+ const saveData = await ipfs.add(JSON.stringify({ name: "sharvan" }));
13
+ console.log(saveData)
14
+ };
15
+
16
+ addText()
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "ipfs-demo",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "dependencies": {
7
+ "any-signal": "^3.0.1",
8
+ "balanced-match": "^1.0.2",
9
+ "blob-to-it": "^1.0.4",
10
+ "brace-expansion": "^1.1.11",
11
+ "browser-readablestream-to-it": "^1.0.3",
12
+ "concat-map": "^0.0.1",
13
+ "dag-jose": "^1.0.0",
14
+ "debug": "^4.3.4",
15
+ "dns-over-http-resolver": "^2.1.0",
16
+ "err-code": "^3.0.1",
17
+ "fast-fifo": "^1.1.0",
18
+ "get-iterator": "^1.0.2",
19
+ "inherits": "^2.0.4",
20
+ "interface-datastore": "^6.1.1",
21
+ "interface-store": "^2.0.2",
22
+ "ip-regex": "^5.0.0",
23
+ "ipfs-core-types": "^0.11.1",
24
+ "ipfs-core-utils": "^0.15.1",
25
+ "ipfs-http-client": "^54.0.1",
26
+ "ipfs-utils": "^9.0.7",
27
+ "is-electron": "^2.2.1",
28
+ "is-ip": "^4.0.0",
29
+ "is-plain-obj": "^2.1.0",
30
+ "iso-url": "^1.2.1",
31
+ "it-all": "^1.0.6",
32
+ "it-first": "^1.0.7",
33
+ "it-glob": "^1.0.2",
34
+ "it-last": "^1.0.6",
35
+ "it-map": "^1.0.6",
36
+ "it-peekable": "^1.0.3",
37
+ "it-pushable": "^2.0.2",
38
+ "it-stream-types": "^1.0.4",
39
+ "it-to-stream": "^1.0.0",
40
+ "long": "^4.0.0",
41
+ "merge-options": "^3.0.4",
42
+ "minimatch": "^3.1.2",
43
+ "ms": "^2.1.2",
44
+ "multiformats": "^9.7.1",
45
+ "nanoid": "^3.3.4",
46
+ "native-fetch": "^4.0.2",
47
+ "node-fetch": "^2.6.7",
48
+ "p-defer": "^3.0.0",
49
+ "p-fifo": "^1.0.0",
50
+ "parse-duration": "^1.0.2",
51
+ "protobufjs": "^6.11.3",
52
+ "react-native-fetch-api": "^2.0.0",
53
+ "readable-stream": "^3.6.0",
54
+ "receptacle": "^1.3.2",
55
+ "retimer": "^3.0.0",
56
+ "safe-buffer": "^5.2.1",
57
+ "stream-to-it": "^0.2.4",
58
+ "string_decoder": "^1.3.0",
59
+ "timeout-abort-controller": "^3.0.0",
60
+ "uint8arrays": "^3.1.0",
61
+ "util-deprecate": "^1.0.2",
62
+ "varint": "^6.0.0"
63
+ },
64
+ "scripts": {
65
+ "test": "echo \"Error: no test specified\" && exit 1"
66
+ },
67
+ "keywords": [],
68
+ "author": "",
69
+ "license": "ISC"
70
+ }