MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / extract_init_controller

Function extract_init_controller

validation/src/test.rs:92–106  ·  view source on GitHub ↗
(
    signing_type: SigningType,
    event_type: TestEventType,
    event: &unvalidated::Event<Ipld>,
)

Source from the content-addressed store, hash-verified

90}
91
92fn extract_init_controller(
93 signing_type: SigningType,
94 event_type: TestEventType,
95 event: &unvalidated::Event<Ipld>,
96) -> String {
97 match event_type {
98 TestEventType::DeterministicInit => unreachable!("nothing to verify"),
99 TestEventType::SignedInit | TestEventType::InvalidSignedInit => extract_controller(event),
100 TestEventType::SignedData | TestEventType::InvalidSignedData => {
101 // get init event controller
102 let (_cid, init) = get_test_event(signing_type, TestEventType::SignedInit);
103 extract_controller(&init)
104 }
105 }
106}
107
108pub async fn assert_invalid_event(
109 signing_type: SigningType,

Callers 2

assert_invalid_eventFunction · 0.85
verify_eventFunction · 0.85

Calls 2

extract_controllerFunction · 0.85
get_test_eventFunction · 0.85

Tested by

no test coverage detected