diff --git a/proto/utxorpc/v1beta/cardano/cardano.proto b/proto/utxorpc/v1beta/cardano/cardano.proto index ff22309..88a4d44 100644 --- a/proto/utxorpc/v1beta/cardano/cardano.proto +++ b/proto/utxorpc/v1beta/cardano/cardano.proto @@ -27,7 +27,7 @@ message TxInput { bytes tx_hash = 1; // Hash of the previous transaction. uint32 output_index = 2; // Index of the output in the previous transaction. TxOutput as_output = 3; // Content of the input represented as output of the related transaction - Redeemer redeemer = 4; // Redeemer for the Plutus script. + optional Redeemer redeemer = 4; // Redeemer for the Plutus script. } // Represents a transaction output in the Cardano blockchain. @@ -35,14 +35,14 @@ message TxOutput { bytes address = 1; // Address receiving the output. BigInt coin = 2; // Amount of ADA in the output. repeated Multiasset assets = 3; // Additional native (non-ADA) assets in the output. - Datum datum = 4; // Plutus data associated with the output. - Script script = 5; // Script associated with the output. + optional Datum datum = 4; // Plutus data associated with the output. + optional Script script = 5; // Script associated with the output. } message Datum { bytes hash = 1; // Hash of this datum as seen on-chain - PlutusData payload = 2; // Parsed Plutus data payload - bytes original_cbor = 3; // Original cbor-encoded data as seen on-chain + optional PlutusData payload = 2; // Parsed Plutus data payload + optional bytes original_cbor = 3; // Original cbor-encoded data as seen on-chain } // Represents a custom asset in the Cardano blockchain. @@ -152,7 +152,7 @@ message HardForkInitiationAction { } message TreasuryWithdrawalsAction { - repeated WithdrawalAmount withdrawals = 1; // A map of the withdrawals to make + repeated WithdrawalAmount withdrawals = 1; // A list of the withdrawals to make bytes policy_hash = 2; } @@ -245,11 +245,13 @@ message Constr { } // Represents a big integer for Plutus data in Cardano. +// The representation here follows CBOR specification for bignums: +// https://www.rfc-editor.org/rfc/rfc8949.html#name-bignums section 3.4.3. message BigInt { oneof big_int { - int64 int = 1; - bytes big_u_int = 2; - bytes big_n_int = 3; + int64 int = 1; // Stores value fitting within int64 range + bytes big_u_int = 2; // Stores unsigned value exceeding int64 range + bytes big_n_int = 3; // Stores negative value `n` exceeding int64 range as `-1 - n` } } @@ -287,6 +289,7 @@ message Script { bytes plutus_v1 = 2; // Plutus V1 script. bytes plutus_v2 = 3; // Plutus V2 script. bytes plutus_v3 = 4; // Plutus V3 script. + bytes plutus_v4 = 5; // Plutus V4 script. } } @@ -592,6 +595,7 @@ message CostModels { CostModel plutus_v1 = 1; CostModel plutus_v2 = 2; CostModel plutus_v3 = 3; + CostModel plutus_v4 = 4; } message VotingThresholds { @@ -759,6 +763,7 @@ message CostModelMap { CostModel plutus_v1 = 1; CostModel plutus_v2 = 2; CostModel plutus_v3 = 3; + CostModel plutus_v4 = 4; } // Unified Genesis configuration containing all parameters from all eras