#Support local wallet

1 messages · Page 1 of 1 (latest)

warped fossil
#

It is hoped that local wallets can be supported in the SDK, for example:
Generate a local mnemonic wallet to allow the user to save the mnemonic and then cache the account. The security of the wallet is the responsibility of the user.
Plus, you can import existing mnemonics to restore your account.

tropic minnow
#

That shouldn't be done by the SDK imo, because we're not the ones that should store the wallet imo. @light wren @zealous compass your thoughts?

tropic minnow
#

@warped fossil sorry for coming so late back to you: Would this work for you:

            {
                s.UseUnityEnvironment();
                s.UseRpcProvider();
                TempAccountProvider tempAccountProvider = new TempAccountProvider()
                {
                    Account = new Account("PRIV_KEY")
                };

                s.AddSingleton<IAccountProvider>(tempAccountProvider);
                s.UseInProcessSigner();
                s.UseInProcessTransactionExecutor();
            });
            _web3 = await web3Builder.LaunchAsync();
            
            var account = _web3.ServiceProvider.GetService<IAccountProvider>();
            account.Account.TransactionManager.Client = _web3.ServiceProvider.GetService<IClient>();```
This way you are responsible for injecting the wallets private key yourself, there is no 'sign transaction' popup showing up.
#

You would inject the private key yourself in the "PRIV_KEY" string, and from there do all the things you want in the blockchain

warped fossil