pub struct CreditsNetwork<N: Network> {
pub package: Package,
pub endpoint: String,
pub delegated_proving_config: Option<DelegatedProvingConfig>,
/* private fields */
}Fields§
§package: Package§endpoint: String§delegated_proving_config: Option<DelegatedProvingConfig>Implementations§
Source§impl<N: Network> CreditsNetwork<N>
impl<N: Network> CreditsNetwork<N>
pub fn configure_delegation(self, config: DelegatedProvingConfig) -> Self
pub fn enable_delegation(self) -> Self
pub fn disable_delegation(self) -> Self
Trait Implementations§
Source§impl<N: Network> CreditsAleo<N> for CreditsNetwork<N>
impl<N: Network> CreditsAleo<N> for CreditsNetwork<N>
fn new(deployer: &Account<N>, endpoint: &str) -> Result<Self, Error>
fn bond_validator( &self, account: &Account<N>, withdrawal_address: Address<N>, amount: u64, commission: u8, ) -> Result<(), Error>
fn bond_public( &self, account: &Account<N>, validator: Address<N>, withdrawal_address: Address<N>, amount: u64, ) -> Result<(), Error>
fn unbond_public( &self, account: &Account<N>, staker: Address<N>, amount: u64, ) -> Result<(), Error>
fn claim_unbond_public( &self, account: &Account<N>, staker: Address<N>, ) -> Result<(), Error>
fn set_validator_state( &self, account: &Account<N>, is_open: bool, ) -> Result<(), Error>
fn transfer_public( &self, account: &Account<N>, receiver: Address<N>, amount: u64, ) -> Result<(), Error>
fn transfer_public_as_signer( &self, account: &Account<N>, receiver: Address<N>, amount: u64, ) -> Result<(), Error>
fn transfer_private( &self, account: &Account<N>, sender_record: Credits<N>, receiver: Address<N>, amount: u64, ) -> Result<(Credits<N>, Credits<N>), Error>
fn transfer_private_to_public( &self, account: &Account<N>, sender_record: Credits<N>, receiver: Address<N>, amount: u64, ) -> Result<Credits<N>, Error>
fn transfer_public_to_private( &self, account: &Account<N>, receiver: Address<N>, amount: u64, ) -> Result<Credits<N>, Error>
fn join( &self, account: &Account<N>, first_record: Credits<N>, second_record: Credits<N>, ) -> Result<Credits<N>, Error>
fn split( &self, account: &Account<N>, record: Credits<N>, amount: u64, ) -> Result<(Credits<N>, Credits<N>), Error>
fn fee_private( &self, account: &Account<N>, sender_record: Credits<N>, amount: u64, priority_fee: u64, deployment_id: Field<N>, ) -> Result<Credits<N>, Error>
fn fee_public( &self, account: &Account<N>, amount: u64, priority_fee: u64, deployment_id: Field<N>, ) -> Result<(), Error>
fn upgrade( &self, account: &Account<N>, record: Credits<N>, ) -> Result<Credits<N>, Error>
fn get_committee(&self, key: Address<N>) -> Option<CommitteeState<N>>
fn get_delegated(&self, key: Address<N>) -> Option<u64>
fn get_metadata(&self, key: Address<N>) -> Option<u32>
fn get_bonded(&self, key: Address<N>) -> Option<BondState<N>>
fn get_unbonding(&self, key: Address<N>) -> Option<UnbondState<N>>
fn get_account(&self, key: Address<N>) -> Option<u64>
fn get_withdraw(&self, key: Address<N>) -> Option<Address<N>>
fn get_pool(&self, key: Address<N>) -> Option<u64>
Auto Trait Implementations§
impl<N> Freeze for CreditsNetwork<N>
impl<N> RefUnwindSafe for CreditsNetwork<N>where
N: RefUnwindSafe,
impl<N> Send for CreditsNetwork<N>
impl<N> Sync for CreditsNetwork<N>
impl<N> Unpin for CreditsNetwork<N>where
N: Unpin,
impl<N> UnwindSafe for CreditsNetwork<N>where
N: UnwindSafe,
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> 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