Gathering detailed insights and metrics for @walletconnect/encoding
Gathering detailed insights and metrics for @walletconnect/encoding
Javascript Utilities for WalletConnect
npm install @walletconnect/encoding
Typescript
Module System
Node Version
NPM Version
99.4
Supply Chain
96.2
Quality
82.7
Maintenance
100
Vulnerability
100
License
TypeScript (96.65%)
JavaScript (3.35%)
Total Downloads
33,626,078
Last Day
16,812
Last Week
81,291
Last Month
395,057
Last Year
7,727,111
117 Stars
413 Commits
80 Forks
24 Watching
50 Branches
31 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.2
Package Id
@walletconnect/encoding@1.0.2
Unpacked Size
287.01 kB
Size
38.23 kB
File Count
14
NPM Version
8.19.1
Node Version
16.17.0
Cumulative downloads
Total Downloads
Last day
-10.4%
16,812
Compared to previous day
Last week
-17.3%
81,291
Compared to previous week
Last month
-10.7%
395,057
Compared to previous month
Last year
-44.5%
7,727,111
Compared to previous year
3
6
Byte encoding utils
1// -- Buffer --------------------------------------------- // 2 3function bufferToUtf8(buf: Buffer): string; 4function bufferToHex(buf: Buffer, prefixed?: boolean): string; 5function bufferToArray(buf: Buffer): Uint8Array; 6function bufferToNumber(buf: Buffer): number; 7function bufferToBinary(buf: Buffer): string; 8 9// -- Utf8 ----------------------------------------------- // 10 11function utf8ToBuffer(utf8: string): Buffer; 12function utf8ToHex(utf8: string, prefixed?: boolean): string; 13function utf8ToArray(utf8: string): Uint8Array; 14function utf8ToNumber(utf8: string): number; 15function utf8ToBinary(utf8: string): string; 16 17// -- Hex ------------------------------------------------ // 18 19function hexToBuffer(hex: string): Buffer; 20function hexToUtf8(hex: string): string; 21function hexToArray(hex: string): Uint8Array; 22function hexToNumber(hex: string): number; 23function hexToBinary(hex: string): string; 24 25// -- Uint8Array ----------------------------------------- // 26 27function arrayToBuffer(arr: Uint8Array): Buffer; 28function arrayToUtf8(arr: Uint8Array): string; 29function arrayToHex(arr: Uint8Array, prefixed?: boolean): string; 30function arrayToNumber(arr: Uint8Array): number; 31function arrayToBinary(arr: Uint8Array): string; 32 33// -- Number ---------------------------------------- // 34 35function numberToBuffer(num: number): Buffer; 36function numberToUtf8(num: number): string; 37function numberToHex(num: number, prefixed?: boolean): string; 38function numberToArray(num: number): Uint8Array; 39function numberToBinary(num: number): string; 40 41// -- Binary ----------------------------------------------- // 42 43function binaryToBuffer(bin: string): Buffer; 44function binaryToArray(bin: string): Uint8Array; 45function binaryToHex(bin: string | string, prefixed?: boolean): string; 46function binaryToUtf8(bin: string): string; 47function binaryToNumber(bin: string): number; 48 49// -- Validators ----------------------------------------- // 50 51function isBinaryString(str: any): boolean; 52function isHexString(str: any, length?: number): boolean; 53function isBuffer(val: any): boolean; 54function isTypedArray(val: any): boolean; 55function isArrayBuffer(val: any): boolean; 56 57function getType(val: any); 58function getEncoding(str: string); 59 60// -- Misc ----------------------------------------------- // 61 62function concatBuffers(...args: Buffer[]): Buffer; 63function concatArrays(...args: Uint8Array[]): Uint8Array; 64function trimLeft(data: Buffer, length: number): Buffer; 65function trimRight(data: Buffer, length: number): Buffer; 66 67function calcByteLength(length: number, byteSize: number): number; 68function splitBytes(str: string, byteSize: number): string[]; 69function sanitizeBytes(str: string, byteSize: number, padding: string): string; 70function swapBytes(str: string): string; 71function swapHex(str: string): string; 72 73function padLeft(str: string, length: number, padding?: string): string; 74function padRight(str: string, length: number, padding?: string): string; 75 76function removeHexPrefix(hex: string): string; 77function addHexPrefix(hex: string): string; 78function sanitizeHex(hex: string): string; 79function removeHexLeadingZeros(hex: string): string;
No vulnerabilities found.
Reason
30 commit(s) out of 30 and 0 issue activity out of 5 found in the last 90 days -- score normalized to 10
Reason
no vulnerabilities detected
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 9
Details
Reason
GitHub code reviews found for 15 commits out of the last 30 -- score normalized to 5
Details
Reason
no badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
no update tool detected
Details
Reason
security policy file not detected
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More