TransactionBuilderParams

Enum TransactionBuilderParams 

Source
pub enum TransactionBuilderParams<'a> {
Show 17 variants AddBid { public_key: PublicKey, delegation_rate: u8, amount: U512, minimum_delegation_amount: Option<u64>, maximum_delegation_amount: Option<u64>, reserved_slots: Option<u32>, }, Delegate { delegator: PublicKey, validator: PublicKey, amount: U512, }, Undelegate { delegator: PublicKey, validator: PublicKey, amount: U512, }, Redelegate { delegator: PublicKey, validator: PublicKey, amount: U512, new_validator: PublicKey, }, ChangeBidPublicKey { public_key: PublicKey, new_public_key: PublicKey, }, AddReservations { reservations: Vec<Reservation>, }, CancelReservations { validator: PublicKey, delegators: Vec<DelegatorKind>, }, InvocableEntity { entity_hash: AddressableEntityHash, entry_point: &'a str, runtime: TransactionRuntimeParams, }, InvocableEntityAlias { entity_alias: &'a str, entry_point: &'a str, runtime: TransactionRuntimeParams, }, Package { package_hash: PackageHash, maybe_entity_version: Option<u32>, entry_point: &'a str, runtime: TransactionRuntimeParams, }, PackageWithMajorVersion { package_hash: PackageHash, maybe_entity_version: Option<EntityVersion>, entry_point: &'a str, runtime: TransactionRuntimeParams, major_protocol_version: Option<ProtocolVersionMajor>, }, PackageAlias { package_alias: &'a str, maybe_entity_version: Option<u32>, entry_point: &'a str, runtime: TransactionRuntimeParams, }, PackageAliasWithMajorVersion { package_alias: &'a str, maybe_entity_version: Option<EntityVersion>, entry_point: &'a str, runtime: TransactionRuntimeParams, major_protocol_version: Option<ProtocolVersionMajor>, }, Session { is_install_upgrade: bool, transaction_bytes: Bytes, runtime: TransactionRuntimeParams, }, Transfer { maybe_source: Option<URef>, target: TransferTarget, amount: U512, maybe_id: Option<u64>, }, WithdrawBid { public_key: PublicKey, amount: U512, }, ActivateBid { validator: PublicKey, },
}
Expand description

An enum representing the parameters needed to construct a transaction builder for the commands concerning the creation of a transaction

Variants§

§

AddBid

Parameters for the add bid variant of the transaction builder

Fields

§public_key: PublicKey

The public key for the add bid transaction

§delegation_rate: u8

The delegation rate for the add bid transaction

§amount: U512

The amount to be bid in the add bid transaction

§minimum_delegation_amount: Option<u64>

The minimum amount to be delegated

§maximum_delegation_amount: Option<u64>

The maximum amount to be delegated

§reserved_slots: Option<u32>

Number of delegator slots which can be reserved for specific delegators

§

Delegate

Parameters for the delegate variant of the transaction builder

Fields

§delegator: PublicKey

The delegator for the delegate transaction

§validator: PublicKey

The validator on which to delegate via the transaction

§amount: U512

The amount to be delegtaed in the transaction

§

Undelegate

Parameters for the undelegate variant of the transaction builder

Fields

§delegator: PublicKey

The delegator for the undelegate transaction

§validator: PublicKey

The delegator for the delegate transaction

§amount: U512

The delegator for the delegate transaction

§

Redelegate

Parameters for the redelegate variant of the transaction builder

Fields

§delegator: PublicKey

The delegator for the redelegate transaction

§validator: PublicKey

The validator for the redelegate transaction

§amount: U512

The amount to be redelegated for the redelegate transaction

§new_validator: PublicKey

The new validator for the redelegate transaction

§

ChangeBidPublicKey

Parameters for the change bid public key variant of the transaction builder

Fields

§public_key: PublicKey

The validator for the change bid public key transaction

§new_public_key: PublicKey

New validator for the change bid public key transaction

§

AddReservations

Parameters for the add reservations variant of the transaction builder

Fields

§reservations: Vec<Reservation>

List of reservations for the add reservations transaction

§

CancelReservations

Parameters for the cancel reservations variant of the transaction builder

Fields

§validator: PublicKey

The validator for the cancel reservations transaction

§delegators: Vec<DelegatorKind>

List of delegatora for the cancel reservations transaction

§

InvocableEntity

Parameters for the invocable entity variant of the transaction builder

Fields

§entity_hash: AddressableEntityHash

The entity hash for the invocable entity transaction

§entry_point: &'a str

The entry point for the invocable entity transaction

§runtime: TransactionRuntimeParams

Transaction Runtime params.

§

InvocableEntityAlias

Parameters for the invocable entity alias variant of the transaction builder

Fields

§entity_alias: &'a str

The entity alias for the invocable entity alias transaction

§entry_point: &'a str

The entry_point for the invocable entity alias transaction

§runtime: TransactionRuntimeParams

Transaction Runtime params.

§

Package

Parameters for the package variant of the transaction builder

Fields

§package_hash: PackageHash

The package hash for the package transaction

§maybe_entity_version: Option<u32>

The optional entity version for the package transaction

§entry_point: &'a str

The entry_point for the package transaction

§runtime: TransactionRuntimeParams

Transaction Runtime.

§

PackageWithMajorVersion

Parameters for the package variant of the transaction builder

Fields

§package_hash: PackageHash

The package hash for the package transaction

§maybe_entity_version: Option<EntityVersion>

The optional entity version for the package alias transaction

§entry_point: &'a str

The entry point for the package alias transaction

§runtime: TransactionRuntimeParams

Transaction Runtime params.

§major_protocol_version: Option<ProtocolVersionMajor>

The protocol version major.

§

PackageAlias

Parameters for the package alias variant of the transaction builder

Fields

§package_alias: &'a str

The package alias for the package alias transaction

§maybe_entity_version: Option<u32>

The optional entity version for the package alias transaction

§entry_point: &'a str

The entry point for the package alias transaction

§runtime: TransactionRuntimeParams

Transaction Runtime params.

§

PackageAliasWithMajorVersion

Parameters for the package alias variant of the transaction builder

Fields

§package_alias: &'a str

The package alias for the package alias transaction

§maybe_entity_version: Option<EntityVersion>

The optional entity version for the package alias transaction

§entry_point: &'a str

The entry point for the package alias transaction

§runtime: TransactionRuntimeParams

Transaction Runtime params.

§major_protocol_version: Option<ProtocolVersionMajor>

The protocol version major.

§

Session

Parameters for the session variant of the transaction builder

Fields

§is_install_upgrade: bool

Flag determining if the Wasm is an install/upgrade.

§transaction_bytes: Bytes

The Bytes to be run by the execution engine for the session transaction

§runtime: TransactionRuntimeParams

Transaction Runtime.

§

Transfer

Parameters for the transfer variant of the transaction builder

Fields

§maybe_source: Option<URef>

Source of the transfer transaction

§target: TransferTarget

Target of the transfer transaction

§amount: U512

The amount of motes for the undelegate transaction

§maybe_id: Option<u64>

The optional id for the transfer transaction

§

WithdrawBid

Parameters for the withdraw bid variant of the transaction builder

Fields

§public_key: PublicKey

The public key for the withdraw bid transaction

§amount: U512

The amount to be withdrawn in the withdraw bid transaction

§

ActivateBid

Parameters for the activate bid variant of the transaction builder

Fields

§validator: PublicKey

The public key for the activate bid transaction

Trait Implementations§

Source§

impl<'a> Debug for TransactionBuilderParams<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,