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

h-nftworks

v1.1.1

Published

nftworks market

Downloads

8

Readme

step1:安装依赖包 h-nftworks
npm install h-nftworks


step2:需要用到的文件中导入依赖包
import { Store } from 'h-nftworks'

    a.实例化Store
        let store = new Store({
            provider:提供者对象, 
            account:连接的钱包地址,
            contract:Store合约地址
        })
    b.Store下方法 都是异步调用
        //部署Store合约
        1.store.deployStore()  

        //部署ERC721或ERC1155合约,成功返回nft合约地址和所有者地址
        2.store.nftDeploy({ 
            contractType:721 || 1155,
            name:nft全称,
            symbol:nft简称
        },可选参数是否发起交易不发起返回预计手续费)

        //检查合约地址是否为平台的nft合约
        3.store.platformSupport(nft合约地址)

        //检查当前连接钱包是否为某个平台nft合约所属者
        4.store.isOwner(nft合约地址)
        
        //nft合约所属者调用合约铸造nft,调用前需要通过(platformSupport,isOwner)这个两个方法检查,如果是平台nft合约任何一个钱包都能调用(platformContract)检查是否为平台nft合约,成功返回交易对象
        5.store.mint({
            uid: 用户ID,
            nft: nft合约地址,
            list:[
                {
                    recipient: 接收者钱包地址,
                    amount: 当前tokenId发行量,
                    fee: 版税比率 例如 2% => 200 ,
                    uri: nft的tokenUri
                }
            ]
        },可选参数是否发起交易不发起返回预计手续费)

        // 返回当前块高
        6.store.web3.eth.getBlockNumber()

        // 判断nft合约是否为平台部署的合约
        7.store.platformContract(nft合约地址)

        // 返回当前连接钱包是否为平台所属者
        8.store.platformOwner()

        // 部署平台nft合约 后台管理使用,只有平台所属者能调用
        9.store.deployPlatform({ 
            contractType:721 || 1155,
            name:nft全称,
            symbol:nft简称
        },可选参数是否发起交易不发起返回预计手续费)
npm publish