when (NimMajor, NimMinor) < (1, 4): {.push raises: [Defect].} else: {.push raises: [].} import stew/results, ../../waku/common/logging, ../../waku/waku_node, ../../waku/waku_rln_relay, ./erc_5564_interface as StealthCommitmentFFI, ./node_spec, ./wire_spec export wire_spec, logging type StealthCommitmentProtocol* = object wakuApp: App contentTopic: string spendingKeyPair: StealthCommitmentFFI.KeyPair viewingKeyPair: StealthCommitmentFFI.KeyPair proc deserialize(T: type StealthCommitmentFFI.PublicKey, v: SerializedKey): Result[T, string] = # deserialize seq[byte] into array[32, uint8] if v.len != 32: return err("invalid key length") var buf: array[32, uint8] for i in 0..