native To Xdr SCVal
Converts a native Kotlin value to an SCValXdr based on the type specification.
This is the core conversion method that handles all type mappings from Kotlin native types to Stellar XDR values. null converts to void and an SCValXdr passes through unchanged.
A parameter of spec type Address takes an account (G...) or contract (C...) strkey, or an Address of type Address.AddressType.ACCOUNT or Address.AddressType.CONTRACT. A parameter of spec type MuxedAddress also takes a muxed account (M...) or muxed contract (W...) strkey, or an Address of type Address.AddressType.MUXED_ACCOUNT or Address.AddressType.MUXED_CONTRACT.
Return
The converted SCValXdr
Parameters
value
The native Kotlin value to convert
type Def
The target type specification
Throws
for invalid types or conversion failures