parseForeignCallDefinition
parseForeignCallDefinition(
syntax
):Either
<RulesError
,ForeignCallDefinition
>
Parses the foreign call definition and validates its structure.
Parameters
Parameter | Type | Description |
---|---|---|
syntax | foreignCallJSON | The JSON representation of the foreign call definition. |
Returns
Either
<RulesError
, ForeignCallDefinition
>
An object containing the foreign call’s name, address, function, return type, parameter types, and encoded indices.
Throws
An error if the return type or parameter types are unsupported.