Struct snarkvm_debug::prelude::Ledger
source · pub struct Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,{ /* private fields */ }Implementations§
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn prepare_advance_to_next_quorum_block(
&self,
subdag: Subdag<N>,
transmissions: IndexMap<TransmissionID<N>, Transmission<N>>
) -> Result<Block<N>, Error>
pub fn prepare_advance_to_next_quorum_block( &self, subdag: Subdag<N>, transmissions: IndexMap<TransmissionID<N>, Transmission<N>> ) -> Result<Block<N>, Error>
Returns a candidate for the next block in the ledger, using a committed subdag and its transmissions.
sourcepub fn prepare_advance_to_next_beacon_block<R>(
&self,
private_key: &PrivateKey<N>,
candidate_ratifications: Vec<Ratify<N>>,
candidate_solutions: Vec<ProverSolution<N>>,
candidate_transactions: Vec<Transaction<N>>,
rng: &mut R
) -> Result<Block<N>, Error>
pub fn prepare_advance_to_next_beacon_block<R>( &self, private_key: &PrivateKey<N>, candidate_ratifications: Vec<Ratify<N>>, candidate_solutions: Vec<ProverSolution<N>>, candidate_transactions: Vec<Transaction<N>>, rng: &mut R ) -> Result<Block<N>, Error>
Returns a candidate for the next block in the ledger.
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn contains_state_root(
&self,
state_root: &<N as Network>::StateRoot
) -> Result<bool, Error>
pub fn contains_state_root( &self, state_root: &<N as Network>::StateRoot ) -> Result<bool, Error>
Returns true if the given state root exists.
sourcepub fn contains_block_height(&self, height: u32) -> Result<bool, Error>
pub fn contains_block_height(&self, height: u32) -> Result<bool, Error>
Returns true if the given block height exists.
sourcepub fn contains_block_hash(
&self,
block_hash: &<N as Network>::BlockHash
) -> Result<bool, Error>
pub fn contains_block_hash( &self, block_hash: &<N as Network>::BlockHash ) -> Result<bool, Error>
Returns true if the given block hash exists.
sourcepub fn contains_certificate(
&self,
certificate_id: &Field<N>
) -> Result<bool, Error>
pub fn contains_certificate( &self, certificate_id: &Field<N> ) -> Result<bool, Error>
Returns true if the given batch certificate ID exists.
sourcepub fn contains_program_id(
&self,
program_id: &ProgramID<N>
) -> Result<bool, Error>
pub fn contains_program_id( &self, program_id: &ProgramID<N> ) -> Result<bool, Error>
Returns true if the given program ID exists.
sourcepub fn contains_transmission(
&self,
transmission_id: &TransmissionID<N>
) -> Result<bool, Error>
pub fn contains_transmission( &self, transmission_id: &TransmissionID<N> ) -> Result<bool, Error>
Returns true if the transmission exists in the ledger.
sourcepub fn contains_puzzle_commitment(
&self,
puzzle_commitment: &PuzzleCommitment<N>
) -> Result<bool, Error>
pub fn contains_puzzle_commitment( &self, puzzle_commitment: &PuzzleCommitment<N> ) -> Result<bool, Error>
Returns true if the given puzzle commitment exists.
sourcepub fn contains_transaction_id(
&self,
transaction_id: &<N as Network>::TransactionID
) -> Result<bool, Error>
pub fn contains_transaction_id( &self, transaction_id: &<N as Network>::TransactionID ) -> Result<bool, Error>
Returns true if the given transaction ID exists.
sourcepub fn contains_transition_id(
&self,
transition_id: &<N as Network>::TransitionID
) -> Result<bool, Error>
pub fn contains_transition_id( &self, transition_id: &<N as Network>::TransitionID ) -> Result<bool, Error>
Returns true if the given transition ID exists.
sourcepub fn contains_input_id(&self, input_id: &Field<N>) -> Result<bool, Error>
pub fn contains_input_id(&self, input_id: &Field<N>) -> Result<bool, Error>
Returns true if the given input ID exists.
sourcepub fn contains_serial_number(
&self,
serial_number: &Field<N>
) -> Result<bool, Error>
pub fn contains_serial_number( &self, serial_number: &Field<N> ) -> Result<bool, Error>
Returns true if the given serial number exists.
sourcepub fn contains_tag(&self, tag: &Field<N>) -> Result<bool, Error>
pub fn contains_tag(&self, tag: &Field<N>) -> Result<bool, Error>
Returns true if the given tag exists.
sourcepub fn contains_output_id(&self, output_id: &Field<N>) -> Result<bool, Error>
pub fn contains_output_id(&self, output_id: &Field<N>) -> Result<bool, Error>
Returns true if the given output ID exists.
sourcepub fn contains_commitment(&self, commitment: &Field<N>) -> Result<bool, Error>
pub fn contains_commitment(&self, commitment: &Field<N>) -> Result<bool, Error>
Returns true if the given commitment exists.
sourcepub fn contains_checksum(&self, checksum: &Field<N>) -> bool
pub fn contains_checksum(&self, checksum: &Field<N>) -> bool
Returns true if the given checksum exists.
sourcepub fn contains_nonce(&self, nonce: &Group<N>) -> Result<bool, Error>
pub fn contains_nonce(&self, nonce: &Group<N>) -> Result<bool, Error>
Returns true if the given nonce exists.
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn find_block_height_from_state_root(
&self,
state_root: <N as Network>::StateRoot
) -> Result<Option<u32>, Error>
pub fn find_block_height_from_state_root( &self, state_root: <N as Network>::StateRoot ) -> Result<Option<u32>, Error>
Returns the block height that contains the given state root.
sourcepub fn find_block_hash(
&self,
transaction_id: &<N as Network>::TransactionID
) -> Result<Option<<N as Network>::BlockHash>, Error>
pub fn find_block_hash( &self, transaction_id: &<N as Network>::TransactionID ) -> Result<Option<<N as Network>::BlockHash>, Error>
Returns the block hash that contains the given transaction ID.
sourcepub fn find_block_height_from_puzzle_commitment(
&self,
puzzle_commitment: &PuzzleCommitment<N>
) -> Result<Option<u32>, Error>
pub fn find_block_height_from_puzzle_commitment( &self, puzzle_commitment: &PuzzleCommitment<N> ) -> Result<Option<u32>, Error>
Returns the block height that contains the given puzzle commitment.
sourcepub fn find_transaction_id_from_program_id(
&self,
program_id: &ProgramID<N>
) -> Result<Option<<N as Network>::TransactionID>, Error>
pub fn find_transaction_id_from_program_id( &self, program_id: &ProgramID<N> ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the transaction ID that contains the given program ID.
sourcepub fn find_transaction_id_from_transition_id(
&self,
transition_id: &<N as Network>::TransitionID
) -> Result<Option<<N as Network>::TransactionID>, Error>
pub fn find_transaction_id_from_transition_id( &self, transition_id: &<N as Network>::TransitionID ) -> Result<Option<<N as Network>::TransactionID>, Error>
Returns the transaction ID that contains the given transition ID.
sourcepub fn find_transition_id(
&self,
id: &Field<N>
) -> Result<<N as Network>::TransitionID, Error>
pub fn find_transition_id( &self, id: &Field<N> ) -> Result<<N as Network>::TransitionID, Error>
Returns the transition ID that contains the given input ID or output ID.
sourcepub fn find_record_ciphertexts<'a>(
&'a self,
view_key: &'a ViewKey<N>,
filter: RecordsFilter<N>
) -> Result<impl Iterator<Item = (Field<N>, Cow<'a, Record<N, Ciphertext<N>>>)> + 'a, Error>
pub fn find_record_ciphertexts<'a>( &'a self, view_key: &'a ViewKey<N>, filter: RecordsFilter<N> ) -> Result<impl Iterator<Item = (Field<N>, Cow<'a, Record<N, Ciphertext<N>>>)> + 'a, Error>
Returns the record ciphertexts that belong to the given view key.
sourcepub fn find_records<'a>(
&'a self,
view_key: &'a ViewKey<N>,
filter: RecordsFilter<N>
) -> Result<impl Iterator<Item = (Field<N>, Record<N, Plaintext<N>>)> + 'a, Error>
pub fn find_records<'a>( &'a self, view_key: &'a ViewKey<N>, filter: RecordsFilter<N> ) -> Result<impl Iterator<Item = (Field<N>, Record<N, Plaintext<N>>)> + 'a, Error>
Returns the records that belong to the given view key.
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn get_committee(
&self,
block_height: u32
) -> Result<Option<Committee<N>>, Error>
pub fn get_committee( &self, block_height: u32 ) -> Result<Option<Committee<N>>, Error>
Returns the committee for the given block height.
sourcepub fn get_committee_for_round(
&self,
round: u64
) -> Result<Option<Committee<N>>, Error>
pub fn get_committee_for_round( &self, round: u64 ) -> Result<Option<Committee<N>>, Error>
Returns the committee for the given round.
sourcepub fn get_state_root(
&self,
block_height: u32
) -> Result<Option<<N as Network>::StateRoot>, Error>
pub fn get_state_root( &self, block_height: u32 ) -> Result<Option<<N as Network>::StateRoot>, Error>
Returns the state root that contains the given block height.
sourcepub fn get_state_path_for_commitment(
&self,
commitment: &Field<N>
) -> Result<StatePath<N>, Error>
pub fn get_state_path_for_commitment( &self, commitment: &Field<N> ) -> Result<StatePath<N>, Error>
Returns a state path for the given commitment.
sourcepub fn get_epoch_challenge(
&self,
block_height: u32
) -> Result<EpochChallenge<N>, Error>
pub fn get_epoch_challenge( &self, block_height: u32 ) -> Result<EpochChallenge<N>, Error>
Returns the epoch challenge for the given block height.
sourcepub fn get_block(&self, height: u32) -> Result<Block<N>, Error>
pub fn get_block(&self, height: u32) -> Result<Block<N>, Error>
Returns the block for the given block height.
sourcepub fn get_blocks(&self, heights: Range<u32>) -> Result<Vec<Block<N>>, Error>
pub fn get_blocks(&self, heights: Range<u32>) -> Result<Vec<Block<N>>, Error>
Returns the blocks in the given block range. The range is inclusive of the start and exclusive of the end.
sourcepub fn get_block_by_hash(
&self,
block_hash: &<N as Network>::BlockHash
) -> Result<Block<N>, Error>
pub fn get_block_by_hash( &self, block_hash: &<N as Network>::BlockHash ) -> Result<Block<N>, Error>
Returns the block for the given block hash.
sourcepub fn get_height(
&self,
block_hash: &<N as Network>::BlockHash
) -> Result<u32, Error>
pub fn get_height( &self, block_hash: &<N as Network>::BlockHash ) -> Result<u32, Error>
Returns the block height for the given block hash.
sourcepub fn get_hash(&self, height: u32) -> Result<<N as Network>::BlockHash, Error>
pub fn get_hash(&self, height: u32) -> Result<<N as Network>::BlockHash, Error>
Returns the block hash for the given block height.
sourcepub fn get_previous_hash(
&self,
height: u32
) -> Result<<N as Network>::BlockHash, Error>
pub fn get_previous_hash( &self, height: u32 ) -> Result<<N as Network>::BlockHash, Error>
Returns the previous block hash for the given block height.
sourcepub fn get_header(&self, height: u32) -> Result<Header<N>, Error>
pub fn get_header(&self, height: u32) -> Result<Header<N>, Error>
Returns the block header for the given block height.
sourcepub fn get_transactions(&self, height: u32) -> Result<Transactions<N>, Error>
pub fn get_transactions(&self, height: u32) -> Result<Transactions<N>, Error>
Returns the block transactions for the given block height.
sourcepub fn get_aborted_transaction_ids(
&self,
height: u32
) -> Result<Vec<<N as Network>::TransactionID>, Error>
pub fn get_aborted_transaction_ids( &self, height: u32 ) -> Result<Vec<<N as Network>::TransactionID>, Error>
Returns the aborted transaction IDs for the given block height.
sourcepub fn get_transaction(
&self,
transaction_id: <N as Network>::TransactionID
) -> Result<Transaction<N>, Error>
pub fn get_transaction( &self, transaction_id: <N as Network>::TransactionID ) -> Result<Transaction<N>, Error>
Returns the transaction for the given transaction ID.
sourcepub fn get_confirmed_transaction(
&self,
transaction_id: <N as Network>::TransactionID
) -> Result<ConfirmedTransaction<N>, Error>
pub fn get_confirmed_transaction( &self, transaction_id: <N as Network>::TransactionID ) -> Result<ConfirmedTransaction<N>, Error>
Returns the confirmed transaction for the given transaction ID.
sourcepub fn get_unconfirmed_transaction(
&self,
transaction_id: &<N as Network>::TransactionID
) -> Result<Transaction<N>, Error>
pub fn get_unconfirmed_transaction( &self, transaction_id: &<N as Network>::TransactionID ) -> Result<Transaction<N>, Error>
Returns the unconfirmed transaction for the given transaction ID.
sourcepub fn get_program(
&self,
program_id: ProgramID<N>
) -> Result<ProgramCore<N, Instruction<N>, Command<N>>, Error>
pub fn get_program( &self, program_id: ProgramID<N> ) -> Result<ProgramCore<N, Instruction<N>, Command<N>>, Error>
Returns the program for the given program ID.
sourcepub fn get_solutions(
&self,
height: u32
) -> Result<Option<CoinbaseSolution<N>>, Error>
pub fn get_solutions( &self, height: u32 ) -> Result<Option<CoinbaseSolution<N>>, Error>
Returns the block solutions for the given block height.
sourcepub fn get_solution(
&self,
solution_id: &PuzzleCommitment<N>
) -> Result<ProverSolution<N>, Error>
pub fn get_solution( &self, solution_id: &PuzzleCommitment<N> ) -> Result<ProverSolution<N>, Error>
Returns the solution for the given solution ID.
Returns the block authority for the given block height.
sourcepub fn get_batch_certificate(
&self,
certificate_id: &Field<N>
) -> Result<Option<BatchCertificate<N>>, Error>
pub fn get_batch_certificate( &self, certificate_id: &Field<N> ) -> Result<Option<BatchCertificate<N>>, Error>
Returns the batch certificate for the given certificate ID.
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn state_roots(
&self
) -> impl Iterator<Item = Cow<'_, <N as Network>::StateRoot>>
pub fn state_roots( &self ) -> impl Iterator<Item = Cow<'_, <N as Network>::StateRoot>>
Returns an iterator over the state roots, for all blocks in self.
sourcepub fn puzzle_commitments(
&self
) -> impl Iterator<Item = Cow<'_, PuzzleCommitment<N>>>
pub fn puzzle_commitments( &self ) -> impl Iterator<Item = Cow<'_, PuzzleCommitment<N>>>
Returns an iterator over the puzzle commitments, for all blocks in self.
sourcepub fn program_ids(&self) -> impl Iterator<Item = Cow<'_, ProgramID<N>>>
pub fn program_ids(&self) -> impl Iterator<Item = Cow<'_, ProgramID<N>>>
Returns an iterator over the program IDs, for all transactions in self.
sourcepub fn programs(
&self
) -> impl Iterator<Item = Cow<'_, ProgramCore<N, Instruction<N>, Command<N>>>>
pub fn programs( &self ) -> impl Iterator<Item = Cow<'_, ProgramCore<N, Instruction<N>, Command<N>>>>
Returns an iterator over the programs, for all transactions in self.
sourcepub fn transaction_ids(
&self
) -> impl Iterator<Item = Cow<'_, <N as Network>::TransactionID>>
pub fn transaction_ids( &self ) -> impl Iterator<Item = Cow<'_, <N as Network>::TransactionID>>
Returns an iterator over the transaction IDs, for all transactions in self.
sourcepub fn transition_ids(
&self
) -> impl Iterator<Item = Cow<'_, <N as Network>::TransitionID>>
pub fn transition_ids( &self ) -> impl Iterator<Item = Cow<'_, <N as Network>::TransitionID>>
Returns an iterator over the transition IDs, for all transitions.
sourcepub fn input_ids(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
pub fn input_ids(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the input IDs, for all transition inputs.
sourcepub fn serial_numbers(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
pub fn serial_numbers(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the serial numbers, for all transition inputs that are records.
Returns an iterator over the tags, for all transition inputs that are records.
sourcepub fn output_ids(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
pub fn output_ids(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the output IDs, for all transition outputs that are records.
sourcepub fn commitments(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
pub fn commitments(&self) -> impl Iterator<Item = Cow<'_, Field<N>>>
Returns an iterator over the commitments, for all transition outputs that are records.
sourcepub fn nonces(&self) -> impl Iterator<Item = Cow<'_, Group<N>>>
pub fn nonces(&self) -> impl Iterator<Item = Cow<'_, Group<N>>>
Returns an iterator over the nonces, for all transition outputs that are records.
sourcepub fn records(
&self
) -> impl Iterator<Item = (Cow<'_, Field<N>>, Cow<'_, Record<N, Ciphertext<N>>>)>
pub fn records( &self ) -> impl Iterator<Item = (Cow<'_, Field<N>>, Cow<'_, Record<N, Ciphertext<N>>>)>
Returns an iterator over the (commitment, record) pairs, for all transition outputs that are records.
sourcepub fn transition_public_keys(&self) -> impl Iterator<Item = Cow<'_, Group<N>>>
pub fn transition_public_keys(&self) -> impl Iterator<Item = Cow<'_, Group<N>>>
Returns an iterator over the transition public keys, for all transactions.
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn load(
genesis_block: Block<N>,
dev: Option<u16>
) -> Result<Ledger<N, C>, Error>
pub fn load( genesis_block: Block<N>, dev: Option<u16> ) -> Result<Ledger<N, C>, Error>
Loads the ledger from storage.
sourcepub fn load_unchecked(
genesis_block: Block<N>,
dev: Option<u16>
) -> Result<Ledger<N, C>, Error>
pub fn load_unchecked( genesis_block: Block<N>, dev: Option<u16> ) -> Result<Ledger<N, C>, Error>
Loads the ledger from storage, without performing integrity checks.
sourcepub const fn coinbase_puzzle(&self) -> &CoinbasePuzzle<N>
pub const fn coinbase_puzzle(&self) -> &CoinbasePuzzle<N>
Returns the coinbase puzzle.
sourcepub fn latest_committee(&self) -> Result<Committee<N>, Error>
pub fn latest_committee(&self) -> Result<Committee<N>, Error>
Returns the latest committee.
sourcepub fn latest_state_root(&self) -> <N as Network>::StateRoot
pub fn latest_state_root(&self) -> <N as Network>::StateRoot
Returns the latest state root.
sourcepub fn latest_epoch_number(&self) -> u32
pub fn latest_epoch_number(&self) -> u32
Returns the latest epoch number.
sourcepub fn latest_epoch_challenge(&self) -> Result<EpochChallenge<N>, Error>
pub fn latest_epoch_challenge(&self) -> Result<EpochChallenge<N>, Error>
Returns the latest epoch challenge.
sourcepub fn latest_block(&self) -> Block<N>
pub fn latest_block(&self) -> Block<N>
Returns the latest block.
sourcepub fn latest_round(&self) -> u64
pub fn latest_round(&self) -> u64
Returns the latest round number.
sourcepub fn latest_height(&self) -> u32
pub fn latest_height(&self) -> u32
Returns the latest block height.
sourcepub fn latest_hash(&self) -> <N as Network>::BlockHash
pub fn latest_hash(&self) -> <N as Network>::BlockHash
Returns the latest block hash.
sourcepub fn latest_header(&self) -> Header<N>
pub fn latest_header(&self) -> Header<N>
Returns the latest block header.
sourcepub fn latest_cumulative_weight(&self) -> u128
pub fn latest_cumulative_weight(&self) -> u128
Returns the latest block cumulative weight.
sourcepub fn latest_cumulative_proof_target(&self) -> u128
pub fn latest_cumulative_proof_target(&self) -> u128
Returns the latest block cumulative proof target.
sourcepub fn latest_solutions_root(&self) -> Field<N>
pub fn latest_solutions_root(&self) -> Field<N>
Returns the latest block solutions root.
sourcepub fn latest_coinbase_target(&self) -> u64
pub fn latest_coinbase_target(&self) -> u64
Returns the latest block coinbase target.
sourcepub fn latest_proof_target(&self) -> u64
pub fn latest_proof_target(&self) -> u64
Returns the latest block proof target.
sourcepub fn last_coinbase_target(&self) -> u64
pub fn last_coinbase_target(&self) -> u64
Returns the last coinbase target.
sourcepub fn last_coinbase_timestamp(&self) -> i64
pub fn last_coinbase_timestamp(&self) -> i64
Returns the last coinbase timestamp.
sourcepub fn latest_timestamp(&self) -> i64
pub fn latest_timestamp(&self) -> i64
Returns the latest block timestamp.
sourcepub fn latest_transactions(&self) -> Transactions<N>
pub fn latest_transactions(&self) -> Transactions<N>
Returns the latest block transactions.
source§impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
impl<N, C> Ledger<N, C>where
N: Network,
C: ConsensusStorage<N>,
sourcepub fn find_unspent_credits_records(
&self,
view_key: &ViewKey<N>
) -> Result<IndexMap<Field<N>, Record<N, Plaintext<N>>>, Error>
pub fn find_unspent_credits_records( &self, view_key: &ViewKey<N> ) -> Result<IndexMap<Field<N>, Record<N, Plaintext<N>>>, Error>
Returns the unspent credits.aleo records.
sourcepub fn create_deploy<R>(
&self,
private_key: &PrivateKey<N>,
program: &ProgramCore<N, Instruction<N>, Command<N>>,
priority_fee_in_microcredits: u64,
query: Option<Query<N, <C as ConsensusStorage<N>>::BlockStorage>>,
rng: &mut R
) -> Result<Transaction<N>, Error>
pub fn create_deploy<R>( &self, private_key: &PrivateKey<N>, program: &ProgramCore<N, Instruction<N>, Command<N>>, priority_fee_in_microcredits: u64, query: Option<Query<N, <C as ConsensusStorage<N>>::BlockStorage>>, rng: &mut R ) -> Result<Transaction<N>, Error>
Creates a deploy transaction.
The priority_fee_in_microcredits is an additional fee on top of the deployment fee.
sourcepub fn create_transfer<R>(
&self,
private_key: &PrivateKey<N>,
to: Address<N>,
amount_in_microcredits: u64,
priority_fee_in_microcredits: u64,
query: Option<Query<N, <C as ConsensusStorage<N>>::BlockStorage>>,
rng: &mut R
) -> Result<Transaction<N>, Error>
pub fn create_transfer<R>( &self, private_key: &PrivateKey<N>, to: Address<N>, amount_in_microcredits: u64, priority_fee_in_microcredits: u64, query: Option<Query<N, <C as ConsensusStorage<N>>::BlockStorage>>, rng: &mut R ) -> Result<Transaction<N>, Error>
Creates a transfer transaction.
The priority_fee_in_microcredits is an additional fee on top of the execution fee.