MCPcopy Create free account
hub / github.com/ProvableHQ/sdk / get_functions

Method get_functions

wasm/src/programs/program.rs:84–92  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

82 /// console.log(credits_functions === expected_functions); // Output should be "true"
83 #[wasm_bindgen(js_name = "getFunctions")]
84 pub fn get_functions(&self) -> Array {
85 let array = Array::new_with_length(self.0.functions().len() as u32);
86 let mut index = 0u32;
87 self.0.functions().values().for_each(|function| {
88 array.set(index, JsValue::from_str(&function.name().to_string()));
89 index += 1;
90 });
91 array
92 }
93
94 /// Get a javascript object representation of the function inputs and types. This can be used
95 /// to generate a web form to capture user inputs for an execution of a function.

Callers

nothing calls this directly

Calls 2

lenMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected