Safe auth issue?

Hello.

I am currently working on the SAFE CLI
(https://github.com/maidsafe/safe-api/tree/master/safe-cli#using-the-cli)

I tried working on ‘safe auth’ (ex. ‘safe auth create-acc’, etc). However, I have kept having the following issue:

ERROR safe] safe-cli error: [Error] AuthdError - [Error] AuthError - Failed to create an account: Safe ND error: Balance does not exist

Before ‘safe auth create’, I generated Public Key and Secret Key (./safe keys create --test-coins --preload 15.342). However, I had above error when using the keys to create an account.

How can I solve the above error and create an account to use ‘safe auth’?

I will really appreciate the answers.

2 Likes

So are you prompted for entering the private key when you do safe auth create-acc ?
If so, are you entering the private key you obtained with safe keys create --test-coins --preload 15.342 ? …from the error you may be entering the wrong private key perhaps?

The easiest way is to simply call safe auth create-acc --test-coins which does both steps together for you.

2 Likes

Given you generated keys before ‘safe auth create’, I wonder you’ve jumped in and over the switch of networks detail.

If you went as far as ‘safe networks switch shared-section’, which it’s likely you would have wanted to do, that might have switched you away from the local network that you created keys to??

Generating keys is beyond what I’ve done, so might be something else.

So, perhaps do the same again and see if it doesn’t just work…

2 Likes

So, I just tried… connected to the shared section.

I expect it’s simply that you used the public key and not the secret key…

So, the second key

$ safe keys create --test-coins --preload 15.342
New SafeKey created at: "safe://hbyyyycyoauztrc1sk4rjgmofryechodmskyqjtmfzim4uwidr65ete9nr"
Preloaded with 15.342 coins
Key pair generated:
Public Key = 82189de2464acad11265c0a40219c80d76501c98acb7aaf58b5464f6d1147c44a69dd46b896ad52ea336be6969aa3eb8
Secret Key = eaa6284b78050d223bbd92346867e6f3b454c301844e2e9fd295f1e595456701

First below with the public key, and second correctly with the secret key:

$ safe auth create-acc
Passphrase: 
Password: 
Enter SafeKey's secret key to pay with:
Sending account creation request to authd...
[2020-05-08T16:18:38Z ERROR safe] safe-cli error: [Error] AuthdError - [Error] AuthError - Failed to create an account: Safe ND error: Balance does not exist

$ safe auth create-acc
Passphrase: 
Password: 
Enter SafeKey's secret key to pay with:
Sending account creation request to authd...
Account was created successfully!
4 Likes

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