decode_boc docs
@@ -28,7 +28,24 @@ pub struct ResultOfDecodeBoc {
pub data: Value,
}
-/// Decodes BOC as a set of provided parameters.
+/// Decodes BOC into JSON as a set of provided parameters.
+///
+/// Solidity functions use ABI types for [builder encoding](https://github.com/tonlabs/TON-Solidity-Compiler/blob/master/API.md#tvmbuilderstore).
+/// 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.
+
#[api_function]
pub async fn decode_boc(
context: Arc<ClientContext>,
