Crate ledger_mob_apdu
source ·Expand description
Protocol / APDU definitions for MobileCoin app communication
This module provides a protocol specification and reference implementation for communication with MobileCoin wallets.
APDUs use a primitive binary encoding to simplify implementation with unsupported languages and platforms (as well as due to inconvenient incompatibilities with prost/heapless/no_std/no_alloc that preclude the direct use of existing protobuf encodings, if this is resolved in future we may be able to share the standard protocols)
Encodings are intended to be roughly equivalent to packed c structures while maintaining 32-bit field alignment to reduce the need for unaligned access on constrained platforms. All field encodings are little-endian, because most of the world is these days.
See Instruction for APDU instruction codes.
Modules
- Application Information APDUs
- Helpers for computing APDU / event digests
- Ed25519 Identity APDUs for SLIP-0013/17 signing support
- Key Image APDUs, used for key matching
- Prelude to simplify downstream use of APDU objects
- Application State APDUs
- Subaddress related APDUs, for fetching / checking wallet subaddresses
- Transaction related APDUs, used to execute a transaction via the hardware wallet.
- Wallet key APDUs, for fetching root account keys
Macros
- Helper macro for encoding
bitflags
types
Enums
- APDU error type
- MobileCoin APDU instruction codes
Constants
- MobileCoin APDU Class
Traits
- Generic APDU request trait
- Helper trait for defining static APDU commands, automatically implements ApduReq.