Skip to content

Commit 69dab13

Browse files
acolytec3holgerd77gabrocheleau
authored
Add serializeCommitment to public API (#53)
* Add serializeCommitment to public API * Update CHANGELOG.md Co-authored-by: Gabriel Rocheleau <[email protected]> --------- Co-authored-by: Holger Drewes <[email protected]> Co-authored-by: Gabriel Rocheleau <[email protected]>
1 parent 89b405e commit 69dab13

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
(modification: no type change headlines) and this project adheres to
66
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## 0.4.4 - 2024-06-11
9+
10+
- Add `serializeCommitment` to to the public API, PR [#53](https://github.com/ethereumjs/verkle-cryptography-wasm/pull/53)
11+
812
## 0.4.3 - 2024-06-03
913

1014
- Add `hashCommitment` to the public API and add new test to demonstrate how to derive a

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "verkle-cryptography-wasm",
3-
"version": "0.4.3",
3+
"version": "0.4.4",
44
"description": "Verkle Trie Crytography WASM/TypeScript Bindings",
55
"keywords": [
66
"ethereum",

src.ts/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ export const loadVerkleCrypto = async (): Promise<VerkleCrypto> => {
3333
const zeroCommitment = zeroCommitmentBase()
3434

3535
const hashCommitment = (commitment: Uint8Array) => verkleFFI.hashCommitment(commitment)
36+
const serializeCommitment = (commitment: Uint8Array) => verkleFFI.serializeCommitment(commitment)
3637
return {
3738
getTreeKey,
3839
getTreeKeyHash,
3940
updateCommitment,
4041
zeroCommitment,
4142
verifyExecutionWitnessPreState,
42-
hashCommitment
43+
hashCommitment,
44+
serializeCommitment
4345
}
4446
}
4547

@@ -55,6 +57,7 @@ export interface VerkleCrypto {
5557
zeroCommitment: Uint8Array
5658
verifyExecutionWitnessPreState: (prestateRoot: string, execution_witness_json: string) => boolean
5759
hashCommitment: (commitment: Uint8Array) => Uint8Array
60+
serializeCommitment: (commitment: Uint8Array) => Uint8Array
5861
}
5962

6063
// This is a 32 byte serialized field element

0 commit comments

Comments
 (0)