GithubHelp home page GithubHelp logo

alphabatem / solana-sale-toast Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 129 KB

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

TypeScript 85.26% CSS 14.74%

solana-sale-toast's Introduction

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

solana-sale-toast's People

Contributors

cloakd avatar

Stargazers

bill_papas_12 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.