pub trait HdkT: HdiT {
Show 29 methods
fn get_agent_activity(
&self,
get_agent_activity_input: GetAgentActivityInput
) -> ExternResult<AgentActivity>;
fn query(&self, filter: ChainQueryFilter) -> ExternResult<Vec<Record>>;
fn sign(&self, sign: Sign) -> ExternResult<Signature>;
fn sign_ephemeral(
&self,
sign_ephemeral: SignEphemeral
) -> ExternResult<EphemeralSignatures>;
fn create(&self, create_input: CreateInput) -> ExternResult<ActionHash>;
fn update(&self, update_input: UpdateInput) -> ExternResult<ActionHash>;
fn delete(&self, delete_input: DeleteInput) -> ExternResult<ActionHash>;
fn get(&self, get_input: Vec<GetInput>) -> ExternResult<Vec<Option<Record>>>;
fn get_details(
&self,
get_input: Vec<GetInput>
) -> ExternResult<Vec<Option<Details>>>;
fn accept_countersigning_preflight_request(
&self,
preflight_request: PreflightRequest
) -> ExternResult<PreflightRequestAcceptance>;
fn agent_info(&self, agent_info_input: ()) -> ExternResult<AgentInfo>;
fn call_info(&self, call_info_input: ()) -> ExternResult<CallInfo>;
fn create_link(
&self,
create_link_input: CreateLinkInput
) -> ExternResult<ActionHash>;
fn delete_link(
&self,
delete_link_input: DeleteLinkInput
) -> ExternResult<ActionHash>;
fn get_links(
&self,
get_links_input: Vec<GetLinksInput>
) -> ExternResult<Vec<Vec<Link>>>;
fn get_link_details(
&self,
get_links_input: Vec<GetLinksInput>
) -> ExternResult<Vec<LinkDetails>>;
fn call(&self, call: Vec<Call>) -> ExternResult<Vec<ZomeCallResponse>>;
fn emit_signal(&self, app_signal: AppSignal) -> ExternResult<()>;
fn remote_signal(&self, remote_signal: RemoteSignal) -> ExternResult<()>;
fn random_bytes(&self, number_of_bytes: u32) -> ExternResult<Bytes>;
fn sys_time(&self, sys_time_input: ()) -> ExternResult<Timestamp>;
fn schedule(&self, scheduled_fn: String) -> ExternResult<()>;
fn sleep(&self, wake_after: Duration) -> ExternResult<()>;
fn x_salsa20_poly1305_shared_secret_create_random(
&self,
key_ref: Option<XSalsa20Poly1305KeyRef>
) -> ExternResult<XSalsa20Poly1305KeyRef>;
fn x_salsa20_poly1305_shared_secret_export(
&self,
x_salsa20_poly1305_shared_secret_export: XSalsa20Poly1305SharedSecretExport
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
fn x_salsa20_poly1305_shared_secret_ingest(
&self,
x_salsa20_poly1305_shared_secret_ingest: XSalsa20Poly1305SharedSecretIngest
) -> ExternResult<XSalsa20Poly1305KeyRef>;
fn x_salsa20_poly1305_encrypt(
&self,
x_salsa20_poly1305_encrypt: XSalsa20Poly1305Encrypt
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
fn create_x25519_keypair(
&self,
create_x25519_keypair_input: ()
) -> ExternResult<X25519PubKey>;
fn x_25519_x_salsa20_poly1305_encrypt(
&self,
x_25519_x_salsa20_poly1305_encrypt: X25519XSalsa20Poly1305Encrypt
) -> ExternResult<XSalsa20Poly1305EncryptedData>;
}
Expand description
When mocking is enabled the mockall crate automatically builds a MockHdkT for us.
ⓘ
let mut mock = MockHdkT::new();
mock_hdk.expect_foo().times(1).etc().etc();
set_hdk(mock_hdk);
Required Methods
sourcefn get_agent_activity(
fn get_agent_activity(
&self,
get_agent_activity_input: GetAgentActivityInput
) -> ExternResult<AgentActivity>
source
fn query(&self, filter: ChainQueryFilter) -> ExternResult<Vec<Record>>
source
fn sign(&self, sign: Sign) -> ExternResult<Signature>
sourcefn sign_ephemeral(
fn sign_ephemeral(
&self,
sign_ephemeral: SignEphemeral
) -> ExternResult<EphemeralSignatures>
source
fn create(&self, create_input: CreateInput) -> ExternResult<ActionHash>
source
fn update(&self, update_input: UpdateInput) -> ExternResult<ActionHash>
source
fn delete(&self, delete_input: DeleteInput) -> ExternResult<ActionHash>
sourcefn get_details(
fn get_details(
&self,
get_input: Vec<GetInput>
) -> ExternResult<Vec<Option<Details>>>
sourcefn accept_countersigning_preflight_request(
fn accept_countersigning_preflight_request(
&self,
preflight_request: PreflightRequest
) -> ExternResult<PreflightRequestAcceptance>
source
fn agent_info(&self, agent_info_input: ()) -> ExternResult<AgentInfo>
source
fn call_info(&self, call_info_input: ()) -> ExternResult<CallInfo>
sourcefn create_link(
fn create_link(
&self,
create_link_input: CreateLinkInput
) -> ExternResult<ActionHash>
sourcefn delete_link(
fn delete_link(
&self,
delete_link_input: DeleteLinkInput
) -> ExternResult<ActionHash>
sourcefn get_links(
fn get_links(
&self,
get_links_input: Vec<GetLinksInput>
) -> ExternResult<Vec<Vec<Link>>>
sourcefn get_link_details(
fn get_link_details(
&self,
get_links_input: Vec<GetLinksInput>
) -> ExternResult<Vec<LinkDetails>>
source
fn call(&self, call: Vec<Call>) -> ExternResult<Vec<ZomeCallResponse>>
source
fn emit_signal(&self, app_signal: AppSignal) -> ExternResult<()>
source
fn remote_signal(&self, remote_signal: RemoteSignal) -> ExternResult<()>
source
fn random_bytes(&self, number_of_bytes: u32) -> ExternResult<Bytes>
source
fn sys_time(&self, sys_time_input: ()) -> ExternResult<Timestamp>
source
fn schedule(&self, scheduled_fn: String) -> ExternResult<()>
source
fn sleep(&self, wake_after: Duration) -> ExternResult<()>
sourcefn x_salsa20_poly1305_encrypt(
fn x_salsa20_poly1305_encrypt(
&self,
x_salsa20_poly1305_encrypt: XSalsa20Poly1305Encrypt
) -> ExternResult<XSalsa20Poly1305EncryptedData>
sourcefn create_x25519_keypair(
fn create_x25519_keypair(
&self,
create_x25519_keypair_input: ()
) -> ExternResult<X25519PubKey>
sourcefn x_25519_x_salsa20_poly1305_encrypt(