🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@krakenfx/verify

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@krakenfx/verify

Kraken Verify access control contracts for EAS attestations

0.1.3
latest
npm
Version published
Maintainers
2
Created
Source

@krakenfx/verify

Solidity contracts for Kraken Verify - EAS attestation utilities for verified Kraken users.

Installation

# Using npm
npm install @krakenfx/verify

# Using yarn
yarn add @krakenfx/verify

# Using pnpm
pnpm add @krakenfx/verify

Setup

Solidity Setup

Remappings

Generate remappings for Foundry:

forge remappings > remappings.txt

You might need to add this extra one manually if you're using pnpm:

@ethereum-attestation-service/=node_modules/.pnpm/@ethereum-attestation-service+eas-contracts@1.8.0/node_modules/@ethereum-attestation-service

IDE Configuration

Update your IDE to support remappings. For VS Code:

// .vscode/settings.json
{
  "solidity.remappings": [
    "...=node_modules/...",
  ]
}

TypeScript Setup

If you're using TypeScript in your project, make sure to configure it to handle JSON imports:

// tsconfig.json
{
  "compilerOptions": {
    // ...other options
    "resolveJsonModule": true,
    "esModuleInterop": true
  }
}

Smart Contract Usage

// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

// Import directly from package
import { KrakenVerifyAccessControl } from "@krakenfx/verify/src/abstracts/KrakenVerifyAccessControl.sol";

contract MyContract is KrakenVerifyAccessControl {
    // Only users with valid Kraken Verify attestations can call this function
    function verifiedUserFunction() external onlyVerified {
        // Your implementation
    }
}

Client Usage

ESM / TypeScript

// ES Modules / TypeScript
import { VerifyClient } from "@krakenfx/verify";

const verifyClient = new VerifyClient();

// Check if an address is verified
const isVerified = await verifyClient.isAddressVerified(
  "0x2193981f2d65149644C039c9071f2bE8b5938F0B"
);

console.log(
  `Verification result: ${isVerified ? "✅ Verified" : "❌ Not verified"}`
);

CommonJS

// CommonJS
const { VerifyClient } = require("@krakenfx/verify");

const verifyClient = new VerifyClient();

// Check if an address is verified
async function checkVerification() {
  const isVerified = await verifyClient.isAddressVerified(
    "0x2193981f2d65149644C039c9071f2bE8b5938F0B"
  );
  
  console.log(
    `Verification result: ${isVerified ? "✅ Verified" : "❌ Not verified"}`
  );
}

checkVerification();

What's Included

This package provides access control for verified Kraken users through EAS attestations:

  • KrakenVerifyAccessControl.sol: Abstract contract with the onlyVerified modifier
  • Supporting libraries and interfaces for attestation verification
  • TypeScript client for verification checks

Requirements

  • Solidity 0.8.24
  • TypeScript (for client usage)
  • Viem (peer dependency for TypeScript client)

License

MIT

Keywords

ethereum

FAQs

Package last updated on 09 Apr 2025

Did you know?

Socket

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.

Install

Related posts