Skip to content

Commit

Permalink
document ethereum.js package (#268)
Browse files Browse the repository at this point in the history
* document ethereum.js package

* deduplicate docs for utilities from foundation package

* clean up mistakes in comments

* remove extra characters, replace redundant byte class comments, fix formatting

* fix jsdocs warnings

---------

Co-authored-by: ludamad <[email protected]>
  • Loading branch information
Orloaft and ludamad authored Apr 19, 2023
1 parent 1b8d40e commit 7362195
Show file tree
Hide file tree
Showing 70 changed files with 4,133 additions and 163 deletions.
2 changes: 1 addition & 1 deletion yarn-project/ethereum.js/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@aztec/foundation/eslint-legacy');
module.exports = require('@aztec/foundation/eslint');
14 changes: 7 additions & 7 deletions yarn-project/ethereum.js/src/bigint_buffer/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Convert a little-endian buffer into a BigInt.
* @param buf The little-endian buffer to convert
* @param buf - The little-endian buffer to convert.
* @returns A BigInt with the little-endian representation of buf.
*/
export function toBigIntLE(buf: Buffer): bigint {
Expand All @@ -14,8 +14,8 @@ export function toBigIntLE(buf: Buffer): bigint {
}

/**
* Convert a big-endian buffer into a BigInt
* @param buf The big-endian buffer to convert.
* Convert a big-endian buffer into a BigInt.
* @param buf - The big-endian buffer to convert.
* @returns A BigInt with the big-endian representation of buf.
*/
export function toBigIntBE(buf: Buffer): bigint {
Expand All @@ -28,8 +28,8 @@ export function toBigIntBE(buf: Buffer): bigint {

/**
* Convert a BigInt to a little-endian buffer.
* @param num The BigInt to convert.
* @param width The number of bytes that the resulting buffer should be.
* @param num - The BigInt to convert.
* @param width - The number of bytes that the resulting buffer should be.
* @returns A little-endian buffer representation of num.
*/
export function toBufferLE(num: bigint, width: number): Buffer {
Expand All @@ -41,8 +41,8 @@ export function toBufferLE(num: bigint, width: number): Buffer {

/**
* Convert a BigInt to a big-endian buffer.
* @param num The BigInt to convert.
* @param width The number of bytes that the resulting buffer should be.
* @param num - The BigInt to convert.
* @param width - The number of bytes that the resulting buffer should be.
* @returns A big-endian buffer representation of num.
*/
export function toBufferBE(num: bigint, width: number): Buffer {
Expand Down
Loading

0 comments on commit 7362195

Please sign in to comment.