Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(autonomi): expose inner MerkleReg type #2426

Closed
wants to merge 2 commits into from

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented Nov 11, 2024

This inner MerkleReg CRDT allows access to the history (DAG) of the register.

@happybeing
Copy link
Contributor

Thanks @b-zee, may I suggest a couple of extras and that you mention the history:

   // Owner's PublicKey is used to verify API calls which are signed using the owner's RegisterSecretKey
    pub fn owner(&self) -> PublicKey {
        self.signed_reg.base_register().address().owner()
    }

    // RegisterPermissions determine who can mutate the register
    pub fn permissions(&self) -> &RegisterPermissions {
        self.signed_reg.base_register().permissions()
    }

   /// Get the low-level CRDT of the register
   /// This is needed to allow access to register history
    pub fn inner_merkle_reg(&self) -> &MerkleReg<Entry> {
        // Unstable method according to documentation.
        &self.crdt_reg.merkle_reg()
    }

@b-zee
Copy link
Contributor Author

b-zee commented Nov 18, 2024

Excellent suggestions @happybeing!

@b-zee b-zee enabled auto-merge November 18, 2024 08:22
Copy link
Member

@maqi maqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are somee rustc compiling failure reports got included by mistake ?

@b-zee b-zee closed this Dec 16, 2024
auto-merge was automatically disabled December 16, 2024 08:24

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants