Constants§
- FIL_
COMMITMENT_ SEALED - FIL_
COMMITMENT_ UNSEALED - POSEIDON_
BLS12_ 381_ A1_ FC1 - Multihash code for Poseidon BLS replica commitments.
- SHA2_
256_ TRUN C254_ PADDED - Multihash code for Sha2 256 trunc254 padded used in data commitments.
Functions§
- cid_
to_ commitment - CIDToCommitment extracts the raw commitment bytes, the FilMultiCodec and FilMultiHash from a CID, after validating that the codec and hash type are consistent
- cid_
to_ data_ commitment_ v1 - cid_to_data_commitment_v1 extracts the raw data commitment from a CID assuming that it has the correct hashing function and serialization types
- cid_
to_ piece_ commitment_ v1 - cid_to_piece_commitment_v1 converts a CID to a comm_p – it is just a helper function that is equivalent to cid_to_data_commitment_v1.
- cid_
to_ replica_ commitment_ v1 - cid_to_replica_commitment_v1 extracts the raw replica commitment from a CID assuming that it has the correct hashing function and serialization types
- commitment_
to_ cid - CommitmentToCID converts a raw commitment hash to a CID by adding:
- data_
commitment_ v1_ to_ cid - DataCommitmentV1ToCID converts a raw data commitment to a CID by adding:
- piece_
commitment_ v1_ to_ cid - piece_commitment_v1_to_cid converts a comm_p to a CID – it is just a helper function that is equivalent to data_commitment_v1_to_cid.
- replica_
commitment_ v1_ to_ cid - ReplicaCommitmentV1ToCID converts a raw data commitment to a CID by adding: