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
//! Types used by the Lexe SDK.
// ## Guidelines
//
// - **Simple**: Straightforward consumption by newbie developers via a JSON
// REST API (Lexe Sidecar SDK) or via language bindings (Lexe SDK).
//
// - *Minimal nesting* means users don't have to define multiple structs per
// request / response.
// - *Fewer fields* means fewer long-term compatibility commitments.
//
// - **User-facing docs**: `///` doc strings here will be rendered in the public
// API docs. Write for SDK users, not Lexe developers.
//
// - **Document serialization and units**: When newtypes are used, document how
// users should interpret the serialized form:
//
// - `UserPk`s and `NodePk`s are serialized as hex; mention it.
// - `Amount`s are serialized as sats; mention it.
// - `TimestampMs` is serialized as *milliseconds* since the UNIX epoch.
// - `semver::Version`s don't use a `v-` prefix; give an example: `0.6.9`.
//
// - **Serialize `null`**: Don't use `#[serde(skip_serializing_if = ...)]` as
// serializing `null` fields makes it clear to SDK users that information
// could be returned there in future responses.
/// Authentication, identity, and node verification.
/// Request, response, and command types for SDK operations.
/// Payment data types.
/// On-chain and Bitcoin primitives.
/// General-purpose utilities.