I am trying to understand the meaning of this paragraph in the Candid Spec:
Most Candid values are self-explanatory, except for references. There are two forms of Candid values for service references and principal references:
-
ref(r)
indicates an opaque reference, understood only by the underlying system. -
id(b)
, indicates a transparent reference to a service addressed by the blobb
.
Likewise, there are two forms of Candid values for function references:
-
ref(r)
indicates an opaque reference, understood only by the underlying system. -
pub(s,n)
, indicates the public method namen
of the service referenced bys
.
And then I am trying to understand how to interpret ref(r)
and i8(0)
in this section on Memory:
M(ref(r) : principal) = i8(0)
M(id(v*) : principal) = i8(1) M(v* : vec nat8)
The M(id(v*) : principal)
is clear, but not the M(ref(r))
?
I have reviewed the different implementations of Candid, and the M(ref(r):principal)
seems to be implemented differently by the different toolkits.
Would somebody be able to put some color to this?