#serde #solana #token #public-key

yanked pubkey

Serde Solana Pubkey serializer/deserializer

0.1.1 Mar 22, 2022
0.1.0 Feb 5, 2022

#196 in #public-key


Used in 2 crates (via tokenlist)

Apache-2.0

4KB

pubkey

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.

License: Apache-2.0


lib.rs:

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.

Dependencies

~16–25MB
~416K SLoC