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
51
52
53
54
use Principal as CandidPrincipal;
/// Represents a wrapper around the `candid::Principal` type.
///
/// This struct is designed to encapsulate a Candid Principal, allowing for
/// integration and usage within Juno hooks contexts.
///
/// # Fields
/// - `value`: The `Principal` this struct wraps.
/// Represents a large integer value for document data, particularly useful for interacting with
/// languages or environments that support large numeric types, such as the `bigint` in JavaScript.
///
/// # Fields
/// - `value`: A `u64` integer representing the large numeric value encapsulated by this struct.
/// Represents an arbitrary precision natural number for document data,
/// mirroring Candid's `nat` type. Useful for values that exceed `u64::MAX`
/// or must be compatible with Candid's `nat` type.
///
/// # Fields
/// - `value`: A `u128` integer representing the natural number.
/// Represents a byte array value for document data, mirroring JavaScript's `Uint8Array`.
///
/// This struct is useful for transporting raw binary data across the JSON boundary,
/// where it is serialized as `{ "__uint8array__": number[] }` (see custom serde impl).
///
/// # Fields
/// - `value`: The underlying bytes.
/// Alias for [`JsonDataPrincipal`].
pub type DocDataPrincipal = JsonDataPrincipal;
/// Alias for [`JsonDataBigInt`].
pub type DocDataBigInt = JsonDataBigInt;
/// Alias for [`JsonDataUint8Array`].
pub type DocDataUint8Array = JsonDataUint8Array;