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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//! # Envelope Expressions
//!
//! This module provides functionality for creating, manipulating, and
//! evaluating expressions encoded in Gordian Envelopes.
//!
//! Envelope Expressions are a method for encoding machine-evaluatable
//! expressions using Gordian Envelope. Using expressions, envelope provides a
//! cryptographically strong foundation on which to build requests and responses
//! for distributed function calls.
//!
//! ## Overview
//!
//! An expression in Gordian Envelope consists of:
//!
//! 1. A function identifier (the subject of the envelope)
//! 2. Zero or more parameters (assertions on the envelope)
//!
//! Functions and parameters are CBOR-tagged to distinguish them from regular
//! envelope content:
//! - Functions are tagged with #6.40006
//! - Parameters are tagged with #6.40007
//!
//! ## Expression Structure
//!
//! In envelope notation, expressions look like this:
//!
//! ```text
//! «function» [
//! ❰parameter❱: argument
//! ❰parameter❱: argument
//! ...
//! ]
//! ```
//!
//! When printed, function identifiers are enclosed in double angle brackets
//! (`«` and `»`), and parameter identifiers are enclosed in heavy single angle
//! brackets (`❰` and `❱`).
//!
//! ## Examples
//!
//! A simple addition expression:
//!
//! ```text
//! «add» [
//! ❰lhs❱: 2
//! ❰rhs❱: 3
//! ]
//! ```
//!
//! A function call with named parameters:
//!
//! ```text
//! «"verifySignature"» [
//! ❰"key"❱: SigningPublicKey
//! ❰"sig"❱: Signature
//! ❰"digest"❱: Digest
//! ]
//! ```
//!
//! ## Function and Parameter Identifiers
//!
//! Both function and parameter identifiers can be:
//! - Numeric: For well-known, standardized functions and parameters
//! - String: For application-specific or less common functions and parameters
//!
//! ## Composition
//!
//! Expressions can be composed, with one expression being a parameter to
//! another:
//!
//! ```text
//! «"verifySignature"» [
//! ❰"key"❱: SigningPublicKey
//! ❰"sig"❱: Signature
//! ❰"digest"❱: «"sha256"» [
//! ❰_❱: messageData
//! ]
//! ]
//! ```
pub use Function;
pub use FunctionsStore;
/// A collection of functions that can be used in envelope expressions.
pub use *;
pub use Parameter;
pub use ParametersStore;
/// A collection of known values that can be used in envelope expressions.
pub use *;
// mod expression_impl;
pub use ;
pub use ;
pub use ;
pub use ;