Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@anima.org/db-widgt

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@anima.org/db-widgt

Darkblock.io React Component Library

unpublished
latest
npmnpm
Version
0.1.19
Version published
Maintainers
1
Created
Source

Darkblock.io React Component Library

Getting Started 🚀

Install Darkblock's React Component Library using yarn or npm

yarn add @darkblock.io/darkblock-widgets
npm i @darkblock.io/darkblock-widgets --save

Once the library is installed, import or require components into your codebase

import "@iproov/web"

require("@iproov/web")

Solana Widget Component

Input

  • tokenId: id of the NFT in Solana
  • walletAdapter: wallet context state object returned from useWallet()
  • callback: callback function to be triggered on the widget's state change (optional)
  • config: config object (optional)

callback function example, the callback function will have the widget's state passed as a parameter:

const cb = (param) => {
  console.log(param)
}

config object's default value:

{
  customCssClass: "",             // pass here a class name you plan to use
  debug: false,                   // debug flag to console.log some variables
  imgViewer: {                    // image viewer control parameters
    showRotationControl: true,
    autoHideControls: true,
    controlsFadeDelay: true,
  },
}

Example

This component needs to be used within the scope of the Solana Wallet Adapter component. useWallet should also be called under the Wallet Adapter scope:

import { ConnectionProvider, WalletProvider, useWallet } from "@solanawallet-adapter-react"
import SolanaDarkblockWidget from "@darkblock.io/darkblockwidgets"

const Widget = () => {
  const walletAdapter = useWallet()

  return (
    <SolanaDarkblockWidget
      tokenId="HgYuunWM9Hpi2oc3MpK31yvURoZhSog13jTbjQYYjPM"
      walletAdapter={walletAdapter}
      callback={cb}
      config={config}
    />
  )
}

const Main = () => {
  ...

  return (
    <ConnectionProvider endpoint={endpoint}>
      <WalletProvider wallets={wallets} autoConnect>
        <WalletModalProvider>
          <WalletMultiButton />

          <Widget />

        </WalletModalProvider>
      </WalletProvider>
    </ConnectionProvider>
  )
}

export default Main

FAQs

Package last updated on 17 Mar 2022

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