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
//! Type definitions for the Titan API.
//!
//! # Features
//!
//! * `enum-other` - Adds an additional `Other` values to most enums to allow for handling unkonwn
//! Client and Server message types. Adds a dependency on `rmpv`.
//! * `pubkey-str` - (default) Enable conversions to/from base58 strings for [`Pubkey`][pubkey]s.
//! * `pubkey-fromstr-const` - (default) Enable compile-time base58 string to [`Pubkey`][pubkey] conversion.
//! * `serde` - (default) Enable `serde` serialization/deserialization for types.
//! * `serde-pubkey-human-base58` - (default) Adds special handling to `serde` (de)serialization
//! to encode pubkeys as base58 strings instead of arrays when the format defines
//! itself as human readable. Binary formats will use more efficient encoding.
//! * `serde-instruction-human-base64` - (default) Adds special handling to `serde`
//! (de)serialization to encode instruction data as base64 strings instead of arrays
//! when the format defines itself as human readable. Binary formats will use more
//! efficient encoding.
//! * `solana-pubkey-convert-v2` - Enables conversion of [`Pubkey`][pubkey] to and from the V2 Solana SDK
//! type.
//! * `solana-pubkey-convert-v3` - Enables conversion of [`Pubkey`][pubkey] to and from the V3 Solana SDK
//! type. Note that depending on version, this is equivalent to either `solana-address-convert-v1`
//! or `solana-address-convert-v2` as `solana-pubkey>=3` simply re-exports the `solana-address` type.
//! * `solana-instruction-convert-v2` - Enable conversion of [`Instruction`][instruction] to and from
//! the V2 Solana SDK types (enables `solana-pubkey-convert-v2`).
//! * `solana-address-convert-v1` - Enable conversion of [`Pubkey`][pubkey] to and from the
//! V1.0 of the [`solana-address`][solana_address] crate, as well as V3 of the `solana-pubkey`.
//! * `solana-address-convert-v2` - Enable conversion of [`Pubkey`][pubkey] to and from the
//! V2 of the [`solana-address`][solana_address] crate.
//! crate (which re-exports `solana_address::Address` as `Pubkey`).
//! * `solana-instruction-convert-v3` - Enable conversion of [`Instruction`][instruction] to and from
//! the V3 Solana SDK types (enables `solana-address-convert-v1`).
//! * `solana-alt-account-convert-v2` - Enable conversion of the [`AddressLookupTableAccount`][altaccount]
//! to/from the corresponding type in `solana-message` V2.
//! * `solana-alt-account-convert-v3` - Enable conversion of the [`AddressLookupTableAccount`][altaccount]
//! to/from the corresponding type in `solana-message` V3.
//! * `solana-alt-account-convert-v4` - Enable conversion of the [`AddressLookupTableAccount`][altaccount]
//! to/from the corresponding type in `solana-message` V4.
//!
//! ## Important note regarding solana-address
//!
//! If using features to convert between Solana V3 or higher types, it is highly recommended
//! to also specify the `solana-address-convert` feature that matches the version you are using.
//!
//! This is because Anza published `solana-address@v1.1` which depends on `solana-address@v2` and
//! re-exports that type, so the `solana-address-convert-v1` has feature has changed to only convert
//! between the `solana-address@1.0.0` type exactly. Unless you are using that exact version of
//! solana-address, please use the `solana-address-convert-v2` feature instead.
//!
//! [pubkey]: crate::common::Pubkey
//! [instruction]: crate::common::Instruction
//! [solana_address]: https://docs.rs/solana-address/1.0.0/solana_address/index.html
//! [altaccount]: crate::common::instruction::AddressLookupTableAccount