How about adding main signer address data into SigningCosmWasmClient?
See original GitHub issueCurrently there’s no field to hold a signer address data or method to get that kind of data in SigningCosmWasmClient
class.
But, considering the usage of that class, why don’t we add an address string data into the class or some addresses to make it more complement class for a literally signing client?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Issues · cosmos/cosmjs - GitHub
The Swiss Army knife to power JavaScript based client solutions ranging from Web ... How about adding main signer address data into SigningCosmWasmClient?...
Read more >CosmWasmClient Part 2: Writing - Medium
In the first part of this duology, we saw how to use the class CosmWasmClient from CosmWasm JS for reading data from a...
Read more >Signers - ethers
A Signer in ethers is an abstraction of an Ethereum Account, which can be used to sign messages ... Returns a Promise that...
Read more >SigningCosmWasmClient | @cosmjs/cosmwasm-stargate ...
Creates a transaction with the given messages, fee and memo. Then signs and broadcasts the transaction. Parameters. signerAddress: string. The address that will ......
Read more >Waves Signer | Waves documentation
Authenticates user with his/her account; creates account if it don't exist. login();. Returns: Promise of user data: address and public key ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Indeed, the client can have one signer address which can be changed. A big API change would still result from making the client a one-address client.
We could try creating a
SimpleSigningCosmWasmClient
to test if that works well.In ts-relayer, I made a simple wrapper that had this hardcoded address. That would not work if used in a web-app using Keplr, where you change account.
The fact that the wallet is completely hidden inside the signing client has been an annoying client side DevX for a while. But adding one more fixed field is not a proper solution. I would propose adding two more methods here:
This means you can simply pass around a SigningClient, without needing to pass along either the wallet or an address to know how to sign it.
I agree with requiring the senderAddress in all the functions still, but at least this way we can find the proper address much easier. Other wrappers (outside of CosmJS) could then auto-fill in this field if they want, but this is the only change I would make in CosmJS to enable ease of use.