types

package module
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDuplicateKey

func CheckDuplicateKey(d *json.Decoder, path []string) error

CheckDuplicateKey checks duplicate keys in JSON

func CoinToProtoCoin

func CoinToProtoCoin(coin sdk.Coin) *basev1beta1.Coin

CoinToProtoCoin constructs a new protobuf coin from gogoproto coin. This function does not validate the coin.

func CoinsToProtoCoins

func CoinsToProtoCoins(coins sdk.Coins) []*basev1beta1.Coin

CoinsToProtoCoins constructs a new protobuf coin set from gogoproto coin set. This function does not validate the coin.

func GogoToProtobufDuration

func GogoToProtobufDuration(d *gogotypes.Duration) *durationpb.Duration

GogoToProtobufDuration converts a gogo duration to a protobuf duration.

func GogoToProtobufTimestamp

func GogoToProtobufTimestamp(ts *gogotypes.Timestamp) *timestamppb.Timestamp

GogoToProtobufTimestamp converts a gogo timestamp to a protobuf timestamp.

func ParseDate

func ParseDate(field string, date string) (time.Time, error)

ParseDate parses a date using the format yyyy-mm-dd.

func ProtoCoinToCoin

func ProtoCoinToCoin(coin *basev1beta1.Coin) (sdk.Coin, bool)

ProtoCoinToCoin constructs a new gogoproto coin from protobuf coin. This function will panic if the amount is negative or if the denomination is invalid.

func ProtoCoinsToCoins

func ProtoCoinsToCoins(coins []*basev1beta1.Coin) (sdk.Coins, bool)

ProtoCoinsToCoins constructs a new gogoproto coin set from protobuf coin set. This function will panic if the amount is negative or if the denomination is invalid.

func ProtobufToGogoTimestamp

func ProtobufToGogoTimestamp(ts *timestamppb.Timestamp) *gogotypes.Timestamp

ProtobufToGogoTimestamp converts a protobuf timestamp to a gogo timestamp.

Types

This section is empty.

Directories

Path Synopsis
Package math provides helper functions for doing mathematical calculations and parsing for the ecocredit module.
Package math provides helper functions for doing mathematical calculations and parsing for the ecocredit module.
cli
fixture
Package fixture defines fixture interfaces and implementations for testing server implementations with multiple backends.
Package fixture defines fixture interfaces and implementations for testing server implementations with multiple backends.
network
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL