holochain_zome_types/
info.rs1use crate::prelude::*;
2use holo_hash::ActionHash;
3use holo_hash::AgentPubKey;
4use holochain_serialized_bytes::prelude::*;
5
6pub use holochain_integrity_types::info::*;
7
8#[allow(missing_docs)]
10#[derive(Clone, Debug, Serialize, Deserialize, SerializedBytes, PartialEq)]
11pub struct AgentInfo {
12 pub agent_initial_pubkey: AgentPubKey,
15 #[cfg(feature = "unstable-dpki")]
16 pub agent_latest_pubkey: AgentPubKey,
20 pub chain_head: (ActionHash, u32, Timestamp),
21}
22
23impl AgentInfo {
24 pub fn new(
25 agent_initial_pubkey: AgentPubKey,
26 #[cfg(feature = "unstable-dpki")] agent_latest_pubkey: AgentPubKey,
27 chain_head: (ActionHash, u32, Timestamp),
28 ) -> Self {
29 Self {
30 agent_initial_pubkey,
31 #[cfg(feature = "unstable-dpki")]
32 agent_latest_pubkey,
33 chain_head,
34 }
35 }
36}
37
38#[derive(Debug, Serialize, Deserialize)]
39pub struct CallInfo {
40 pub provenance: AgentPubKey,
43 pub function_name: FunctionName,
45 pub as_at: (ActionHash, u32, Timestamp),
48 pub cap_grant: CapGrant,
50}