Open ArtemShe opened 2 years ago
Hi,
Did you tried with an Account that exists?
I'm confused)
According code of class Wallet
method CreateAsync
that contains a line
Account = Account.Build(keyType, privateKey, publicKey);
this method create account, and account means/equals a wallet.
Could you provide example of code with your SDK how to create account/wallet from scratch and check balance.
Another interesting point is that looks like Wallet.CreateAsync
generate public and private key of wallet at client side.
Its also unclear for because
1) usually server return to client "Id" on registration
2) Looks like Wallet.CreateAsync
logic not depend on sever/network, but regarding documentation - base on network is start with specifics symbols.
And this SDK generate public key not regarding this rules.
Regards)
That's correct the private key is generated client-side and is encrypted with a seed you provide.
This will not create an account on the blockchain itself for that purpose you will need to create a transaction sending you some tokens at that point your public key will be registered on the chain as an account. maybe that can clarify some of your questions, https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-
Here is an example of how to create a transaction.
As we are currently heavily refactoring the API, you might wait for one a few days then I will provide more code snippets with the most actual monthly release which makes everything much more smooth with the newest API release.
Hello, could you please also provide the example how to get the current balance?
Sure, The easiest way is that you create your SDK for your node with this repository. https://github.com/ajuna-network/Ajuna.SDK
Use this step-by-step https://github.com/ajuna-network/Ajuna.SDK#installing-the-template
If you exchange here SystemStorage.Number with SystemStorageAccountInfo your are good to go. https://github.com/ajuna-network/Ajuna.SDK.Demos/blob/master/Ajuna.SDK.Demos.DirectPolling/Program.cs
Hi! I'm new in crypto. Trying to use your SDK Idea its to create wallets and manage them- at least see balances and transfer 'money' between wallets. As I understood - balance information is placed at
wallet.AccountInfo.AccountData
Problem that when wallet is created or loaded -wallet.AccountInfo is null
Using different domainsI debug SDK code and looks like my problem here (class Wallet)
So what should I do to have wallet.AccountInfo?
Regards)