0.10.3 • Published 8 months ago

chia-nft-minter v0.10.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

chia-nft-minter

A JS client to encapsulate minting CHIA NFT's.

Heavily informed by mintgarden

Getting Started

npm install
npm test

Check out the examples of using this from with the chia-repl.

Basic Usage

You will need:

The full workflow will:

  • Generate metadata for the NFT
  • Upload a file to nft.storage along with metadata
  • Supply information about the minting process
  • Use the minting information and IPFS data to call nft_mint_nft
import { ChiaDaemon, loadUIConfig } from 'chia-daemon';
import { NftMinter, MetadataFactory } from 'chia-nft-minter';

const dataFileInfo = {
    name: 'test-nft-by-you',
    type: 'image/png',
    filepath: 'C:\\path\\to\\some_file.png'
};

const mintingInfo = {
    wallet_id: 2,
    royalty_address: 'txch10kn82kl6hqv47qzeh4ugmqjr5mmdcnrlymfx8wl9nrhhkyxnzfkspna7l9',
    target_address: 'txch10kn82kl6hqv47qzeh4ugmqjr5mmdcnrlymfx8wl9nrhhkyxnzfkspna7l9',
    royalty_percentage: 250,
};

const factory = new MetadataFactory('chia-nft-minter-tests');
const collectionMetaData = factory.createCollectionMetadata('test-nft-collection-by-you');
const nftMetadata = factory.createNftMetadata('test-nft-by-you', collectionMetaData);

const daemon = new ChiaDaemon(loadUIConfig(), 'your-chia-nft-app');
const connected = await chia.connect();

const minter = new NftMinter(chia.services.wallet, '_YOUR_API_KEY_');
const result = await minter.createNftFromFile(dataFileInfo, mintingInfo, nftMetadata);

console.log(result);
0.10.2

8 months ago

0.10.3

8 months ago

0.10.1

1 year ago

0.10.0

1 year ago

0.8.4

2 years ago

0.3.0

2 years ago

0.9.0

1 year ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago