Summary
part of #11970
Allow golang clients to be able to generate and sign Txs with SIGN_MODE_TEXTUAL.
Problem Definition
In #13700 we added a SignModeHandler, which means we're able to call GetSignBytes with Textual using our client Tx infrastructure (TxConfig, TxBuilder...).
However, Textual signing is not stateless, and generating the sign doc needs access to latest state (for coin metadata). This issue is about how a client-side Textual can access to state.
For this, we proposed in #13646 to add a context.Context arg to some of the signing functions. Most notably, on the client side, both Sign and SignWithPrivKey take a new context.Context arg.
Proposal
Summary
part of #11970
Allow golang clients to be able to generate and sign Txs with SIGN_MODE_TEXTUAL.
Problem Definition
In #13700 we added a SignModeHandler, which means we're able to call
GetSignByteswith Textual using our client Tx infrastructure (TxConfig, TxBuilder...).However, Textual signing is not stateless, and generating the sign doc needs access to latest state (for coin metadata). This issue is about how a client-side Textual can access to state.
For this, we proposed in #13646 to add a
context.Contextarg to some of the signing functions. Most notably, on the client side, bothSignandSignWithPrivKeytake a newcontext.Contextarg.Proposal
Textualinstance to the client.Context's TxConfig, we should make so that Textual's coinMetadataQuerier instantiates a bank query client using thegrpc.ClientConn, and retrieves the coin metadata via a remote gRPC query.