-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Currently trying to use the library within a Java project, and have mostly been able to get a basic project working. Problem I have is that the inline UByte class isn't accessible to Java (can't see component1()
or getDecimals()
). Proposal would be to add Java friendly accessors like below
Additionally, as per the Kotlin guide, you cannot catch Kotlin exceptions, unless a method is annotated with @throws(SuiException::class)
https://kotlinlang.org/docs/java-to-kotlin-interop.html#checked-exceptions
data class SuiCoinMetadata(
val decimals: UByte,
val description: String,
val iconUrl: String?,
val id: String = "",
val name: String,
val symbol: String,
) {
@JvmName("getDecimalsAsInt")
fun getDecimalsAsInt(): Int = decimals.toInt()
}
Metadata
Metadata
Assignees
Labels
No labels