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

commonMain.terra.wasm.v1beta1.wasm.converter.kt Maven / Gradle / Ivy

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

package terra.wasm.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 LegacyCodeInfoConverter : ProtobufConverter

public fun LegacyCodeInfo.toAny(): Any = Any(LegacyCodeInfo.TYPE_URL, with(LegacyCodeInfoConverter)
    { toByteArray() })

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

public val LegacyCodeInfo.Companion.converter: LegacyCodeInfoConverter
  get() = LegacyCodeInfoConverter

public expect object LegacyContractInfoConverter : ProtobufConverter

public fun LegacyContractInfo.toAny(): Any = Any(LegacyContractInfo.TYPE_URL,
    with(LegacyContractInfoConverter) { toByteArray() })

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

public val LegacyContractInfo.Companion.converter: LegacyContractInfoConverter
  get() = LegacyContractInfoConverter




© 2015 - 2025 Weber Informatics LLC | Privacy Policy