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

@zilliqa-js/util

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zilliqa-js/util - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

2

dist/validation.d.ts
import BN from 'bn.js';
import Long from 'long';
export declare const isAddress: (address: string) => boolean;
export declare const isBech32: (raw: string) => boolean;
export declare const isBase58: (raw: string) => boolean;
export declare const isPrivateKey: (privateKey: string) => boolean;

@@ -5,0 +7,0 @@ export declare const isPubKey: (pubKey: string) => boolean;

@@ -9,2 +9,8 @@ "use strict";

};
exports.isBech32 = function (raw) {
return !!raw.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/);
};
exports.isBase58 = function (raw) {
return !!raw.match(/^[1-9ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/);
};
exports.isPrivateKey = function (privateKey) {

@@ -11,0 +17,0 @@ return exports.isByteString(privateKey, 64);

4

package.json
{
"name": "@zilliqa-js/util",
"version": "0.5.0",
"version": "0.6.0",
"description": "Utilities for working with Zillia.",

@@ -26,3 +26,3 @@ "main": "dist/index.js",

},
"gitHead": "c9ac41a9624e4797e8a94f8c1d7558bf96f92d25"
"gitHead": "36aca1d0308845a83903e83de88eac3a8d92f1ed"
}

@@ -8,2 +8,12 @@ import BN from 'bn.js';

export const isBech32 = (raw: string) => {
return !!raw.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/);
};
export const isBase58 = (raw: string) => {
return !!raw.match(
/^[1-9ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/,
);
};
export const isPrivateKey = (privateKey: string) => {

@@ -10,0 +20,0 @@ return isByteString(privateKey, 64);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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