Safe network access

I saw that the invitation system that used to be integrated in the SAFE browser is gone. I’m trying out of curiosity to develop a small PoC app around articles sharing - authors gets paid if users like the articles and so on. I have the basic idea drafted out from documentation point of view and I can start writing some code. I want to build the app in Rust. So, I have two questions:

  • Is there a new way of creating account and accessing the network?

I need to authenticate users so I know who is who. I’ll also need to be able to upload files to the network so that articles get stored. Some sort of basic cataloging system would also be part of the PoC but I can figure something quick and easy if files can be stored and accessed.

  • What crate (Rust dependency) I need to use to access SAFE API?

Thank you!


As long as this isn’t outdated then New Release: Vault Phase 1 (real vault) but I’m pretty sure Maidsafe has been updating it. I’ll poke around for more resources.

The safe-api is a Rust crate which exposes the SAFE API with all the functions needed to communicate with the SAFE Network and the SAFE Authenticator. If you are developing a Rust application for SAFE, this is all you need as a dependency from your app.


Thank you! I managed to add the "safe-api = “0.6.0” crate to my dependencies and got a build. There are no docs on safe-api 0.6.0 - so I built them myself locally but I don’t see any examples. I would appreciate if someone can show me some example implementations that can help me get the hang of it.

As for the steps on the Vault Phase 1 release I can honestly say that I haven’t had much luck with it. I’m asked for a secret and password which I don’t have - I don’t know how to create an account nowadays and the only pointers I managed to find are to the invite system that was taken down. I’ll grab latest binaries and keep trying - maybe I am missing the point somewhere.


Update on the vault testing. I’m doing those steps:

  • Running safe_vault
kstaykov@devz:~/Downloads/safenet$ safe_vault 
Checking target-arch... x86_64-unknown-linux-musl
Checking current version... v0.20.1
Checking latest released version... v0.20.1
Update status: `0.20.1`!
Our connection info:

Writing connection info to: /home/kstaykov/.config/safe_vault/vault_connection_info.config
Waiting for connections ...
  • Using safe_auth with --test-coins which seems like is creating an account for me. I put the same string when asked for Secret and Password:
kstaykov@devz:~/Downloads/safenet$ safe_auth --daemon 41805 --test-coins
Account was created successfully!
SafeKey created and preloaded with test-coins. Owner key pair generated:
Public Key = 95853c2b109ff8350fd50e3d7....<removed some of it>
Secret Key = 96053254cb9c7e59ea0dbaf6e......<removed some of it>
Exposing service on
  • I then tried to authenticate but that fails:
kstaykov@devz:~/Downloads/safenet$ safe auth login --self-auth
Sending login action request to authd...
[2020-01-04T22:25:43Z ERROR safe] safe-cli error: [Error] AuthdError - [Error] AuthError - Failed to log in: no SAFE account found with the passphrase provided

I tried putting the same string in Passphrase and Password that I used before with safe_auth. I also tried the Public Key and Secret Key I was given but no luck.

What am I doing wrong?


I don’t think we can launch directly safe_auth anymore. The procedure is to launch it indirectly with safe command:

$ safe auth start

and then to create the account:

$ safe auth create-acc --test-coins

(notice the blank between safe and auth, instead of an underscore)


This might be handy. What’s included in Phase 1 Vaults?

@tfa made a nice tutorial awhile back. Maybe this could help. New Release: Vault Phase 1 (mock vault) - #53 by tfa


Unfortunately this tutorial is not valid anymore (it uses former safe_auth).

CLI complete documentation is here:


Thanks @tfa I had forgotten that auth is bundled into the CLI now.


Thank you! That was the missing piece - now it works and I can continue playing with it.


I had a look at the dev forum and I found that safe-app might be a better dependency to use. Here’s an example the guys created:


It looks rather nice. Too bad I’m back at work tomorrow but when I get the chance I’ll play with it some more.


Is bash completions implemented yet? Docs suggest they are but …

willie@gagarin:~/projects/maidsafe$ SC=/tmp/safe.rc && safe setup completions bash > $SC && source $SC
error: Found argument 'setup' which wasn't expected, or isn't valid in this context


For more information try --help

I’m on the latest version
willie@gagarin:~/projects/maidsafe$ safe update
Checking target-arch… x86_64-unknown-linux-gnu
Checking current version… v0.6.0
Checking latest released version… v0.6.0
Update status: 0.6.0!

Apart from that little niggle, everything I tried Just Works as per the docs


@Southside that command is implemented on master branch already but not released yet, so you need to either use master branch (building CLI yourself), or use the older auto-completion implementation detailed in the 0.6.0 release notes:


This topic was automatically closed after 60 days. New replies are no longer allowed.