Yaay !! Remember you need oxygen on the way down too.
New SAFE CLI v0.13.0
and safe-authd v0.0.9
were just published, both are compatible with with Baby-Fleming vaults and current public shared section.
As usual you can use CLI to update both CLI (with $ safe update
) and safe-authd (with $ safe auth update
), or follow the instructions on the CLI User Guide for installing them for the first time and other instructions.
I wonder config and networks are looking very similar⦠tempting a tidy up of some form
$ safe config
+----------------+--------------------------------------------------------------------------------------------------+
| Networks | |
+----------------+--------------------------------------------------------------------------------------------------+
| Network name | Connection info location |
+----------------+--------------------------------------------------------------------------------------------------+
| shared-section | https://safe-vault-config.s3.eu-west-2.amazonaws.com/shared-section/vault_connection_info.config |
+----------------+--------------------------------------------------------------------------------------------------+
$ safe networks
+----------------+--------------------------------------------------------------------------------------------------+
| Networks | |
+----------------+--------------------------------------------------------------------------------------------------+
| Network name | Connection info location |
+----------------+--------------------------------------------------------------------------------------------------+
| shared-section | https://safe-vault-config.s3.eu-west-2.amazonaws.com/shared-section/vault_connection_info.config |
+----------------+--------------------------------------------------------------------------------------------------+
$ safe networks --help
safe-networks 0.13.0
Switch between SAFE networks
USAGE:
safe networks [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-n, --dry-run Dry run of command. No data will be written. No coins spent
-h, --help Prints help information
--json Sets JSON as output serialisation format (alias of '--output json')
-V, --version Prints version information
OPTIONS:
--endpoint <endpoint> Endpoint of the Authenticator daemon where to send requests to. If not provided,
https://localhost:33000 is assumed
-o, --output <output-fmt> Output data serialisation: [json, jsoncompact, yaml]
--xorurl <xorurl-base> Base encoding to be used for XOR-URLs generated. Currently supported: base32z
(default), base32 and base64
SUBCOMMANDS:
add Add a network to the CLI config
check Check current network configuration and try to match it to networks in the CLI config
help Prints this message or the help of the given subcommand(s)
remove Remove a network from the CLI config
switch Switch to a different SAFE network
$ safe config --help
safe-config 0.13.0
CLI config settings
USAGE:
safe config [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-n, --dry-run Dry run of command. No data will be written. No coins spent
-h, --help Prints help information
--json Sets JSON as output serialisation format (alias of '--output json')
-V, --version Prints version information
OPTIONS:
--endpoint <endpoint> Endpoint of the Authenticator daemon where to send requests to. If not provided,
https://localhost:33000 is assumed
-o, --output <output-fmt> Output data serialisation: [json, jsoncompact, yaml]
--xorurl <xorurl-base> Base encoding to be used for XOR-URLs generated. Currently supported: base32z
(default), base32 and base64
SUBCOMMANDS:
add Add a config setting
clear Remove all config settings
help Prints this message or the help of the given subcommand(s)
remove Remove a config setting
I donāt use those often enough to suggest more atm.
The safe config
is planned for containing all type of configuration settings the CLI supports, while safe networks
is and will always be specific for networks type of config settings, at the moment they are pretty much the same but safe config
is expected to evolve to support other type of settings.
safe network
cmds can even be considered as alias cmds to safe config
cmd for network related settings.
and while talking about CLI⦠I donāt know the approach you will take for UTF8 and other simple confusables.
Thereās a problem atm that both desktop and mobile browsers reduce case of safe://V to safe://v while the CLI it seems does well acknowledging both.
Perhaps CLI and both browsers need to be consistent in their handling of what is possible?.. OR⦠is the CLI intended more powerful and unrestrained and the browsers catering for more web orientated issues??..
I think it needs to be looked at from the perspective of āthe resolverā (i.e. safe-api), which means it will behave the same for all apps using that resolver from safe-api.
Just noting that CLI v0.13 is doing something new on upload that sees āinode/directoryā created. Kind of surprised those directories donāt have explicit links⦠is the directory not an xorurl itself?
upload of emptybag test works well⦠and sees those directories.
$ safe cat safe://hnyynyw4w7ep5jn9cqeoh4t3o8axqwd5jzgg7feoifem8hyszruuqgowtrbnc
Files of FilesContainer (version 0) at "safe://hnyynyw4w7ep5jn9cqeoh4t3o8axqwd5jzgg7feoifem8hyszruuqgowtrbnc":
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| Name | Type | Size | Created | Modified | Link |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.empty | Raw | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | safe://hbyyyynw7fi7ko8u3wtai6eekko3m5y6u9ud7w1i4ajycmwfwu3wwpnn81 |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.full | Raw | 5 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | safe://hbyyyynh3u8bshre4gebmygjk3akm6iw7x94r1nckbzjdj1on8u5kisdgs |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hidden | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide/.empty | Raw | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | safe://hbyyyynw7fi7ko8u3wtai6eekko3m5y6u9ud7w1i4ajycmwfwu3wwpnn81 |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide/.full | Raw | 5 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | safe://hbyyyynh3u8bshre4gebmygjk3akm6iw7x94r1nckbzjdj1on8u5kisdgs |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide/.hidden | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide/empty | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide/full | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /.hide/full/something | Raw | 5 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | safe://hbyyyynqntedjm356yyuhfgsi93gnaa58kxpt71i9m6ceg914tx9an7yjf |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /empty | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /full | inode/directory | 0 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
| /full/something | Raw | 5 | 2020-06-01T19:00:02Z | 2020-06-01T19:00:02Z | safe://hbyyyynqntedjm356yyuhfgsi93gnaa58kxpt71i9m6ceg914tx9an7yjf |
+-----------------------+-----------------+------+----------------------+----------------------+-------------------------------------------------------------------+
and liking the change on dog detail too
Perhaps we will see safe config
start to realise its potential once we have Vaults from Home?
Thanks @davidpbrown , saves me the bother
aw you didnāt allow infinite loop
still a new error to add to the list
ERROR safe] safe-cli error: [Error] ContentError - The maximum number of indirections (10) was reached when trying to resolve the URL provided
I donāt know what that isā¦
I was talking of safe://loop1 => safe://loop2 => safe://loop1 repeat until 10
Another oddity I canāt get my head round, is that this url resolution doesnāt work as a bounce in the browser.
So, the idea is that one nrs points to the next
safe nrs create matryoshka.matryoshka.matryoshka.matryoshka --link safe://hnyynyzze4mp4k34687spni8xrag3mz3hdx7xk7pte47qohd8wuy1r8whkbnc?v=0
safe nrs add matryoshka.matryoshka.matryoshka --link safe://matryoshka.matryoshka.matryoshka.matryoshka?v=0
safe nrs add matryoshka.matryoshka --link safe://matryoshka.matryoshka.matryoshka?v=0
safe nrs add matryoshka --link safe://matryoshka.matryoshka?v=0
that in dull latin because маŃŃŠ¾Ńка spawns idn parallel.
So, the first line is that actual and the others are the reductions that should point forward to the result⦠but I get nothing back from the browser, as if it is not trying to move to the next url resolution.
Yeah, perhaps, there are so many things we could allow the CLI to start managing locally, but yes, you are probably right.
Thatās because that browser is still using previous version of the safe-api, those type of URL resolution will work the same once we release a new version of the browser using this new version of safe-api (v0.13.0). Keep in mind that all the URL resolution is done on the client, i.e. safe-api resolver.
I wonder thereās something more⦠might be my setting this up but getting a result here I donāt understand.
Why do the first two give error?.. where the third lists them all as under PublicName: āmatryoshkaāā¦
$ safe dog safe://matryoshka
[2020-06-02T14:55:23Z ERROR safe] safe-cli error: [Error] ContentError - Sub name not found in NRS Map Container
$ safe dog safe://matryoshka.matryoshka
[2020-06-02T14:55:44Z ERROR safe] safe-cli error: [Error] ContentError - Sub name not found in NRS Map Container
$ safe dog safe://matryoshka.matryoshka.matryoshka.matryoshka
== URL resolution step 1 ==
Resolved from: safe://matryoshka.matryoshka.matryoshka.matryoshka
= NRS Map Container =
PublicName: "matryoshka"
XOR-URL: safe://matryoshka.matryoshka.matryoshka.hnyydyse3yjmgdiadouwgmmugi65iqpptpd3g9mwkn8wzmdqh5smw3xdw1bqh
Version: 4
Type tag: 1500
XOR name: 0x919025661d70384e865ae66afb75735b168f26fae8a11e9758ddcdd974cbc749
Native data type: PublishedSeqAppendOnlyData
+---------------------------------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| NRS name/subname | Created | Modified | Link |
+---------------------------------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| matryoshka | 2020-06-01T21:18:02Z | 2020-06-01T21:18:02Z | safe://matryoshka.matryoshka?v=0 |
+---------------------------------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| matryoshka.matryoshka | 2020-06-01T21:18:01Z | 2020-06-01T21:18:01Z | safe://matryoshka.matryoshka.matryoshka?v=0 |
+---------------------------------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| matryoshka.matryoshka.matryoshka | 2020-06-01T21:18:01Z | 2020-06-01T21:18:01Z | safe://matryoshka.matryoshka.matryoshka.matryoshka?v=0 |
+---------------------------------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| matryoshka.matryoshka.matryoshka.matryoshka | 2020-06-01T21:21:05Z | 2020-06-01T21:21:05Z | safe://hnyynyzze4mp4k34687spni8xrag3mz3hdx7xk7pte47qohd8wuy1r8whkbnc?v=0 |
+---------------------------------------------+----------------------+----------------------+--------------------------------------------------------------------------+
== URL resolution step 2 ==
Resolved from: safe://hnyynyzze4mp4k34687spni8xrag3mz3hdx7xk7pte47qohd8wuy1r8whkbnc?v=0
= FilesContainer =
XOR-URL: safe://hnyynyzze4mp4k34687spni8xrag3mz3hdx7xk7pte47qohd8wuy1r8whkbnc?v=0
Version: 0
Type tag: 1100
XOR name: 0xee8d2dba5675e3f6cd154ef260d95df3c1bfaf575b146bae87067a4c1221e9c5
Native data type: PublishedSeqAppendOnlyData
That looks like a bug to me
So, above was querying if the āinode/directoryā has an xorurl as thatās not apparent in dog.
I wonder also now that āFilesContainerā is more just a āContainerā now that it hosts Files and Folders.
#trivial but perhaps helps if we donāt use new terms unnecessarily.
To my knowledge directories donāt exist. They are reconstituted from the set of file names. Which means:
- they donāt have a xorurl
- we can continue using the term FileContainer
Directories have recently been added, at least in the form of empty directories. I canāt remember the details, but I have previously suggested that when this was added, we also allow sub-containers (like a symlink from one FilesContainer to another). Some form of link is being/has been added, but I donāt remember the details.
I think FilesContainer and Container arenāt great terms, especially for end users. One is cumbersome, the other not descriptive. Store, Disk or Drive or something familiar might be worth considering. Depends how closely we want to follow the file system metaphor, but in this case I think thatās exactly what we are trying to do, so Iām inclined towards Drive.
The SAFE CLI follows this well, and if we/I ever revive SAFE Drive for the new API I think it also works well.
@JimCollinson any thoughts re end users?
Just to add background info, the name Container comes from the RDF, so itās about which layer we are talking about, if itās about the type of abstraction and format created and stored on the network, or is it the abstraction exposed to the user by an application like CLI. A Container is a bunch of links, it uses some of the SAFE data types to store content in some format (like RDF) with links, itās linked data what we really manage.
0.13 CLI has inode/directory
but you only see those on newly uploaded content. So, example above lists the result⦠but no xor for them, which begs question what those are referenced with.
See⦠Baby Fleming Public Shared Section - #189 by davidpbrown
This⦠just want to check if the inode is an xor