From FIPs P2P Marketplace
Implementation must contain a set of claims using
beezk
, already described as
provenance claim
which attests for a proof of origin of a NFT metadatapublisher or issuer claim
which attests for proof of originatorwholesaler claim
which attests for a proof of allowed or certified wholesaler
In gnark
circuits standard library, we get can translate this to:
merkle proof verification
merkle proof verification
zk snark verification
as in Is this wholesaler/marketplace certified to sell my NFTs? yes or no?
without disclosing which wholesaler are or not certified.We can define a claim, which must be referenced in the soulbound token, using circuits:
disable(address, claim_type, claim_signature_ref)
require(address, claim_type, claim_signature_ref)
grant(address, claim_type, claim_signature_ref)
revoke(address, claim_type, claim_signature_ref)
Alice SBT has references stored in Swarm with ZK signatures claims for an Issuer actor:
disable(0x, 'VIP members', hash value in hex)
: Disables VIP members claimrequire(0x, 'DAO members', hash value in hex)
: Requires the DAO members claimgrant(0x, 'Minting access to NFT contract', hash value in hex)
: Grants minting access to smart contractAn NFT has a SBT with Provenance claims:
require(0x, 'Certified Marketplace members', hash value in hex)
: Requires the Certified Marketplace members claimrequire(0x, 'NFT Owners', hash value in hex)
: Requires the NFT Ownership members claimgrant(0x, 'NFT metadata verification', hash value in hex)
: Grants NFT token address a verified metadata verification reference.A NFT marketplace has a smart contract with a verifier for NFT metadata verification:
require(0x, 'NFT metadata verification', hash value in hex)
: Requires the NFT metadata verification claimNote: Circuit implementation requires further investigation
===
gnark
circuits using Go toolingHardhat
Circuits are compiled inside build directory, where a solidity artifact is created.
There are two examples from gnark library, the default cubic equation circuit and a MiMC circuit called age18orOlder
. Additional helper functions are EdDSA signatures
, Merkle proofs
and zk-SNARK verifier
Solidity contracts
Solidity tests
Compiles build/contract/main.go
, outputs a proof and verifier. Builds a Solidity contract verifier ready to use.
MIT