parseForeignCallDefinition(syntax): Either<RulesError, ForeignCallDefinition>

Parses the foreign call definition and validates its structure.

Parameters

ParameterTypeDescription
syntaxforeignCallJSONThe 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.

Defined in

src/parsing/parser.ts:238