@beincom/nft-builder
v0.0.14
Published
<h1 align="center"><a href='https://beincom.org/'>BIC NFT Background Builder</a></h1>
Downloads
5
Maintainers
Keywords
Readme
Installation
#npm
npm install @beincom/nft-builder
#or yarn
yarn add @beincom/nft-builder
Node.js
const express = require('express');
const nft = require('@beincom/nft-builder/nft');
const builder = require('@beincom/nft-builder/builder');
async function bootstrap() {
await nft.initContracts({
rpcUrl: 'https://sepolia-rollup.arbitrum.io/rpc',
configUrl:''// bic-chain-config-url.
});
const app = express()
const port = 3000
app.get('/:type/:tokenId', async (req, res) => {
const { type, tokenId } = req.params
const name = await nft.getNftName(type, tokenId);
const nftSvg = builder.generate(type,name);
res.send(nftSvg)
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
}