
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
nft-resolver
Advanced tools
Resolver for non-fungible tokens issued by oasis.asset.
NFT Resolver is a SDK for NFT developer:
NFT generate and sign following oasis.asset
standard.
Customized and generate extended meta data from a NFT.
Check out the API
Install with npm:
npm install nft-resolver -S
or with yarn:
yarn add nft-resolver -S
check out docs.
import { NFT } from "nft-resolver";
// Initialize with uuid.
const uuid = "123456";
const symbol = "SWORD";
const uri = "oasis://rogeman/OTHER/antsword?subtypes=type1,type2&types1=1&types2=2";
const nft = new NFT(uri, symbol, uuid);
// or initialize without uuid
const nft = new NFT(uri, symbol);
// Get nft uri and meta data decoded from uri
nft.uri // "oasis://rogeman/ARMOR/antsword/other1/other2?subtypes=type1,type2&types1=1&types2=2"
nft.world // "rogeman"
nft.type // "OTHER"
nft.category // "antsword"
nft.params // { subtypes:"type1,type2", type1: "1", types2: "2"}
nft.fragments // ["other1","other2"]
// Set extended meta data
nft.setExtMetaData({
"name": "Asset Name",
"description": "Lorem ipsum...",
"image": "...",
"properties": {
// An example
"simple_property": "example value",
"rich_property": {...}
}
})
nft.extendedMetaData; // the same with above
// Sign nft
const signature = nft.sign('5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3');
// Verify signature
nft.verifySign('EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV');
URI resolver provided a low-level uri assemble or disassemble.
import { NftURI } from "nft-resolver";
const uriString =
"oasis://rogeman/ARMOR/antsword?subtypes=type1,type2&type1=1&type2=2";
const game = "rogeman";
const type = "ARMOR";
const category = "antsword";
const nftUri = new NftURI(game, type, category, {
subtypes: "type1,type2",
type1: "1",
type2: "2",
});
nftUri.raw == uriString; // true
// Sub types manages
nftUri.getParam("type1"); // "1"
nftUri.addParam("type3", "3");
nftUri.rmParam("type3");
// Return all query params
nftUri.allParams(); // Object{"subtypes":"type1,type2","type1":"1","type2":"2"}
Extended Meta data class is provided:
import {NftExtMeta} from 'nft-resolver';
const name = "Asset Name";
const desp = "Simple description";
const image = "https://www.google.com/image/1.jpg";
const properties: Properties = {
simpleProperty: "Simple property",
richProperty:{...} // json object
};
const extMeta = new NftExtMeta(name,desp,image,properties);
// Set new property
extMeta.setProps(newProps);
extMeta.toString();
// {
// "name": "Asset Name",
// "description": "Simple description",
// "image": "https://www.google.com/image/1.jpg",
// "properties": {
// "simple_property": "Simple property",
// "rich_property": {...}
// }
// }
FAQs
Resolver for non-fungible tokens issued by oasis.asset
The npm package nft-resolver receives a total of 22 weekly downloads. As such, nft-resolver popularity was classified as not popular.
We found that nft-resolver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.