Skip to content

CIP-0116 compatibility #672

@klntsky

Description

@klntsky

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

  • Address - uses bech32
  • [?] AssetName
  • AuxiliaryData
    • does not include prefer_alonzo_format (CSL-specific)
  • 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
  • BlockHash
  • BootstrapWitness
    • attributes is an array of numbers in CSL instead of hex(bytes)
    • chain_code is an array of numbers in CSL instead of hex(bytes)
  • ByronAddress
    • CSL does not offer to_json
  • ByteString
  • Certificate
    • CSL does not use tag property
  • CostModels
    • CIP uses snake_case for field names
  • Credential
    • does not use tag property
  • DNSName - DNSRecordSRV in CSL
  • DataHash
  • Ed25519KeyHash
  • Ed25519PublicKey
  • Ed25519Signature
  • EnterpriseAddress
    • CSL does not offer to_json
  • ExUnitPrices
  • ExUnits
  • GenesisDelegateHash
  • GenesisHash
  • Header
  • HeaderBody
  • 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
  • KESSignature
  • KESVKey
  • Language
    • CIP uses snake_case for enums
  • MIRPot
    • CIP uses snake_case for enums
  • Mint
    • incompatible
  • MoveInstantaneousRewards
    • CSL does not use tag property, CIP doesn't use MIREnumJSON
  • MultiAsset
  • NativeScript
    • CSL does not use tag property
  • NetworkId
    • CIP uses snake_case for enums
  • NonZeroInt64
    • Not present in CSL
  • OperationalCert
  • PlutusData
    • does not use tag property
  • [?] PlutusScript
  • [?] PlutusV1CostModel
  • [?] PlutusV2CostModel
  • [?] PointerAddress
  • [?] PoolMetadata
  • [?] PoolMetadataHash
  • [?] PoolParams
  • [?] PoolPubKeyHash
  • PosInt64
    • not used in CSL
  • ProtocolParamUpdate
  • ProtocolVersion
  • Redeemer
  • RedeemerTag
    • CIP uses snake_case for enums
  • Relay
    • does not use tag property
  • RewardAddress
    • CSL does not offer to_json
  • ScriptDataHash
  • ScriptHash
  • ScriptRef
    • does not use tag property
  • Transaction
  • TransactionBody
  • TransactionHash
  • TransactionInput
  • TransactionMetadata
    • CIP is incompatible with GeneralTransactionMetadata: uses key/value pairs
  • TransactionMetadatum
    • does not use tag property
  • TransactionOutput
    • plutus_data uses different format (tagged)
  • TransactionUnspentOutput
  • TransactionWitnessSet
    • rename vkeys field to vkeywitnesses
  • UInt32
  • UInt64
  • URL
  • UnitInterval
  • Update
  • VRFCert
    • output and proof fields must be hexstrings
  • VRFKeyHash
  • VRFVKey
  • Value
    • property names do not match
  • Vkeywitness

Conway era

TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions