UNPKG

ox

Version:

Ethereum Standard Library

30 lines 1.02 kB
/** @see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters */ export const versionedHashVersion = 1; /** * Defines a KZG interface. * * @example * ```ts twoslash * // @noErrors * import * as cKzg from 'c-kzg' * import { Kzg } from 'ox' * import { Paths } from 'ox/trusted-setups' * * cKzg.loadTrustedSetup(Paths.mainnet) * * const kzg = Kzg.from(cKzg) * ``` * * @param value - The KZG object to convert. * @returns The KZG interface object. */ export function from(value) { return { blobToKzgCommitment: (blob) => value.blobToKzgCommitment(blob), computeCells: (blob) => value.computeCells(blob), computeCellsAndKzgProofs: (blob) => value.computeCellsAndKzgProofs(blob), recoverCellsAndKzgProofs: (indices, cells) => value.recoverCellsAndKzgProofs(indices, cells), verifyCellKzgProofBatch: (commitments, indices, cells, proofs) => value.verifyCellKzgProofBatch(commitments, indices, cells, proofs), }; } //# sourceMappingURL=Kzg.js.map