transaction/transaction

Types

pub type Transaction {
  Transaction(
    sender: Address,
    sender_type: AccountType,
    sender_data: BitArray,
    recipient: Address,
    recipient_type: AccountType,
    recipient_data: BitArray,
    value: Coin,
    fee: Coin,
    validity_start_height: Int,
    network_id: NetworkId,
    flags: Option(TransactionFlags),
    proof: BitArray,
  )
}

Constructors

  • Transaction(
      sender: Address,
      sender_type: AccountType,
      sender_data: BitArray,
      recipient: Address,
      recipient_type: AccountType,
      recipient_data: BitArray,
      value: Coin,
      fee: Coin,
      validity_start_height: Int,
      network_id: NetworkId,
      flags: Option(TransactionFlags),
      proof: BitArray,
    )

Functions

pub fn deserialize(
  buf: BitArray,
) -> Result(#(Transaction, BitArray), String)
pub fn deserialize_all(
  buf: BitArray,
) -> Result(Transaction, String)
pub fn format(tx: Transaction) -> TransactionFormat
pub fn from_hex(hex: String) -> Result(Transaction, String)
pub fn new_basic(
  sender: Address,
  recipient: Address,
  value: Coin,
  fee: Coin,
  validity_start_height: Int,
  network_id: NetworkId,
  proof: Option(BitArray),
) -> Transaction
pub fn new_basic_with_data(
  sender: Address,
  recipient: Address,
  data: BitArray,
  value: Coin,
  fee: Coin,
  validity_start_height: Int,
  network_id: NetworkId,
  proof: Option(BitArray),
) -> Transaction
pub fn serialize(tx: Transaction) -> Result(BitArray, String)
pub fn serialize_content(tx: Transaction) -> BitArray
pub fn set_proof(tx: Transaction, proof: BitArray) -> Transaction
pub fn to_hex(tx: Transaction) -> Result(String, String)
Search Document