toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    "numSignatures": numSignatures,
    "padding": padding,
    "signatureOffset": signatureOffset,
    "signatureInstructionIndex": signatureInstructionIndex,
    "publicKeyOffset": publicKeyOffset,
    "publicKeyInstructionIndex": publicKeyInstructionIndex,
    "messageDataOffset": messageDataOffset,
    "messageDataSize": messageDataSize,
    "messageInstructionIndex": messageInstructionIndex,
    "publicKey": publicKey.toAddress().address,
    "signature": BytesUtils.toHexString(signature, prefix: "0x"),
    "message": StringUtils.tryDecode(message) ??
        BytesUtils.toHexString(message, prefix: "0x")
  };
}