pub struct NeoTransaction {
pub version: u8,
pub nonce: u32,
pub system_fee: i64,
pub network_fee: i64,
pub valid_until_block: u32,
pub signers: Vec<TransactionSigner>,
pub attributes: Vec<TransactionAttribute>,
pub script: Vec<u8>,
}Expand description
NEO N3 transaction.
Fields§
§version: u8Transaction version (currently 0).
nonce: u32Nonce for uniqueness.
system_fee: i64System fee in fractions of GAS.
network_fee: i64Network fee in fractions of GAS.
valid_until_block: u32Valid until this block height.
signers: Vec<TransactionSigner>Transaction signers.
attributes: Vec<TransactionAttribute>Transaction attributes.
script: Vec<u8>The invocation script.
Implementations§
Source§impl NeoTransaction
impl NeoTransaction
Sourcepub fn serialize_unsigned(&self) -> Vec<u8> ⓘ
pub fn serialize_unsigned(&self) -> Vec<u8> ⓘ
Serialize the transaction for signing (without witnesses).
Sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
Compute the transaction hash (SHA-256 of serialized unsigned tx).
Sourcepub fn sign(&self, signer: &NeoSigner) -> Result<NeoSignature, SignerError>
pub fn sign(&self, signer: &NeoSigner) -> Result<NeoSignature, SignerError>
Sign the transaction with a NEO signer.
Source§impl NeoTransaction
impl NeoTransaction
Sourcepub fn deserialize(data: &[u8]) -> Result<Self, SignerError>
pub fn deserialize(data: &[u8]) -> Result<Self, SignerError>
Deserialize a NEO N3 transaction from its unsigned byte representation.
Parses version, nonce, fees, signers, attributes, and script.
Trait Implementations§
Source§impl Clone for NeoTransaction
impl Clone for NeoTransaction
Source§fn clone(&self) -> NeoTransaction
fn clone(&self) -> NeoTransaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NeoTransaction
impl RefUnwindSafe for NeoTransaction
impl Send for NeoTransaction
impl Sync for NeoTransaction
impl Unpin for NeoTransaction
impl UnsafeUnpin for NeoTransaction
impl UnwindSafe for NeoTransaction
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