npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mantial/react-minting-sdk

v1.0.2

Published

Mantial - Minting SDK

Downloads

1

Readme

@mantial/react-minting-sdk

Source code at https://github.com/mantial/react-minting-sdk

Installation

npm install @mantial/react-minting-sdk

Build

npm run rollup

Testing library locally

First, generate the react-minting-sdk-version.tgz file with:

npm pack

Move .tgz to the target project

npm install react-minting-sdk-version.tgz

Usage

The MinterContextProvider must enclose the Mantial components used. For example:

import React from 'react';
import {MinterContextProvider} from '@mantial/react-minting-sdk';

const customMantialConfig = {
    //your custom mantial config
}

function App(){
    return(
        <MinterContextProvider config={{...customMantialConfig}}>
            <Router />  //the rest of your app...
        </MinterContextProvider>
    )
}

export default App;

Then, you are able to use our components somewhere. For example:

import React from 'react';
import {Minter} from '@mantial/react-minting-sdk';

function Form(){
    return(
        <div>
            <h2>Mint your NFT</h2>
            <Minter />
        </div>
    )
}

export default App;

Mantial configuration

Under the hood this use Material-UI to apply styling. Be sure to read documentation if you want to customize this 100%

{
    network: 'ropsten' | 'ethereum', //network where the iframe is going to run, being "ethereum" mainnet and "ropsten" testnet.
    collectionSlug: string //slug for your collection. Use the same that you use to register it, you MUST to put the slug correctly, otherwise it won't work,
    amount: string //The amount of NFTs you want the user to be able to mint,
    showTitle: boolean //if you want to show the title above the mint button,
    amountSelector: boolean //if you want the user to be able to select how many NFTs mint(max 5),
    saleSelector: boolean //if you want the user to be able to see the different active sales,
    saleId: string //use this in case you want to create a mint button that works with a particular sale (without the selector) so that it only allows users to mint for a particular sale,
    showDetails: boolean //if you want the user to be able to see details from the operation,
    showErrors: boolean //if you want the user to be able to see the different errors that can occur in the minting process,
    theme: any, // ---> [MUI v5 theme](https://mui.com/material-ui/customization/theming/),
    styles: { // ---> [allow inline styles applied as 'sx' to MUI components](https://mui.com/system/the-sx-prop/)
        button: any,
        mintButton: any,
        switchNetworkButton: any,
        container: any,
        title: any,
        error: any,
        amount: any,
        iconButton: any,
        texts: any,
        success: any,
        minting: any,
        minterContainer: any,
        description: any,
        installMetamaskButton: any,
    },
    texts: {
        title: string //title you want to show above the mint button,
        minting: string //text you want to show while the minting is happening,
        success: string //text you want to show if the mint was success,
        buy: string //text you want to show on the mint button "Buy" by default,
        goBack: string //text you want to show to go back once the mint was success;
        description: string //a description for some details you want to show,
        switchNetwork: string //text to show when the network is not the correct "Switch Network" by default,
        installMetamask: string //text to show when metamask is not installed "Install Metamask" by default,
    },
};