#Support local wallet
1 messages · Page 1 of 1 (latest)
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?
@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
This was very helpful to me, thanks for your answer