-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KZG Initialization Refactor #6
Conversation
Have revised this slightly as follows:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. WIll merge once @g11tech approves
src/index.ts
Outdated
/** | ||
* | ||
* @param blob - a blob of data formatted as a Uint8Array of 4096 bytes | ||
* @returns a KZG commitment corresponding to the input blob formatted as a 32 byte Uint8Array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @returns a KZG commitment corresponding to the input blob formatted as a 32 byte Uint8Array | |
* @returns a KZG commitment corresponding to the input blob formatted as a 48 byte Uint8Array |
commitment is 48 bytes
Co-authored-by: g11tech <develop@g11tech.io>
src/index.ts
Outdated
const blobToKzgCommitment = (blob: Uint8Array) => { | ||
const blobHex = '0x' + blobToKzgCommitmentWasm(blob) | ||
return hexToBytes(blobHex) | ||
} | ||
|
||
/** | ||
* | ||
* @param blob - a blob of data formatted as a Uint8Array of 4096 bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again correction needed for what is blob and size
src/index.ts
Outdated
/** | ||
* | ||
* @param blob - a blob of data formatted as a Uint8Array of 4096 bytes | ||
* @param commitment - a KZG commitment corresponding to a blob formatted as a 32 byte Uint8Array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param commitment - a KZG commitment corresponding to a blob formatted as a 32 byte Uint8Array | |
* @param commitment - a KZG commitment corresponding to a blob formatted as a 48 byte Uint8Array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have also updated the changelog and release so we can push an update on NPM.
Small refactor in preparation for a simplified KZG initialization on the EthereumJS side as discussed in the chat.