@zilliqa-js/util
Advanced tools
Comparing version 0.8.3 to 0.8.8
import BN from 'bn.js'; | ||
import Long from 'long'; | ||
export declare const isAddress: (address: string) => boolean; | ||
export declare const isBech32: (raw: string, testnet?: boolean) => boolean; | ||
export declare const isBech32: (raw: string) => boolean; | ||
export declare const isBase58: (raw: string) => boolean; | ||
@@ -6,0 +6,0 @@ export declare const isPrivateKey: (privateKey: string) => boolean; |
@@ -23,7 +23,4 @@ "use strict"; | ||
}; | ||
exports.isBech32 = function (raw, testnet) { | ||
if (testnet === void 0) { testnet = false; } | ||
return testnet | ||
? !!raw.match(/^tzil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/) | ||
: !!raw.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/); | ||
exports.isBech32 = function (raw) { | ||
return !!raw.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/); | ||
}; | ||
@@ -30,0 +27,0 @@ exports.isBase58 = function (raw) { |
{ | ||
"name": "@zilliqa-js/util", | ||
"version": "0.8.3", | ||
"version": "0.8.8", | ||
"description": "Utilities for working with Zilliqa.", | ||
@@ -36,3 +36,3 @@ "author": "Ian Tan (https://github.com/iantanwx)", | ||
}, | ||
"gitHead": "1c13cb0661cb128353bfdde686d80e3751c114ba" | ||
"gitHead": "918706697fed29f75195fa055286b142c1e2f96c" | ||
} |
@@ -23,6 +23,4 @@ // This file is part of Zilliqa-Javascript-Library. | ||
export const isBech32 = (raw: string, testnet: boolean = false) => { | ||
return testnet | ||
? !!raw.match(/^tzil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/) | ||
: !!raw.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/); | ||
export const isBech32 = (raw: string) => { | ||
return !!raw.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}/); | ||
}; | ||
@@ -29,0 +27,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232498
1739
1