Minteandome
  • Introduction
    • Why use minteandome?
      • Features Overview
    • Team
  • Docs
    • 📚Getting Started
      • ⛓️Supported Chains
      • ⭐Sign up
      • 📑Create SmartContract
      • NFT Collection Details
      • 🔡Create NFTs
        • Mint new NFTs
      • 🔃Evolve NFTs
        • Mint evolved NFTs
      • Casper Mint / Evolve / Burn NFT
        • Delegate mint NFTs
        • Delegate mint evolved NFTs
        • Delegate burn NFTs
      • NFTs user
    • Future of Minteandome
  • SDK
    • 💻SDK
      • ⚙️Installation
      • 🔧Usage
      • 📂Scheduler (EVM blockchains)
      • 📖Examples
        • 📔Create an SmartContract
        • 🚀Deploy an SmartContract
          • 📂Scheduled deploy (EVM blockchains)
          • ⚙️Self deploy
        • 📑Smart Contract Configuration
        • 🔣Create NFTs
        • ✨Mint NFTs
          • 📂Scheduled mint
          • 🔧Self mint
        • 🔥Burn NFTs
      • 🏙️Models
        • SmartContract
        • NFT
        • User
        • Blockchain
Powered by GitBook
On this page

Was this helpful?

  1. SDK
  2. SDK

Installation

Minteandome SDK is published in the npmjs registry.

PreviousSDKNextUsage

Last updated 2 years ago

Was this helpful?

Copy the following line in your console for installing the package.

npm install minteandome-sdk
yarn add minteandome-sdk

React create-app

If you have used create-react-app (version >= 5) for creating a React application, you may be facing some issues with the webpack.

This is a known issue related with using web3 libraries. For fixing it, follow the next steps:

Install react-app-rewired

Write in the console in the root dir:

npm install --save-dev react-app-rewired crypto-browserify stream-browserify assert stream-http https-browserify os-browserify url buffer process
yarn add --save-dev react-app-rewired crypto-browserify stream-browserify assert stream-http https-browserify os-browserify url buffer process

Create a config.overrides.js

Create a new file placed in the root dir of the project.

const webpack = require("webpack");


module.exports = function override(config) {
  const fallback = config.resolve.fallback || {};
  Object.assign(fallback, {
    crypto: require.resolve("crypto-browserify"),
    stream: require.resolve("stream-browserify"),
    assert: require.resolve("assert"),
    http: require.resolve("stream-http"),
    https: require.resolve("https-browserify"),
    os: require.resolve("os-browserify"),
    url: require.resolve("url"),
  });
  config.resolve.fallback = fallback;
  config.plugins = (config.plugins || []).concat([
    new webpack.ProvidePlugin({
      process: "process/browser",
      Buffer: ["buffer", "Buffer"],
    }),
  ]);
  config.ignoreWarnings = [/Failed to parse source map/];
  config.module.rules.push({
    test: /\.(js|mjs|jsx)$/,
    enforce: "pre",
    loader: require.resolve("source-map-loader"),
    resolve: {
      fullySpecified: false,
    },
  });
  return config;
};

Modify the package.json scripts

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
},
"scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-scripts eject"
},
💻
⚙️
Logonpm: minteandome-sdknpm