pub struct Wallet {
signing_key: SigningKey,
internal_counters: SpendingCounterIncreasing,
discrimination: Discrimination,
}
Expand description
wallet for an account
Fields§
§signing_key: SigningKey
the spending key
internal_counters: SpendingCounterIncreasing
the counter as we know of this value needs to be in sync with what is in the blockchain
discrimination: Discrimination
Implementations§
source§impl Wallet
impl Wallet
pub fn generate<RNG>(rng: &mut RNG, discrimination: Discrimination) -> Selfwhere RNG: CryptoRng + RngCore,
pub fn from_secret_key( signing_key: SigningKey, internal_counters: SpendingCounterIncreasing, discrimination: Discrimination ) -> Self
pub fn from_existing_account( bech32_str: &str, spending_counter: Option<SpendingCounter>, discrimination: Discrimination ) -> Self
pub fn save_to<W: Write>(&self, w: W) -> Result<()>
pub fn address(&self) -> Address
pub fn set_counter(&mut self, counter: SpendingCounter)
pub fn increment_counter(&mut self, lane: usize)
pub fn decrement_counter(&mut self, lane: usize)
pub fn spending_counter(&self) -> &SpendingCounterIncreasing
sourcepub fn internal_counter(&self) -> SpendingCounter
pub fn internal_counter(&self) -> SpendingCounter
Use the default counter
pub fn internal_counters(&self) -> [SpendingCounter; 8]
pub fn stake_key(&self) -> UnspecifiedAccountIdentifier
pub fn identifier(&self) -> Identifier
pub fn signing_key(&self) -> &SigningKey
pub fn mk_witness( &self, block0_hash: &Hash, signing_data: &TransactionSignDataHash ) -> Witness
pub fn add_input_with_value(&self, value: Value) -> Input
pub fn add_input<Extra: Payload>( &self, payload: PayloadSlice<'_, Extra>, iobuilder: &mut InputOutputBuilder, fees: &LinearFee ) -> Result<(), FragmentBuilderError>where LinearFee: FeeAlgorithm,
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Wallet
impl Send for Wallet
impl Sync for Wallet
impl Unpin for Wallet
impl UnwindSafe for Wallet
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request