2023-09-12 19:14:08 +00:00
|
|
|
//go:build !gowaku_no_rln
|
|
|
|
// +build !gowaku_no_rln
|
2022-11-26 15:57:11 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2023-01-11 15:58:49 +00:00
|
|
|
cli "github.com/urfave/cli/v2"
|
2022-11-26 15:57:11 +00:00
|
|
|
wcli "github.com/waku-org/go-waku/waku/cliutils"
|
|
|
|
)
|
|
|
|
|
|
|
|
func rlnFlags() []cli.Flag {
|
|
|
|
return []cli.Flag{
|
|
|
|
&cli.BoolFlag{
|
|
|
|
Name: "rln-relay",
|
|
|
|
Value: false,
|
|
|
|
Usage: "Enable spam protection through rln-relay",
|
|
|
|
Destination: &options.RLNRelay.Enable,
|
|
|
|
},
|
2023-09-04 21:44:41 +00:00
|
|
|
&cli.GenericFlag{
|
|
|
|
Name: "rln-relay-cred-index",
|
|
|
|
Usage: "the index of the onchain commitment to use",
|
|
|
|
Value: &wcli.OptionalUint{
|
|
|
|
Value: &options.RLNRelay.MembershipIndex,
|
|
|
|
},
|
2022-11-26 15:57:11 +00:00
|
|
|
},
|
|
|
|
&cli.BoolFlag{
|
|
|
|
Name: "rln-relay-dynamic",
|
|
|
|
Usage: "Enable waku-rln-relay with on-chain dynamic group management",
|
|
|
|
Destination: &options.RLNRelay.Dynamic,
|
|
|
|
},
|
|
|
|
&cli.PathFlag{
|
|
|
|
Name: "rln-relay-cred-path",
|
|
|
|
Usage: "RLN relay membership credentials file",
|
2023-09-14 21:24:34 +00:00
|
|
|
Value: "",
|
2022-11-26 15:57:11 +00:00
|
|
|
Destination: &options.RLNRelay.CredentialsPath,
|
|
|
|
},
|
|
|
|
&cli.StringFlag{
|
|
|
|
Name: "rln-relay-cred-password",
|
2023-09-14 21:24:34 +00:00
|
|
|
Value: "",
|
2022-11-26 15:57:11 +00:00
|
|
|
Usage: "Password for encrypting RLN credentials",
|
|
|
|
Destination: &options.RLNRelay.CredentialsPassword,
|
|
|
|
},
|
2023-08-18 13:59:37 +00:00
|
|
|
&cli.StringFlag{
|
|
|
|
Name: "rln-relay-tree-path",
|
|
|
|
Value: "",
|
|
|
|
Usage: "Path to the RLN merkle tree sled db (https://github.com/spacejam/sled)",
|
|
|
|
Destination: &options.RLNRelay.TreePath,
|
|
|
|
},
|
2022-11-26 15:57:11 +00:00
|
|
|
&cli.StringFlag{
|
|
|
|
Name: "rln-relay-eth-client-address",
|
|
|
|
Usage: "Ethereum testnet client address",
|
|
|
|
Value: "ws://localhost:8545",
|
|
|
|
Destination: &options.RLNRelay.ETHClientAddress,
|
|
|
|
},
|
|
|
|
&cli.GenericFlag{
|
|
|
|
Name: "rln-relay-eth-contract-address",
|
2023-08-10 21:55:43 +00:00
|
|
|
Usage: "Address of membership contract",
|
2022-11-26 15:57:11 +00:00
|
|
|
Value: &wcli.AddressValue{
|
|
|
|
Value: &options.RLNRelay.MembershipContractAddress,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|