toMap

Build a SCValXdr with the type of SCValTypeXdr.SCV_MAP.

The entries are emitted in the Soroban host's key order (compareScValHostOrder), which the host requires of every map argument; the iteration order of map does not matter.

Return

SCValXdr with the type of SCValTypeXdr.SCV_MAP

Parameters

map

map to convert

Throws

if two keys are equal in host order


Build a SCValXdr with the type of SCValTypeXdr.SCV_MAP from entries, sorted into the Soroban host's key order (compareScValHostOrder).

This overload preserves separate entries whose converted keys compare equal, allowing duplicate-key validation.

Return

SCValXdr with the type of SCValTypeXdr.SCV_MAP

Parameters

entries

map entries in any order

Throws

if two keys are equal in host order