Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.5.0, MVX libs updated to handle axios issue, new getOwners method, owner attr for DataNft, use BigNumber defaults #84

Merged
merged 8 commits into from
Dec 20, 2023
133 changes: 98 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itheum/sdk-mx-data-nft",
"version": "2.4.1",
"version": "2.5.0",
"description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain",
"main": "out/index.js",
"types": "out/index.d.js",
Expand All @@ -16,18 +16,18 @@
"author": "Itheum Protocol",
"license": "GPL-3.0-only",
"dependencies": {
"@multiversx/sdk-core": "12.11.0",
"@multiversx/sdk-network-providers": "2.0.0",
"@multiversx/sdk-core": "12.17.0",
"@multiversx/sdk-network-providers": "2.2.0",
"bignumber.js": "9.1.2",
"nft.storage": "7.1.1"
},
"devDependencies": {
"@types/jest": "29.5.4",
"@types/jest": "29.5.11",
"jest": "29.7.0",
"ts-jest": "29.1.1",
"tslint": "6.1.3",
"typedoc": "0.25.1",
"typescript": "5.2.2"
"typedoc": "0.25.4",
"typescript": "5.3.3"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/common/mint-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NFTStorage, File } from 'nft.storage';
import { File, NFTStorage } from 'nft.storage';

export async function dataNFTDataStreamAdvertise(
dataNFTStreamUrl: string,
Expand Down
5 changes: 3 additions & 2 deletions src/common/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BigNumber from 'bignumber.js';
import { DataNft } from '../datanft';
import { NftEnumType, NftType, Offer } from '../interfaces';
import { ErrFetch, ErrMissingTrait, ErrMissingValueForTrait } from '../errors';
import { NftEnumType, NftType, Offer } from '../interfaces';

export function numberToPaddedHex(value: BigNumber.Value) {
let hex = new BigNumber(value).toString(16);
Expand Down Expand Up @@ -56,6 +56,7 @@ export function parseDataNft(value: NftType): DataNft {
nonce: value.nonce,
collection: value.collection,
balance: value.balance ? Number(value.balance) : 0,
owner: value.owner ? value.owner : '',
...DataNft.decodeAttributes(value.attributes)
});
}
Expand Down Expand Up @@ -362,7 +363,7 @@ export function validateSpecificParamsMint(params: {
datasetDescription?: string | undefined;
royalties?: number | undefined;
supply?: number | undefined;
antiSpamTax?: number | undefined;
antiSpamTax?: BigNumber.Value | undefined;
_mandatoryParamsList: string[]; // a pure JS fallback way to validate mandatory params, as typescript rules for mandatory can be bypassed by client app
}): {
allPassed: boolean;
Expand Down
Loading