Skip to main content

Crate titan_api_types

Crate titan_api_types 

Source
Expand description

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 Pubkeys.
  • pubkey-fromstr-const - (default) Enable compile-time base58 string to 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 to and from the V2 Solana SDK type.
  • solana-pubkey-convert-v3 - Enables conversion of 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 to and from the V2 Solana SDK types (enables solana-pubkey-convert-v2).
  • solana-address-convert-v1 - Enable conversion of Pubkey to and from the V1.0 of the solana-address crate, as well as V3 of the solana-pubkey.
  • solana-address-convert-v2 - Enable conversion of Pubkey to and from the V2 of the solana-address crate. crate (which re-exports solana_address::Address as Pubkey).
  • solana-instruction-convert-v3 - Enable conversion of Instruction to and from the V3 Solana SDK types (enables solana-address-convert-v1).
  • solana-alt-account-convert-v2 - Enable conversion of the AddressLookupTableAccount to/from the corresponding type in solana-message V2.
  • solana-alt-account-convert-v3 - Enable conversion of the AddressLookupTableAccount to/from the corresponding type in solana-message V3.
  • solana-alt-account-convert-v4 - Enable conversion of the AddressLookupTableAccount 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.

Modules§

common
Shared types used by multiple APIs and/or versions.
ws
Versioned types for the WebSocket API.

Macros§

pubkey
Convenient macro to define a static public key.