Struct snarkvm_dpc::transition::request::Request
source · [−]pub struct Request<N: Network> { /* private fields */ }
Implementations
sourceimpl<N: Network> Request<N>
impl<N: Network> Request<N>
sourcepub fn new_coinbase<R: Rng + CryptoRng>(
recipient: Address<N>,
amount: AleoAmount,
is_public: bool,
rng: &mut R
) -> Result<Self>
pub fn new_coinbase<R: Rng + CryptoRng>(
recipient: Address<N>,
amount: AleoAmount,
is_public: bool,
rng: &mut R
) -> Result<Self>
Initializes a new coinbase generation.
sourcepub fn new_transfer<R: Rng + CryptoRng>(
caller: &PrivateKey<N>,
records: Vec<Record<N>>,
ledger_proofs: Vec<LedgerProof<N>>,
recipient: Address<N>,
amount: AleoAmount,
fee: AleoAmount,
is_public: bool,
rng: &mut R
) -> Result<Self>
pub fn new_transfer<R: Rng + CryptoRng>(
caller: &PrivateKey<N>,
records: Vec<Record<N>>,
ledger_proofs: Vec<LedgerProof<N>>,
recipient: Address<N>,
amount: AleoAmount,
fee: AleoAmount,
is_public: bool,
rng: &mut R
) -> Result<Self>
Initializes a new transfer request.
sourcepub fn new_noop<R: Rng + CryptoRng>(
ledger_proofs: Vec<LedgerProof<N>>,
rng: &mut R
) -> Result<Self>
pub fn new_noop<R: Rng + CryptoRng>(
ledger_proofs: Vec<LedgerProof<N>>,
rng: &mut R
) -> Result<Self>
Returns a new instance of a noop request.
sourcepub fn new<R: Rng + CryptoRng>(
caller: &PrivateKey<N>,
records: Vec<Record<N>>,
ledger_proofs: Vec<LedgerProof<N>>,
operation: Operation<N>,
fee: AleoAmount,
is_public: bool,
rng: &mut R
) -> Result<Self>
pub fn new<R: Rng + CryptoRng>(
caller: &PrivateKey<N>,
records: Vec<Record<N>>,
ledger_proofs: Vec<LedgerProof<N>>,
operation: Operation<N>,
fee: AleoAmount,
is_public: bool,
rng: &mut R
) -> Result<Self>
Signs and returns a new instance of a request.
sourcepub fn from(
records: Vec<Record<N>>,
ledger_proofs: Vec<LedgerProof<N>>,
operation: Operation<N>,
fee: AleoAmount,
signature: N::AccountSignature,
is_public: bool
) -> Result<Self>
pub fn from(
records: Vec<Record<N>>,
ledger_proofs: Vec<LedgerProof<N>>,
operation: Operation<N>,
fee: AleoAmount,
signature: N::AccountSignature,
is_public: bool
) -> Result<Self>
Returns a new instance of a request.
sourcepub fn ledger_roots(&self) -> Vec<N::LedgerRoot>
pub fn ledger_roots(&self) -> Vec<N::LedgerRoot>
Returns the ledger roots used to prove inclusion of ledger-consumed records.
sourcepub fn ledger_proofs(&self) -> &Vec<LedgerProof<N>>
pub fn ledger_proofs(&self) -> &Vec<LedgerProof<N>>
Returns a reference to the ledger proofs.
sourcepub fn function_id(&self) -> N::FunctionID
pub fn function_id(&self) -> N::FunctionID
Returns the function ID.
sourcepub fn function_type(&self) -> FunctionType
pub fn function_type(&self) -> FunctionType
Returns the function type.
sourcepub fn fee(&self) -> AleoAmount
pub fn fee(&self) -> AleoAmount
Returns the fee.
sourcepub fn signature(&self) -> &N::AccountSignature
pub fn signature(&self) -> &N::AccountSignature
Returns a reference to the signature.
sourcepub fn to_balance(&self) -> AleoAmount
pub fn to_balance(&self) -> AleoAmount
Returns the balance of the caller.
sourcepub fn to_program_id(&self) -> Result<N::ProgramID>
pub fn to_program_id(&self) -> Result<N::ProgramID>
Returns the program ID.
sourcepub fn to_serial_numbers(&self) -> Result<Vec<N::SerialNumber>>
pub fn to_serial_numbers(&self) -> Result<Vec<N::SerialNumber>>
Returns the serial numbers.
sourcepub fn to_input_commitments(&self) -> Vec<N::Commitment>
pub fn to_input_commitments(&self) -> Vec<N::Commitment>
Returns the input commitments.
Trait Implementations
Auto Trait Implementations
impl<N> RefUnwindSafe for Request<N> where
N: RefUnwindSafe,
<N as Network>::AccountSignature: RefUnwindSafe,
<N as Network>::BlockHash: RefUnwindSafe,
<N as Network>::BlockHeaderRoot: RefUnwindSafe,
<N as Network>::BlockHeaderRootParameters: RefUnwindSafe,
<N as Network>::Commitment: RefUnwindSafe,
<N as Network>::FunctionID: RefUnwindSafe,
<N as Network>::InnerScalarField: RefUnwindSafe,
<N as Network>::LedgerRoot: RefUnwindSafe,
<N as Network>::LedgerRootParameters: RefUnwindSafe,
<N as Network>::ProgramAffineCurve: RefUnwindSafe,
<N as Network>::ProgramID: RefUnwindSafe,
<N as Network>::RecordCiphertext: RefUnwindSafe,
<N as Network>::RecordViewKey: RefUnwindSafe,
<N as Network>::TransactionID: RefUnwindSafe,
<N as Network>::TransactionIDParameters: RefUnwindSafe,
<N as Network>::TransactionsRoot: RefUnwindSafe,
<N as Network>::TransactionsRootParameters: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
<N as Network>::TransitionIDParameters: RefUnwindSafe,
impl<N> Send for Request<N>
impl<N> Sync for Request<N>
impl<N> Unpin for Request<N> where
N: Unpin,
<N as Network>::AccountSignature: Unpin,
<N as Network>::BlockHash: Unpin,
<N as Network>::BlockHeaderRoot: Unpin,
<N as Network>::Commitment: Unpin,
<N as Network>::FunctionID: Unpin,
<N as Network>::InnerScalarField: Unpin,
<N as Network>::LedgerRoot: Unpin,
<N as Network>::ProgramAffineCurve: Unpin,
<N as Network>::ProgramID: Unpin,
<N as Network>::RecordCiphertext: Unpin,
<N as Network>::RecordViewKey: Unpin,
<N as Network>::TransactionID: Unpin,
<N as Network>::TransactionsRoot: Unpin,
<N as Network>::TransitionID: Unpin,
impl<N> UnwindSafe for Request<N> where
N: UnwindSafe,
<N as Network>::AccountSignature: UnwindSafe,
<N as Network>::BlockHash: UnwindSafe,
<N as Network>::BlockHeaderRoot: UnwindSafe,
<N as Network>::BlockHeaderRootParameters: RefUnwindSafe,
<N as Network>::Commitment: UnwindSafe,
<N as Network>::FunctionID: UnwindSafe,
<N as Network>::InnerScalarField: UnwindSafe,
<N as Network>::LedgerRoot: UnwindSafe,
<N as Network>::LedgerRootParameters: RefUnwindSafe,
<N as Network>::ProgramAffineCurve: UnwindSafe,
<N as Network>::ProgramID: UnwindSafe,
<N as Network>::RecordCiphertext: UnwindSafe,
<N as Network>::RecordViewKey: UnwindSafe,
<N as Network>::TransactionID: UnwindSafe,
<N as Network>::TransactionIDParameters: RefUnwindSafe,
<N as Network>::TransactionsRoot: UnwindSafe,
<N as Network>::TransactionsRootParameters: RefUnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
<N as Network>::TransitionIDParameters: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more