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

@sliksafe/mint

v1.0.3

Published

Slik offers you the ability to protect files with end-to-end encryption as a simple drop in NPM package.

Downloads

94

Readme

Mint NFTs

Slik offers you the ability to deploy an ERC-721 contract and MINT an NFT in a single API call and as a drop in NPM package.

Using the @sliksafe/mint package, you can enable NFT minting for users within your app, while storing their NFT across decentralized storage networks like Arweave or Filecoin.

API Keys

Before getting started you would need an API key. Create an API key via the console: https://console.developers.sliksafe.com

Demo

You can play around with the demo app that uses the mint SDK at: https://slikmintdemo.web.app/

Docs

Please see a few samples below, but you can find the detailed docs here: https://slik.gitbook.io/docs/packages/upload-and-download-files

Install via yarn

yarn add @sliksafe/protect

Deploy NFT Contract

All NFTs minted on Ethereum or Polygon need to have a contract address. This contract address helps in grouping a collection of NFTs, like the Azuki NFTs or the BAYC NFTs.

// Import SlikMint
import { SlikMint } from '@sliksafe/mint'

// Initialize 
const initParams = { apiKey: "api_key_string" }
const mintHandler = await SlikMint.initialize(initParams)

// Contract options
const contractOptions = { 
    tokenName: "BoredApeYachtClub",
    tokenSymbol: "BAYC",
    chain: "polygon",
    protocol: "ERC721",
}

mintHandler.deployContract(contractOptions, (response, err) => {
    console.log("The contract was deployed with id: ", response.contractAddress);
});

Mint a File as NFT

Using the contract address obtained after deploying a contract , you can mint NFTs corresponding to the deployed contract.

// Specify the metadata that is associated with the NFT. 
// Note: the metadataJSON is not editable once the NFT is minted.

const metadataJSON = { 
    name: "My Awesome NFT #1",
    description: "This is the description of my awesome NFT!"
}

const file: File = // The file object selected by the user

const mintOptions = {
    walletAddress: "0x5c14E7A5e9D4568Bb8B1ebEE2ceB2E32Faee1311",
    contractAddress: "0x468DF3FfC8D87EF3ee0e71AB8Ec0afd0E79e57A0",
    file: file,
    storageNetwork: "filecoin", // or "arweave"
    chain: "polygon",
    metadata: metadataJSON,
}

mintHandler.mintNFT(mintOptions, (response, err) => {
    if (!!err) {
        console.error("Failed to mint NFTs");
        return
    }
    const txId = response.txId;
    console.log("NFT minting completed. Transaction id: ", txId);
});

Scalability

The Slik infrastructure has been designed to scale with the needs of the developer. It is currently used by thousands of users worldwide to backup terabytes of data.