Compare commits

..

No commits in common. "main" and "v0.0.8" have entirely different histories.
main ... v0.0.8

11 changed files with 12 additions and 8 deletions

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/waku-org/go-rln module github.com/status-im/go-rln
go 1.17 go 1.17

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -11,6 +11,10 @@ package rln
#cgo linux,amd64,musl,!android LDFLAGS:-L${SRCDIR}/../libs/x86_64-unknown-linux-musl #cgo linux,amd64,musl,!android LDFLAGS:-L${SRCDIR}/../libs/x86_64-unknown-linux-musl
#cgo linux,amd64,!musl,!android LDFLAGS:-L${SRCDIR}/../libs/x86_64-unknown-linux-gnu #cgo linux,amd64,!musl,!android LDFLAGS:-L${SRCDIR}/../libs/x86_64-unknown-linux-gnu
#cgo linux,386 LDFLAGS:-L${SRCDIR}/../libs/i686-unknown-linux-gnu #cgo linux,386 LDFLAGS:-L${SRCDIR}/../libs/i686-unknown-linux-gnu
#cgo linux,mips LDFLAGS:-L${SRCDIR}/../libs/mips-unknown-linux-gnu
#cgo linux,mips64 LDFLAGS:-L${SRCDIR}/../libs/mips64-unknown-linux-gnuabi64
#cgo linux,mips64le LDFLAGS:-L${SRCDIR}/../libs/mips64el-unknown-linux-gnuabi64
#cgo linux,mipsle LDFLAGS:-L${SRCDIR}/../libs/mipsel-unknown-linux-gnu
#cgo windows,386 LDFLAGS:-L${SRCDIR}/../libs/i686-pc-windows-gnu -lrln -lm -lws2_32 -luserenv #cgo windows,386 LDFLAGS:-L${SRCDIR}/../libs/i686-pc-windows-gnu -lrln -lm -lws2_32 -luserenv
#cgo windows,amd64 LDFLAGS:-L${SRCDIR}/../libs/x86_64-pc-windows-gnu -lrln -lm -lws2_32 -luserenv #cgo windows,amd64 LDFLAGS:-L${SRCDIR}/../libs/x86_64-pc-windows-gnu -lrln -lm -lws2_32 -luserenv
#cgo darwin,386,!ios LDFLAGS:-L${SRCDIR}/../libs/i686-apple-darwin #cgo darwin,386,!ios LDFLAGS:-L${SRCDIR}/../libs/i686-apple-darwin

View File

@ -7,21 +7,21 @@ import (
) )
// IDKey is an identity key as defined in https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view#Membership // IDKey is an identity key as defined in https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view#Membership
type IDKey = [32]byte type IDKey [32]byte
// IDCommintment is hash of identity key as defined in https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view#Membership // IDCommintment is hash of identity key as defined in https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view#Membership
type IDCommitment = [32]byte type IDCommitment [32]byte
// Each node of the Merkle tee is a Poseidon hash which is a 32 byte value // Each node of the Merkle tee is a Poseidon hash which is a 32 byte value
type MerkleNode = [32]byte type MerkleNode [32]byte
type Nullifier = [32]byte type Nullifier [32]byte
type ZKSNARK = [256]byte type ZKSNARK [256]byte
// Custom data types defined for waku rln relay ------------------------- // Custom data types defined for waku rln relay -------------------------
type MembershipKeyPair = struct { type MembershipKeyPair struct {
// user's identity key (a secret key) which is selected randomly // user's identity key (a secret key) which is selected randomly
// see details in https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view#Membership // see details in https://hackmd.io/tMTLMYmTR5eynw2lwK9n1w?view#Membership
IDKey IDKey IDKey IDKey
@ -50,7 +50,7 @@ type RateLimitProof struct {
Nullifier Nullifier Nullifier Nullifier
} }
type MembershipIndex = uint type MembershipIndex uint
type ProofMetadata struct { type ProofMetadata struct {
Nullifier Nullifier Nullifier Nullifier