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::Displayandstd::str::FromStrviaFormat.
Structs§
- Batched
Tx - A transaction with the commitment to a specific inner transaction of the batch
- Block
Hash - Hash of a block as fixed-size byte array
- Block
Header - The block header data from Tendermint header relevant for Namada storage
- Block
Height - Height of a block, i.e. the level. The
defaultis theBlockHeight::sentinelvalue, 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
- Event
Type - ABCI event type.
- KeyVal
Iterator - Storage key-val pair iterator
- Log
- Extend an
Eventwith 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
- Decode
Error - Error
- Event
Level - 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§
- Borsh
Deserialize - A data-structure that can be de-serialized from binary format by NBOR.
- Borsh
Serialize - A data-structure that can be serialized into binary format by NBOR.
- Borsh
Serialize Ext - Extensions to types implementing
BorshSerialize. - Emit
Events - Used in sub-systems that may emit events.
- Event
ToEmit - An event to be emitted in Namada.
- Option
Ext - An extension to
Optionto allow turningNonecase to an Error from a static string (handy for WASM). - Result
Ext - Result extension to easily wrap custom errors into
Error. - Storage
Read - Common storage read interface
- Storage
Write - 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§
Attribute Macros§
- transaction
- Generate WASM binding for a transaction main entrypoint function.