1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// ASSET CALLBACK FLAG
// ================================================================================================
/// Indicates whether a faucet's assets trigger
/// [`AssetCallbacks`](crate::asset::AssetCallbacks) when they are added to an account or note.
///
/// The flag is an immutable property of the issuing faucet's [`AccountId`](super::AccountId),
/// encoded as a single bit of the ID prefix and fixed at account creation. Because every asset
/// carries its faucet's ID prefix, the kernel can derive this capability from the asset alone
/// without reading the faucet's account state.
///
/// When [`Enabled`](Self::Enabled), the kernel dispatches the faucet's callbacks whenever one of
/// its assets is added to a vault or note. When [`Disabled`](Self::Disabled), callbacks are skipped
/// entirely and no foreign-account read is performed.
///
/// The flag only enables the dispatch. On dispatch, the kernel reads the callback's procedure root
/// from the faucet's storage and skips the invocation if the callback slot is absent or holds the
/// empty word, so [`Enabled`](Self::Enabled) means callbacks may be invoked for the faucet's
/// assets, not that the faucet has any.