@scure/base
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -488,5 +488,5 @@ /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */ | ||
str: `${Prefix}1${string}`, | ||
limit: number | false | ||
limit?: number | false | ||
): Bech32Decoded<Prefix>; | ||
function decode(str: string, limit: number | false): Bech32Decoded; | ||
function decode(str: string, limit?: number | false): Bech32Decoded; | ||
function decode(str: string, limit: number | false = 90): Bech32Decoded { | ||
@@ -493,0 +493,0 @@ if (typeof str !== 'string') |
@@ -89,7 +89,7 @@ /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */ | ||
decode: { | ||
<Prefix_1 extends string>(str: `${Prefix_1}1${string}`, limit: number | false): Bech32Decoded<Prefix_1>; | ||
(str: string, limit: number | false): Bech32Decoded; | ||
<Prefix_1 extends string>(str: `${Prefix_1}1${string}`, limit?: number | false): Bech32Decoded<Prefix_1>; | ||
(str: string, limit?: number | false): Bech32Decoded; | ||
}; | ||
decodeToBytes: (str: string) => Bech32DecodedWithArray; | ||
decodeUnsafe: (str: string, limit: number | false) => void | Bech32Decoded<string>; | ||
decodeUnsafe: (str: string, limit?: number | false | undefined) => void | Bech32Decoded<string>; | ||
fromWords: (to: number[]) => Uint8Array; | ||
@@ -102,7 +102,7 @@ fromWordsUnsafe: (to: number[]) => void | Uint8Array; | ||
decode: { | ||
<Prefix_1 extends string>(str: `${Prefix_1}1${string}`, limit: number | false): Bech32Decoded<Prefix_1>; | ||
(str: string, limit: number | false): Bech32Decoded; | ||
<Prefix_1 extends string>(str: `${Prefix_1}1${string}`, limit?: number | false): Bech32Decoded<Prefix_1>; | ||
(str: string, limit?: number | false): Bech32Decoded; | ||
}; | ||
decodeToBytes: (str: string) => Bech32DecodedWithArray; | ||
decodeUnsafe: (str: string, limit: number | false) => void | Bech32Decoded<string>; | ||
decodeUnsafe: (str: string, limit?: number | false | undefined) => void | Bech32Decoded<string>; | ||
fromWords: (to: number[]) => Uint8Array; | ||
@@ -109,0 +109,0 @@ fromWordsUnsafe: (to: number[]) => void | Uint8Array; |
{ | ||
"name": "@scure/base", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Secure, audited & 0-dep implementation of base64, bech32, base58, base32 & base16", | ||
@@ -5,0 +5,0 @@ "files": [ |
# scure-base | ||
Audited and 0-dep implementation of bech32, base64, base58, base32 & base16. | ||
Audited & minimal implementation of bech32, base64, base58, base32 & base16. | ||
- [🔒 Audited](#security) by an independent security firm | ||
- 🔒 [Audited](#security) by an independent security firm | ||
- 🔻 Tree-shaking-friendly: use only what's necessary, other code won't be included | ||
- 🔍 Unique tests which ensure correctness | ||
- 📦 ESM and common.js | ||
- ✍️ Written in [functional style](#design-rationale), easily composable | ||
@@ -22,3 +22,3 @@ - 💼 Matches specs | ||
- Audited by a third-party | ||
- Minimal or zero dependencies | ||
- Releases are signed with PGP keys and built transparently with NPM provenance | ||
@@ -178,4 +178,9 @@ - Check out all libraries: | ||
The library has been audited by Cure53 on Jan 5, 2022. Check out the audit [PDF](./audit/2022-01-05-cure53-audit-nbl2.pdf) & [URL](https://cure53.de/pentest-report_hashing-libs.pdf). See [changes since audit](https://github.com/paulmillr/scure-base/compare/1.0.0..main). | ||
The library has been independently audited: | ||
- at version 1.0.0, in Jan 2022, by [cure53](https://cure53.de) | ||
- PDFs: [online](https://cure53.de/pentest-report_hashing-libs.pdf), [offline](./audit/2022-01-05-cure53-audit-nbl2.pdf) | ||
- [Changes since audit](https://github.com/paulmillr/scure-base/compare/1.0.0..main). | ||
- The audit has been funded by [Ethereum Foundation](https://ethereum.org/en/) with help of [Nomic Labs](https://nomiclabs.io) | ||
The library was initially developed for [js-ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography). | ||
@@ -182,0 +187,0 @@ At commit [ae00e6d7](https://github.com/ethereum/js-ethereum-cryptography/commit/ae00e6d7d24fb3c76a1c7fe10039f6ecd120b77e), |
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
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
77757
202