Skip to content

TEXTUAL public keys value renderer #13626

Closed

Description

Summary

Part of #11970

Define how public keys should be value-rendered in SIGN_MODE_TEXTUAL.

Problem Definition

We didnt' define public keys value renderers in ADR-050. Currently, they would be displayed as normal messages (i.e. Proposal 1).

Which high-level format should we display pubkeys in (bytes, or a struct)?

Recall, we mainly have 3 types of pubkeys: secp256k1, ed25519 and legacy multisigs.

Proposal 1

No custom value renderer for pubkeys. We would have:

* PubKey object
*> Key: 123ABC

ref:

message PubKey {
option (gogoproto.goproto_stringer) = false;
bytes key = 1;
}

Pro: visibility into sub pubkeys
cons: longer screens

Proposal 2

Use the Bytes() method on the pubkey interface.

Rendered:

*Public key: 123ABC

Small Pro: people are used to this Bytes() method, albeit in base64 format
Big con: this would rely on Amino, because of LegacyMultisig:

// Bytes returns the proto encoded version of the LegacyAminoPubKey
func (m *LegacyAminoPubKey) Bytes() []byte {
return AminoCdc.MustMarshal(m)
}

Proposal 3

Define something completely new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions