catalyst_cardano_serialization library

Classes

AuthToken
The Authentication Token is based loosely on JWT. It consists of an Authentication Header attached to every authenticated request, and an encoded signed.
AuxiliaryData
The transaction metadata as a list of key-value pairs (a map).
AuxiliaryDataHash
Describes the Blake2b-256 hash of auxiliary data which is included in the transaction body.
Balance
Represents the balance of the wallet in terms of Coin.
BaseCertificate
Implements a common base of certificate that holds binary bytes.
BaseHash
Implements a common base of hash types that holds binary bytes of exact length.
C509Certificate
Describes the C509 certificate.
CborEncodable
An interface for classes that support CBOR serialization.
CertificateHash
Describes the Blake2b-128 hash of a certificate.
Data
Class representing data in a Cardano transaction output. The Data class is a type of Datum that contains actual data stored on-chain.
Datum
Abstract base class representing a datum in a Cardano transaction output. A datum is a piece of data that can be either a hash or inline plutus data.
DatumHash
Class representing a datum hash in Cardano. A DatumHash is a type of Datum that contains a cryptographic hash, which refers to data stored off-chain.
DatumOption
Class representing an optional datum in a Cardano transaction output. A DatumOption wraps a Datum, which can either be a datum hash or direct data as inline datum.
Ed25519KeyPair
The public and private Ed25519 key pair.
Ed25519PublicKeyHash
Describes the Blake2b-224 hash of a Ed25519PublicKey.
InvalidAfter
Class representing an "invalid after" native script (time-locked).
InvalidBefore
Class representing an "invalid before" native script (time-locked).
KeyReference
References a local key in this registration or a given key in an earlier registration.
LinearFee
Calculates fees for the transaction on Cardano blockchain.
LocalKeyReference
Offset reference to a key defined in this registration.
MultiAsset
Holds native assets minted with PolicyId.
NativeScript
Abstract base class for native scripts, extending Script.
PlutusScript
Abstract base class for Plutus scripts, extending Script.
PlutusV1Script
Class representing a Plutus V1 script.
PlutusV2Script
Class representing a Plutus V2 script.
PlutusV3Script
Class representing a Plutus V3 script.
PreBabbageTransactionOutput
Class representing a transaction output from the Pre-Babbage era in Cardano. A PreBabbageTransactionOutput contains a datum hash, which refers to data stored off-chain. This type of transaction output is used in Cardano before the Babbage era.
Redeemer
Class representing a redeemer in Cardano. A Redeemer is a piece of data that is used to validate a plutus script in a transaction.
RegistrationData
Defines the X509 Role Based Access Control transaction metadata.
RoleData
Roles are defined in a list. A user can register for any available role, and they can enrol in more than one role in a single registration transaction.
Script
Define a sealed class for scripts that extends Equatable.
ScriptAll
Class representing an "all" native script (AND operation).
ScriptAny
Class representing an "any" native script (OR operation).
ScriptData
Class representing a script data in Cardano.
ScriptDataHash
Describes the Blake2b-256 hash of script data which is included in the transaction body.
ScriptNOfK
Class representing an "n of k" native script (M of N operation).
ScriptPubkey
Class representing a public key based native script.
ScriptRef
Class representing a reference script in an transaction output.
ShelleyAddress
ShelleyAddress supports bech32 encoded addresses as defined in CIP-19.
ShelleyMultiAssetTransactionOutput
Abstract base class representing a transaction output in Cardano. A ShelleyMultiAssetTransactionOutput defines the destination address and the amount of cryptocurrency being sent to that address.
Transaction
Represents the signed transaction with a list of witnesses which are used to verify the validity of a transaction.
TransactionBody
Represents the details of a transaction including inputs, outputs, fee, etc.
TransactionBuilder
A builder which helps to create the TransactionBody.
TransactionBuilderConfig
A configuration for the TransactionBuilder which holds protocol parameters and other constants.
TransactionHash
Describes the Blake2b-256 hash of the transaction which serves as proof of transaction validation.
TransactionInput
The transaction output of a previous transaction, acts as input for the next transaction.
TransactionInputsHash
Describes the Blake2b-128 hash of the transaction inputs (UTXOs) which can be used as a link to a certain transaction (as UTXOs can only be spent once).
TransactionOutput
Class representing a transaction output from the Post-Alonzo era in Cardano. A TransactionOutput can include additional fields like a datum option and a script reference, supporting advanced features introduced after the Alonzo hard fork.
TransactionOutputBuilder
Builder and utils around ShelleyMultiAssetTransactionOutput.
TransactionUnspentOutput
The UTXO that can be used as an input in a new transaction.
TransactionWitnessSet
A set of witnesses that sign the transaction.
TransactionWitnessSetBuilder
A builder that builds TransactionWitnessSet.
VkeyWitness
The transaction witness with a signature of the transaction.
X509DerCertificate
Describes the X509 certificate encoded in DER format.
X509MetadataEnvelope<T>
X509 Certificate metadata and related metadata within a x509 Registration/Update transaction must be protected against replayability.

Enums

DatumOptionType
Enum representing the type of a datum option in Cardano. A DatumOption can either be a datum hash or inline Plutus data.
LocalKeyReferenceType
Defines the type of the referenced local key.
NativeScriptType
Define an enum for the different types of native scripts
NetworkId
Specifies on which network the code will run.
RefScriptType
Define an enum for the different types of reference scripts
WitnessType
Witnesses that allow for various types of transactions on the Cardano blockchain.

Extension Types

AssetName
The name of a native asset.
Coin
Specifies an amount of ADA in terms of lovelace.
DRepID
A hex-encoded string representing a registered DRep's ID which is a Blake2b-224 hash digest of a 32 byte Ed25519 public key, as described in CIP-1694 Registered DReps.
Ed25519PrivateKey
The Ed25519 private key that is 256 bits long.
Ed25519PublicKey
The ED25519 public key that is 256 bits long.
Ed25519Signature
The witness signature of the transaction.
PolicyId
The hash of policy ID that minted native assets.
PubDRepKey
A hex-encoded string representing 32 byte Ed25519 DRep public key, as described in CIP-0105 | Conway Era Key Chains for HD Wallets.
PubStakeKey
A hex-encoded string representing 32 byte Ed25519 public key used as a staking credential.
SlotBigNum
A blockchain slot number.
UuidV4
The Uuid version 4 identifier.

Constants

scriptHashSize → const int
The size of the script hash in bytes.

Typedefs

ChunkedDataDeserializer<T> = T Function(CborValue value)
Deserializes the type T from cbor.
ChunkedDataSerializer<T> = CborValue Function(T value)
Serializes the type T into cbor.

Exceptions / Errors

AssetDoesNotExistException
Exception thrown when a native asset that is required does not exist in the wallet.
HashFormatException
Exception thrown when parsing a hash that has incorrect length.
InsufficientAdaForAssetsException
Exception thrown when there's not enough Coin to transfer native assets.
InsufficientUtxoBalanceException
Exception thrown when the transaction outputs exceed the inputs.
InvalidAddressException
Exception thrown if the address doesn't match the bech32 specification for Shelley addresses.
InvalidTransactionWitnessesException
Exception thrown when the number of witnesses doesn't match the expected amount.
MaxTxSizeExceededException
Exception thrown when the transaction exceeds the allowed maximum size.
TxFeeNotSpecifiedException
Exception thrown when building a transaction that doesn't specify the fee.
TxValueBelowMinUtxoValueException
Exception thrown when the transaction output amount is less than required by the network.
TxValueSizeExceededException
Exception thrown when the transaction output takes more bytes than allowed by maxValueSize.