Expand description

Serde Solana Pubkey serializer/deserializer.

Installation

Add pubkey to your Cargo.toml.

Usage

use solana_program::pubkey::Pubkey;

#[derive(serde::Serialize, serde::Deserialize)]
pub struct MyStruct {
    /// Token pubkey.
    #[serde(with = "pubkey")]
    pub address: Pubkey,
}

License

The pubkey crate is licensed under the Apache 2.0 License.

Structs

Functions

The signature of a deserialize_with function must follow the pattern:

The signature of a serialize_with function must follow the pattern: