Skip to main content

Crate amaru_kernel

Crate amaru_kernel 

Source

Re-exports§

pub use cardano::account::Account;
pub use cardano::address::is_locked_by_script;
pub use cardano::auxiliary_data::AuxiliaryData;
pub use cardano::ballot::Ballot;
pub use cardano::ballot_id::BallotId;
pub use cardano::block::Block;
pub use cardano::block_header::BlockHeader;
pub use cardano::block_height::BlockHeight;
pub use cardano::certificate_pointer::CertificatePointer;
pub use cardano::constitutional_committee::ConstitutionalCommitteeStatus;
pub use cardano::drep_registration::DRepRegistration;
pub use cardano::drep_state::DRepState;
pub use cardano::epoch::Epoch;
pub use cardano::era_bound::EraBound;
pub use cardano::era_history::EraHistory;
pub use cardano::era_history::EraHistoryError;
pub use cardano::era_history::EraHistoryFileError;
pub use cardano::era_history::MAINNET_ERA_HISTORY;
pub use cardano::era_history::PREPROD_ERA_HISTORY;
pub use cardano::era_history::PREVIEW_ERA_HISTORY;
pub use cardano::era_history::TESTNET_ERA_HISTORY;
pub use cardano::era_history::load_era_history_from_file;
pub use cardano::era_name::EraName;
pub use cardano::era_name::EraNameError;
pub use cardano::era_params::EraParams;
pub use cardano::era_summary::EraSummary;
pub use cardano::ex_units::sum_ex_units;
pub use cardano::hash::HeaderHash;
pub use cardano::hash::NULL_HASH28;
pub use cardano::hash::NULL_HASH32;
pub use cardano::hash::ORIGIN_HASH;
pub use cardano::hash::PoolId;
pub use cardano::hash::TransactionId;
pub use cardano::hash::size;
pub use cardano::lovelace::Lovelace;
pub use cardano::memoized::MemoizedDatum;
pub use cardano::memoized::MemoizedNativeScript;
pub use cardano::memoized::MemoizedPlutusData;
pub use cardano::memoized::MemoizedScript;
pub use cardano::memoized::MemoizedTransactionOutput;
pub use cardano::memoized::decode_script;
pub use cardano::memoized::deserialize_script;
pub use cardano::memoized::encode_script;
pub use cardano::memoized::from_minted_script;
pub use cardano::memoized::script_original_bytes;
pub use cardano::memoized::serialize_memoized_script;
pub use cardano::memoized::serialize_script;
pub use cardano::metadatum::Metadatum;
pub use cardano::network_magic::NetworkMagic;
pub use cardano::network_name::NetworkName;
pub use cardano::nonce::Nonce;
pub use cardano::nonce::parse_nonce;
pub use cardano::ordered_redeemer::OrderedRedeemer;
pub use cardano::peer::Peer;
pub use cardano::point::Point;
pub use cardano::pool_params::PoolParams;
pub use cardano::proposal_id::ComparableProposalId;
pub use cardano::proposal_pointer::ProposalPointer;
pub use cardano::proposal_state::ProposalState;
pub use cardano::protocol_parameters::ConsensusParameters;
pub use cardano::protocol_parameters::GlobalParameters;
pub use cardano::protocol_parameters::MAINNET_GLOBAL_PARAMETERS;
pub use cardano::protocol_parameters::PREPROD_GLOBAL_PARAMETERS;
pub use cardano::protocol_parameters::PREPROD_INITIAL_PROTOCOL_PARAMETERS;
pub use cardano::protocol_parameters::PREVIEW_GLOBAL_PARAMETERS;
pub use cardano::protocol_parameters::PREVIEW_INITIAL_PROTOCOL_PARAMETERS;
pub use cardano::protocol_parameters::ProtocolParameters;
pub use cardano::protocol_parameters::TESTNET_GLOBAL_PARAMETERS;
pub use cardano::protocol_parameters_update::display_protocol_parameters_update;
pub use cardano::protocol_version::PROTOCOL_VERSION_9;
pub use cardano::protocol_version::PROTOCOL_VERSION_10;
pub use cardano::raw_block::RawBlock;
pub use cardano::required_script::RequiredScript;
pub use cardano::reward::Reward;
pub use cardano::reward_account::expect_stake_credential;
pub use cardano::reward_account::new_stake_address;
pub use cardano::reward_account::reward_account_to_stake_credential;
pub use cardano::reward_kind::RewardKind;
pub use cardano::script_kind::ScriptKind;
pub use cardano::script_purpose::script_purpose_to_string;
pub use cardano::slot::Slot;
pub use cardano::slot::SlotArithmeticError;
pub use cardano::stake_credential::BorrowedStakeCredential;
pub use cardano::stake_credential::stake_credential_from_reward_account;
pub use cardano::stake_credential_kind::StakeCredentialKind;
pub use cardano::tip::Tip;
pub use cardano::transaction::Transaction;
pub use cardano::transaction_body::TransactionBody;
pub use cardano::transaction_input::transaction_input_to_string;
pub use cardano::transaction_pointer::TransactionPointer;
pub use cardano::vkey_witness::InvalidEd25519Signature;
pub use cardano::vkey_witness::verify_ed25519_signature;
pub use cardano::voter_kind::VoterKind;
pub use cardano::witness_set::WitnessSet;
pub use serde_json as json;

Modules§

cardano
cbor
macros
utils

Macros§

hash
Easily create a hash from a hex-encoded literal string. Useful for testing.
include_cbor
Includes and deserialize a CBOR-encoded test data file. The file must located under the project’s tests/data folder, relative to the project’s Cargo.toml.
include_json
Includes and deserialize a JSON-encoded test data file. The file must located under the project’s tests/data folder, relative to the project’s Cargo.toml.
prop_cbor_roundtrip
Generate a roundtrip property to assert that Cbor encoder and decoder for a given type can safely be called in sequence and yield the original input.
try_include_cbor
Like ‘include_cbor!’, but do not panic when failing to decode. Return a Result instead.

Structs§

AddressPayload
Anchor
BootstrapWitness
ByronAddress
New type wrapping a Byron address primitive
Bytes
Constitution
Constr
CostModels
DRepVotingThresholds
ExUnitPrices
ExUnits
Hash
data that is a cryptographic Hash of BYTES long.
Hasher
handy method to create a hash of given SIZE bit size.
HeaderBody
Int
KeepRaw
Decodes a struct while preserving original CBOR
NonZeroInt
Introduced in Conway negInt64 = -9223372036854775808 .. -1 posInt64 = 1 .. 9223372036854775807 nonZeroInt64 = negInt64 / posInt64 ; this is the same as the current int64 definition but without zero
PlutusScript
PoolMetadata
PoolVotingThresholds
PositiveCoin
Introduced in Conway positive_coin = 1 .. 18446744073709551615
Proposal
ProposalId
ProtocolParamUpdate
RationalNumber
Redeemer
RedeemerKey
ShelleyAddress
A decoded Shelley address
StakeAddress
A decoded Stake address
TransactionInput
VKeyWitness
VotingProcedure

Enums§

AddrAttrProperty
AddrType
Address
A decoded Cardano address of any type
AddressError
BigInt
Certificate
DRep
GovernanceAction
Language
MaybeIndefArray
A struct that maintains a reference to whether a cbor array was indef or not
NativeScript
Network
The network tag of an address
NetworkId
PlutusData
Redeemers
Relay
ScriptPurpose
ShelleyDelegationPart
The delegation part of a Shelley address
ShelleyPaymentPart
The payment part of a Shelley address
StakeCredential
StakePayload
The payload of a Stake address
Value
Vote
Voter

Traits§

ComputeHash
OriginalHash

Functions§

from_cbor
Decode raw bytes into a structured type T, assuming no context.
from_cbor_no_leftovers
Decode a CBOR input, ensuring that there are no bytes leftovers once decoded. This is handy to test standalone decoders and ensures that they entirely consume their inputs.
from_cbor_no_leftovers_with
Decode a CBOR input, ensuring that there are no bytes leftovers once decoded. This is handy to test standalone decoders and ensures that they entirely consume their inputs.
to_cbor
Encode any serialisable value T into bytes.

Type Aliases§

AssetName
CostModel
Header
ProtocolVersion
RewardAccount