pub struct Data {
pub authority: Pubkey,
pub durable_nonce: DurableNonce,
pub fee_calculator: FeeCalculator,
}
Expand description
Initialized data of a durable transaction nonce account.
This is stored within State
for initialized nonce accounts.
Fields§
Address of the account that signs transactions using the nonce account.
durable_nonce: DurableNonce
Durable nonce value derived from a valid previous blockhash.
fee_calculator: FeeCalculator
The fee calculator associated with the blockhash.
Implementations§
Source§impl Data
impl Data
Sourcepub fn new(
authority: Pubkey,
durable_nonce: DurableNonce,
lamports_per_signature: u64,
) -> Data
pub fn new( authority: Pubkey, durable_nonce: DurableNonce, lamports_per_signature: u64, ) -> Data
Create new durable transaction nonce data.
Sourcepub fn blockhash(&self) -> Hash
pub fn blockhash(&self) -> Hash
Hash value used as recent_blockhash field in Transactions. Named blockhash for legacy reasons, but durable nonce and blockhash have separate domains.
Sourcepub fn get_lamports_per_signature(&self) -> u64
pub fn get_lamports_per_signature(&self) -> u64
Get the cost per signature for the next transaction to use this nonce.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Data
impl<'de> Deserialize<'de> for Data
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Data, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Data, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Data
impl Serialize for Data
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Data
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more