Skip to content

Access the underlying cid::Cid from the Atrium CID wrapper #289

@hbjydev

Description

@hbjydev

Currently, the atrium_api::types::string::Cid struct defines that the underlying cid::Cid type is private;

pub struct Cid(cid::Cid)

I'd like to access the underlying cid::Cid instance for the sake of verifying the contents of the blob we get from the PDS versus the CID requested, but I can't currently see a way to do this without needlessly reprocessing it into a string and reading it with cid::Cid::from::<String>(...).

The easiest way would probably be to just make it pub cid::Cid, but if there's a different way I can get it I'd appreciate the help! 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions