All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.terra.dyncomm.v1beta1.genesis.converter.kt Maven / Gradle / Ivy

There is a newer version: 3.1.6-4
Show newest version
// Transform from terra/dyncomm/v1beta1/genesis.proto
@file:GeneratorVersion(version = "0.5.2")

package terra.dyncomm.v1beta1

import google.protobuf.Any
import java.lang.IllegalStateException
import kr.jadekim.protobuf.`annotation`.GeneratorVersion
import kr.jadekim.protobuf.converter.ProtobufConverter
import kr.jadekim.protobuf.converter.parseProtobuf

public expect object GenesisStateConverter : ProtobufConverter

public fun GenesisState.toAny(): Any = Any(GenesisState.TYPE_URL, with(GenesisStateConverter) {
    toByteArray() })

public fun Any.parse(converter: ProtobufConverter = GenesisStateConverter):
    GenesisState {
  if (typeUrl != GenesisState.TYPE_URL) throw IllegalStateException("Please check the type_url")
  return value.parseProtobuf(converter)
}

public val GenesisState.Companion.converter: GenesisStateConverter
  get() = GenesisStateConverter

public expect object ValidatorCommissionRateConverter : ProtobufConverter

public fun ValidatorCommissionRate.toAny(): Any = Any(ValidatorCommissionRate.TYPE_URL,
    with(ValidatorCommissionRateConverter) { toByteArray() })

public fun Any.parse(converter: ProtobufConverter =
    ValidatorCommissionRateConverter): ValidatorCommissionRate {
  if (typeUrl != ValidatorCommissionRate.TYPE_URL) throw
      IllegalStateException("Please check the type_url")
  return value.parseProtobuf(converter)
}

public val ValidatorCommissionRate.Companion.converter: ValidatorCommissionRateConverter
  get() = ValidatorCommissionRateConverter




© 2015 - 2025 Weber Informatics LLC | Privacy Policy