Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
simple-net-art-diagram
Advanced tools
The Simple Net Art Diagram: the simplest possible net art diagram.
Created by artist duo MTAA, Simple Net Art Diagram (SNAD) is a schematic illustration of two computer terminals connected by a line and a red lightning bolt labeled “The art happens here.” Through an extreme economy of form, the now-iconic image conveys complex concepts about net art: first, that it “happens,” and therefore can be thought of as an action or a performance; and second, that it is defined by in-betweenness.
Since its publication in the late 1990s, Simple Net Art Diagram has functioned as a kind of net art meme, remade by other artists to reflect differing conceptions of net art. Embracing this evolution, MTAA have released it under a Creative Commons license that permits alteration and reuse.
MTAA has deployed a smart contract to the Ethereum blockchain which embeds a base64-encoded representation of The Simple Net Art Diagram within its source code. This contract follows the ERC-721 standard.
The artists have minted three non-fungible tokens of The Simple Net Art Diagram. These tokens are entirely on the Ethereum blockchain with no external dependencies such as IPFS or Arweave. See the contracts section of this repo for the source code.
The smart contract exposes two functions that may be used to render The Simple Net Art Diagram directly from the blockchian.
SIMPLE_NET_ART_DIAGRAM
— returns a base64-encoded data URI (the signature is 0xea99b750
)tokenURI
returns base64-encoded ERC-721 compliant metadata JSON, with the data uri in the image
fieldInstall
yarn add simple-net-art-diagram
Require in Node.js:
const Simple_Net_Art_Diagram = require("simple-net-art-diagram");
or, in the browser, which adds a Simple_Net_Art_Diagram
global variable.
<script src="./node_modules/simple-net-art-diagram/dist/index.js"></script>
Note: We're not providing a CDN URL for the package.
The smart contract ABI, addresses, SIMPLE_NET_ART_DIAGRAM
function signature, and the data URI are available via properties on the exported object:
Simple_Net_Art_Diagram.abi; // [{"inputs": [],"stateMutability": "nonpayable",}...etc.
Simple_Net_Art_Diagram.addresses; // { "31337": { "address": "0x5FbDB2313...etc"
Simple_Net_Art_Diagram.functionSignature; // 0xea99b750
Simple_Net_Art_Diagram.dataUri; // "data:image/gif;base64,R0lGODlh1wHuAMQAAP///...etc
addresses.json
is an object with chain IDs as keys:
{
"<chain id>": {
"address": "<contract address>",
"transactionHash": "<deploy transaction hash>"
}
}
There is also a helper function exported which helps to retrieve the data URI directly from the blockchain.
Simple_Net_Art_Diagram.fetchData(rpcEndpoint: string, chainId: string): Promise<string>
// example
(async function () {
const img = new Image();
img.src = await Simple_Net_Art_Diagram.fetchData("http://127.0.0.1:8545", "31337");
body.appendChild(img);
})();
See the examples directory for more.
To run the tests, first start a hardhat node:
yarn hardhat node
And then in another terminal run:
yarn test
This runs both the smart contract tests and the helper lib tests.
Find other formats of The Simple Net Art Diagram on IPFS
FAQs
The Simple Net Art Diagram: the simplest possible net art diagram.
We found that simple-net-art-diagram 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.