
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@ngraveio/ur-hex-string
Advanced tools
This repository is the hex string extension of bc-ur-registry
This Cbor type is used to represent a byte string as a hexadecimal string. This is useful when you want to represent a byte string as a hex string in a CBOR object.
To install, run:
yarn add @ngraveio/ur-hex-string
npm install --save @ngraveio/ur-hex-string
Source: https://github.com/toravir/CBOR-Tag-Specs/blob/master/hexString.md
This document specifies a tag for Hex String in Concise Binary Object Representation (CBOR) [1].
Tag: 263
Data item: byte string
Semantics: Hexadecimal String
Point of contact: Ravi R <ravir@employees.org>
Description of semantics: https://github.com/toravir/CBOR-Tag-Specs/blob/master/hexString.md
Tag 263 can be applied to a byte string (major type 2) to indicate that the byte string is a hexadecimal string - any normal string is stored as hexadecimal string, but this tag means that string is to be kept as hex format and does not mean anything to convert to ASCII or anything.
import { HexString } from "@ngraveio/ur-hex-string";
// Create HexString from buffer
const hex = "babecafe8badf00d";
const buff = Buffer.from(hex, "hex");
const hexStringFromBuffer = new HexString(buff);
// Remove starting 0x on string
const hexStringWith0x = new HexString("0x" + hex);
// Create HexString from hex string
const hexStringFromString = new HexString(hex);
// Create UR
const ur = hexStringFromBuffer.toUR();
ur.toString(); // Output: ur:hex-string/fdrdrnsgzelupmwtbtjpryzsss
// Decode HexString from CBOR
const expectedCBOR = "48babecafe8badf00d";
const cborData = Buffer.from(expectedCBOR, "hex");
const decodedHexString = HexString.fromHex(cborData);
// Decode HexString from UR
const expectedUR = "ur:hex-string/fdrdrnsgzelupmwtbtjpryzsss";
const decodedHexStringFromUR = UR.fromString(expectedUR).decode() as HexString;
console.log(decodedHexStringFromUR.toHex()); // Output: 48babecafe8badf00d
[1] C. Bormann, and P. Hoffman. "Concise Binary Object Representation (CBOR)". RFC 7049, October 2013.
Ravi R ravir@employees.org
FAQs
Provides BC UR type for hex string.
The npm package @ngraveio/ur-hex-string receives a total of 27 weekly downloads. As such, @ngraveio/ur-hex-string popularity was classified as not popular.
We found that @ngraveio/ur-hex-string 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.