Skip to content

Commit 151de69

Browse files
committed
tx: add peerdas blob transactions support
1 parent 3f0cd29 commit 151de69

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/util/src/kzg.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Interface for an externally provided kzg library used when creating blob transactions
33
*/
44
export interface KZG {
5+
// eip-4844
56
blobToKzgCommitment(blob: string): string
67
computeBlobProof(blob: string, commitment: string): string
78
verifyProof(polynomialKZG: string, z: string, y: string, KZGProof: string): boolean
@@ -10,4 +11,15 @@ export interface KZG {
1011
expectedKZGCommitments: string[],
1112
KZGProofs: string[],
1213
): boolean
14+
// eip-7594
15+
computeCells(blob: string): string[]
16+
computeCellsAndProofs(blob: string): [string[], string[]]
17+
recoverCells(indices: number[], cells: string[]): string[]
18+
recoverCellsAndProofs(indices: number[], cells: string[]): [string[], string[]]
19+
verifyCellKzgProofBatch(
20+
commitments: string[],
21+
indices: number[],
22+
cells: string[],
23+
proofs: string[],
24+
): boolean
1325
}

0 commit comments

Comments
 (0)