Skip to content

Allow client-side signing with SIGN_MODE_TEXTUAL  #13747

@amaury1093

Description

@amaury1093

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

  • When passing a Textual instance to the client.Context's TxConfig, we should make so that Textual's coinMetadataQuerier instantiates a bank query client using the grpc.ClientConn, and retrieves the coin metadata via a remote gRPC query.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions