dl_events 0.1.1

A simple and fun library for publishing canister events to subscribers! 🎉
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::Event;
use candid::Principal;

pub fn notify_subscriber(
    canister: Principal,
    method: String,
    events: &Vec<Event>,
) -> Result<(), ()> {
    ic_cdk::api::call::notify(canister, &*method, (events,)).map_err(|e| ())
}