titan_api_types/lib.rs
1//! Type definitions for the Titan API.
2//!
3//! # Features
4//!
5//! * `enum-other` - Adds an additional `Other` values to most enums to allow for handling unkonwn
6//! Client and Server message types. Adds a dependency on `rmpv`.
7//! * `pubkey-str` - (default) Enable conversions to/from base58 strings for [`Pubkey`][pubkey]s.
8//! * `pubkey-fromstr-const` - (default) Enable compile-time base58 string to [`Pubkey`][pubkey] conversion.
9//! * `serde` - (default) Enable `serde` serialization/deserialization for types.
10//! * `serde-pubkey-human-base58` - (default) Adds special handling to `serde` (de)serialization
11//! to encode pubkeys as base58 strings instead of arrays when the format defines
12//! itself as human readable. Binary formats will use more efficient encoding.
13//! * `serde-instruction-human-base64` - (default) Adds special handling to `serde`
14//! (de)serialization to encode instruction data as base64 strings instead of arrays
15//! when the format defines itself as human readable. Binary formats will use more
16//! efficient encoding.
17//! * `solana-pubkey-convert-v2` - Enables conversion of [`Pubkey`][pubkey] to and from the V2 Solana SDK
18//! type.
19//! * `solana-pubkey-convert-v3` - Enables conversion of [`Pubkey`][pubkey] to and from the V3 Solana SDK
20//! type. Note that depending on version, this is equivalent to either `solana-address-convert-v1`
21//! or `solana-address-convert-v2` as `solana-pubkey>=3` simply re-exports the `solana-address` type.
22//! * `solana-instruction-convert-v2` - Enable conversion of [`Instruction`][instruction] to and from
23//! the V2 Solana SDK types (enables `solana-pubkey-convert-v2`).
24//! * `solana-address-convert-v1` - Enable conversion of [`Pubkey`][pubkey] to and from the
25//! V1.0 of the [`solana-address`][solana_address] crate, as well as V3 of the `solana-pubkey`.
26//! * `solana-address-convert-v2` - Enable conversion of [`Pubkey`][pubkey] to and from the
27//! V2 of the [`solana-address`][solana_address] crate.
28//! crate (which re-exports `solana_address::Address` as `Pubkey`).
29//! * `solana-instruction-convert-v3` - Enable conversion of [`Instruction`][instruction] to and from
30//! the V3 Solana SDK types (enables `solana-address-convert-v1`).
31//! * `solana-alt-account-convert-v2` - Enable conversion of the [`AddressLookupTableAccount`][altaccount]
32//! to/from the corresponding type in `solana-message` V2.
33//! * `solana-alt-account-convert-v3` - Enable conversion of the [`AddressLookupTableAccount`][altaccount]
34//! to/from the corresponding type in `solana-message` V3.
35//! * `solana-alt-account-convert-v4` - Enable conversion of the [`AddressLookupTableAccount`][altaccount]
36//! to/from the corresponding type in `solana-message` V4.
37//!
38//! ## Important note regarding solana-address
39//!
40//! If using features to convert between Solana V3 or higher types, it is highly recommended
41//! to also specify the `solana-address-convert` feature that matches the version you are using.
42//!
43//! This is because Anza published `solana-address@v1.1` which depends on `solana-address@v2` and
44//! re-exports that type, so the `solana-address-convert-v1` has feature has changed to only convert
45//! between the `solana-address@1.0.0` type exactly. Unless you are using that exact version of
46//! solana-address, please use the `solana-address-convert-v2` feature instead.
47//!
48//! [pubkey]: crate::common::Pubkey
49//! [instruction]: crate::common::Instruction
50//! [solana_address]: https://docs.rs/solana-address/1.0.0/solana_address/index.html
51//! [altaccount]: crate::common::instruction::AddressLookupTableAccount
52#![warn(missing_docs)]
53
54pub mod common;
55pub mod ws;