sendResult method
Implementation
Future<void> sendResult(
int id,
String topic,
String method,
dynamic result,
) async {
// print('sending result');
final Map<String, dynamic> payload = PairingUtils.formatJsonRpcResponse(
id,
result,
);
final String message = await core.crypto.encode(topic, payload);
// final JsonRpcRecord? record = core.history.get(id);
// if (record == null) {
// return;
// }
final RpcOptions opts = RPCConstants.PAIRING_RPC_OPTS[method]['res'];
await core.relayClient.publish(topic, message, opts.ttl);
// await core.history.resolve(payload);
}