
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@matterpool/superasset-js
Advanced tools
Standard Bitcoin Smart Contracts for Assets. SuperAsset Whitepaper https://matterpool.io
SuperAsset is a collection of Standard Bitcoin Smart Contract Templates.

Non-Fungible-Token (NFT) Smart Contract for Bitcoin. Used for any digital property, license, media, or state tracking.
Features:
Contract Code and State Layout:
// ==========================================================================
// |
// SA10 STATIC CODE | OP_RETURN tokenID(36B) ownerPublicKey(33B) [ payload(varlen) ]
// |
// ==========================================================================
Fungible-Token (FT) Smart Contract for Bitcoin. Useful for creating entire classes of related data with an initial supply that can be transferred just like regular p2pkh UTXOs.
Coming soon...
npm install superasset-js
// Import the library or include it in a <script/> tag
import * as simpleasset from 'simpleasset';
var simpleasset = require('simpleasset');
const sa10 = superasset.instance({
feeb: 0.5,
}).SA10({ verbose: true });
// Set up the keys used below.
const privateKey1= new bsv.PrivateKey('wifkey1');
const publicKey1 = bsv.PublicKey.fromPrivateKey(privateKey1)
const privateKey2 = new bsv.PrivateKey('wifkey2')
const publicKey2 = bsv.PublicKey.fromPrivateKey(privateKey2)
// -----------------------------------------------------
// DEPLOYMENT
//
// Deploy NFT with initial owner and satoshis value of 7000 (Lower than this may hit dust limit)
// Example: https://whatsonchain.com/tx/1bb01a6660b4f6b1cbb60ff141eea61052950fe75957026b79f7f62941d6e998
const assetValue = 20000;
const initialOwnerPublicKey = publicKey1.toString();
const fundingPrivateKey = privateKey2.toString();
let assetState = await sa10.deploy(initialOwnerPublicKey, assetValue, fundingPrivateKey);
// -----------------------------------------------------
// TRANSFER (AND UPDATE) - JSON Example
//
// Note: The payload data must follow minimal push encoding rules.
// Reference: https://github.com/moneybutton/bsv/blob/bsv-legacy/lib/script/script.js#L1083
// Client can send NFT to a public key and keep funding input and change seperate
// Example: https://whatsonchain.com/tx/cc97616a873c002abc42f03a51ed5611a89ac1cc619c8d3e343fd09a3bf2cb94
let payloadUpdate = Buffer.from(`{ "hello": "world" }`, 'utf8').toString('hex');
let currentOwnerPrivateKey = privateKey1.toString();
let nextOwnerPublicKey = publicKey2.toString();
assetState = await sa10.transfer(assetState, currentOwnerPrivateKey, nextOwnerPublicKey, fundingPrivateKey, payloadUpdate);
// -----------------------------------------------------
// TRANSFER (AND UPDATE) - HEX Binary Data Example
//
// Note: The payload data must follow minimal push encoding rules.
// Reference: https://github.com/moneybutton/bsv/blob/bsv-legacy/lib/script/script.js#L1083
// Client can send NFT to a public key and keep funding input and change seperate
// Example: https://whatsonchain.com/tx/23ff92f9026160a0f84ac578ac6bf2c0bfe516a8471523c12eb8f4a88a7a55d7
payloadUpdate = '012345';
currentOwnerPrivateKey = privateKey2.toString();
nextOwnerPublicKey = publicKey2.toString();
assetState = await sa10.transfer(assetState, currentOwnerPrivateKey, nextOwnerPublicKey, fundingPrivateKey, payloadUpdate);
// -----------------------------------------------------
// TRANSFER (AND UPDATE) - Empty/null Payload example
//
// Note: The payload data must follow minimal push encoding rules.
// Reference: https://github.com/moneybutton/bsv/blob/bsv-legacy/lib/script/script.js#L1083
// Client can send NFT to a public key and keep funding input and change seperate
// Example: https://whatsonchain.com/tx/b2d5283b70414581188296cbf360f4a9ff089cd1fd6a9b3227964f76001cc5f8
payloadUpdate = '';
currentOwnerPrivateKey = privateKey2.toString();
nextOwnerPublicKey = publicKey2.toString();
assetState = await sa10.transfer(assetState, currentOwnerPrivateKey, nextOwnerPublicKey, fundingPrivateKey, payloadUpdate);
// -----------------------------------------------------
// MELT
//
// Melt back to regular p2pkh satoshis
// Client can send back NFT value to another address and keep change seperate
// Example: https://whatsonchain.com/tx/ae44aaa9aad8433b74d1f6d9dedf57deb47ab3b9e671549bdd36b0ca9f8e9567
payloadUpdate = null;
currentOwnerPrivateKey = privateKey2.toString();
let receiverPublicKey = publicKey2.toString();
assetState = await sa10.melt(assetState, currentOwnerPrivateKey, receiverPublicKey, fundingPrivateKey);
npm install
npm run build
npm run test
@mxtterpool
FAQs
SuperAsset Javascript SDK - matterpool.io
The npm package @matterpool/superasset-js receives a total of 7 weekly downloads. As such, @matterpool/superasset-js popularity was classified as not popular.
We found that @matterpool/superasset-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.