GithubHelp home page GithubHelp logo

botfuturesavings / cardano-nft-mint-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thaddeusdiamond/cardano-nft-js-toolkit

0.0 0.0 0.0 1.78 MB

This package provides a simple example of how to use Lucid to build a frontend dApp for NFT minting

License: Apache License 2.0

JavaScript 69.76% CSS 1.26% HTML 28.98%

cardano-nft-mint-frontend's Introduction

cardano-nft-js-toolkit

This package provides a simple example of how to use Lucid to build a frontend dApp for NFT minting

Quickstart

Prerequisites:

You must update your secrets in a root file called src/js/secrets.js. The file should contain the following format:

// Blockfrost.io keys (used across pages)
export const BLOCKFROST_PROJ = "<BLOCKFROST_PROJ>"
// Used in drop-payment.js
export const PAYMENT_ADDR = "<PAYMENT_ADDR>"
export const MINT_PRICE = <MINT_PRICE_IN_LOVELACE>;
export const LOWER_LIMIT = <MIN_TO_MINT_USUALLY_ONE>;
export const UPPER_LIMIT = <MAX_TO_MINT_AT_ONCE>;
// Used in nft-creator.js
export const MAX_QUANTITY = <MAX_QUANTITY_OF_FTS_FOR_1OF1_MINTER>;
export const REQUIRED_POLICY_KEY = "<GATEKEEPING_NFT_POLICY>";
// Used in vending-machine.js
export const REQUIRED_POLICY_MIN = <MIN_TO_USE_1OF1_MINTER>;
export const REQUIRED_VENDING_MACHINE_RATIO = <RATIO_FOR_AMOUNT_TO_VEND_PER_GATEKEEPING_NFT>;

โš ๏ธ DO NOT COMMIT SECRETS TO THIS REPOSITORY!!

Before your very first run (or any time you change the dependencies), you MUST run:

npm i

To install all the required dependencies.

The sample module in src/js/tools/drop-payment.js contains functions that are bound to the DOM in src/static/drop-payment.html. To build the required JS modules into a single webpack JS, run:

npm run build

Then, serve the src/static/drop-payment.html using a web application server you prefer. We recommend (for quickstarts, not production), static-server. To install this, run:

npm i static-server

Then, to serve the pages:

cd dist/
static-server

Build

The expected output of this package is a set of Javascript and WASM resources in dist/ for deployment to a production dApp. To compile these, run this from project root:

npm run build

To completely reset the cache and prior builds, simply run:

rm -fr dist/

Tests

Tests can be run through npm in the root directory:

npm run test

cardano-nft-mint-frontend's People

Contributors

thaddeusdiamond 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.