mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex.git
synced 2026-09-21 16:52:00 -07:00
feat(ipfs-coord): Added ipfs-coord and deps, got it working
This commit is contained in:
+5
-1
@@ -12,7 +12,7 @@ const cors = require('kcors')
|
||||
|
||||
// Local libraries
|
||||
const config = require('../config') // this first.
|
||||
|
||||
const IPFSLib = require('../src/lib/ipfs')
|
||||
const AdminLib = require('../src/lib/admin')
|
||||
const adminLib = new AdminLib()
|
||||
|
||||
@@ -70,6 +70,10 @@ async function startServer () {
|
||||
const success = await adminLib.createSystemUser()
|
||||
if (success) console.log('System admin user created.')
|
||||
|
||||
// Start the IPFS node.
|
||||
const ipfsLib = new IPFSLib()
|
||||
await ipfsLib.start()
|
||||
|
||||
return app
|
||||
}
|
||||
// startServer()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
£dnamex6QmWp3ah86DvCsYk57c6RQe89DPPBZtiDK8mGMNedWFgDTz21033018dtypeheventlogpaccessControllerx7/ipfs/zdpuAsYRtJLLLDibnmxWPzyRGJEqtjmJP27ppKWcLreNGGTFN
|
||||
Binary file not shown.
@@ -0,0 +1,55 @@
|
||||
|
||||
•␍�
|
||||
IPFS -- Inter-Planetary File system
|
||||
|
||||
IPFS is a global, versioned, peer-to-peer filesystem. It combines good ideas
|
||||
from Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single bit-
|
||||
torrent swarm, exchanging git objects. IPFS provides an interface as simple
|
||||
as the HTTP web, but with permanence built in. You can also mount the world
|
||||
at /ipfs.
|
||||
|
||||
IPFS is a protocol:
|
||||
- defines a content-addressed file system
|
||||
- coordinates content delivery
|
||||
- combines Kademlia + BitTorrent + Git
|
||||
|
||||
IPFS is a filesystem:
|
||||
- has directories and files
|
||||
- mountable filesystem (via FUSE)
|
||||
|
||||
IPFS is a web:
|
||||
- can be used to view documents like the web
|
||||
- files accessible via HTTP at `http://ipfs.io/<path>`
|
||||
- browsers or extensions can learn to use `ipfs://` directly
|
||||
- hash-addressed content guarantees authenticity
|
||||
|
||||
IPFS is modular:
|
||||
- connection layer over any network protocol
|
||||
- routing layer
|
||||
- uses a routing layer DHT (kademlia/coral)
|
||||
- uses a path-based naming service
|
||||
- uses bittorrent-inspired block exchange
|
||||
|
||||
IPFS uses crypto:
|
||||
- cryptographic-hash content addressing
|
||||
- block-level deduplication
|
||||
- file integrity + versioning
|
||||
- filesystem-level encryption + signing support
|
||||
|
||||
IPFS is p2p:
|
||||
- worldwide peer-to-peer file transfers
|
||||
- completely decentralized architecture
|
||||
- **no** central point of failure
|
||||
|
||||
IPFS is a cdn:
|
||||
- add a file to the filesystem locally, and it's now available to the world
|
||||
- caching-friendly (content-hash naming)
|
||||
- bittorrent-based bandwidth distribution
|
||||
|
||||
IPFS has a name service:
|
||||
- IPNS, an SFS inspired name system
|
||||
- global namespace based on PKI
|
||||
- serves to build trust chains
|
||||
- compatible with other NSes
|
||||
- can map DNS, .onion, .bit, etc to IPNS
|
||||
�␍
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
ªavbidxq/orbitdb/zdpuAs8sTLLbVEfvEtHZUjwGtHjPfHhaSeUM1kHPtLjXwtaY7/QmWp3ah86DvCsYk57c6RQe89DPPBZtiDK8mGMNedWFgDTz21033018ckeyx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40csigxŽ3045022100bec860340c746c745c63dbb1af607ef10f8380242a0b38a959defce852335b11022069f4226d996e410fffe661aea691f9d709c7ae19892f05be51b5f0194229bcfcdhashödnext€drefs€eclock¢bidx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40dtimegpayload£bopcADDckeyöevalue£ddatay¢04457e81d2c0f4e8c6d4540ab1034f93b04544b82a956334b6347b3ffc29cea49b741b13d3dd855a8d885225bf78ad93fa1bec0ddf3c1b39771bebbc6f6f9c31ae5651bf565c4b2d8e845409e4b93e456eec169fd582403a1c8cf05dad9bfd08a60f86fa7e5de7529a08ae33ee88a98e9ce9c47a3b4a9b5bde2a1e77201c123a82bede0da81464be5ad0053731bca67e80277b3737f0f767d10bb12f659a8e1d117d725fd674e0458dcdcd5fecefeb9b198ce0e9c93da1a783a7598ba624b9bc299ebd630f5d3f6d07419f4c7d2f9e2084dfromx.QmRrUu64cAnPntYiUc7xMunLKZgj1XZT5HmqJNtDMqQcD7itimestampx2021-03-31T00:38:33.033Zhidentity¤bidxB0231b1d215a01d2a1b4e3c6ed6faf3c392257d754bcbd8a542c67d9b70fe4d4ca2dtypegorbitdbipublicKeyx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40jsignatures¢bidxŒ304402206bf1908b0fa90699055a67c8b2b6443c213b59f58f0a6f6a84b48de1e58c4f4f022032711b7f0dd2d70557f210440da2afdf77b9fda35dd33b8ec4cf6a17746e1783ipublicKeyxŽ304502210094122a5333178a93411c4122d39e68e75791660d2f36ade1eee9161578ecb3ee022023853683457c28421ed7ab18cf027e597ebd00c67cd4c61fc97570abacc01153
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
|
||||
ŽCome hang out in our IRC chat room if you have any questions.
|
||||
|
||||
Contact the ipfs dev team:
|
||||
- Bugs: https://github.com/ipfs/go-ipfs/issues
|
||||
- Help: irc.freenode.org/#ipfs
|
||||
- Email: dev@ipfs.io
|
||||
½
|
||||
@@ -0,0 +1 @@
|
||||
」dnamex6QmZq6NwvY2oiqQ5a8ZinmRfrgMWLAdBy8ynGVuChpBoRyC21033018dtypeheventlogpaccessControllerx7/ipfs/zdpuAsYRtJLLLDibnmxWPzyRGJEqtjmJP27ppKWcLreNGGTFN
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
ªavbidxq/orbitdb/zdpuAvfbNhrcxLUFLpfkkmeiD2A14afGWd8ZmdTMAtz817EMT/QmRrUu64cAnPntYiUc7xMunLKZgj1XZT5HmqJNtDMqQcD721032416ckeyx‚04b80ce73adc9f8937b31b600ea9edf6d9382fd9e4939aae9f7c2080b3bb506c5785b85e3978a2a4d1d590b56be967986e83c4a99d5c0e6595263a2bf9c291166fcsigxŽ3045022100eb18f665a0f1ab9600b5d5e26656fc26f6c9c0a4d3e9f5e66bf4001fde348b5102201afe93e8836c870958c1670964ff6ee271015401997950a7916e7a06e402e035dhashödnext€drefs€eclock¢bidx‚04b80ce73adc9f8937b31b600ea9edf6d9382fd9e4939aae9f7c2080b3bb506c5785b85e3978a2a4d1d590b56be967986e83c4a99d5c0e6595263a2bf9c291166fdtimegpayload£bopcADDckeyöevalue£ddatay04ac0c921eb0e8c55311a1c9f3fb781e14d45a2acc23bae9e3455bc965cfe127ebb645f732a8f1a7d1ee924606ff03f800b934765144c71a33edf5fbc2e2c5cef393b590b56ee9834e8634edfce7fb8dd609d896a4a5d284dab1997c1a076b2943bb5020df1b3e1c46a3b6082e1c78b9c76f8f974d2ab17deb8a0aa053c53ec6d7dfromx.QmXaBzsQM112fHvuefnULmv3K6EQs7VDT7qbch3ES6Q3o6itimestampx2021-03-28T22:37:20.895Zhidentity¤bidxB02ce4f1d32ebf384b99ecf32f1acfdfe3292104ced3e721f2f61db942d885eb08bdtypegorbitdbipublicKeyx‚04b80ce73adc9f8937b31b600ea9edf6d9382fd9e4939aae9f7c2080b3bb506c5785b85e3978a2a4d1d590b56be967986e83c4a99d5c0e6595263a2bf9c291166fjsignatures¢bidxŽ3045022100d8897b944c66ea20daf090cd16d7636cf78e4ef92c7d61deb186ecf12d57e83302200380e03a40884e578474b323ca85292b7a9b0161433d035b84a3d72cce7152adipublicKeyxŒ30440220411063285ee4b8c420bae616ec16088c8506c2f3222c8696b1716b0701b82d22022021d2d07c82f83eb91e329a27d3f9f92c7563166b5b1f1db0e8eac01bf3ff7808
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
¿·Some helpful resources for finding your way around ipfs:
|
||||
|
||||
- quick-start: a quick show of various ipfs features.
|
||||
- ipfs commands: a list of all commands
|
||||
- ipfs --help: every command describes itself
|
||||
- https://github.com/ipfs/go-ipfs -- the src repository
|
||||
- #ipfs on irc.freenode.org -- the community irc channel
|
||||
·
|
||||
@@ -0,0 +1,115 @@
|
||||
|
||||
½␍µ␍# 0.1 - Quick Start
|
||||
|
||||
This is a set of short examples with minimal explanation. It is meant as
|
||||
a "quick start". Soon, we'll write a longer tour :-)
|
||||
|
||||
|
||||
Add a file to ipfs:
|
||||
|
||||
echo "hello world" >hello
|
||||
ipfs add hello
|
||||
|
||||
|
||||
View it:
|
||||
|
||||
ipfs cat <the-hash-you-got-here>
|
||||
|
||||
|
||||
Try a directory:
|
||||
|
||||
mkdir foo
|
||||
mkdir foo/bar
|
||||
echo "baz" > foo/baz
|
||||
echo "baz" > foo/bar/baz
|
||||
ipfs add -r foo
|
||||
|
||||
|
||||
View things:
|
||||
|
||||
ipfs ls <the-hash-here>
|
||||
ipfs ls <the-hash-here>/bar
|
||||
ipfs cat <the-hash-here>/baz
|
||||
ipfs cat <the-hash-here>/bar/baz
|
||||
ipfs cat <the-hash-here>/bar
|
||||
ipfs ls <the-hash-here>/baz
|
||||
|
||||
|
||||
References:
|
||||
|
||||
ipfs refs <the-hash-here>
|
||||
ipfs refs -r <the-hash-here>
|
||||
ipfs refs --help
|
||||
|
||||
|
||||
Get:
|
||||
|
||||
ipfs get <the-hash-here> -o foo2
|
||||
diff foo foo2
|
||||
|
||||
|
||||
Objects:
|
||||
|
||||
ipfs object get <the-hash-here>
|
||||
ipfs object get <the-hash-here>/foo2
|
||||
ipfs object --help
|
||||
|
||||
|
||||
Pin + GC:
|
||||
|
||||
ipfs pin add <the-hash-here>
|
||||
ipfs repo gc
|
||||
ipfs ls <the-hash-here>
|
||||
ipfs pin rm <the-hash-here>
|
||||
ipfs repo gc
|
||||
|
||||
|
||||
Daemon:
|
||||
|
||||
ipfs daemon (in another terminal)
|
||||
ipfs id
|
||||
|
||||
|
||||
Network:
|
||||
|
||||
(must be online)
|
||||
ipfs swarm peers
|
||||
ipfs id
|
||||
ipfs cat <hash-of-remote-object>
|
||||
|
||||
|
||||
Mount:
|
||||
|
||||
(warning: fuse is finicky!)
|
||||
ipfs mount
|
||||
cd /ipfs/<the-hash-here>
|
||||
ls
|
||||
|
||||
|
||||
Tool:
|
||||
|
||||
ipfs version
|
||||
ipfs update
|
||||
ipfs commands
|
||||
ipfs config --help
|
||||
open http://localhost:5001/webui
|
||||
|
||||
|
||||
Browse:
|
||||
|
||||
webui:
|
||||
|
||||
http://localhost:5001/webui
|
||||
|
||||
video:
|
||||
|
||||
http://localhost:8080/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXse
|
||||
|
||||
images:
|
||||
|
||||
http://localhost:8080/ipfs/QmZpc3HvfjEXvLWGQPWbHk3AjD5j8NEN4gmFN8Jmrd5g83/cs
|
||||
|
||||
markdown renderer app:
|
||||
|
||||
http://localhost:8080/ipfs/QmX7M9CiYXjVeFnkfVGf3y5ixTZ2ACeSGyL1vBJY1HvQPp/mdown
|
||||
µ␍
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
ªavbidxq/orbitdb/zdpuB2P9fSUfCBZ3ALartejGzHe1cdbFespEV1tfwAwnwrjLv/QmVFZAGXoqmbixYYDRjtp4dKqHSMpGvztapgVSEQAs83VN21033018ckeyx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40csigxŒ30440220380f1998f6167a9c4e53930aedfeee0647258154354b1af172361898c3f2b9bb022060b9ce9344710763f47a34f7c45e34159b0cacd22aae378766303f2bb1e01fc4dhashödnext€drefs€eclock¢bidx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40dtimegpayload£bopcADDckeyöevalue£ddatay¢0429c882829d54159df5fe8ef91f3ee9e4a7b300345841d1e9c6afd38528b798b75c2b053f57656b2ae2ded6291d250f469c6ecccd8aea188a57466a4a0d05bc6404be22eeadc62dd84476d9cedd6321ff0b9035bdafb06640373fdd07da14452024380a17c399a56a0f8b29c2a120981deccbbdf22f110ddff644bede46cbbf58e8ecb61cc39d633a17184914af0cbd2a3a8456a87eccf44bf66afbf10215a7e83c7777327effcbe2f08e487cb174875fd980508d69c999f0f76328f70f44f12d43a86c325c2ce26f901f1131d6c284b0dfromx.QmRrUu64cAnPntYiUc7xMunLKZgj1XZT5HmqJNtDMqQcD7itimestampx2021-03-31T00:43:32.857Zhidentity¤bidxB0231b1d215a01d2a1b4e3c6ed6faf3c392257d754bcbd8a542c67d9b70fe4d4ca2dtypegorbitdbipublicKeyx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40jsignatures¢bidxŒ304402206bf1908b0fa90699055a67c8b2b6443c213b59f58f0a6f6a84b48de1e58c4f4f022032711b7f0dd2d70557f210440da2afdf77b9fda35dd33b8ec4cf6a17746e1783ipublicKeyxŽ304502210094122a5333178a93411c4122d39e68e75791660d2f36ade1eee9161578ecb3ee022023853683457c28421ed7ab18cf027e597ebd00c67cd4c61fc97570abacc01153
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
|
||||
’ Š IPFS Alpha Security Notes
|
||||
|
||||
We try hard to ensure our system is safe and robust, but all software
|
||||
has bugs, especially new software. This distribution is meant to be an
|
||||
alpha preview, don't use it for anything mission critical.
|
||||
|
||||
Please note the following:
|
||||
|
||||
- This is alpha software and has not been audited. It is our goal
|
||||
to conduct a proper security audit once we close in on a 1.0 release.
|
||||
|
||||
- ipfs is a networked program, and may have serious undiscovered
|
||||
vulnerabilities. It is written in Go, and we do not execute any
|
||||
user provided data. But please point any problems out to us in a
|
||||
github issue, or email security@ipfs.io privately.
|
||||
|
||||
- security@ipfs.io GPG key:
|
||||
- 4B9665FB 92636D17 7C7A86D3 50AAE8A9 59B13AF3
|
||||
- https://pgp.mit.edu/pks/lookup?op=get&search=0x50AAE8A959B13AF3
|
||||
|
||||
- ipfs uses encryption for all communication, but it's NOT PROVEN SECURE
|
||||
YET! It may be totally broken. For now, the code is included to make
|
||||
sure we benchmark our operations with encryption in mind. In the future,
|
||||
there will be an "unsafe" mode for high performance intranet apps.
|
||||
If this is a blocking feature for you, please contact us.
|
||||
Š
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
|
||||
Index
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
¤œWIP
|
||||
|
||||
# 0.0 - Introduction
|
||||
|
||||
Welcome to IPFS! This tour will guide you through a few of the
|
||||
features of this tool, and the most common commands. Then, it will
|
||||
immerse you into the world of merkledags and the amazing things
|
||||
you can do with them.
|
||||
|
||||
|
||||
This tour has many parts, and can be taken in different sequences.
|
||||
Different people learn different ways, so choose your own adventure:
|
||||
|
||||
To start with the concepts, try:
|
||||
- The Merkle DAG
|
||||
- Data Structures on the Merkle DAG
|
||||
- Representing Files with unixfs
|
||||
- add, cat, ls, refs
|
||||
...
|
||||
|
||||
|
||||
To start with the examples, try:
|
||||
- add, cat, ls, refs
|
||||
- Representing Files with unixfs
|
||||
- Data Structures on the Merkle DAG
|
||||
- The Merkle DAG
|
||||
...
|
||||
|
||||
|
||||
To start with the network, try:
|
||||
- IPFS Nodes
|
||||
- Running the daemon
|
||||
- The Swarm
|
||||
- The Web
|
||||
œ
|
||||
@@ -0,0 +1,4 @@
|
||||
2
|
||||
" ’èžsÜL`•>¾P}ãÈD
|
||||
>ÚŸo_¸=¡"´u'Ò 0.0-intro§
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
ЛГHello and Welcome to IPFS!
|
||||
|
||||
в–€в–€в•—в–€в–€в–€в–€в–€в–€в•— в–€в–€в–€в–€в–€в–€в–€в•—в–€в–€в–€в–€в–€в–€в–€в•—
|
||||
в–€в–€в•‘в–€в–€в•”в•ђв•ђв–€в–€в•—в–€в–€в•”в•ђв•ђв•ђв•ђв•ќв–€в–€в•”в•ђв•ђв•ђв•ђв•ќ
|
||||
в–€в–€в•‘в–€в–€в–€в–€в–€в–€в•”в•ќв–€в–€в–€в–€в–€в•— в–€в–€в–€в–€в–€в–€в–€в•—
|
||||
в–€в–€в•‘в–€в–€в•”в•ђв•ђв•ђв•ќ в–€в–€в•”в•ђв•ђв•ќ в•љв•ђв•ђв•ђв•ђв–€в–€в•‘
|
||||
в–€в–€в•‘в–€в–€в•‘ в–€в–€в•‘ в–€в–€в–€в–€в–€в–€в–€в•‘
|
||||
в•љв•ђв•ќв•љв•ђв•ќ в•љв•ђв•ќ в•љв•ђв•ђв•ђв•ђв•ђв•ђв•ќ
|
||||
|
||||
If you're seeing this, you have successfully installed
|
||||
IPFS and are now interfacing with the ipfs merkledag!
|
||||
|
||||
-------------------------------------------------------
|
||||
| Warning: |
|
||||
| This is alpha software. Use at your own discretion! |
|
||||
| Much is missing or lacking polish. There are bugs. |
|
||||
| Not yet secure. Read the security notes for more. |
|
||||
-------------------------------------------------------
|
||||
|
||||
Check out some of the other files in this directory:
|
||||
|
||||
./about
|
||||
./help
|
||||
./quick-start <-- usage examples
|
||||
./readme <-- this file
|
||||
./security-notes
|
||||
Г
|
||||
@@ -0,0 +1 @@
|
||||
」dnamex6QmRrUu64cAnPntYiUc7xMunLKZgj1XZT5HmqJNtDMqQcD721032416dtypeheventlogpaccessControllerx7/ipfs/zdpuAsYRtJLLLDibnmxWPzyRGJEqtjmJP27ppKWcLreNGGTFN
|
||||
@@ -0,0 +1,3 @@
|
||||
-
|
||||
" õR ;�—¿ˆfq�aU¿õ0[Xè@÷8Ó·O§¦index
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
/repo/flatfs/shard/v1/next-to-last/2
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
¢dtypedipfsfparams¡gaddressx1zdpuAts3TrKq8itLR1uSZPVfmiRbF8wGxJ6ioCb33EoDHd4Pi
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
£dnamex6QmVFZAGXoqmbixYYDRjtp4dKqHSMpGvztapgVSEQAs83VN21033018dtypeheventlogpaccessControllerx7/ipfs/zdpuAsYRtJLLLDibnmxWPzyRGJEqtjmJP27ppKWcLreNGGTFN
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
ªavbidxq/orbitdb/zdpuAuHRFbYtgxaxaJDVSWtgVQZXzuQXi9YuYtgUZpvurP7WW/QmZq6NwvY2oiqQ5a8ZinmRfrgMWLAdBy8ynGVuChpBoRyC21033018ckeyx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40csigxŽ3045022100a7b9d38f7da564c2225f813b8e7c3a645dd48dce930c63bb9d0bc622a2e1b45f02207c6d35813b5769f4675ffbac76ac07ca72d9ca73bed4407a3e6bf1d55c6d5b98dhashödnext€drefs€eclock¢bidx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40dtimegpayload£bopcADDckeyöevalue£ddatay¢04503863edafd1c53ad3d4c35c0d62148ba05f8e936f98cd3305d39cde82faebf4d99b3395a0f42c6c0c460e2649e60041fe860cd4079df6ff2b8c291524d373a508979b63f49c718d4c20aa714b69f8b74628a8fb5d419b20dbe0c5dda8582db7b631c22ee1beb4c3d492560c51cf857ccda651cf266047ec70737626c906a46b3a6d52ea1c2369b8d7664ceb1b66904500344b94f90ad9230a1b102d8a9c7efa9e0f9722a6deb3230037094410bc944302f2f178693297b12d0e2d9d83d2dcd448c1f78462893f2199b0eda9b8766f76dfromx.QmRrUu64cAnPntYiUc7xMunLKZgj1XZT5HmqJNtDMqQcD7itimestampx2021-03-31T00:41:32.971Zhidentity¤bidxB0231b1d215a01d2a1b4e3c6ed6faf3c392257d754bcbd8a542c67d9b70fe4d4ca2dtypegorbitdbipublicKeyx‚0470eb9ec9e1c7fdcbab43b0dd24664b06f723548094d7eb7814cb78f2311fd65059c341f0b0bd12c17314081e94b897e90b94d1c33927e399ad3152082d739b40jsignatures¢bidxŒ304402206bf1908b0fa90699055a67c8b2b6443c213b59f58f0a6f6a84b48de1e58c4f4f022032711b7f0dd2d70557f210440da2afdf77b9fda35dd33b8ec4cf6a17746e1783ipublicKeyxŽ304502210094122a5333178a93411c4122d39e68e75791660d2f36ade1eee9161578ecb3ee022023853683457c28421ed7ab18cf027e597ebd00c67cd4c61fc97570abacc01153
|
||||
@@ -0,0 +1,3 @@
|
||||
Ąewritei[
|
||||
"*"
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
This is a repository of IPLD objects. Each IPLD object is in a single file,
|
||||
named <base32 encoding of cid>.data. Where <base32 encoding of cid> is the
|
||||
"base32" encoding of the CID (as specified in
|
||||
https://github.com/multiformats/multibase) without the 'B' prefix.
|
||||
All the object files are placed in a tree of directories, based on a
|
||||
function of the CID. This is a form of sharding similar to
|
||||
the objects directory in git repositories. Previously, we used
|
||||
prefixes, we now use the next-to-last two charters.
|
||||
func NextToLast(base32cid string) {
|
||||
nextToLastLen := 2
|
||||
offset := len(base32cid) - nextToLastLen - 1
|
||||
return str[offset : offset+nextToLastLen]
|
||||
}
|
||||
For example, an object with a base58 CIDv1 of
|
||||
zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f
|
||||
has a base32 CIDv1 of
|
||||
BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA
|
||||
and will be placed at
|
||||
SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data
|
||||
with 'SC' being the last-to-next two characters and the 'B' at the
|
||||
beginning of the CIDv1 string is the multibase prefix that is not
|
||||
stored in the filename.
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"Addresses": {
|
||||
"Swarm": [
|
||||
"/ip4/0.0.0.0/tcp/4002",
|
||||
"/ip4/127.0.0.1/tcp/4003/ws"
|
||||
],
|
||||
"Announce": [],
|
||||
"API": "/ip4/127.0.0.1/tcp/5002",
|
||||
"Gateway": "/ip4/127.0.0.1/tcp/9090",
|
||||
"RPC": "/ip4/127.0.0.1/tcp/5003",
|
||||
"Delegates": [
|
||||
"/dns4/node0.delegate.ipfs.io/tcp/443/https",
|
||||
"/dns4/node1.delegate.ipfs.io/tcp/443/https",
|
||||
"/dns4/node2.delegate.ipfs.io/tcp/443/https",
|
||||
"/dns4/node3.delegate.ipfs.io/tcp/443/https"
|
||||
]
|
||||
},
|
||||
"Discovery": {
|
||||
"MDNS": {
|
||||
"Enabled": true,
|
||||
"Interval": 10
|
||||
},
|
||||
"webRTCStar": {
|
||||
"Enabled": true
|
||||
}
|
||||
},
|
||||
"Bootstrap": [
|
||||
"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
|
||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
|
||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
|
||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmZa1sAxajnQjVM8WjWXoMbmPd7NsWhfKsPkErzpm9wGkp",
|
||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
|
||||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
|
||||
"/dns4/node0.preload.ipfs.io/tcp/443/wss/p2p/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic",
|
||||
"/dns4/node1.preload.ipfs.io/tcp/443/wss/p2p/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6",
|
||||
"/dns4/node2.preload.ipfs.io/tcp/443/wss/p2p/QmV7gnbW5VTcJ3oyM2Xk1rdFBJ3kTkvxc87UFGsun29STS",
|
||||
"/dns4/node3.preload.ipfs.io/tcp/443/wss/p2p/QmY7JB6MQXhxHvq7dBDh4HpbH29v4yE9JRadAVpndvzySN"
|
||||
],
|
||||
"Pubsub": {
|
||||
"Router": "gossipsub",
|
||||
"Enabled": true
|
||||
},
|
||||
"Swarm": {
|
||||
"ConnMgr": {
|
||||
"LowWater": 200,
|
||||
"HighWater": 500
|
||||
},
|
||||
"DisableNatPortMap": false
|
||||
},
|
||||
"Routing": {
|
||||
"Type": "none"
|
||||
},
|
||||
"relay": {
|
||||
"enabled": true,
|
||||
"hop": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"pubsub": true,
|
||||
"Identity": {
|
||||
"PeerID": "QmWp3ah86DvCsYk57c6RQe89DPPBZtiDK8mGMNedWFgDTz",
|
||||
"PrivKey": "CAASqAkwggSkAgEAAoIBAQDyxR0D0igAXuriVw8IlOuiqWmpHBfrfu9VH4pBbjU5dRZU74HMH1Bh5zs+3N6B9uNRVaMRHy2Ipmg9GT/hu2Fa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toKq0vwDOAQi8aJK3D2UUlCtxhn5vEAIjOtnsbJtMTxRpzNLt2Co5lAz8QKBgARhmL1Rb6Te9eR2WmDpt2jrI5iUFdXWb5k1GgMpbgjBTpLQhrD+yrtA/mz92s77JDKnvkjWL3iU6IrN/Tq/V4hsyOZDJ6tTiRLPgrcvqZq4/pO07c3Slnb20/npaO46VPEmET7JYQkDJvyik+MGcRVA3KMU8xoSeJrTdsv1U23VAoGBAOUHHGpP3aIApIpSJ9wqDs4dHp4FIdoKCAXsD5KX6tQ4Z0YlOh1WB/0VWsCQtuvLHq34FFzYgQEgVxdJKH/LGu6UzTEweYsKmUBsdmM4tmveBBdEtDD0wGn5Tx+ju8i4ra83XPxw43l3y/zYo6wnQoWGvoQl0XmWwiELlBDcDLdJ"
|
||||
},
|
||||
"datastore": {
|
||||
"Spec": {
|
||||
"type": "mount",
|
||||
"mounts": [
|
||||
{
|
||||
"mountpoint": "/blocks",
|
||||
"type": "measure",
|
||||
"prefix": "flatfs.datastore",
|
||||
"child": {
|
||||
"type": "flatfs",
|
||||
"path": "blocks",
|
||||
"sync": true,
|
||||
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"mountpoint": "/",
|
||||
"type": "measure",
|
||||
"prefix": "leveldb.datastore",
|
||||
"child": {
|
||||
"type": "levelds",
|
||||
"path": "datastore",
|
||||
"compression": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Keychain": {
|
||||
"dek": {
|
||||
"keyLength": 64,
|
||||
"iterationCount": 10000,
|
||||
"salt": "Dq++6HYu7Kpq3EEt4BZiWFmH",
|
||||
"hash": "sha2-512"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
MANIFEST-000004
|
||||
@@ -0,0 +1,5 @@
|
||||
2021/03/30-17:38:06.043338 7f2026b79700 Recovering log #3
|
||||
2021/03/30-17:38:06.043437 7f2026b79700 Level-0 table #5: started
|
||||
2021/03/30-17:38:06.045783 7f2026b79700 Level-0 table #5: 21117 bytes OK
|
||||
2021/03/30-17:38:06.050733 7f2026b79700 Delete type=3 #2
|
||||
2021/03/30-17:38:06.050846 7f2026b79700 Delete type=0 #3
|
||||
@@ -0,0 +1 @@
|
||||
2021/03/30-17:08:24.179721 7f264c8df700 Delete type=3 #1
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"mounts":[{"mountpoint":"/blocks","path":"blocks","shardFunc":"/repo/flatfs/shard/v1/next-to-last/2","type":"flatfs"},{"mountpoint":"/","path":"datastore","type":"levelds"}],"type":"mount"}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"self","id":"QmWp3ah86DvCsYk57c6RQe89DPPBZtiDK8mGMNedWFgDTz"}
|
||||
@@ -0,0 +1,30 @@
|
||||
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
MIIFODBiBgkqhkiG9w0BBQ0wVTA0BgkqhkiG9w0BBQwwJwQQzQe4jsMmJAsZkp+2
|
||||
DllOpQICJxACASAwDAYIKoZIhvcNAgsFADAdBglghkgBZQMEASoEEEW10BgbO3RR
|
||||
JRuP4Q4iBewEggTQu55ajYre6l3lPV5r/reidtoDGky1TN6bVmS4HxTSVQ0lW3t5
|
||||
aMuItA0RlnypieMEkyaHRB2MIfaeERXFit+VGj+Kuhhqwp14Ibz7GxQzUilZaelD
|
||||
HF98dJgb72sH/1mOXDMhgFeO9ZfCaSQtN6QHjvVKoCFQLH9TvjGIlGQ6Itqk9e4T
|
||||
VkK3gI2BSgYRhoIWPOP2CcfYMbaHwiFxiK288PprHXIMgnAbwfjX3XBiPRz/AQhd
|
||||
LGptkSIpHEwcBbvggEAE1N1yU1euakK05TfntQpKG9zlWaQ2JJd0iaiONcVXMJTd
|
||||
nXW7TCA3ou4IEzLG0apD95iVpJuDiz0ZvS7q7FIg3Ya9wzgATcPQOmqFgmmlz7RD
|
||||
9h+uAnw6+NW5Z4M/vM6Jxji1mK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a8iFN+sU56kKjtFVkAuv5M
|
||||
UE4c5gztOep5lTw1Xmg0zON+VNg0mgOGUXWMCKubQf/OsYQH+c/KX5uKNUI9R9PN
|
||||
xVMiPMojgiYiPPgwPHr089lHhdB954v2BmoOGq3QcBJ3HYM7WJ9QWkHJI8w2xOxt
|
||||
Tbnsl1RX/RSbH5zQJlzy17PyrvwLCTeL6G5DALduyeHWoZGGp3TBnWRXWmiygWuq
|
||||
j4XVQzKAeFZw1uXg6RBRECyAuAS/Oj4a9E/2EASr+GlGQL+Ct/O8I8k9FTE=
|
||||
-----END ENCRYPTED PRIVATE KEY-----
|
||||
@@ -0,0 +1 @@
|
||||
Y”„9_)ažô€Ë¹2¾RÅm™Å–keà9ð˜»ï
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
MANIFEST-000004
|
||||
@@ -0,0 +1,5 @@
|
||||
2021/03/30-17:38:06.062673 7f202737a700 Recovering log #3
|
||||
2021/03/30-17:38:06.062766 7f202737a700 Level-0 table #5: started
|
||||
2021/03/30-17:38:06.064933 7f202737a700 Level-0 table #5: 315 bytes OK
|
||||
2021/03/30-17:38:06.070853 7f202737a700 Delete type=3 #2
|
||||
2021/03/30-17:38:06.070932 7f202737a700 Delete type=0 #3
|
||||
@@ -0,0 +1 @@
|
||||
2021/03/30-17:08:24.196390 7f263ffff700 Delete type=3 #1
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
10
|
||||
@@ -0,0 +1 @@
|
||||
MANIFEST-000002
|
||||
@@ -0,0 +1 @@
|
||||
2021/03/30-17:38:06.795963 7f2026b79700 Delete type=3 #1
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
MANIFEST-000002
|
||||
@@ -0,0 +1 @@
|
||||
2021/03/30-17:38:06.785120 7f2027b7b700 Delete type=3 #1
|
||||
Binary file not shown.
Generated
+11745
-18418
File diff suppressed because it is too large
Load Diff
@@ -34,9 +34,12 @@
|
||||
},
|
||||
"repository": "christroutner/ipfs-service-provider",
|
||||
"dependencies": {
|
||||
"@psf/bch-js": "^4.17.6",
|
||||
"axios": "^0.21.1",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"glob": "^7.1.6",
|
||||
"ipfs": "^0.54.4",
|
||||
"ipfs-coord": "^2.2.6",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"kcors": "^2.2.2",
|
||||
"koa": "^2.13.1",
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
This support library handles the connection to the IPFS network. It instantiates
|
||||
the IPFS node and starts the ipfs-coord library.
|
||||
*/
|
||||
|
||||
// Global npm libraries
|
||||
const IPFS = require('ipfs')
|
||||
const IpfsCoord = require('ipfs-coord')
|
||||
const BCHJS = require('@psf/bch-js')
|
||||
|
||||
class IPFSLib {
|
||||
constructor (localConfig) {
|
||||
// Encapsulate dependencies
|
||||
this.IPFS = IPFS
|
||||
this.IpfsCoord = IpfsCoord
|
||||
this.bchjs = new BCHJS()
|
||||
}
|
||||
|
||||
// This is a 'macro' start method. It kicks off several smaller methods that
|
||||
// start the various subcomponents of this IPFS library.
|
||||
async start () {
|
||||
await this.startIpfs()
|
||||
await this.startIpfsCoord()
|
||||
console.log('IPFS is ready.')
|
||||
}
|
||||
|
||||
async startIpfs () {
|
||||
try {
|
||||
// Ipfs Options
|
||||
const ipfsOptions = {
|
||||
repo: './ipfsdata',
|
||||
start: true,
|
||||
EXPERIMENTAL: {
|
||||
pubsub: true
|
||||
},
|
||||
config: {
|
||||
relay: {
|
||||
enabled: true, // enable circuit relay dialer and listener
|
||||
hop: {
|
||||
enabled: true // enable circuit relay HOP (make this node a relay)
|
||||
}
|
||||
},
|
||||
pubsub: true // enable pubsub
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new IPFS node.
|
||||
this.ipfs = await this.IPFS.create(ipfsOptions)
|
||||
} catch (err) {
|
||||
console.error('Error in startIpfs()')
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
async startIpfsCoord () {
|
||||
try {
|
||||
this.ipfsCoord = new this.IpfsCoord({
|
||||
ipfs: this.ipfs,
|
||||
type: 'node.js',
|
||||
bchjs: this.bchjs
|
||||
})
|
||||
|
||||
await this.ipfsCoord.isReady()
|
||||
} catch (err) {
|
||||
console.error('Error in startIpfsCoord()')
|
||||
throw err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = IPFSLib
|
||||
Reference in New Issue
Block a user