From d14e3be64ef3faa1bae621826873d097d3928110 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 18 Aug 2022 10:42:18 -0400 Subject: [PATCH] chore: add comments to rln options --- waku/v2/node/wakuoptions_rln.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/waku/v2/node/wakuoptions_rln.go b/waku/v2/node/wakuoptions_rln.go index 307a5754..c3ee7865 100644 --- a/waku/v2/node/wakuoptions_rln.go +++ b/waku/v2/node/wakuoptions_rln.go @@ -11,6 +11,8 @@ import ( "github.com/status-im/go-waku/waku/v2/protocol/rln" ) +// WithStaticRLNRelay enables the Waku V2 RLN protocol in offchain mode +// Requires the `gowaku_rln` build constrain (or the env variable RLN=true if building go-waku) func WithStaticRLNRelay(pubsubTopic string, contentTopic string, memberIndex r.MembershipIndex, spamHandler rln.SpamHandler) WakuNodeOption { return func(params *WakuNodeParameters) error { params.enableRLN = true @@ -23,6 +25,8 @@ func WithStaticRLNRelay(pubsubTopic string, contentTopic string, memberIndex r.M } } +// WithStaticRLNRelay enables the Waku V2 RLN protocol in onchain mode. +// Requires the `gowaku_rln` build constrain (or the env variable RLN=true if building go-waku) func WithDynamicRLNRelay(pubsubTopic string, contentTopic string, memberIndex r.MembershipIndex, idKey *r.IDKey, idCommitment *r.IDCommitment, spamHandler rln.SpamHandler, ethClientAddress string, ethPrivateKey *ecdsa.PrivateKey, membershipContractAddress common.Address) WakuNodeOption { return func(params *WakuNodeParameters) error { params.enableRLN = true