cardano-serialization-lib
cardano-serialization-lib copied to clipboard
CIP-0116 compatibility
This is a compatibility table between JSON representation layouts in CSL and the cardano json-schema CIP. (CIP-0116).
Why is this here?
The goal is to eventually synchronize CSL's JSON data layouts with the "standard" schema.
[x] means that the layout of a type in CSL is compatible with the JSON-schema (but not necessarily all the structural sub-components of the type! This just indicates whether there are changes needed in code for the type itself)
[ ] means that there are some differences (that are listed below)
[?] means that the compatibility hasn't been checked yet.
Babbage era
- [x] Address - uses bech32
- [?]
AssetName - [ ]
AuxiliaryData- does not include
prefer_alonzo_format(CSL-specific)
- does not include
- [x]
AuxiliaryDataHash - [ ]
BaseAddress- CSL does not offer to_json
- [ ]
BigInt- CSL serializes as JSON number when used in PlutusData:
> lib.PlutusData.new_integer(lib.BigInt.from_str('1239999999999999999999999999999999999999999')).to_json() Uncaught 'Integer 1239999999999999999999999999999999999999999 too big for our JSON support' > lib.BigInt.from_str('9999999999999999999').to_json() '"9999999999999999999"' - [?]
Block - [x]
BlockHash - [ ]
BootstrapWitnessattributesis an array of numbers in CSL instead of hex(bytes)chain_codeis an array of numbers in CSL instead of hex(bytes)
- [ ]
ByronAddress- CSL does not offer to_json
- [x]
ByteString - [ ]
Certificate- CSL does not use
tagproperty
- CSL does not use
- [ ]
CostModels- CIP uses snake_case for field names
- [ ]
Credential- does not use
tagproperty
- does not use
- [x]
DNSName-DNSRecordSRVin CSL - [x]
DataHash - [x]
Ed25519KeyHash - [x]
Ed25519PublicKey - [x]
Ed25519Signature - [ ]
EnterpriseAddress- CSL does not offer to_json
- [x]
ExUnitPrices - [x]
ExUnits - [x]
GenesisDelegateHash - [x]
GenesisHash - [x]
Header - [x]
HeaderBody - [x]
Int128 - [ ]
Ipv4- CSL represents as an array of 4 bytes, CIP represents as a string
- [ ]
Ipv6- CSL represents as an array of 12 bytes, CIP represents as a string
- [x]
KESSignature - [x]
KESVKey - [ ]
Language- CIP uses snake_case for enums
- [ ]
MIRPot- CIP uses snake_case for enums
- [ ]
Mint- incompatible
- [ ]
MoveInstantaneousRewards- CSL does not use
tagproperty, CIP doesn't use MIREnumJSON
- CSL does not use
- [x]
MultiAsset - [ ]
NativeScript- CSL does not use
tagproperty
- CSL does not use
- [ ]
NetworkId- CIP uses snake_case for enums
- [ ]
NonZeroInt64- Not present in CSL
- [x]
OperationalCert - [ ]
PlutusData- does not use
tagproperty
- does not use
- [?]
PlutusScript - [?]
PlutusV1CostModel - [?]
PlutusV2CostModel - [?]
PointerAddress - [?]
PoolMetadata - [?]
PoolMetadataHash - [?]
PoolParams - [?]
PoolPubKeyHash - [ ]
PosInt64- not used in CSL
- [x]
ProtocolParamUpdate - [x]
ProtocolVersion - [x]
Redeemer - [ ]
RedeemerTag- CIP uses snake_case for enums
- [ ]
Relay- does not use
tagproperty
- does not use
- [ ]
RewardAddress- CSL does not offer to_json
- [x]
ScriptDataHash - [x]
ScriptHash - [ ]
ScriptRef- does not use
tagproperty
- does not use
- [x]
Transaction - [x]
TransactionBody - [x]
TransactionHash - [x]
TransactionInput - [ ]
TransactionMetadata- CIP is incompatible with
GeneralTransactionMetadata: uses key/value pairs
- CIP is incompatible with
- [ ]
TransactionMetadatum- does not use
tagproperty
- does not use
- [ ]
TransactionOutput- plutus_data uses different format (tagged)
- [x]
TransactionUnspentOutput - [ ]
TransactionWitnessSet- rename
vkeysfield tovkeywitnesses
- rename
- [x]
UInt32 - [x]
UInt64 - [x]
URL - [x]
UnitInterval - [x]
Update - [ ]
VRFCertoutputandprooffields must be hexstrings
- [x]
VRFKeyHash - [x]
VRFVKey - [ ]
Value- property names do not match
- [x]
Vkeywitness
Conway era
TBD