syntax = "proto3";

import "amino/amino.proto";
import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "cosmos_proto/cosmos.proto";

// AminoSignFee is the legacy amino json sign mode compatible version of txv1beta1.Fee, and differs from that message
// by the name of the Gas field (GasLimit in txv1beta.Fee).
// Note: this is only used for signing, see x/tx/signing/aminojson.go for more details.
message AminoSignFee {
  repeated cosmos.base.v1beta1.Coin amount  = 1 [(amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins"];
  uint64                            gas     = 2 [(amino.dont_omitempty) = true];
  string                            payer   = 3;
  string                            granter = 4;
}

// AminoSignDoc is a message container used to generate the SIGN_MODE_LEGACY_AMINO_JSON sign bytes with proto3 API.
// Note: This is only used for generated JSON in signing, see x/tx/signing/aminojson.go for more details.
// We allow omitempty based on what is already defined in the legacy StdSignDoc.
message AminoSignDoc {
  uint64       account_number       = 1 [(amino.dont_omitempty) = true];
  uint64       sequence             = 2 [(amino.dont_omitempty) = true];
  uint64       timeout_height       = 3;
  string       chain_id             = 4 [(amino.dont_omitempty) = true];
  string       memo                 = 5 [(amino.dont_omitempty) = true];
  AminoSignFee fee                  = 6 [(amino.dont_omitempty) = true];
  repeated google.protobuf.Any msgs = 7 [(amino.dont_omitempty) = true];
  bool unordered = 8 [(amino.dont_omitempty) = false, (cosmos_proto.field_added_in) = "cosmos-sdk 0.53"];
  google.protobuf.Timestamp timeout_timestamp = 9
      [(amino.dont_omitempty) = false, (cosmos_proto.field_added_in) = "cosmos-sdk 0.53"];
}
