decodeWithResult method
Implementation
DecodeAddressResult decodeWithResult(String addr, {int? workChain}) {
final decode = TonAddressUtils.decodeAddress(addr);
if (workChain != null && workChain != decode.workchain) {
throw AddressConverterException.addressValidationFailed(
reason: "Invalid address workchain.",
network: "Ton",
details: {
"expected": workChain.toString(),
"workchain": decode.workchain.toString(),
},
);
}
return decode;
}