> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Blob.toProof

> Generate 48-byte KZG proof for blob

<Card title="Try it Live" icon="play" href="https://playground.tevm.sh?example=primitives/blob.ts">
  Run Blob examples in the interactive playground
</Card>

<Tabs>
  <Tab title="Standard API">
    ```typescript theme={null}
    import { Kzg, Blob } from 'tevm';

    const blob = Blob.fromData(data);
    const commitment = Kzg.Commitment(blob);
    const proof = Kzg.Proof(blob, commitment);

    console.log(proof.length); // 48
    console.log(Blob.Proof.isValid(proof)); // true
    ```

    **Note:** Requires c-kzg-4844 library integration (coming soon).
  </Tab>

  <Tab title="Factory API">
    ## `ToProof({ computeBlobKzgProof })(blob, commitment): Proof`

    Tree-shakeable factory pattern with explicit KZG dependency.

    **Dependencies:**

    * `computeBlobKzgProof: (blob: Uint8Array, commitment: Uint8Array) => Uint8Array` - KZG proof function from c-kzg-4844

    **Example:**

    ```typescript theme={null}
    import { Kzg } from 'tevm'
    import { computeBlobKzgProof } from 'c-kzg'

    const Proof = Kzg.ProofFactory({ computeBlobKzgProof })
    const proof = Proof(blob, commitment)
    ```

    **Bundle size:** KZG crypto only included if you import it explicitly.

    **Note:** Requires c-kzg-4844 library integration (coming soon).
  </Tab>
</Tabs>

## See Also

* [toCommitment](./toCommitment) - Generate KZG commitment
* [verify](./verify) - Verify proof
* [KZG](/primitives/blob/kzg) - KZG proof generation details
