use crate::CapGrant;
use crate::FunctionName;
use crate::Timestamp;
use holo_hash::ActionHash;
use holo_hash::AgentPubKey;
use holochain_serialized_bytes::prelude::*;
pub use holochain_integrity_types::info::*;
#[allow(missing_docs)]
#[derive(Clone, Debug, Serialize, Deserialize, SerializedBytes, PartialEq)]
pub struct AgentInfo {
pub agent_initial_pubkey: AgentPubKey,
pub agent_latest_pubkey: AgentPubKey,
pub chain_head: (ActionHash, u32, Timestamp),
}
impl AgentInfo {
pub fn new(
agent_initial_pubkey: AgentPubKey,
agent_latest_pubkey: AgentPubKey,
chain_head: (ActionHash, u32, Timestamp),
) -> Self {
Self {
agent_initial_pubkey,
agent_latest_pubkey,
chain_head,
}
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct CallInfo {
pub provenance: AgentPubKey,
pub function_name: FunctionName,
pub as_at: (ActionHash, u32, Timestamp),
pub cap_grant: CapGrant,
}