From 0e55c6f16839dd084ad5bcc66f5073f2ac45921f Mon Sep 17 00:00:00 2001 From: Mark Paul Date: Sat, 6 Apr 2024 22:44:06 +1100 Subject: [PATCH 1/8] feature: fix #125 #126 to allow for extra image in metadata and to move image preview out of traits --- README.md | 6 ++---- package.json | 2 +- src/common/mint-utils.ts | 25 +++++++++++++++++-------- src/common/utils.ts | 2 +- src/nft-minter.ts | 8 ++++++-- src/sft-minter.ts | 8 ++++++-- 6 files changed, 33 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1fd1865..ef138c2 100644 --- a/README.md +++ b/README.md @@ -239,15 +239,13 @@ Items below marked "required" are the "minimum" required for it to be compatible ```json { "description": "Data NFT description", // required + "data_preview_url": "https://previewdata.com", + "bonus_media_img": "ipfs://imgCID", "attributes": [ { "trait_type": "Creator", // required "value": "creator address" }, - { - "trait_type": "Data Preview URL", // required - "value": "https://previewdata.com" - }, { "trait_type": "extra trait", "value": "extra trait value" diff --git a/package.json b/package.json index 1b5df0f..73b137c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.0.0", + "version": "3.1.0-alpha.1", "description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain", "main": "out/index.js", "types": "out/index.d.js", diff --git a/src/common/mint-utils.ts b/src/common/mint-utils.ts index 32f6c44..33eb67c 100644 --- a/src/common/mint-utils.ts +++ b/src/common/mint-utils.ts @@ -61,12 +61,18 @@ export function createIpfsMetadata( datasetTitle: string, datasetDescription: string, dataNFTStreamPreviewUrl: string, - address: string + address: string, + bonusNFTMediaImgUrl?: string ) { - const metadata = { + const metadata: Record = { description: `${datasetTitle} : ${datasetDescription}`, + data_preview_url: dataNFTStreamPreviewUrl, attributes: [] as object[] }; + // if we have bonusNFTMediaImgUrl, we put that as a top level attribute as well + if (bonusNFTMediaImgUrl && bonusNFTMediaImgUrl.trim() !== '') { + metadata['bonus_media_img'] = bonusNFTMediaImgUrl.trim().toLowerCase(); + } const attributes = traits .split(',') .filter((element) => element.trim() !== ''); @@ -76,10 +82,11 @@ export function createIpfsMetadata( const trait = { trait_type: key.trim(), value: value.trim() }; metadataAttributes.push(trait); } - metadataAttributes.push({ - trait_type: 'Data Preview URL', - value: dataNFTStreamPreviewUrl - }); + //// This should not be a trait as it will pollute the trait filters on NFT marketplaces + // metadataAttributes.push({ + // trait_type: 'Data Preview URL', + // value: dataNFTStreamPreviewUrl + // }); metadataAttributes.push({ trait_type: 'Creator', value: address }); metadata.attributes = metadataAttributes; return metadata; @@ -90,7 +97,8 @@ export async function createFileFromUrl( datasetTitle: string, datasetDescription: string, dataNFTStreamPreviewUrl: string, - address: string + address: string, + bonusNFTMediaImgUrl?: string ) { let res: any = ''; let data: any = ''; @@ -105,7 +113,8 @@ export async function createFileFromUrl( datasetTitle, datasetDescription, dataNFTStreamPreviewUrl, - address + address, + bonusNFTMediaImgUrl ); const _traitsFile = new File([JSON.stringify(traits)], 'metadata.json', { type: 'application/json' diff --git a/src/common/utils.ts b/src/common/utils.ts index 133e3b4..1723f9e 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -202,7 +202,7 @@ export async function checkTraitsUrl(traitsUrl: string) { throw new ErrMissingTrait(traits.attributes); } - const requiredTraits = ['Creator', 'Data Preview URL']; + const requiredTraits = ['Creator']; const traitsAttributes = traits.attributes; for (const requiredTrait of requiredTraits) { diff --git a/src/nft-minter.ts b/src/nft-minter.ts index 3d5af4f..53de74b 100644 --- a/src/nft-minter.ts +++ b/src/nft-minter.ts @@ -159,6 +159,7 @@ export class NftMinter extends Minter { * - nftStorageToken: the nft storage token to be used to upload the image and metadata to IPFS * - antiSpamTokenIdentifier: the anti spam token identifier to be used for the minting * - antiSpamTax: the anti spam tax to be set for the Data NFT-FT with decimals. Needs to be greater than 0 and should be obtained in real time via {@link viewMinterRequirements} prior to calling mint. + * - bonusNFTMediaImgUrl [optional] a bonus media image URL you can send in if needed. */ async mint( senderAddress: IAddress, @@ -175,6 +176,7 @@ export class NftMinter extends Minter { nftStorageToken?: string; antiSpamTokenIdentifier?: string; antiSpamTax?: BigNumber.Value; + bonusNFTMediaImgUrl?: string; } ): Promise { const { @@ -182,7 +184,8 @@ export class NftMinter extends Minter { traitsUrl, nftStorageToken, antiSpamTokenIdentifier, - antiSpamTax + antiSpamTax, + bonusNFTMediaImgUrl } = options ?? {}; // deep validate all mandatory URLs @@ -215,7 +218,8 @@ export class NftMinter extends Minter { datasetTitle, datasetDescription, dataPreviewUrl, - senderAddress.bech32() + senderAddress.bech32(), + bonusNFTMediaImgUrl ); const { diff --git a/src/sft-minter.ts b/src/sft-minter.ts index d12b9d1..38522b3 100644 --- a/src/sft-minter.ts +++ b/src/sft-minter.ts @@ -231,6 +231,7 @@ export class SftMinter extends Minter { * - imageUrl: the URL of the image for the Data NFT * - traitsUrl: the URL of the traits for the Data NFT * - nftStorageToken: the nft storage token to be used to upload the image and metadata to IPFS + * - bonusNFTMediaImgUrl a bonus media image URL you can send in if needed. * */ async mint( @@ -249,9 +250,11 @@ export class SftMinter extends Minter { imageUrl?: string; traitsUrl?: string; nftStorageToken?: string; + bonusNFTMediaImgUrl?: string; } ): Promise { - const { imageUrl, traitsUrl, nftStorageToken } = options ?? {}; + const { imageUrl, traitsUrl, nftStorageToken, bonusNFTMediaImgUrl } = + options ?? {}; const tokenNameValidator = new StringValidator() .notEmpty() @@ -320,7 +323,8 @@ export class SftMinter extends Minter { datasetTitle, datasetDescription, dataPreviewUrl, - senderAddress.bech32() + senderAddress.bech32(), + bonusNFTMediaImgUrl ); const { From aff0e96e621a64344ad05b0d9a4585599d102ac7 Mon Sep 17 00:00:00 2001 From: Damian Date: Sat, 6 Apr 2024 23:29:51 +0300 Subject: [PATCH 2/8] feat: extra assets --- README.md | 1 - package-lock.json | 228 ++++++++++++++++++++++++++++++++++++++- src/common/mint-utils.ts | 18 +--- src/common/utils.ts | 4 + src/datanft.ts | 1 + src/interfaces.ts | 2 + src/nft-minter.ts | 52 ++++----- src/sft-minter.ts | 14 +-- 8 files changed, 266 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index ef138c2..09c5663 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,6 @@ Items below marked "required" are the "minimum" required for it to be compatible { "description": "Data NFT description", // required "data_preview_url": "https://previewdata.com", - "bonus_media_img": "ipfs://imgCID", "attributes": [ { "trait_type": "Creator", // required diff --git a/package-lock.json b/package-lock.json index b170ac0..d9f5e4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "2.7.0-beta.11", + "version": "3.1.0-alpha.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@itheum/sdk-mx-data-nft", - "version": "2.7.0-beta.11", + "version": "3.1.0-alpha.1", "license": "GPL-3.0-only", "dependencies": { "@multiversx/sdk-core": "12.18.0", @@ -7516,14 +7516,17 @@ }, "node_modules/npm/node_modules/@colors/colors": { "version": "1.5.0", + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "engines": { "node": ">=0.1.90" } }, "node_modules/npm/node_modules/@isaacs/cliui": { "version": "8.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7540,6 +7543,7 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7551,11 +7555,13 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7572,6 +7578,7 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7586,11 +7593,13 @@ }, "node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/@npmcli/agent": { "version": "2.2.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7606,6 +7615,7 @@ }, "node_modules/npm/node_modules/@npmcli/arborist": { "version": "7.3.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7652,6 +7662,7 @@ }, "node_modules/npm/node_modules/@npmcli/config": { "version": "8.1.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7670,6 +7681,7 @@ }, "node_modules/npm/node_modules/@npmcli/disparity-colors": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7681,6 +7693,7 @@ }, "node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7695,6 +7708,7 @@ }, "node_modules/npm/node_modules/@npmcli/fs": { "version": "3.1.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7706,6 +7720,7 @@ }, "node_modules/npm/node_modules/@npmcli/git": { "version": "5.0.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7724,6 +7739,7 @@ }, "node_modules/npm/node_modules/@npmcli/installed-package-contents": { "version": "2.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7739,6 +7755,7 @@ }, "node_modules/npm/node_modules/@npmcli/map-workspaces": { "version": "3.0.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7753,6 +7770,7 @@ }, "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { "version": "7.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7767,6 +7785,7 @@ }, "node_modules/npm/node_modules/@npmcli/name-from-folder": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7775,6 +7794,7 @@ }, "node_modules/npm/node_modules/@npmcli/node-gyp": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7783,6 +7803,7 @@ }, "node_modules/npm/node_modules/@npmcli/package-json": { "version": "5.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7800,6 +7821,7 @@ }, "node_modules/npm/node_modules/@npmcli/promise-spawn": { "version": "7.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7811,6 +7833,7 @@ }, "node_modules/npm/node_modules/@npmcli/query": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7822,6 +7845,7 @@ }, "node_modules/npm/node_modules/@npmcli/run-script": { "version": "7.0.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -7837,14 +7861,17 @@ }, "node_modules/npm/node_modules/@pkgjs/parseargs": { "version": "0.11.0", + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "engines": { "node": ">=14" } }, "node_modules/npm/node_modules/@sigstore/bundle": { "version": "2.1.1", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7856,6 +7883,7 @@ }, "node_modules/npm/node_modules/@sigstore/core": { "version": "0.2.0", + "dev": true, "inBundle": true, "license": "Apache-2.0", "engines": { @@ -7864,6 +7892,7 @@ }, "node_modules/npm/node_modules/@sigstore/protobuf-specs": { "version": "0.2.1", + "dev": true, "inBundle": true, "license": "Apache-2.0", "engines": { @@ -7872,6 +7901,7 @@ }, "node_modules/npm/node_modules/@sigstore/sign": { "version": "2.2.1", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7886,6 +7916,7 @@ }, "node_modules/npm/node_modules/@sigstore/tuf": { "version": "2.3.0", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7898,6 +7929,7 @@ }, "node_modules/npm/node_modules/@sigstore/verify": { "version": "0.1.0", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -7911,6 +7943,7 @@ }, "node_modules/npm/node_modules/@tufjs/canonical-json": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7919,6 +7952,7 @@ }, "node_modules/npm/node_modules/@tufjs/models": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7931,6 +7965,7 @@ }, "node_modules/npm/node_modules/abbrev": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7939,6 +7974,7 @@ }, "node_modules/npm/node_modules/agent-base": { "version": "7.1.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7950,6 +7986,7 @@ }, "node_modules/npm/node_modules/aggregate-error": { "version": "3.1.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -7962,6 +7999,7 @@ }, "node_modules/npm/node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7970,6 +8008,7 @@ }, "node_modules/npm/node_modules/ansi-styles": { "version": "6.2.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -7981,16 +8020,19 @@ }, "node_modules/npm/node_modules/aproba": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/archy": { "version": "1.0.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/are-we-there-yet": { "version": "4.0.2", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -7999,11 +8041,13 @@ }, "node_modules/npm/node_modules/balanced-match": { "version": "1.0.2", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/bin-links": { "version": "4.0.3", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8018,6 +8062,7 @@ }, "node_modules/npm/node_modules/binary-extensions": { "version": "2.2.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8026,6 +8071,7 @@ }, "node_modules/npm/node_modules/brace-expansion": { "version": "2.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8034,6 +8080,7 @@ }, "node_modules/npm/node_modules/builtins": { "version": "5.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8042,6 +8089,7 @@ }, "node_modules/npm/node_modules/cacache": { "version": "18.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8064,6 +8112,7 @@ }, "node_modules/npm/node_modules/chalk": { "version": "5.3.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8075,6 +8124,7 @@ }, "node_modules/npm/node_modules/chownr": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8083,6 +8133,7 @@ }, "node_modules/npm/node_modules/ci-info": { "version": "4.0.0", + "dev": true, "funding": [ { "type": "github", @@ -8097,6 +8148,7 @@ }, "node_modules/npm/node_modules/cidr-regex": { "version": "4.0.3", + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -8108,6 +8160,7 @@ }, "node_modules/npm/node_modules/clean-stack": { "version": "2.2.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8116,6 +8169,7 @@ }, "node_modules/npm/node_modules/cli-columns": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8128,6 +8182,7 @@ }, "node_modules/npm/node_modules/cli-table3": { "version": "0.6.3", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8142,6 +8197,7 @@ }, "node_modules/npm/node_modules/clone": { "version": "1.0.4", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8150,6 +8206,7 @@ }, "node_modules/npm/node_modules/cmd-shim": { "version": "6.0.2", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8158,6 +8215,7 @@ }, "node_modules/npm/node_modules/color-convert": { "version": "2.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8169,11 +8227,13 @@ }, "node_modules/npm/node_modules/color-name": { "version": "1.1.4", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/color-support": { "version": "1.1.3", + "dev": true, "inBundle": true, "license": "ISC", "bin": { @@ -8182,6 +8242,7 @@ }, "node_modules/npm/node_modules/columnify": { "version": "1.6.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8194,16 +8255,19 @@ }, "node_modules/npm/node_modules/common-ancestor-path": { "version": "1.0.1", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/console-control-strings": { "version": "1.1.0", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/cross-spawn": { "version": "7.0.3", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8217,6 +8281,7 @@ }, "node_modules/npm/node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8231,6 +8296,7 @@ }, "node_modules/npm/node_modules/cssesc": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -8242,6 +8308,7 @@ }, "node_modules/npm/node_modules/debug": { "version": "4.3.4", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8258,11 +8325,13 @@ }, "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/defaults": { "version": "1.0.4", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8274,6 +8343,7 @@ }, "node_modules/npm/node_modules/diff": { "version": "5.1.0", + "dev": true, "inBundle": true, "license": "BSD-3-Clause", "engines": { @@ -8282,24 +8352,29 @@ }, "node_modules/npm/node_modules/eastasianwidth": { "version": "0.2.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/emoji-regex": { "version": "8.0.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/encoding": { "version": "0.1.13", + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "dependencies": { "iconv-lite": "^0.6.2" } }, "node_modules/npm/node_modules/env-paths": { "version": "2.2.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8308,16 +8383,19 @@ }, "node_modules/npm/node_modules/err-code": { "version": "2.0.3", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/exponential-backoff": { "version": "3.1.1", + "dev": true, "inBundle": true, "license": "Apache-2.0" }, "node_modules/npm/node_modules/fastest-levenshtein": { "version": "1.0.16", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8326,6 +8404,7 @@ }, "node_modules/npm/node_modules/foreground-child": { "version": "3.1.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8341,6 +8420,7 @@ }, "node_modules/npm/node_modules/fs-minipass": { "version": "3.0.3", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8352,6 +8432,7 @@ }, "node_modules/npm/node_modules/function-bind": { "version": "1.1.2", + "dev": true, "inBundle": true, "license": "MIT", "funding": { @@ -8360,6 +8441,7 @@ }, "node_modules/npm/node_modules/gauge": { "version": "5.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8378,6 +8460,7 @@ }, "node_modules/npm/node_modules/glob": { "version": "10.3.10", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8399,16 +8482,19 @@ }, "node_modules/npm/node_modules/graceful-fs": { "version": "4.2.11", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/has-unicode": { "version": "2.0.1", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/hasown": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8420,6 +8506,7 @@ }, "node_modules/npm/node_modules/hosted-git-info": { "version": "7.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8431,11 +8518,13 @@ }, "node_modules/npm/node_modules/http-cache-semantics": { "version": "4.1.1", + "dev": true, "inBundle": true, "license": "BSD-2-Clause" }, "node_modules/npm/node_modules/http-proxy-agent": { "version": "7.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8448,6 +8537,7 @@ }, "node_modules/npm/node_modules/https-proxy-agent": { "version": "7.0.2", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8460,8 +8550,10 @@ }, "node_modules/npm/node_modules/iconv-lite": { "version": "0.6.3", + "dev": true, "inBundle": true, "license": "MIT", + "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -8471,6 +8563,7 @@ }, "node_modules/npm/node_modules/ignore-walk": { "version": "6.0.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8482,6 +8575,7 @@ }, "node_modules/npm/node_modules/imurmurhash": { "version": "0.1.4", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8490,6 +8584,7 @@ }, "node_modules/npm/node_modules/indent-string": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8498,6 +8593,7 @@ }, "node_modules/npm/node_modules/ini": { "version": "4.1.1", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8506,6 +8602,7 @@ }, "node_modules/npm/node_modules/init-package-json": { "version": "6.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8523,11 +8620,13 @@ }, "node_modules/npm/node_modules/ip": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/ip-regex": { "version": "5.0.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8539,6 +8638,7 @@ }, "node_modules/npm/node_modules/is-cidr": { "version": "5.0.3", + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -8550,6 +8650,7 @@ }, "node_modules/npm/node_modules/is-core-module": { "version": "2.13.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8561,6 +8662,7 @@ }, "node_modules/npm/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8569,16 +8671,19 @@ }, "node_modules/npm/node_modules/is-lambda": { "version": "1.0.1", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/isexe": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/jackspeak": { "version": "2.3.6", + "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8596,6 +8701,7 @@ }, "node_modules/npm/node_modules/json-parse-even-better-errors": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -8604,6 +8710,7 @@ }, "node_modules/npm/node_modules/json-stringify-nice": { "version": "1.1.4", + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -8612,6 +8719,7 @@ }, "node_modules/npm/node_modules/jsonparse": { "version": "1.3.1", + "dev": true, "engines": [ "node >= 0.2.0" ], @@ -8620,16 +8728,19 @@ }, "node_modules/npm/node_modules/just-diff": { "version": "6.0.2", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/just-diff-apply": { "version": "5.5.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { "version": "8.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8642,6 +8753,7 @@ }, "node_modules/npm/node_modules/libnpmdiff": { "version": "6.0.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8661,6 +8773,7 @@ }, "node_modules/npm/node_modules/libnpmexec": { "version": "7.0.7", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8682,6 +8795,7 @@ }, "node_modules/npm/node_modules/libnpmfund": { "version": "5.0.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8693,6 +8807,7 @@ }, "node_modules/npm/node_modules/libnpmhook": { "version": "10.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8705,6 +8820,7 @@ }, "node_modules/npm/node_modules/libnpmorg": { "version": "6.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8717,6 +8833,7 @@ }, "node_modules/npm/node_modules/libnpmpack": { "version": "6.0.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8731,6 +8848,7 @@ }, "node_modules/npm/node_modules/libnpmpublish": { "version": "9.0.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8749,6 +8867,7 @@ }, "node_modules/npm/node_modules/libnpmsearch": { "version": "7.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8760,6 +8879,7 @@ }, "node_modules/npm/node_modules/libnpmteam": { "version": "6.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8772,6 +8892,7 @@ }, "node_modules/npm/node_modules/libnpmversion": { "version": "5.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8787,6 +8908,7 @@ }, "node_modules/npm/node_modules/lru-cache": { "version": "10.1.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8795,6 +8917,7 @@ }, "node_modules/npm/node_modules/make-fetch-happen": { "version": "13.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8816,6 +8939,7 @@ }, "node_modules/npm/node_modules/minimatch": { "version": "9.0.3", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8830,6 +8954,7 @@ }, "node_modules/npm/node_modules/minipass": { "version": "7.0.4", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8838,6 +8963,7 @@ }, "node_modules/npm/node_modules/minipass-collect": { "version": "2.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8849,6 +8975,7 @@ }, "node_modules/npm/node_modules/minipass-fetch": { "version": "3.0.4", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8865,6 +8992,7 @@ }, "node_modules/npm/node_modules/minipass-flush": { "version": "1.0.5", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8876,6 +9004,7 @@ }, "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { "version": "3.3.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8887,6 +9016,7 @@ }, "node_modules/npm/node_modules/minipass-json-stream": { "version": "1.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8896,6 +9026,7 @@ }, "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { "version": "3.3.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8907,6 +9038,7 @@ }, "node_modules/npm/node_modules/minipass-pipeline": { "version": "1.2.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8918,6 +9050,7 @@ }, "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { "version": "3.3.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8929,6 +9062,7 @@ }, "node_modules/npm/node_modules/minipass-sized": { "version": "1.0.3", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8940,6 +9074,7 @@ }, "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { "version": "3.3.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8951,6 +9086,7 @@ }, "node_modules/npm/node_modules/minizlib": { "version": "2.1.2", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -8963,6 +9099,7 @@ }, "node_modules/npm/node_modules/minizlib/node_modules/minipass": { "version": "3.3.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -8974,6 +9111,7 @@ }, "node_modules/npm/node_modules/mkdirp": { "version": "1.0.4", + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -8985,11 +9123,13 @@ }, "node_modules/npm/node_modules/ms": { "version": "2.1.3", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/mute-stream": { "version": "1.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -8998,6 +9138,7 @@ }, "node_modules/npm/node_modules/negotiator": { "version": "0.6.3", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9006,6 +9147,7 @@ }, "node_modules/npm/node_modules/node-gyp": { "version": "10.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9029,6 +9171,7 @@ }, "node_modules/npm/node_modules/nopt": { "version": "7.2.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9043,6 +9186,7 @@ }, "node_modules/npm/node_modules/normalize-package-data": { "version": "6.0.0", + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -9057,6 +9201,7 @@ }, "node_modules/npm/node_modules/npm-audit-report": { "version": "5.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9065,6 +9210,7 @@ }, "node_modules/npm/node_modules/npm-bundled": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9076,6 +9222,7 @@ }, "node_modules/npm/node_modules/npm-install-checks": { "version": "6.3.0", + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { @@ -9087,6 +9234,7 @@ }, "node_modules/npm/node_modules/npm-normalize-package-bin": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9095,6 +9243,7 @@ }, "node_modules/npm/node_modules/npm-package-arg": { "version": "11.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9109,6 +9258,7 @@ }, "node_modules/npm/node_modules/npm-packlist": { "version": "8.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9120,6 +9270,7 @@ }, "node_modules/npm/node_modules/npm-pick-manifest": { "version": "9.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9134,6 +9285,7 @@ }, "node_modules/npm/node_modules/npm-profile": { "version": "9.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9146,6 +9298,7 @@ }, "node_modules/npm/node_modules/npm-registry-fetch": { "version": "16.1.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9163,6 +9316,7 @@ }, "node_modules/npm/node_modules/npm-user-validate": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "BSD-2-Clause", "engines": { @@ -9171,6 +9325,7 @@ }, "node_modules/npm/node_modules/npmlog": { "version": "7.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9185,6 +9340,7 @@ }, "node_modules/npm/node_modules/p-map": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9199,6 +9355,7 @@ }, "node_modules/npm/node_modules/pacote": { "version": "17.0.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9230,6 +9387,7 @@ }, "node_modules/npm/node_modules/parse-conflict-json": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9243,6 +9401,7 @@ }, "node_modules/npm/node_modules/path-key": { "version": "3.1.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9251,6 +9410,7 @@ }, "node_modules/npm/node_modules/path-scurry": { "version": "1.10.1", + "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -9266,6 +9426,7 @@ }, "node_modules/npm/node_modules/postcss-selector-parser": { "version": "6.0.15", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9278,6 +9439,7 @@ }, "node_modules/npm/node_modules/proc-log": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9286,6 +9448,7 @@ }, "node_modules/npm/node_modules/promise-all-reject-late": { "version": "1.0.1", + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -9294,6 +9457,7 @@ }, "node_modules/npm/node_modules/promise-call-limit": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "ISC", "funding": { @@ -9302,11 +9466,13 @@ }, "node_modules/npm/node_modules/promise-inflight": { "version": "1.0.1", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/promise-retry": { "version": "2.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9319,6 +9485,7 @@ }, "node_modules/npm/node_modules/promzard": { "version": "1.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9330,6 +9497,7 @@ }, "node_modules/npm/node_modules/qrcode-terminal": { "version": "0.12.0", + "dev": true, "inBundle": true, "bin": { "qrcode-terminal": "bin/qrcode-terminal.js" @@ -9337,6 +9505,7 @@ }, "node_modules/npm/node_modules/read": { "version": "2.1.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9348,6 +9517,7 @@ }, "node_modules/npm/node_modules/read-cmd-shim": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9356,6 +9526,7 @@ }, "node_modules/npm/node_modules/read-package-json": { "version": "7.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9370,6 +9541,7 @@ }, "node_modules/npm/node_modules/read-package-json-fast": { "version": "3.0.2", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9382,6 +9554,7 @@ }, "node_modules/npm/node_modules/retry": { "version": "0.12.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9390,11 +9563,14 @@ }, "node_modules/npm/node_modules/safer-buffer": { "version": "2.1.2", + "dev": true, "inBundle": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/npm/node_modules/semver": { "version": "7.5.4", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9409,6 +9585,7 @@ }, "node_modules/npm/node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9420,11 +9597,13 @@ }, "node_modules/npm/node_modules/set-blocking": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/shebang-command": { "version": "2.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9436,6 +9615,7 @@ }, "node_modules/npm/node_modules/shebang-regex": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9444,6 +9624,7 @@ }, "node_modules/npm/node_modules/signal-exit": { "version": "4.1.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9455,6 +9636,7 @@ }, "node_modules/npm/node_modules/sigstore": { "version": "2.2.0", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -9471,6 +9653,7 @@ }, "node_modules/npm/node_modules/smart-buffer": { "version": "4.2.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9480,6 +9663,7 @@ }, "node_modules/npm/node_modules/socks": { "version": "2.7.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9493,6 +9677,7 @@ }, "node_modules/npm/node_modules/socks-proxy-agent": { "version": "8.0.2", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9506,6 +9691,7 @@ }, "node_modules/npm/node_modules/spdx-correct": { "version": "3.2.0", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -9515,11 +9701,13 @@ }, "node_modules/npm/node_modules/spdx-exceptions": { "version": "2.3.0", + "dev": true, "inBundle": true, "license": "CC-BY-3.0" }, "node_modules/npm/node_modules/spdx-expression-parse": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9529,11 +9717,13 @@ }, "node_modules/npm/node_modules/spdx-license-ids": { "version": "3.0.16", + "dev": true, "inBundle": true, "license": "CC0-1.0" }, "node_modules/npm/node_modules/ssri": { "version": "10.0.5", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9545,6 +9735,7 @@ }, "node_modules/npm/node_modules/string-width": { "version": "4.2.3", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9559,6 +9750,7 @@ "node_modules/npm/node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9572,6 +9764,7 @@ }, "node_modules/npm/node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9584,6 +9777,7 @@ "node_modules/npm/node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9595,6 +9789,7 @@ }, "node_modules/npm/node_modules/supports-color": { "version": "9.4.0", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9606,6 +9801,7 @@ }, "node_modules/npm/node_modules/tar": { "version": "6.2.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9622,6 +9818,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9633,6 +9830,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { "version": "3.3.6", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9644,6 +9842,7 @@ }, "node_modules/npm/node_modules/tar/node_modules/minipass": { "version": "5.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9652,16 +9851,19 @@ }, "node_modules/npm/node_modules/text-table": { "version": "0.2.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/tiny-relative-date": { "version": "1.3.0", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/treeverse": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9670,6 +9872,7 @@ }, "node_modules/npm/node_modules/tuf-js": { "version": "2.2.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9683,6 +9886,7 @@ }, "node_modules/npm/node_modules/unique-filename": { "version": "3.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9694,6 +9898,7 @@ }, "node_modules/npm/node_modules/unique-slug": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9705,11 +9910,13 @@ }, "node_modules/npm/node_modules/util-deprecate": { "version": "1.0.2", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/validate-npm-package-license": { "version": "3.0.4", + "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -9719,6 +9926,7 @@ }, "node_modules/npm/node_modules/validate-npm-package-name": { "version": "5.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9730,11 +9938,13 @@ }, "node_modules/npm/node_modules/walk-up-path": { "version": "3.0.1", + "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/wcwidth": { "version": "1.0.1", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9743,6 +9953,7 @@ }, "node_modules/npm/node_modules/which": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9757,6 +9968,7 @@ }, "node_modules/npm/node_modules/which/node_modules/isexe": { "version": "3.1.1", + "dev": true, "inBundle": true, "license": "ISC", "engines": { @@ -9765,6 +9977,7 @@ }, "node_modules/npm/node_modules/wide-align": { "version": "1.1.5", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9773,6 +9986,7 @@ }, "node_modules/npm/node_modules/wrap-ansi": { "version": "8.1.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9790,6 +10004,7 @@ "node_modules/npm/node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9806,6 +10021,7 @@ }, "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9820,6 +10036,7 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "6.0.1", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -9831,11 +10048,13 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", + "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9852,6 +10071,7 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "7.1.0", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -9866,6 +10086,7 @@ }, "node_modules/npm/node_modules/write-file-atomic": { "version": "5.0.1", + "dev": true, "inBundle": true, "license": "ISC", "dependencies": { @@ -9878,6 +10099,7 @@ }, "node_modules/npm/node_modules/yallist": { "version": "4.0.0", + "dev": true, "inBundle": true, "license": "ISC" }, diff --git a/src/common/mint-utils.ts b/src/common/mint-utils.ts index 33eb67c..ebb9231 100644 --- a/src/common/mint-utils.ts +++ b/src/common/mint-utils.ts @@ -61,18 +61,13 @@ export function createIpfsMetadata( datasetTitle: string, datasetDescription: string, dataNFTStreamPreviewUrl: string, - address: string, - bonusNFTMediaImgUrl?: string + address: string ) { const metadata: Record = { description: `${datasetTitle} : ${datasetDescription}`, data_preview_url: dataNFTStreamPreviewUrl, attributes: [] as object[] }; - // if we have bonusNFTMediaImgUrl, we put that as a top level attribute as well - if (bonusNFTMediaImgUrl && bonusNFTMediaImgUrl.trim() !== '') { - metadata['bonus_media_img'] = bonusNFTMediaImgUrl.trim().toLowerCase(); - } const attributes = traits .split(',') .filter((element) => element.trim() !== ''); @@ -82,11 +77,6 @@ export function createIpfsMetadata( const trait = { trait_type: key.trim(), value: value.trim() }; metadataAttributes.push(trait); } - //// This should not be a trait as it will pollute the trait filters on NFT marketplaces - // metadataAttributes.push({ - // trait_type: 'Data Preview URL', - // value: dataNFTStreamPreviewUrl - // }); metadataAttributes.push({ trait_type: 'Creator', value: address }); metadata.attributes = metadataAttributes; return metadata; @@ -97,8 +87,7 @@ export async function createFileFromUrl( datasetTitle: string, datasetDescription: string, dataNFTStreamPreviewUrl: string, - address: string, - bonusNFTMediaImgUrl?: string + address: string ) { let res: any = ''; let data: any = ''; @@ -113,8 +102,7 @@ export async function createFileFromUrl( datasetTitle, datasetDescription, dataNFTStreamPreviewUrl, - address, - bonusNFTMediaImgUrl + address ); const _traitsFile = new File([JSON.stringify(traits)], 'metadata.json', { type: 'application/json' diff --git a/src/common/utils.ts b/src/common/utils.ts index 1723f9e..37a5d37 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -183,6 +183,10 @@ export function parseDataNft(value: NftType): DataNft { collection: value.collection, balance: value.balance ? Number(value.balance) : 0, owner: value.owner ? value.owner : '', + extraAssets: + value.uris + ?.slice(2) + .map((uri) => Buffer.from(uri, 'base64').toString('ascii')) ?? [], ...attributes }; return new DataNft(returnValue); diff --git a/src/datanft.ts b/src/datanft.ts index d960943..3753260 100644 --- a/src/datanft.ts +++ b/src/datanft.ts @@ -50,6 +50,7 @@ export class DataNft implements DataNftType { readonly overrideDataMarshal: string = ''; readonly overrideDataMarshalChainId: string = ''; readonly isDataNFTPH: boolean = false; + readonly extraAssets: string[] = []; static networkConfiguration: Config; static apiConfiguration: string; diff --git a/src/interfaces.ts b/src/interfaces.ts index f92d036..5b12341 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -69,6 +69,8 @@ export interface DataNftType { readonly owner: string; readonly overrideDataMarshal: string; readonly overrideDataMarshalChainId: string; + readonly isDataNFTPH: boolean; + readonly extraAssets: string[]; } export enum NftEnumType { diff --git a/src/nft-minter.ts b/src/nft-minter.ts index 53de74b..fc1d9d9 100644 --- a/src/nft-minter.ts +++ b/src/nft-minter.ts @@ -159,7 +159,7 @@ export class NftMinter extends Minter { * - nftStorageToken: the nft storage token to be used to upload the image and metadata to IPFS * - antiSpamTokenIdentifier: the anti spam token identifier to be used for the minting * - antiSpamTax: the anti spam tax to be set for the Data NFT-FT with decimals. Needs to be greater than 0 and should be obtained in real time via {@link viewMinterRequirements} prior to calling mint. - * - bonusNFTMediaImgUrl [optional] a bonus media image URL you can send in if needed. + * - extraAssets [optional] extra URIs to attached to the NFT. Can be media files, documents, etc. These URIs are public */ async mint( senderAddress: IAddress, @@ -176,7 +176,7 @@ export class NftMinter extends Minter { nftStorageToken?: string; antiSpamTokenIdentifier?: string; antiSpamTax?: BigNumber.Value; - bonusNFTMediaImgUrl?: string; + extraAssets?: string[]; } ): Promise { const { @@ -185,7 +185,7 @@ export class NftMinter extends Minter { nftStorageToken, antiSpamTokenIdentifier, antiSpamTax, - bonusNFTMediaImgUrl + extraAssets } = options ?? {}; // deep validate all mandatory URLs @@ -218,8 +218,7 @@ export class NftMinter extends Minter { datasetTitle, datasetDescription, dataPreviewUrl, - senderAddress.bech32(), - bonusNFTMediaImgUrl + senderAddress.bech32() ); const { @@ -254,35 +253,30 @@ export class NftMinter extends Minter { .setFunction(new ContractFunction('ESDTTransfer')) .addArg(new TokenIdentifierValue(antiSpamTokenIdentifier)) .addArg(new BigUIntValue(antiSpamTax)) - .addArg(new StringValue('mint')) - .addArg(new StringValue(tokenName)) - .addArg(new StringValue(imageOnIpfsUrl)) - .addArg(new StringValue(metadataOnIpfsUrl)) - .addArg(new StringValue(dataMarshalUrl)) - .addArg(new StringValue(dataNftStreamUrlEncrypted)) - .addArg(new StringValue(dataPreviewUrl)) - .addArg(new U64Value(royalties)) - .addArg(new StringValue(datasetTitle)) - .addArg(new StringValue(datasetDescription)) - .build(); + .addArg(new StringValue('mint')); } else { - data = new ContractCallPayloadBuilder() - .setFunction(new ContractFunction('mint')) - .addArg(new StringValue(tokenName)) - .addArg(new StringValue(imageOnIpfsUrl)) - .addArg(new StringValue(metadataOnIpfsUrl)) - .addArg(new StringValue(dataMarshalUrl)) - .addArg(new StringValue(dataNftStreamUrlEncrypted)) - .addArg(new StringValue(dataPreviewUrl)) - .addArg(new U64Value(royalties)) - .addArg(new StringValue(datasetTitle)) - .addArg(new StringValue(datasetDescription)) - .build(); + data = new ContractCallPayloadBuilder().setFunction( + new ContractFunction('mint') + ); } + data + .addArg(new StringValue(tokenName)) + .addArg(new StringValue(imageOnIpfsUrl)) + .addArg(new StringValue(metadataOnIpfsUrl)) + .addArg(new StringValue(dataMarshalUrl)) + .addArg(new StringValue(dataNftStreamUrlEncrypted)) + .addArg(new StringValue(dataPreviewUrl)) + .addArg(new U64Value(royalties)) + .addArg(new StringValue(datasetTitle)) + .addArg(new StringValue(datasetDescription)); + + for (const extraAsset of extraAssets ?? []) { + data.addArg(new StringValue(extraAsset)); + } const mintTx = new Transaction({ value: antiSpamTokenIdentifier == 'EGLD' ? antiSpamTax : 0, - data, + data: data.build(), sender: senderAddress, receiver: this.contract.getAddress(), gasLimit: 60000000, diff --git a/src/sft-minter.ts b/src/sft-minter.ts index 38522b3..d6fb932 100644 --- a/src/sft-minter.ts +++ b/src/sft-minter.ts @@ -231,7 +231,7 @@ export class SftMinter extends Minter { * - imageUrl: the URL of the image for the Data NFT * - traitsUrl: the URL of the traits for the Data NFT * - nftStorageToken: the nft storage token to be used to upload the image and metadata to IPFS - * - bonusNFTMediaImgUrl a bonus media image URL you can send in if needed. + * - extraAssets: [optional] extra URIs to attached to the NFT. Can be media files, documents, etc. These URIs are public * */ async mint( @@ -250,11 +250,10 @@ export class SftMinter extends Minter { imageUrl?: string; traitsUrl?: string; nftStorageToken?: string; - bonusNFTMediaImgUrl?: string; + extraAssets?: string[]; } ): Promise { - const { imageUrl, traitsUrl, nftStorageToken, bonusNFTMediaImgUrl } = - options ?? {}; + const { imageUrl, traitsUrl, nftStorageToken, extraAssets } = options ?? {}; const tokenNameValidator = new StringValidator() .notEmpty() @@ -323,8 +322,7 @@ export class SftMinter extends Minter { datasetTitle, datasetDescription, dataPreviewUrl, - senderAddress.bech32(), - bonusNFTMediaImgUrl + senderAddress.bech32() ); const { @@ -372,6 +370,10 @@ export class SftMinter extends Minter { data.addArg(new U64Value(lockPeriod)); } + for (const extraAsset of extraAssets ?? []) { + data.addArg(new StringValue(extraAsset)); + } + const mintTx = new Transaction({ data: data.build(), sender: senderAddress, From 3efade26c2e84a932d52846109f283e47f5bf3f2 Mon Sep 17 00:00:00 2001 From: dmn <44813558+damienen@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:35:21 +0300 Subject: [PATCH 3/8] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 73b137c..35084da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.1.0-alpha.1", + "version": "3.1.0-alpha.2", "description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain", "main": "out/index.js", "types": "out/index.d.js", From 6d144094716ef52827fd1fb22b24d4c5d0f9e051 Mon Sep 17 00:00:00 2001 From: Damian Date: Sun, 7 Apr 2024 12:53:04 +0300 Subject: [PATCH 4/8] feat: add extraAssets to metadata --- src/common/mint-utils.ts | 10 +++++++--- src/nft-minter.ts | 3 ++- src/sft-minter.ts | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/common/mint-utils.ts b/src/common/mint-utils.ts index ebb9231..99c0e40 100644 --- a/src/common/mint-utils.ts +++ b/src/common/mint-utils.ts @@ -61,11 +61,13 @@ export function createIpfsMetadata( datasetTitle: string, datasetDescription: string, dataNFTStreamPreviewUrl: string, - address: string + address: string, + extraAssets: string[] ) { const metadata: Record = { description: `${datasetTitle} : ${datasetDescription}`, data_preview_url: dataNFTStreamPreviewUrl, + extra_assets: extraAssets, attributes: [] as object[] }; const attributes = traits @@ -87,7 +89,8 @@ export async function createFileFromUrl( datasetTitle: string, datasetDescription: string, dataNFTStreamPreviewUrl: string, - address: string + address: string, + extraAssets: string[] ) { let res: any = ''; let data: any = ''; @@ -102,7 +105,8 @@ export async function createFileFromUrl( datasetTitle, datasetDescription, dataNFTStreamPreviewUrl, - address + address, + extraAssets ); const _traitsFile = new File([JSON.stringify(traits)], 'metadata.json', { type: 'application/json' diff --git a/src/nft-minter.ts b/src/nft-minter.ts index fc1d9d9..cd761ec 100644 --- a/src/nft-minter.ts +++ b/src/nft-minter.ts @@ -218,7 +218,8 @@ export class NftMinter extends Minter { datasetTitle, datasetDescription, dataPreviewUrl, - senderAddress.bech32() + senderAddress.bech32(), + extraAssets ?? [] ); const { diff --git a/src/sft-minter.ts b/src/sft-minter.ts index d6fb932..1836f68 100644 --- a/src/sft-minter.ts +++ b/src/sft-minter.ts @@ -322,7 +322,8 @@ export class SftMinter extends Minter { datasetTitle, datasetDescription, dataPreviewUrl, - senderAddress.bech32() + senderAddress.bech32(), + extraAssets ?? [] ); const { From 6ce772b436a78a405356c38f027d1d0a27880111 Mon Sep 17 00:00:00 2001 From: Damian Date: Mon, 8 Apr 2024 09:39:35 +0300 Subject: [PATCH 5/8] fix: add extraAssets only if there's at least one --- src/common/mint-utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/mint-utils.ts b/src/common/mint-utils.ts index 99c0e40..7a2f747 100644 --- a/src/common/mint-utils.ts +++ b/src/common/mint-utils.ts @@ -67,9 +67,11 @@ export function createIpfsMetadata( const metadata: Record = { description: `${datasetTitle} : ${datasetDescription}`, data_preview_url: dataNFTStreamPreviewUrl, - extra_assets: extraAssets, attributes: [] as object[] }; + if (extraAssets && extraAssets.length > 0) { + metadata.extra_assets = extraAssets; + } const attributes = traits .split(',') .filter((element) => element.trim() !== ''); From 1682d8108a4b7cb701d2273b555f8663be9007a7 Mon Sep 17 00:00:00 2001 From: dmn <44813558+damienen@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:23:51 +0300 Subject: [PATCH 6/8] Update package.json chore: package v up --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 35084da..a3bbbae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.1.0-alpha.2", + "version": "3.1.0-alpha.3", "description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain", "main": "out/index.js", "types": "out/index.d.js", From 0f30beb3fe042eb58ff3d34b158a3415c63920b3 Mon Sep 17 00:00:00 2001 From: dmn <44813558+damienen@users.noreply.github.com> Date: Mon, 8 Apr 2024 17:43:04 +0300 Subject: [PATCH 7/8] chore: package v up --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3bbbae..532e71d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.1.0-alpha.3", + "version": "3.1.0", "description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain", "main": "out/index.js", "types": "out/index.d.js", From e61a29559bed2865fdd569c1618efd9d6ca1edfd Mon Sep 17 00:00:00 2001 From: Damian Date: Mon, 8 Apr 2024 17:44:05 +0300 Subject: [PATCH 8/8] chore: npm install --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d9f5e4c..3467f83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.1.0-alpha.1", + "version": "3.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@itheum/sdk-mx-data-nft", - "version": "3.1.0-alpha.1", + "version": "3.1.0", "license": "GPL-3.0-only", "dependencies": { "@multiversx/sdk-core": "12.18.0",