inspect message
This section is a work in progress.
Examples:
import { bool, Canister, ic, inspectMessage, update } from 'azle/experimental';
export default Canister({
inspectMessage: inspectMessage(() => {
console.log('inspectMessage called');
if (ic.methodName() === 'accessible') {
ic.acceptMessage();
return;
}
if (ic.methodName() === 'inaccessible') {
return;
}
throw `Method "${ic.methodName()}" not allowed`;
}),
accessible: update([], bool, () => {
return true;
}),
inaccessible: update([], bool, () => {
return false;
}),
alsoInaccessible: update([], bool, () => {
return false;
})
});