Struct chain_impl_mockchain::testing::data::AddressData
source · pub struct AddressData {
pub private_key: EitherEd25519SecretKey,
pub spending_counter: SpendingCounterIncreasing,
pub address: Address,
}
Expand description
Struct is responsible for adding some code which makes converting into transaction input/output easily. Also it held all needed information (private key, public key) which can construct witness for transaction.
Fields§
§private_key: EitherEd25519SecretKey
§spending_counter: SpendingCounterIncreasing
§address: Address
Implementations§
source§impl AddressData
impl AddressData
pub fn new( private_key: EitherEd25519SecretKey, spending_counter: SpendingCounterIncreasing, address: Address ) -> Self
pub fn from_discrimination_and_kind_type( discrimination: Discrimination, kind: KindType ) -> Self
pub fn from_leader_pair( leader_pair: LeaderPair, discrimination: Discrimination ) -> Self
pub fn utxo(discrimination: Discrimination) -> Self
pub fn account(discrimination: Discrimination) -> Self
pub fn account_with_spending_counter( discrimination: Discrimination, spending_counter: u32 ) -> Self
pub fn delegation(discrimination: Discrimination) -> Self
pub fn delegation_from( primary_address: &AddressData, delegation_address: &AddressData ) -> Self
pub fn delegation_for(address: &AddressData) -> Self
pub fn make_input( &self, value: Value, utxo: Option<Entry<'_, Address>> ) -> Input
pub fn delegation_id(&self) -> Identifier
pub fn to_id(&self) -> Identifier
pub fn make_output(&self, value: Value) -> Output<Address>
pub fn public_key(&self) -> PublicKey<Ed25519>
pub fn delegation_key(&self) -> PublicKey<Ed25519>
pub fn confirm_transaction(&mut self) -> Result<(), Error>
pub fn confirm_transaction_at_lane(&mut self, lane: usize) -> Result<(), Error>
pub fn spending_counter_at_lane( &self, lane: usize ) -> Result<SpendingCounter, Error>
pub fn spending_counter(&self) -> &SpendingCounterIncreasing
pub fn spending_counter_mut(&mut self) -> &mut SpendingCounterIncreasing
pub fn private_key(&self) -> EitherEd25519SecretKey
pub fn kind(&self) -> Kind
pub fn discrimination(&self) -> Discrimination
pub fn to_bech32_str(&self) -> String
pub fn generate_key_pair<A: AsymmetricKey>() -> KeyPair<A>
pub fn delegation_for_account( other: AddressData, delegation_public_key: PublicKey<Ed25519> ) -> Self
pub fn make_witness( &mut self, block0_hash: &HeaderId, tad: TransactionAuthData<'_> ) -> Witness
pub fn make_witness_with_lane( &mut self, block0_hash: &HeaderId, lane: usize, tad: TransactionAuthData<'_> ) -> Witness
pub fn address(&self) -> Address
Trait Implementations§
source§impl Arbitrary for AddressData
impl Arbitrary for AddressData
source§impl Clone for AddressData
impl Clone for AddressData
source§fn clone(&self) -> AddressData
fn clone(&self) -> AddressData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AddressData
impl Debug for AddressData
source§impl From<AddressData> for Address
impl From<AddressData> for Address
source§fn from(data: AddressData) -> Self
fn from(data: AddressData) -> Self
Converts to this type from the input type.
source§impl From<AddressDataValue> for AddressData
impl From<AddressDataValue> for AddressData
source§fn from(value: AddressDataValue) -> Self
fn from(value: AddressDataValue) -> Self
Converts to this type from the input type.
source§impl PartialEq<AddressData> for AddressData
impl PartialEq<AddressData> for AddressData
Auto Trait Implementations§
impl RefUnwindSafe for AddressData
impl Send for AddressData
impl Sync for AddressData
impl Unpin for AddressData
impl UnwindSafe for AddressData
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