Socket
Socket
Sign inDemoInstall

@banq/wallet-nft-widget

Package Overview
Dependencies
86
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @banq/wallet-nft-widget

Our **"NFT Linking"** widget enables platforms to quickly process migrating NFTs from banq Account to any other platform of NFC.


Version published
Weekly downloads
2
increased by100%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Overview

Our "NFT Linking" widget enables platforms to quickly process migrating NFTs from banq Account to any other platform of NFC.

Overview

Main Entities

The Banq is source and platform is a destination in migrate example:

  • Banq services:
    • Open API
    • NFT Linking widget
    • NFT Web App
  • NFT Platform (the platform should has an account on Banq)
  • User (Owner of NFTs)

Native JavaScript

The simplest way is adding html's block on your web page.

<script src="https://walletnft-widget.sandbox.banq.com/ecommerce.js"></script>
<div id="nft-link-banq"></div>
<script>
  const app = new window.ecommerceBanqWidget({
    selector: '#nft-link-banq',
    // `platformId` is from `banq/AccountSpace`
    platformId: "00000000-0000-0000-0000-000000000000",
    // this function will trigger callback when user will close widget
    onPopUpClose: () => {
      console.log('pop up is closed action');
    },
    // this function will trigger callback after success payment
    onPaymentSuccess: () => {
      console.log('this triggers after payment completed successfully');
    }
  });
  app.bootstrapApp();
</script>

Installation

To install the stable version, run:

npm install --save @banq/wallet-nft-widget
# or
yarn add @banq/wallet-nft-widget

Usage

Add this import to starting point of your project such as: index.js or index.ts files

import '@banq/wallet-nft-widget'

Create a <link-nft-widget-dialog /> element with required attributes mentioned below.

  <link-nft-widget-dialog platformId="<PLATFORM_ID>" />

Attributes:

NameRequiredDescription
environmentFor testing use other environment
platformIdplatformId from banq/AccountSpace/platformId

Events:

NameDescription
closeFires after widget closes
successPaymentFires when user creates payment

Create a <link-nft-banq-button /> element with required attributes mentioned below.

<link-nft-banq-button
  className="buttonStyle"
  disabled="false"
  loading="false"
  error="false"
/>

Attributes:

NameRequiredDescription
classNameFor styling button
disabledDisables pay with banq button
loadingShows loading indicator
errorShows error indicator

FAQs

Last updated on 16 Dec 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc