![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@itheum/sdk-mx-data-nft
Advanced tools
This SDK is currently focused on interacting with the Itheum's Data NFT technology that's deployed to the MultiversX blockchain.
node@19.7X
npm install
/src
foldernpm run devtest
and work on the test.mjs file for live reloadnpm run build
dist
foldernpm i @itheum/sdk-mx-data-nft
SDK Docs
import { DataNft } from '@itheum/sdk-mx-data-nft';
DataNft.setNetworkConfig('devnet' | 'testnet' | 'mainnet');
// Can build a new DataNft object partially
const dataNft = new DataNft({
tokenIdentifier: 'tokenIdentifier',
tokenName: 'tokenName'
});
// Create a new DataNft object from API
const nonce = 1;
const nft = await DataNft.createFromApi(nonce);
// Create a new DataNft object from API Response
const response = await fetch('https://devnet-api.multiversx.com/address/nfts');
const dataNfts = [];
response.forEach(async (nft) => {
const data = await DataNft.createFromApiResponse(nft);
dataNfts.push(data);
});
// Retrives the DataNfts owned by a address
const address = 'address';
const dataNfts = [];
dataNfts = await DataNft.ownedByAddress(address);
// Retrives the DataNft message from marshal to sign
const dataNft = DataNft.createFromApi(nonce);
const message = await dataNft.messageToSign();
// Sign the message with a wallet
const signature = 'signature';
// Unlock the data inside the dataNft
dataNft.viewData(message, signature);
import { DataNftMinter } from '@itheum/sdk-mx-data-nft';
const dataNftMinter = new DataNftMinter('devnet' | 'testnet' | 'mainnet');
// View minter smart contract rewquirements
const requirements = await dataNftMinter.viewMinterRequirements('address');
// View contract pause state
const result = await dataNftMarket.viewContractPauseState();
// Create a mint transaction
const transaction = await dataNftMarket.mint(
new Address('erd1'),
'TEST-TOKEN',
'https://marshal.com',
'https://streamdata.com',
'https://previewdata',
15,
1000,
'Test Title',
'Test Description',
10
);
// Create a burn transaction
const transaction = await dataNftMarket.burn(
new Address('erd1'),
dataNftNonce,
quantityToBurn
);
import { DataNftMarket } from '@itheum/sdk-mx-data-nft';
const dataNftMarket = new DataNftMarket('devnet' | 'testnet' | 'mainnet');
// View requirements
const result = await dataNftMarket.viewRequirements();
// View address listed offers
const result = await dataNftMarket.viewAddressListedOffers(new Address(''));
// View address paged offers
const result = await dataNftMarket.viewAddressPagedOffers(
1,
10,
new Address('')
);
// View address total offers
const result = await dataNftMarket.viewAddressTotalOffers(new Address(''));
// View address cancelled offers
const result = await dataNftMarket.viewAddressCancelledOffers(new Address(''));
// View offers paged
const result = await dataNftMarket.viewPagedOffers(1, 10);
// View offers
const result = await dataNftMarket.viewOffers();
// View number of offers listed
const result = await dataNftMarket.viewNumberOfOffers();
// View contract pause state
const result = await dataNftMarket.viewContractPauseState();
// View last valid offer id
const result = await dataNftMarket.viewLastValidOfferId();
// Create addOffer transaction
const result = dataNftMarket.addOffer(new Address(''), '', 0, 0, '', 0, 0, 0);
// Create acceptOffer transaction
const result = dataNftMarket.acceptOffer(new Address(''), 0, 0, 0);
// Create cancelOffer transaction
const result = dataNftMarket.cancelOffer(new Address(''), 0);
// Create cancelOffer transaction without sending the funds back to the owner
const result = dataNftMarket.cancelOffer(new Address(''), 0, false);
// Create withdrawFromCancelledOffer transaction
const result = dataNftMarket.withdrawCancelledOffer(new Address(''), 0);
// Create changeOfferPrice transaction
const result = dataNftMarket.changeOfferPrice(new Address(''), 0, 0);
FAQs
SDK for Itheum's Data NFT Technology on MultiversX Blockchain
The npm package @itheum/sdk-mx-data-nft receives a total of 52 weekly downloads. As such, @itheum/sdk-mx-data-nft popularity was classified as not popular.
We found that @itheum/sdk-mx-data-nft demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.