pub struct TransactionBuilder { /* private fields */ }Implementations§
Source§impl TransactionBuilder
impl TransactionBuilder
Sourcepub fn new(
signer_id: AccountId,
public_key: PublicKey,
receiver_id: AccountId,
nonce: Nonce,
block_hash: CryptoHash,
) -> Self
pub fn new( signer_id: AccountId, public_key: PublicKey, receiver_id: AccountId, nonce: Nonce, block_hash: CryptoHash, ) -> Self
Initialize a new TransactionBuilder with the required fields for a Transaction
Sourcepub fn sign_transaction(self, signer: &dyn Signer) -> SignedTransaction
pub fn sign_transaction(self, signer: &dyn Signer) -> SignedTransaction
Sign a transaction with your custom Signer.
Sourcepub fn create_account(self) -> Self
pub fn create_account(self) -> Self
Methods to add CreateAccount action directly to the Transaction’s actions vector
Sourcepub fn deploy_contract(self, code: Vec<u8>) -> Self
pub fn deploy_contract(self, code: Vec<u8>) -> Self
Method to add a DeployContract action
pub fn function_call( self, method_name: String, args: Vec<u8>, gas: Gas, deposit: Balance, ) -> Self
pub fn transfer(self, deposit: Balance) -> Self
pub fn stake(self, stake: Balance, public_key: PublicKey) -> Self
pub fn add_key(self, public_key: PublicKey, access_key: AccessKey) -> Self
pub fn delete_key(self, public_key: PublicKey) -> Self
pub fn delete_account(self, beneficiary_id: AccountId) -> Self
pub fn build(self) -> Transaction
Auto Trait Implementations§
impl Freeze for TransactionBuilder
impl RefUnwindSafe for TransactionBuilder
impl Send for TransactionBuilder
impl Sync for TransactionBuilder
impl Unpin for TransactionBuilder
impl UnwindSafe for TransactionBuilder
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