
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@agoralabs-sh/uuid
Advanced tools
A UUID v4 utility package that allows generation and encoding/decoding.
A UUID v4 utility package that allows generation and encoding/decoding.
You can install the types using:
npm add @agoralabs-sh/uuid
generate([options])
Generates a random UUID v4 string.
Name | Type | Required | Default | Description |
---|---|---|---|---|
options | IExtraOptions | no | - | Options that allows the UUID to to be returned to uppercase. |
Type | Description |
---|---|
string | A random UUID v4 string. |
import { generate } from '@agoralabs-sh/uuid';
const uuid = generate();
console.log(uuid);
// 18b0e62a-21c6-4e27-a813-825716f0fedb
decode(value)
Decodes the UUID into a byte array. This removes any hyphens and case is preserved.
Name | Type | Required | Default | Description |
---|---|---|---|---|
value | string | yes | - | The UUID to decode |
Type | Description |
---|---|
Uint8Array | The UUID as bytes. |
import { decode } from '@agoralabs-sh/uuid';
const decoded = decode('18b0e62a-21c6-4e27-a813-825716f0fedb');
console.log(decoded);
// [24, 176, 230, 42, 33, 198, 78, 39, 168, 19, 130, 87, 22, 240, 254, 219]
encode(value, [options])
Encodes the UUID into the human-readable format with hyphens added.
Name | Type | Required | Default | Description |
---|---|---|---|---|
value | Uint8Array | yes | - | A UUID byte array. |
options | IExtraOptions | no | - | Options that allows the UUID to to be returned to uppercase. |
Type | Description |
---|---|
string | The encoded UUID string as a human-readable string. |
import { encode } from '@agoralabs-sh/uuid';
const uuid = encode(new Uint8Array([24, 176, 230, 42, 33, 198, 78, 39, 168, 19, 130, 87, 22, 240, 254, 219]));
console.log(uuid);
// 18b0e62a-21c6-4e27-a813-825716f0fedb
IExtraOptions
Name | Type | Required | Default | Description |
---|---|---|---|---|
uppercase | boolean | no | false | Whether the UUID is transformed to uppercase. |
Command | Description |
---|---|
pnpm run build | Generates build and TypeScript declaration files to the dist/ directory. |
pnpm run clean | Deletes the dist/ directory and the tsconfig.*.tsbuildinfo files. |
pnpm run generate:index | Generates/overwrites the main index.ts file used for exporting all files. |
pnpm run lint | Runs the linter based on the rules in eslint.config.mjs . |
pnpm run prettier | Runs the prettier based on the rules in prettier.config.mjs . |
Please read the Contributing Guide to learn about the development process.
Please refer to the LICENSE file.
FAQs
A UUID v4 utility package that allows generation and encoding/decoding.
We found that @agoralabs-sh/uuid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.