toJson method
Implementation
CborMapValue<CborIntValue, CborBytesValue> toJson() {
final attrs = <CborIntValue, CborBytesValue>{};
if (hdPathEncBytes != null) {
attrs[CborIntValue(1)] = CborBytesValue(
CborBytesValue(hdPathEncBytes!).encode(),
);
}
if (networkMagic != null &&
networkMagic != ADANetwork.mainnet.protocolMagic) {
attrs[CborIntValue(2)] = CborBytesValue(
CborIntValue(networkMagic!).encode(),
);
}
return CborMapValue.definite(attrs);
}