New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@arcxmoney/passport-js

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcxmoney/passport-js

Component to show Defi Passport

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by71.43%
Maintainers
4
Weekly downloads
 
Created
Source

CircleCI Commitizen friendly

Introduction

Passport.js ノ is a small React library that offers interactive components to display an individual's DeFi passport in your application.

Check out the demo here

How it works

The Passport component fetches an address' information from our backend servers and upon success returns the user's passport video.

If the user has no DeFi passport, no widget will be shown.

Passport component

Installation

Install our package either through yarn add @arcxmoney/passport-js or npm install @arcxmoney/passport-js --save.

Implementation

The Passport component is an absolute positioned component written to load on top of your application. We recommend placing it higher up your component tree for readability, but also inside your Web3 provider.

Below is an example of how to combine the useWeb3React hook with the Passport component

import { Passport } from '@arcxmoney/passport-js';
import { useWeb3React } from '@web3-react/core'

const Page = () => {
    const { account } = useWeb3React();
    return (
        <Layout>
            <Passport account={account} />
        </Layout>
    );
}

Styling

The underlying <video /> component is fully customizable through the videoStyles prop.

<Passport
    videoStyles={{ border: '3px solid red' }}
    account={USER_ADDRESS} 
/>

Props

NameDescriptionRequiredDefault value
accountThe user's address.Yes
analyticsVoluntary prop to activate if you wish to help us out by sharing metrics. 🙂Notrue
videoStylesCustomize styles for the underlying video component.NoDefault Styles

Roadmap

We will be actively working on this library to help other protocols and builders integrate DeFi Passports and reputation.

Here's a small list of things currently being worked on:

  • Interactive video component
  • Utility functions for retrieving an account's passport information
  • Fully interactive WebGL Passport component

If you have any questions or suggestions, feel free to raise an issue in our repository.

Happy building! ノ

FAQs

Package last updated on 13 Oct 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc