@alphabatem/solana-sale-toast
TypeScript icon, indicating that this package has built-in type declarations

1.1.18 • Public • Published

Solana NFT Sale Toast

Automatically display recent sales popups to increase your sales on your online store.

Example Toast

Powered By

Quick Start

  1. Install Solana Toast
yarn add @alphabatem/solana-sale-toast
  1. Obtain a Hellomoon API Key & DataStream (https://www.hellomoon.io/developers)

  2. Create your data stream (you can add additional filters here if you are only monitoring 1 collection etc) HelloMoon data stream setup

  3. Grab your subscriptionID from the Datastreams section HelloMoon datastreams

  4. Grab your apiKey from the Dashboard section HelloMoon dashboard

  5. Setup the solana toast in your code

const apiKey = "" //HelloMoon API Key
const subscriptionId = "" //HelloMoon Datastream ID
const enrichMetadata = true //Retrieve mint image (where available)

const connection = CreateSolanaToastClient(apiKey, subscriptionId, enrichMetadata)
connection.setCollectionFilter(new FilterOpts({
    collectionName: "AlphaBatem", //Filter to collection name
}))
connection.listen()

Top stop the connection run:

connection.close()
  1. Filter Options can be used to further filter the inbound datastream (say if you wish for it to be more generic etc) - This also helps for changing dynamically between collections (say on a marketplace, just adjust the collectionFilter to match the current browsed collection)
new FilterOpts({
    collectionName: "AlphaBatem", //Filter sales to only this collection
	minPrice: 0.1 //Filter only sales above this price
})
  1. Include the base theme css file & adjust the style to your suiting
import "@alphabatem/solana-sale-toast/css/solana_toast.css";
  1. All set! Example Toast

Package Sidebar

Install

npm i @alphabatem/solana-sale-toast

Weekly Downloads

0

Version

1.1.18

License

MIT

Unpacked Size

39.1 kB

Total Files

67

Last publish

Collaborators

  • cloakd