Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@gitcoin/gs-passport-verifier
Advanced tools
Verify the contents of a Gitcoin Passport
Add to your project...
yarn add @gitcoinco/passport-sdk-verifier
--
Or download this .git repository and install deps manually...
yarn install
Build...
yarn run webpack
Firstly, we need to import the library/bundle and construct a PassportVerifier
instance
// import as a module
import PassportVerifier from "@gitcoinco/passport-sdk-verifier";
// or import the bundle
<script src="./dist/verifier.bundle.js" type="script/javascript"/>
...
// create a new instance pointing at the community clay node on mainnet along with the criteria we wish to score against
const verifier = new PassportVerifier();
// Verify all Stamps held within a Passport
const passport = await verifier.verifyPassport("0x0...");
Browser Usage
If you are using this package in a browser, you may need to asynchronously load @gitcoinco/passport-sdk-verifier
'`
before using.
// NextJS Example
const [verifier, setVerifier] = useState();
useEffect(() => {
const initVerifier = async () => {
// Dynamically load @gitcoinco/passport-sdk-verifier
const PassportVerifier = (await import("@gitcoinco/passport-sdk-verifier")).PassportVerifier;
setVerifier(new PassportVerifier("https://ceramic.staging.dpopp.gitcoin.co"));
};
initVerifier().then(() => {
console.log("Verifier inited :)");
});
}, []);
The PassportVerifier
instance exposes read-only methods to verify the content of a Gitcoin Passport:
verifyPassport
- pass in an ethereum address and get back a Passport where each stamps contains a verified: boolean
fieldPassportVerifier.verifyPassport(address: string, passport?: Passport, additionalStampCheck?: (stamp: Stamp) => boolean): Promise<Passport>
verifyStamp
- pass in a Stamp and get back a Stamp with the verified: boolean
field completedPassportVerifier.verifyStamp(address: string, stamp: Stamp, additionalStampCheck?: (stamp: Stamp) => boolean): Promise<Stamp>
verifyCredential
- pass in a VerifiableCredentail and get back a booleanPassportVerifier.verifyCredential(credential: VerifiableCredential): Promise<boolean>
FAQs
Verify the contents of a Gitcoin Passport
The npm package @gitcoin/gs-passport-verifier receives a total of 2 weekly downloads. As such, @gitcoin/gs-passport-verifier popularity was classified as not popular.
We found that @gitcoin/gs-passport-verifier demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.