decode_boc method
Solidity functions use ABI types for builder encoding. The simplest way to decode such a BOC is to use ABI decoding. ABI has it own rules for fields layout in cells so manually encoded BOC can not be described in terms of ABI rules.
To solve this problem we introduce a new ABI type Ref(<ParamType>)
which allows to store ParamType ABI parameter in cell reference and, thus,
decode manually encoded BOCs. This type is available only in decode_boc function
and will not be available in ABI messages encoding until it is included into some ABI revision.
Such BOC descriptions covers most users needs. If someone wants to decode some BOC which can not be described by these rules (i.e. BOC with TLB containing constructors of flags defining some parsing conditions) then they can decode the fields up to fork condition, check the parsed data manually, expand the parsing schema and then decode the whole BOC with the full schema.
Implementation
Future<ResultOfDecodeBoc> decode_boc(ParamsOfDecodeBoc params) async {
final res =
await _tonCore.request('abi.decode_boc', params.toString());
return ResultOfDecodeBoc.fromMap(res);
}