-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ipfs Raw Block Commands #138
Comments
I'll do it post-@jbenet input |
I think a few plumbing tools are emerging: # interact with the routing system (via its interface)
ipfs routing [get, put, putprovider, getprovider, findpeer]
# show/edit the dht state
ipfs dht [table, diagnostic, providers, ... ]
# interact with bitswap
ipfs bitswap [strategy, ... ]
# get/put **raw** ipfs blocks (possibly encrypted, protobuf serialized)
ipfs block get <key> > valfile
ipfs block put < valfile
# interact with ipfs objects (almost porcelain)
ipfs object data <key> > datafile (plumbing behind ipfs cat)
ipfs object links <key> > linksfile (plumbing behind ipfs ls)
ipfs object get <key> > objfile (probably protobuf serialized? or ....)
ipfs object get --format=json <key> > objfile
ipfs object put --format=json < objfile
# interact with local keys / keychain
ipfs key gen <name> # make a key(pair) named <name>
ipfs key add <name> <keyfile> # add a key(pair) named
ipfs key rm <name>
ipfs key show <name> (Updated to remove |
sorted from easiest to hardest:
|
+:100: :+1: |
we should turn all these commands into their own issue. (i can get to that later today) |
cmds:
|
Still need |
what subcommands do we want under bitswap and dht? |
Rename # routing table
ipfs routing table - prints the routing table
ipfs routing table add <ipfs-addr> - adds <ipfs-addr> to the routing table
ipfs routing table rm [--all] <ipfs-addr> - removes <ipfs-addr> from the routing table
# if the routing system does not have a routing table, return an error
# actual routing operations!
ipfs routing value get [--local, --all] <key> -- returns value for <key>
ipfs routing value put [--local] <key> -- puts stdin as a value for <key>.
ipfs routing value rm [--all] <key> -- remove local value for <key>.
ipfs routing provider get [--local, --all] <key> -- returns providers for <key>
ipfs routing provider add [--local] <key> <ipfs-addr> -- adds provider for <key>
ipfs routing peer [--local, --all] <peer.ID> -- returns <ipfs-addrs> for peer with <peer.ID>
# all of these support options:
# --local - return only local results
# --all - returns all local values (implies --local, and does not need <key>)
|
# general exchange, should work even if bitswap doesnt.
# this is different from ipfs-block in that it may allow us to force --remote operation
# so we can test protocols. -- say, both of these have:
ipfs exchange get [--local, --remote] <key> [<ipfs-addr>...] returns contents of <key>
ipfs exchange add [--local, --remote] [<ipfs-addr>...] -- adds contents of stdin.
# if `<ipfs-addr>...` are specified, use only peers at those addresses.
# bitswap specific
ipfs bitswap peers [--all, --inactive] -- print IDs of peers
ipfs bitswap ledger [--all, --inactive] <key> -- print ledger contents
# --inactive prints peers we have ledgers for, but not currently connected
# --all print all entries, active and inactive (and implies no <key> needed)
ipfs bitswap strategy -- print information on the current strategy used
ipfs bitswap stat -- print statistic on bitswap traffic |
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
fix: remove deprecated calls
fix: remove deprecated calls
fix: remove deprecated calls
fix: remove deprecated calls
It would be nice if we had some commands to interface directly with the raw DHT data. something like:
And have it return the raw data from doing a database or bitswap query for that block.
In the same vein of thinking, I would also like to make
ipfs add
be able to accept input data from standard in so we could do something like:echo 'hello world' | ipfs add
and have it create an object for that.@jbenet What do you think as far as semantics?
The text was updated successfully, but these errors were encountered: