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
//! Protocol-aware WIT scalar codecs.
//!
//! The encode/decode engine and the [`WitScalarCodec`] trait live in `miden-assembly-syntax`, which
//! does not depend on `miden-protocol` and should not: the VM does not depend on the protocol. So
//! it ships the two codecs it can write itself, `word` and `felt`, and leaves the trait for the
//! rest.
//!
//! `account-id` and `asset` are the rest. `AccountId::from_hex` says what a valid id is, and
//! `Asset` says what a valid asset is, so both codecs live on this side.
//!
//! [`with_cli_codecs`] registers them in one place, so the commands that render typed signatures
//! do not know the individual types.
//!
//! [`WitScalarCodec`]: miden_client::vm::typed::WitScalarCodec
//! [`TypedProcInfo`]: miden_client::vm::typed::TypedProcInfo
use ;
pub use AccountIdCodec;
pub use AssetCodec;
/// Builds the `InvalidScalar` error a codec returns when it can't parse `token`. Shared so every
/// codec reports the same error shape from one place.
pub
/// Registers every CLI scalar codec onto `typed`. New codecs are added here so the commands that
/// render typed signatures stay agnostic of the individual WIT types.