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

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

// Transform from terra/treasury/v1beta1/genesis.proto
@file:GeneratorVersion(version = "0.5.2")

package terra.treasury.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 TaxCapConverter : ProtobufConverter

public fun TaxCap.toAny(): Any = Any(TaxCap.TYPE_URL, with(TaxCapConverter) { toByteArray() })

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

public val TaxCap.Companion.converter: TaxCapConverter
  get() = TaxCapConverter

public expect object EpochStateConverter : ProtobufConverter

public fun EpochState.toAny(): Any = Any(EpochState.TYPE_URL, with(EpochStateConverter) {
    toByteArray() })

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

public val EpochState.Companion.converter: EpochStateConverter
  get() = EpochStateConverter




© 2015 - 2025 Weber Informatics LLC | Privacy Policy