Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docs on proto annotations #15548

Merged
merged 8 commits into from
Sep 7, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/docs/building-apps/03-protobuf-annotations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
sidebar_position: 1
---

# ProtocolBuffer Annotations

This document explains the various protobuf scalars that have been added to make working with protobuf easier for Cosmos SDK application developers

## Scalars

(cosmos_proto.scalar) = "cosmos.AddressString";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note to also describe AddressBytes, ValidatorAddressString/Bytes and ConsensusAddressString/Bytes. Basically we want to cover all of what is in the global config and sdk.{Acc/Val/Cons}Address


## Interfaces

option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI";

## Amino

### Name

option (amino.name) = "cosmos-sdk/BaseAccount";

### Field Name

(amino.field_name) = "public_key"

### Dont_OmitEmpty

(amino.dont_omitempty) = true,

### Encoding

(amino.encoding) = "legacy_coins",