Closed jaybxyz closed 6 years ago
You don't need to inject private keys, you only need the public key and need to make sure that the wallet containing the corresponding public key is:
If I am not using my own eosio (using one of Block Producer's eosio), I believe their wallet doesn't contain my corresponding public key. Or do they contain (imported) all accounts already?
I thought I should sign the transaction using my account's private key and send it to network.
In other blockchain like bitcoin, to simply explain, you sign the transaction using your private key proving that you are the owner of this transaction and send that transaction to the network.
Other wallets should not contain your private keys. You need a wallet running on your local machine or on a server that you trust.
However this library currently uses the same base url for all kinds of queries.
There should definitely be an option to use different base urls for history/chain/wallet queries. Thanks for pointing that out.
Yes, other wallet shouldn't contain anyone's private key.
Well, my purpose is to use one of the BP's public API endpoint instead of running on my local machine or building one myself on a server that I trust.
In that sense, I believe there needs my account's private key to sign the transaction or create 3rd user's account using my account.
Is it possible to make a transaction using a public api endpoint?
Have you been testing using on your local only?
Yes, I used it only locally so far.
You need a wallet running somewhere, because this package doesn't take care of signing, even if you would provide a private key somewhere (which I am not sure if supported by the http api).
For signing it relies on separate software.
I'll look into adding additional parameters for different base urls (chain, history and wallet).
I will play around more for now.
I would like to test if it it works well to get account's info and transfer EOS using this project.
First, I created the rest client like below and tested to see it if connects.
Don't you need to inject the account's private key of active key (called keyProvider in eosjs) when signing occurs?
I don't seem to find where to inject the private key when signing occurs...