commitmentToVersionedHash
Transform a commitment to it's versioned hash.
Import
import { } from 'viem'Usage
import {
,
,
} from 'viem'
import { } from './kzg'
const = ({ : '0x1234' })
const [] = ({ , })
const = ({
,
}) Returns
Hex | ByteArray
Versioned hash corresponding to the commitment.
Parameters
commitment
- Type:
Hex | ByteArray
Commitment to transform into a versioned hash.
const = ({ : '0x1234' })
const [] = ({ , })
const = ({
,
})to
- Type:
"bytes" | "hex"
The output type.
const = ({ : '0x1234' })
const [] = ({ , })
const = ({
,
: 'bytes'
})
version
- Type:
number - Default:
1
Version to tag onto the hash. Defaults to 1.
const = ({ : '0x1234' })
const [] = ({ , })
const = ({
,
: 69,
})