Struct poseidon_client::PdaBuilder
source · [−]pub struct PdaBuilder { /* private fields */ }Expand description
Create a Program Derived Address and it’s Instruction
This struct builds a Solana Program Derived account from the given parameters yielding an instruction.
#[derive(Serialize, Deserialize)]
pub struct PdaBuilder {
from_public_key: PublicKey,
to_public_key: PublicKey,
base: PublicKey,
space: u64,
owner: PublicKey,
seed: String,
lamports: u64,
}Implementations
sourceimpl PdaBuilder
impl PdaBuilder
pub fn new() -> Self
pub fn add_from(&mut self, public_key: PublicKey) -> &mut Self
pub fn add_base(&mut self, public_key: PublicKey) -> &mut Self
pub fn add_space(&mut self, space: u64) -> &mut Self
pub fn add_owner(&mut self, public_key: PublicKey) -> &mut Self
pub fn add_seed(&mut self, seed: &str) -> &mut Self
pub fn add_lamports(&mut self, lamports: u64) -> &mut Self
pub fn derive_public_key(&mut self) -> PoseidonResult<PdaPublicKey>
pub fn pda_pk_base58(&self) -> String
pub fn build(&self) -> PoseidonResult<Instruction>
Trait Implementations
sourceimpl Debug for PdaBuilder
impl Debug for PdaBuilder
sourceimpl<'de> Deserialize<'de> for PdaBuilder
impl<'de> Deserialize<'de> for PdaBuilder
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for PdaBuilder
impl Serialize for PdaBuilder
Auto Trait Implementations
impl RefUnwindSafe for PdaBuilder
impl Send for PdaBuilder
impl Sync for PdaBuilder
impl Unpin for PdaBuilder
impl UnwindSafe for PdaBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more