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

@xylabs/hex

Package Overview
Dependencies
Maintainers
7
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 3.0.1 to 3.0.2

2

dist/browser/address.d.ts
import { AssertConfig } from './assert';
import { Hex, HexConfig } from './hex';
export type Address = Hex;
export type Address = Exclude<Hex, 'reserved-address-value'>;
export declare const toAddress: (value: unknown, config?: HexConfig) => Lowercase<string>;

@@ -5,0 +5,0 @@ export declare const isAddress: (value: unknown, bitLength?: number) => value is Lowercase<string>;

@@ -6,3 +6,3 @@ import { AssertConfig } from './assert';

export declare const isHashBitLength: (value: unknown) => value is HashBitLength;
export type Hash = Hex;
export type Hash = Exclude<Hex, 'reserved-hash-value'>;
export declare const isHash: (value: unknown, bitLength?: HashBitLength) => value is Lowercase<string>;

@@ -9,0 +9,0 @@ export declare function asHash(value: unknown): Hash | undefined;

@@ -1,2 +0,2 @@

export type Hex = Lowercase<string>;
export type Hex = Exclude<Lowercase<string>, 'reserved-hex-value'>;
export interface HexConfig {

@@ -3,0 +3,0 @@ bitLength?: number;

import { AssertConfig } from './assert';
import { Hex, HexConfig } from './hex';
export type Address = Hex;
export type Address = Exclude<Hex, 'reserved-address-value'>;
export declare const toAddress: (value: unknown, config?: HexConfig) => Lowercase<string>;

@@ -5,0 +5,0 @@ export declare const isAddress: (value: unknown, bitLength?: number) => value is Lowercase<string>;

@@ -6,3 +6,3 @@ import { AssertConfig } from './assert';

export declare const isHashBitLength: (value: unknown) => value is HashBitLength;
export type Hash = Hex;
export type Hash = Exclude<Hex, 'reserved-hash-value'>;
export declare const isHash: (value: unknown, bitLength?: HashBitLength) => value is Lowercase<string>;

@@ -9,0 +9,0 @@ export declare function asHash(value: unknown): Hash | undefined;

@@ -1,2 +0,2 @@

export type Hex = Lowercase<string>;
export type Hex = Exclude<Lowercase<string>, 'reserved-hex-value'>;
export interface HexConfig {

@@ -3,0 +3,0 @@ bitLength?: number;

@@ -42,3 +42,3 @@ {

"dependencies": {
"@xylabs/arraybuffer": "~3.0.1"
"@xylabs/arraybuffer": "~3.0.2"
},

@@ -61,4 +61,4 @@ "devDependencies": {

"sideEffects": false,
"version": "3.0.1",
"version": "3.0.2",
"type": "module"
}
import { AssertConfig, assertError } from './assert'
import { Hex, HexConfig, hexFrom, hexFromHexString, isHex } from './hex'
export type Address = Hex
export type Address = Exclude<Hex, 'reserved-address-value'>

@@ -6,0 +6,0 @@ export const toAddress = (value: unknown, config: HexConfig = {}) => {

@@ -11,3 +11,3 @@ import { AssertConfig, assertError } from './assert'

export type Hash = Hex
export type Hash = Exclude<Hex, 'reserved-hash-value'>
export const isHash = (value: unknown, bitLength: HashBitLength = 256): value is Hash => {

@@ -14,0 +14,0 @@ return isHex(value, { bitLength })

@@ -1,2 +0,3 @@

export type Hex = Lowercase<string>
//we use Exclude to intentionally make the type not equal to string
export type Hex = Exclude<Lowercase<string>, 'reserved-hex-value'>

@@ -3,0 +4,0 @@ export interface HexConfig {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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