Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit ed8522b

Browse files
authored
Expose more types from CMT (#3875)
* Expose other types from CMT to allow usage on the client side while deserializing accounts. * adds a convenient creation slot getter
1 parent bb404a6 commit ed8522b

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

account-compression/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

account-compression/programs/account-compression/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spl-account-compression"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
description = "Solana Program Library Account Compression Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"

account-compression/programs/account-compression/src/state/concurrent_merkle_tree_header.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ impl ConcurrentMerkleTreeHeader {
108108
}
109109
}
110110

111+
pub fn get_creation_slot(&self) -> u64 {
112+
match &self.header {
113+
ConcurrentMerkleTreeHeaderData::V1(header) => header.creation_slot,
114+
}
115+
}
116+
111117
pub fn set_new_authority(&mut self, new_authority: &Pubkey) {
112118
match self.header {
113119
ConcurrentMerkleTreeHeaderData::V1(ref mut header) => {

account-compression/programs/account-compression/src/state/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
mod concurrent_merkle_tree_header;
33
mod path_node;
44

5-
pub use concurrent_merkle_tree_header::{
6-
ConcurrentMerkleTreeHeader, CONCURRENT_MERKLE_TREE_HEADER_SIZE_V1,
7-
};
5+
pub use concurrent_merkle_tree_header::*;
86
pub use path_node::PathNode;

0 commit comments

Comments
 (0)