func Res To Native
Converts a contract function result from XDR to a native Kotlin value.
This method takes the XDR result value returned from a contract function call and converts it back to a native Kotlin type based on the function's output specification.
Usage
// With SCValXdr
val result = spec.funcResToNative("balance", resultScVal)
// With base64-encoded XDR
val result = spec.funcResToNative("balance", "AAAAAwAAAAQ=")Return
The converted native Kotlin value, or null for void results
Parameters
The function name
The result value as SCValXdr
Throws
if the function is not found, has multiple outputs, or type conversion fails
Converts a contract function result from base64-encoded XDR to a native Kotlin value.
This is a convenience overload that first decodes the base64 XDR string before conversion.
Return
The converted native Kotlin value, or null for void results
Parameters
The function name
The result value as base64-encoded XDR string
Throws
if the function is not found, has multiple outputs, or type conversion fails