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

xrpl-nft-autominter

v1.2.2

Published

A TypeScript/JavaScript package to mint NFTs on XRP Ledger in Node.js without IPFS logics

Downloads

22

Readme

xrpl-nft-autominter

A TypeScript/JavaScript package to mint NFTs on XRP Ledger in Node.js without IPFS logic.

Importance and Implementation

Importance

The xrpl-nft-autominter is built on the top of xrpl package and it provides a straightforward solution for minting NFTs on the XRP Ledger without the complexity of IPFS integration. This simplifies the process of creating and managing NFTs on a robust XRP Ledger, leveraging cloud storage for file management and Pinata for metadata handling.

Key features include:

  • Simplicity: Easily mint NFTs using Node.js with minimal setup.
  • Integration: Seamless integration with AWS S3, GCS for file storage and retrieval.
  • Customization: Flexible options for specifying XRP network, transfer fees, taxonomy, and other parameters.
  • Security: Securely manage wallet credentials for minting operations.

Implementation

Visit below to understand the workflow or contact at [email protected]

Installation

To start using xrpl-nft-autominter, install it via npm:

npm install xrpl-nft-autominter

How to use this?

First, import the function to mint an NFT:

import { MintThrougAWSCloud } from "xrpl-nft-autominter";

or using CommonJS:

const { MintThrougAWSCloud } = require("xrpl-nft-autominter");

Types to use

Ensure these types are used to mint an NFT:

interface S3BucketConnectionAttributes {
  accessKeyId: string, 
  secretAccessKey: string,
  region: string
}

interface S3BucketObjectRetrievalAttributes {
  Bucket: string, 
  Key: string 
}

interface PinataConfigAttributes {
  PinataToken: string,
  pinata_api_key: string,
  pinata_secret_api_key: string
}

interface MintingAccountDetails {
  MINTING_ACCOUNT_WALLET_ADDRESS: string,
  MINTING_ACCOUNT_SECRET_KEY: string
}

The MintThrougAWSCloud function returns a string which represents your NFT token ID upon successful minting.

const s3Connection: S3BucketConnectionAttributes = {
  accessKeyId: "Your S3 Access Key Id",
  secretAccessKey: "Your S3 Access Key Secret",
  region: "Your S3 Region",
};

const pinataCredentials: PinataConfigAttributes = {
  PinataToken: "Your Pinata Token",
  pinata_api_key: "Your Pinata API Key",
  pinata_secret_api_key: "Your Pinata API Secret",
};

const file: S3BucketObjectRetrievalAttributes = {
  Bucket: "Your Bucket Name",
  Key: "Path to File",
};

const json: S3BucketObjectRetrievalAttributes = {
  Bucket: "Your Bucket Name",
  Key: "Path to File",
};

const XRP_NETWORK: string = "Testnet or Mainnet URL";

const MintingAccountDetails: MintingAccountDetails = {
  MINTING_ACCOUNT_WALLET_ADDRESS: "Your Minting Account Wallet Address",
  MINTING_ACCOUNT_SECRET_KEY: "Your Minting Account Secret",
};

const nfTokenTaxon: number = "NFT Taxonomy ID"; 
const largeInteger: number = "Large integer on ledger"; 
const transferFee: number = "Transfer fee to set"; 
const flag: number = "Flag to set burnable/transferable properties";

const nftokenID = await MintThrougAWSCloud(
  s3Connection,
  pinataCredentials,
  file,
  json,
  XRP_NETWORK,
  MintingAccountDetails,
  nfTokenTaxon,
  transferFee,
  flag,
  largeInteger
);

Minting NFTs using Google Cloud Storage

First, import the function to mint an NFT using GCP:

import { MintThrougGcpCloud } from "xrpl-nft-autominter";

or using CommonJS:

const { MintThrougGcpCloud } = require("xrpl-nft-autominter");

Types to use

Ensure these types are used to mint an NFT:

 
 interface PinataConfigAttributes{
    PinataToken:string,
    pinata_api_key:string,
    pinata_secret_api_key:string
}


 interface GcsBucketObjectRetrivalAttributes{
    bucketName:string, // This is the bucket name
    fileName:string // This is path to that specific object
}

The MintThrougGcpCloud function returns a string which represents your NFT token ID upon successful minting.


const pinataCredentials: PinataConfigAttributes = {
  PinataToken: "Your Pinata Token",
  pinata_api_key: "Your Pinata API Key",
  pinata_secret_api_key: "Your Pinata API Secret",
};

const gcpServiceAccountJsonPath:string="Path To Your GCP Service Account Auth Json"

const file: GcsBucketObjectRetrivalAttributes = {
  Bucket: "Your Bucket Name",
  Key: "Path to File",
};

const json: GcsBucketObjectRetrivalAttributes = {
  Bucket: "Your Bucket Name",
  Key: "Path to File",
};

const XRP_NETWORK: string = "Testnet or Mainnet URL";

const MintingAccountDetails: MintingAccountDetails = {
  MINTING_ACCOUNT_WALLET_ADDRESS: "Your Minting Account Wallet Address",
  MINTING_ACCOUNT_SECRET_KEY: "Your Minting Account Secret",
};

const nfTokenTaxon: number = "NFT Taxonomy ID"; 
const largeInteger: number = "Large integer on ledger"; 
const transferFee: number = "Transfer fee to set"; 
const flag: number = "Flag to set burnable/transferable properties";

const nftokenID = await MintThrougGcpCloud(
  gcpServiceAccountJsonPath,
  pinataCredentials,
  file,
  json,
  XRP_NETWORK,
  MintingAccountDetails,
  nfTokenTaxon,
  transferFee,
  flag,
  largeInteger
);

Minting NFTs from a Local Machine

Now, let's move on to minting from a local machine. When minting from a local machine, you need to provide the imagePath, jsonPath, and Pinata credentials.

First, import this function as follows:

import { localMintWithJson } from "xrpl-nft-autominter";

or using CommonJS:

const { localMintWithJson } = require("xrpl-nft-autominter");

The localMintWithJson function returns a string which represents your NFT token ID upon successful minting.


const pinataCredentials: PinataConfigAttributes = {
  PinataToken: "Your Pinata Token",
  pinata_api_key: "Your Pinata API Key",
  pinata_secret_api_key: "Your Pinata API Secret",
};

const filePath: string = "Path To Your File"

const jsonPath: string = "Path To Your Json i.e MetaData"

const XRP_NETWORK: string = "Testnet or Mainnet URL";

const MintingAccountDetails: MintingAccountDetails = {
  MINTING_ACCOUNT_WALLET_ADDRESS: "Your Minting Account Wallet Address",
  MINTING_ACCOUNT_SECRET_KEY: "Your Minting Account Secret",
};

const nfTokenTaxon: number = "NFT Taxonomy ID"; 
const largeInteger: number = "Large integer on ledger"; 
const transferFee: number = "Transfer fee to set"; 
const flag: number = "Flag to set burnable/transferable properties";

const nftokenID = await localMintWithJson(
  pinataCredentials,
  filePath,
  jsonPath,
  XRP_NETWORK,
  MintingAccountDetails,
  nfTokenTaxon,
  transferFee,
  flag,
  largeInteger
);

Happy Minting 😎

Hope you enjoyed auto minting

What's Next

Future updates will include features such as minting and support for various cloud providers like Azure, IBM, Oracle, and Alibaba Cloud. It will also support IPFS providers such as Infura, Fleek, Temporal, and Textile. Additionally, there will be options for minting with and without JSON metadata.