2019-12-03 17:55:18 -08:00
|
|
|
// Allows macro expansion of `use ::solana_sdk::*` to work within this crate
|
|
|
|
extern crate self as solana_sdk;
|
|
|
|
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod account;
|
|
|
|
pub mod account_utils;
|
|
|
|
pub mod bpf_loader;
|
2019-09-09 16:38:52 -07:00
|
|
|
pub mod clock;
|
2020-01-08 13:49:35 -08:00
|
|
|
pub mod commitment_config;
|
2020-02-04 14:54:49 -08:00
|
|
|
pub mod entrypoint_native;
|
2019-10-08 22:34:26 -07:00
|
|
|
pub mod epoch_schedule;
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod fee_calculator;
|
|
|
|
pub mod hash;
|
|
|
|
pub mod inflation;
|
|
|
|
pub mod instruction;
|
|
|
|
pub mod loader_instruction;
|
|
|
|
pub mod message;
|
2019-10-29 17:14:07 -07:00
|
|
|
pub mod move_loader;
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod native_loader;
|
2019-10-01 10:53:28 -07:00
|
|
|
pub mod native_token;
|
2019-12-07 11:54:10 -08:00
|
|
|
pub mod nonce_state;
|
2019-12-10 23:19:13 -08:00
|
|
|
pub mod packet;
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod poh_config;
|
2020-02-05 12:48:30 -08:00
|
|
|
pub mod program_utils;
|
2019-09-09 16:38:52 -07:00
|
|
|
pub mod pubkey;
|
2019-10-30 16:25:12 -07:00
|
|
|
pub mod rent;
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod rpc_port;
|
|
|
|
pub mod short_vec;
|
2019-10-08 22:34:26 -07:00
|
|
|
pub mod slot_hashes;
|
2019-12-23 12:23:45 -08:00
|
|
|
pub mod slot_history;
|
2020-01-29 17:59:14 -08:00
|
|
|
pub mod stake_history;
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod system_instruction;
|
|
|
|
pub mod system_program;
|
2019-09-09 16:38:52 -07:00
|
|
|
pub mod sysvar;
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod timing;
|
2019-09-09 16:38:52 -07:00
|
|
|
|
2019-12-03 17:55:18 -08:00
|
|
|
/// Convenience macro to declare a static public key and functions to interact with it
|
|
|
|
///
|
|
|
|
/// Input: a single literal base58 string representation of a program's id
|
|
|
|
///
|
|
|
|
/// # Example
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// # // wrapper is used so that the macro invocation occurs in the item position
|
|
|
|
/// # // rather than in the statement position which isn't allowed.
|
|
|
|
/// use std::str::FromStr;
|
|
|
|
/// use solana_sdk::{declare_id, pubkey::Pubkey};
|
|
|
|
///
|
|
|
|
/// # mod item_wrapper {
|
|
|
|
/// # use solana_sdk::declare_id;
|
|
|
|
/// declare_id!("My11111111111111111111111111111111111111111");
|
|
|
|
/// # }
|
|
|
|
/// # use item_wrapper::id;
|
|
|
|
///
|
|
|
|
/// let my_id = Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap();
|
|
|
|
/// assert_eq!(id(), my_id);
|
|
|
|
/// ```
|
|
|
|
pub use solana_sdk_macro::declare_id;
|
|
|
|
|
2019-09-09 16:38:52 -07:00
|
|
|
// On-chain program specific modules
|
2020-01-24 10:54:26 -08:00
|
|
|
pub mod account_info;
|
2019-09-09 16:38:52 -07:00
|
|
|
pub mod entrypoint;
|
|
|
|
pub mod log;
|
2020-01-30 09:47:22 -08:00
|
|
|
pub mod program_error;
|
2019-09-09 16:38:52 -07:00
|
|
|
|
|
|
|
// Modules not usable by on-chain programs
|
|
|
|
#[cfg(not(feature = "program"))]
|
2019-09-20 13:21:12 -07:00
|
|
|
pub mod bank_hash;
|
|
|
|
#[cfg(not(feature = "program"))]
|
2019-09-09 16:38:52 -07:00
|
|
|
pub mod client;
|
|
|
|
#[cfg(not(feature = "program"))]
|
2019-11-08 20:56:57 -08:00
|
|
|
pub mod genesis_config;
|
2019-09-09 16:38:52 -07:00
|
|
|
#[cfg(not(feature = "program"))]
|
|
|
|
pub mod signature;
|
|
|
|
#[cfg(not(feature = "program"))]
|
|
|
|
pub mod system_transaction;
|
|
|
|
#[cfg(not(feature = "program"))]
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod transaction;
|
2019-09-09 16:38:52 -07:00
|
|
|
#[cfg(not(feature = "program"))]
|
2019-09-06 15:33:58 -07:00
|
|
|
pub mod transport;
|
2018-11-02 17:32:54 -07:00
|
|
|
|
2018-09-27 07:49:26 -07:00
|
|
|
#[macro_use]
|
|
|
|
extern crate serde_derive;
|
2019-11-21 16:34:40 -08:00
|
|
|
pub extern crate bs58;
|
2019-11-14 10:24:53 -08:00
|
|
|
extern crate log as logger;
|