You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: replace BufferSource with Uint8Array in type definitions and function parameters
- Updated type definitions in `types.ts` across multiple files to replace `Uint8Array<ArrayBuffer>` with `Uint8Array` for better clarity and consistency.
- Adjusted function parameters in `base-x.js`, `ec-compression.js`, `utf8.js`, and others to reflect the new type definitions.
- Refactored utility functions to ensure compatibility with the updated types, enhancing maintainability and reducing potential type-related issues.
Copy file name to clipboardExpand all lines: packages/iso-base/src/ec-compression.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ export function isCompressed(key) {
74
74
}
75
75
76
76
/**
77
-
* @param {Uint8Array<ArrayBuffer>} key
77
+
* @param {Uint8Array} key
78
78
*/
79
79
exportfunctionisUncompressed(key){
80
80
returnkey[0]===0x04
@@ -83,7 +83,7 @@ export function isUncompressed(key) {
83
83
/**
84
84
* Elliptic Curve point compression
85
85
*
86
-
* @param { Uint8Array<ArrayBuffer>} pubkeyBytes
86
+
* @param { Uint8Array } pubkeyBytes
87
87
*/
88
88
exportfunctioncompress(pubkeyBytes){
89
89
if(!isUncompressed(pubkeyBytes)){
@@ -105,7 +105,7 @@ export function compress(pubkeyBytes) {
105
105
/**
106
106
* Elliptic Curve point decompression
107
107
*
108
-
* @param {Uint8Array<ArrayBuffer>} comp - Compressed public key. 1st byte: 0x02 for even or 0x03 for odd. Following curve size n bytes: x coordinate expressed as big-endian.
108
+
* @param {Uint8Array} comp - Compressed public key. 1st byte: 0x02 for even or 0x03 for odd. Following curve size n bytes: x coordinate expressed as big-endian.
0 commit comments