Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xylabs/hex

Package Overview
Dependencies
Maintainers
0
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/hex - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

dist/neutral/address.d.ts

56

dist/neutral/index.d.ts

@@ -1,52 +0,4 @@

type AssertCallback = (value: unknown, message: string) => string | boolean;
type AssertConfig = string | AssertCallback | boolean;
type Hex = Exclude<Lowercase<string>, 'reserved-hex-value'>;
interface HexConfig {
bitLength?: number;
byteSize?: number;
prefix?: boolean;
}
declare function asHex(value: unknown): Hex | undefined;
declare function asHex(value: unknown, assert: AssertConfig): Hex;
declare const hexFrom: (value: string | number | bigint | ArrayBuffer, config?: HexConfig) => Hex;
declare const hexFromArrayBuffer: (buffer: ArrayBuffer, config?: HexConfig) => Hex;
declare const hexFromBigInt: (value: bigint, config?: HexConfig) => Hex;
declare const hexFromHexString: (value: string, config?: HexConfig) => Hex;
declare const hexFromNumber: (value: number, config?: HexConfig) => Hex;
declare const isHex: (value: unknown, config?: HexConfig) => value is Hex;
declare const isHexZero: (value?: string) => boolean | undefined;
declare const toHexLegacy: (buffer: ArrayBuffer) => string;
declare const bitsToNibbles: (value: number) => number;
declare const nibblesToBits: (value: number) => number;
declare const hexRegex: RegExp;
declare const hexRegexWithPrefix: RegExp;
declare const toHex: (value: string | number | bigint | ArrayBuffer, config?: HexConfig) => Lowercase<string>;
type Address = Exclude<Hex, 'reserved-address-value'>;
declare const toAddress: (value: string | number | bigint | ArrayBuffer, config?: HexConfig) => Lowercase<string>;
declare const isAddress: (value: unknown, config?: HexConfig) => value is Address;
declare function asAddress(value: unknown): Address | undefined;
declare function asAddress(value: unknown, assert: AssertConfig): Address;
type HashBitLength = 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
declare const HashBitLength: HashBitLength[];
declare const isHashBitLength: (value: unknown) => value is HashBitLength;
type Hash = Exclude<Hex, 'reserved-hash-value'>;
declare const isHash: (value: unknown, bitLength?: HashBitLength) => value is Hash;
declare function asHash(value: unknown): Hash | undefined;
declare function asHash(value: unknown, assert: AssertConfig): Hash;
export { type Address, type Hash, HashBitLength, type Hex, type HexConfig, asAddress, asHash, asHex, bitsToNibbles, hexFrom, hexFromArrayBuffer, hexFromBigInt, hexFromHexString, hexFromNumber, hexRegex, hexRegexWithPrefix, isAddress, isHash, isHashBitLength, isHex, isHexZero, nibblesToBits, toAddress, toHex, toHexLegacy };
export * from './address.ts';
export * from './hash.ts';
export * from './hex/index.ts';
//# sourceMappingURL=index.d.ts.map
{
"name": "@xylabs/hex",
"version": "4.0.3",
"version": "4.0.4",
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",

@@ -42,4 +42,4 @@ "keywords": [

"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^4.0.0",
"@xylabs/tsconfig": "^4.0.0",
"@xylabs/ts-scripts-yarn3": "^4.0.7",
"@xylabs/tsconfig": "^4.0.7",
"typescript": "^5.5.4"

@@ -46,0 +46,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc