newton-core 0.4.16

newton protocol core sdk
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Secrets-namespace key builders.
//!
//! Re-exports typed constructors from [`newton_state_tree::NamespaceKey`].
//! See `docs/PRIVATE_DATA_STORAGE.md` ยง 5.3 for the encoding schema.

use alloy::primitives::{Address, B256};
pub use newton_state_tree::NamespaceKey;

/// Build a secrets-namespace leaf key for one `(policy_client, secret_id)` pair.
#[inline]
pub fn secrets_leaf(policy_client: Address, secret_id: B256) -> NamespaceKey {
    NamespaceKey::secrets_leaf(policy_client, secret_id)
}