7.0.2 • Published 2 years ago

@banq/wallet-nft-widget v7.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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
7.0.2

2 years ago

7.0.1

2 years ago

7.0.0

2 years ago

6.0.0

2 years ago

5.0.0

2 years ago

4.0.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

0.0.1

2 years ago