Crate namada_tx_prelude

Crate namada_tx_prelude 

Source
Expand description

This crate contains library code for transaction WASM.

Re-exports§

pub use namada_gas as gas;
pub use namada_governance as governance;
pub use namada_parameters as parameters;

Modules§

account
Account related functions.
action
Actions applied in a transaction.
address
Implements transparent addresses as described in Accounts Addresses.
arith
Arithmetics helpers
booleans
Boolean related functionality.
borsh
Borsh binary encoding (re-exported) from official crate with custom ext.
bytes
Bytes hex formatting
chain
Chain related data types
collections
Lazy data structures for storage access where elements are not all loaded into memory.
dec
A non-negative fixed precision decimal type.
eth_abi
This module defines encoding methods compatible with Ethereum smart contracts.
eth_bridge_pool
The necessary type definitions for the contents of the Ethereum bridge pool
ethereum_events
Types representing data intended for Namada via Ethereum events
ethereum_structs
Ethereum bridge struct re-exports and types to do with ethereum.
gov_storage
governance storage Governance storage
hash
Types for working with 32 bytes hashes.
hints
Compiler hints, to improve the performance of certain operations.
ibc
IBC lower-level functions for transactions.
internal
Shared internal types between the host env and guest (wasm).
keccak
This module is for hashing Namada types using the keccak256 hash function in a way that is compatible with smart contracts on Ethereum.
key
Cryptographic signature keys
masp
MASP types
masp_primitives
General MASP primitives.
parameters_storage
Parameters storage
pgf
PGF related functions.
proof_of_stake
Proof of Stake system integration with functions for transactions
storage
Storage types
string_encoding
Namada’s standard string encoding for public types.
tendermint
Re-export of tendermint v0.37
tendermint_proto
Re-export of tendermint-proto v0.37
time
Types for dealing with time and durations.
token
Shielded and transparent tokens related functions
transaction
Data-Types that are used in transactions.
uint
An unsigned 256 integer type. Used for, among other things, the backing type of token amounts.
validity_predicate
Types that are used in validity predicates.
voting_power
This module contains types related with validator voting power calculations.

Macros§

debug_log
Format and log a string in a debug build.
impl_display_and_from_str_via_format
Implement std::fmt::Display and std::str::FromStr via Format.

Structs§

BatchedTx
A transaction with the commitment to a specific inner transaction of the batch
BlockHash
Hash of a block as fixed-size byte array
BlockHeader
The block header data from Tendermint header relevant for Namada storage
BlockHeight
Height of a block, i.e. the level. The default is the BlockHeight::sentinel value, which doesn’t correspond to any block.
Ctx
Execution context provides access to the host environment functions
Epoch
Epoch identifier. Epochs are identified by consecutive numbers.
EthAddress
Representation of address on Ethereum. The inner value is the last 20 bytes of the public key that controls the account.
Event
Custom events that can be queried from Tendermint using a websocket client
EventType
ABCI event type.
KeyValIterator
Storage key-val pair iterator
Log
Extend an Event with log data.
Tx
A Namada transaction is represented as a header followed by a series of sections providing additional details.

Enums§

Address
An account’s address
DecodeError
Error
EventLevel
Indicates if an event is emitted do to an individual Tx or the nature of a finalized block
Section
A section of a transaction. Carries an independent piece of information necessary for the processing of a transaction.

Constants§

BLOCK_HASH_LENGTH
The length of the block hash

Traits§

BorshDeserialize
A data-structure that can be de-serialized from binary format by NBOR.
BorshSerialize
A data-structure that can be serialized into binary format by NBOR.
BorshSerializeExt
Extensions to types implementing BorshSerialize.
EmitEvents
Used in sub-systems that may emit events.
EventToEmit
An event to be emitted in Namada.
OptionExt
An extension to Option to allow turning None case to an Error from a static string (handy for WASM).
ResultExt
Result extension to easily wrap custom errors into Error.
StorageRead
Common storage read interface
StorageWrite
Common storage write interface
TxEnv
Transaction host functions

Functions§

consensus_version
Get the current consensus version
decode
Decode a value with borsh
encode
Encode a value with borsh
iter_prefix
Iterate Borsh encoded items matching the given prefix, ordered by the storage keys.
iter_prefix_bytes
Iterate items matching the given prefix, ordered by the storage keys.
log_string
Log a string. The message will be printed at the tracing::Level::Info.
update_masp_note_commitment_tree
Update the masp note commitment tree in storage with the new notes
verify_signatures_of_pks
Verify section signatures against the given list of keys

Type Aliases§

Result
Result of a storage API call.
TxResult
Transaction result

Attribute Macros§

transaction
Generate WASM binding for a transaction main entrypoint function.

Derive Macros§

BorshDeserialize

BorshSerialize