pub trait HdkT: HdiT {
Show 36 methods
// Required methods
fn get_agent_activity(
&self,
get_agent_activity_input: GetAgentActivityInput,
) -> Result<AgentActivity, WasmError>;
fn query(&self, filter: ChainQueryFilter) -> Result<Vec<Record>, WasmError>;
fn sign(&self, sign: Sign) -> Result<Signature, WasmError>;
fn sign_ephemeral(
&self,
sign_ephemeral: SignEphemeral,
) -> Result<EphemeralSignatures, WasmError>;
fn create(
&self,
create_input: CreateInput,
) -> Result<HoloHash<Action>, WasmError>;
fn update(
&self,
update_input: UpdateInput,
) -> Result<HoloHash<Action>, WasmError>;
fn delete(
&self,
delete_input: DeleteInput,
) -> Result<HoloHash<Action>, WasmError>;
fn get(
&self,
get_input: Vec<GetInput>,
) -> Result<Vec<Option<Record>>, WasmError>;
fn get_details(
&self,
get_input: Vec<GetInput>,
) -> Result<Vec<Option<Details>>, WasmError>;
fn accept_countersigning_preflight_request(
&self,
preflight_request: PreflightRequest,
) -> Result<PreflightRequestAcceptance, WasmError>;
fn agent_info(&self, agent_info_input: ()) -> Result<AgentInfo, WasmError>;
fn call_info(&self, call_info_input: ()) -> Result<CallInfo, WasmError>;
fn create_link(
&self,
create_link_input: CreateLinkInput,
) -> Result<HoloHash<Action>, WasmError>;
fn delete_link(
&self,
delete_link_input: DeleteLinkInput,
) -> Result<HoloHash<Action>, WasmError>;
fn get_links(
&self,
get_links_input: Vec<GetLinksInput>,
) -> Result<Vec<Vec<Link>>, WasmError>;
fn get_link_details(
&self,
get_links_input: Vec<GetLinksInput>,
) -> Result<Vec<LinkDetails>, WasmError>;
fn count_links(&self, query: LinkQuery) -> Result<usize, WasmError>;
fn block_agent(
&self,
block_agent_input: BlockAgentInput,
) -> Result<(), WasmError>;
fn unblock_agent(
&self,
unblock_agent_input: BlockAgentInput,
) -> Result<(), WasmError>;
fn call(&self, call: Vec<Call>) -> Result<Vec<ZomeCallResponse>, WasmError>;
fn emit_signal(&self, app_signal: AppSignal) -> Result<(), WasmError>;
fn remote_signal(
&self,
remote_signal: RemoteSignal,
) -> Result<(), WasmError>;
fn random_bytes(&self, number_of_bytes: u32) -> Result<ByteBuf, WasmError>;
fn sys_time(&self, sys_time_input: ()) -> Result<Timestamp, WasmError>;
fn schedule(&self, scheduled_fn: String) -> Result<(), WasmError>;
fn sleep(&self, wake_after: Duration) -> Result<(), WasmError>;
fn x_salsa20_poly1305_shared_secret_create_random(
&self,
key_ref: Option<XSalsa20Poly1305KeyRef>,
) -> Result<XSalsa20Poly1305KeyRef, WasmError>;
fn x_salsa20_poly1305_shared_secret_export(
&self,
x_salsa20_poly1305_shared_secret_export: XSalsa20Poly1305SharedSecretExport,
) -> Result<XSalsa20Poly1305EncryptedData, WasmError>;
fn x_salsa20_poly1305_shared_secret_ingest(
&self,
x_salsa20_poly1305_shared_secret_ingest: XSalsa20Poly1305SharedSecretIngest,
) -> Result<XSalsa20Poly1305KeyRef, WasmError>;
fn x_salsa20_poly1305_encrypt(
&self,
x_salsa20_poly1305_encrypt: XSalsa20Poly1305Encrypt,
) -> Result<XSalsa20Poly1305EncryptedData, WasmError>;
fn create_x25519_keypair(
&self,
create_x25519_keypair_input: (),
) -> Result<X25519PubKey, WasmError>;
fn x_25519_x_salsa20_poly1305_encrypt(
&self,
x_25519_x_salsa20_poly1305_encrypt: X25519XSalsa20Poly1305Encrypt,
) -> Result<XSalsa20Poly1305EncryptedData, WasmError>;
fn create_clone_cell(
&self,
input: CreateCloneCellInput,
) -> Result<ClonedCell, WasmError>;
fn disable_clone_cell(
&self,
input: DisableCloneCellInput,
) -> Result<(), WasmError>;
fn enable_clone_cell(
&self,
input: DisableCloneCellInput,
) -> Result<ClonedCell, WasmError>;
fn delete_clone_cell(
&self,
input: DisableCloneCellInput,
) -> Result<(), WasmError>;
}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);