registry-sdk/proto/cosmos/base/v1beta1/coin.proto

62 lines
1.8 KiB
Protocol Buffer
Raw Permalink Normal View History

2022-03-31 10:00:02 +00:00
syntax = "proto3";
package cosmos.base.v1beta1;
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";
2022-03-31 10:00:02 +00:00
option go_package = "github.com/cosmos/cosmos-sdk/types";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.stringer_all) = false;
// Coin defines a token with a denomination and an amount.
//
// NOTE: The amount field is an Int which implements the custom method
// signatures required by gogoproto.
message Coin {
option (gogoproto.equal) = true;
string denom = 1;
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
2022-03-31 10:00:02 +00:00
}
// DecCoin defines a token with a denomination and a decimal amount.
//
// NOTE: The amount field is an Dec which implements the custom method
// signatures required by gogoproto.
message DecCoin {
option (gogoproto.equal) = true;
string denom = 1;
string amount = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
2022-03-31 10:00:02 +00:00
}
// IntProto defines a Protobuf wrapper around an Int object.
// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
2022-03-31 10:00:02 +00:00
message IntProto {
string int = 1 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
2022-03-31 10:00:02 +00:00
}
// DecProto defines a Protobuf wrapper around a Dec object.
// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
2022-03-31 10:00:02 +00:00
message DecProto {
string dec = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
2022-03-31 10:00:02 +00:00
}