Crate sidechain_domain

Source
Expand description

§Partner Chains domain types

This crate defines common domain and utility types used in the Partner Chain Toolkit.

Modules§

byte_string
Module providing various byte sequence wrapper types for use by the Partner Chains Toolkit crates
crypto
Cryptographic utilities for use by the domain types
mainchain_epoch
Module providing types and function for calculations on Cardano epoch and slot numbers

Macros§

bounded_str
Macro that creates a BoundedString, supporting string interpolation like alloc::format.

Structs§

AdaBasedStaking
Information on ADA stake pool ownership
AssetId
Full data identifying a Cardano native asset
AssetName
Cardano native asset name
AuraPublicKey
Sr25519 public key used by Aura consensus algorithm. Not validated
BTreeMap
An ordered map based on a B-Tree.
CandidateRegistration
Cardano SPO registration. This is a stripped-down version of RegistrationData.
CandidateRegistrations
Information about an Authority Candidate’s Registrations at some block.
CrossChainKeyHash
blake2b_224 hash of a cross-chain public key
CrossChainPublicKey
Cross-chain public key (ECDSA)
CrossChainSignature
Cross-chain signature created using CrossChainPublicKey
DParameter
Parameter controlling the number and proportion of registered and permissioned candidates selected into a Partner Chain committee, used by the Ariadne family of selection algorithms.
DelegatorStakeAmount
Amount of Lovelace staked by a Cardano delegator to a single stake pool
EpochNonce
Cardano epoch nonce
GrandpaPublicKey
Ed25519 public key used by the Grandpa finality gadget. Not validated
MainchainAddress
Wraps UTF-8 bytes of Mainchain Address in bech32 format. Example: utf-8 bytes of “addr_test1wz5qc7fk2pat0058w4zwvkw35ytptej3nuc3je2kgtan5dq3rt4sc” are “0x616464725f7465737431777a35716337666b327061743030353877347a77766b77333579747074656a336e7563336a65326b6774616e356471337274347363”
MainchainBlock
Data describing a Cardano block
MainchainKeyHash
blake2b_224 hash of a Cardano Verification (Public) Key. It can be a hash of Payment Verification, Payment Extended Verification, Stake Pool Verification Key or Staking Verification Key.
MainchainSignature
Cardano signature type (EDDSA)
McBlockHash
Cardano block hash
McBlockNumber
Cardano block number. In range [0, 2^31-1].
McEpochNumber
Cardano epoch number. In range [0, 2^31-1].
McSlotNumber
Cardano slot number. In range [0, 2^63-1].
McTxHash
Cardano transaction hash
McTxIndexInBlock
An index of transaction in a block. In range [0, 2^31-1].
NativeTokenAmount
The amount of a Cardano native token
PermissionedCandidateData
Information about a permissioned committee member candidate
PolicyId
Cardano Policy Id
PoolDelegation
ADA delegation data for a single Cardano SPO
RegistrationData
Cardano SPO registration data
ScEpochNumber
Partner Chain epoch number
ScSlotNumber
Partner Chain slot number
SidechainPublicKey
Partner Chain public key
SidechainSignature
Cross-chain signature type (ECDSA) created using SidechainPublicKey
StakeDelegation
Amount of Lovelace (which is a fraction of 1 ADA) staked/locked on Cardano
StakeDistribution
A mapping between Cardano SPOs and the information about ADA delegation of their stake pools
StakeKeySignature
Cardano staking key signature type (EDDSA)
StakePoolPublicKey
Cardano stake pool public key (ed25519)
StakePublicKey
Cardano staking public key (ed25519)
TransactionCbor
CBOR bytes of Cardano Transaction.
UtxoId
Identifies a Cardano UTxO (unspent transaction output)
UtxoIndex
An index of output of a transaction. In range [0, 2^15-1].
UtxoInfo
Extended information about a UTxO in Cardano ledger
UtxoInfoOrderingKey
Key type used for ordering transaction outputs
VKeyWitnessCbor
CBOR bytes of Cardano VKeyWitness.
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Enums§

DelegatorKey
Represents a Cardano ADA delegator
NetworkType
Type of Cardano network

Constants§

MAINCHAIN_SIGNATURE_LEN
Length of Cardano signature (EDDSA)
MAX_ASSET_NAME_LEN
Maximum length of a Cardano native asset’s name in UTF-8 bytes
STAKE_KEY_SIGNATURE_LEN
Length of Cardano staking key signature (EDDSA)
TX_HASH_SIZE
Size of a Cardano transaction hash

Functions§

offset_data_epoch
Shifts given epoch back by [DATA_MC_EPOCH_OFFSET] accounting for underflow.

Type Aliases§

ScriptHash
Cardano script hash