Commit graph

23 commits

Author SHA1 Message Date
Matthias Benkort
969d5612b7
refactor: Re-organize and clean-up pallas-primitives (#523)
* Re-organize and clean-up pallas-primitives

  Namely:

  - Move _common_ (i.e. era-independent) types and structures up to the
    `lib` module; to be shared across all eras. If any of those deviate
    in a subsequent era, it is easy to bring them down and define new
    types from the point of divergence onward. This simplifies the scope
    of each era-specific module and make them slightly easier to
    navigate.

    Note that, each era module still re-export all of the common types
    that's relevant to that particular era. So technically, this
    reorganization doesn't really change anything for callers/users of
    the library.

  - Rename `Scripthash` to `ScriptHash`. Before this commit, both
    actually existed as `ScriptHash` was introduced with the Conway era.
    Yet, they refer to the same thing, so the duplication is simply
    confusing.

  - Rename `One` / `Two` constructors for `NetworkId` to `Testnet` and
    `Mainnet` respectively. Also defined idiomatic `From` & `TryFrom`
    implementation for conversion to and from `u8`. This is a lot let
    confusing!

  - Generalize `PlutusScript` with a constant generic, to avoid
    repetition for each plutus script generated for specific version.
    Note that a distinction is still _necessary_ if we want to provie
    out-of-the-box serialisers for Plutus scripts, which are serialised
    with a tag prefix depending on the language. All else apart, they
    are strictly similar types.

  - Rename `CostMdls` to `CostModels`. Because, common.

  - Rename `plutus_script` to `plutus_v1_script` in the Alonzo's witness
    set, for consistency with other eras.

* Fix ordering of ScriptHash variants.

  This is an odd one. See the note.

* Bump minicbor to v0.25.1

* Add aliases with deprecation warnings to various fields and types.

* revert renaming plutus_script to plutus_v1_script in Alonzo witness

  See https://github.com/txpipe/pallas/pull/523#discussion_r1807329742
2024-10-22 08:57:21 -03:00
Santiago Carmuega
de88df1986
feat(traverse): introduce MultiEraValue (#516) 2024-10-01 09:46:58 -03:00
Santiago Carmuega
5a19c6858c
feat(interop): map u5c Conway structs (#511) 2024-09-06 21:12:27 -03:00
Santiago Carmuega
cd1beff822
feat(interop): implement u5c pparams mapping (#504) 2024-08-15 16:01:10 -03:00
Santiago Carmuega
c6621730eb
feat(interop): introduce field-mask context for u5c (#502) 2024-08-15 10:35:58 -03:00
Santiago Carmuega
3e2c657f20
fix(interop): skip conway certs in u5c (#498) 2024-08-03 10:46:14 -03:00
Santiago Carmuega
3dbd582207
chore(interop): update u5c spec to v0.8.0 (#493) 2024-07-28 19:48:43 -03:00
Lucas
4fbca7b8ce
fix(interop): map missing u5c redeemers (#490) 2024-07-15 21:47:25 -03:00
Santiago Carmuega
a85619623d
chore(interop): update u5c spec to v0.7.0 (#489) 2024-07-15 18:25:40 -03:00
Santiago Carmuega
1406d7a599
fix(interop): use correct input order to match redeemers (#487) 2024-07-14 13:48:05 -03:00
Santiago Carmuega
15538cd0bf
fix(interop): check for spend purpose when matching redeemers (#486) 2024-07-13 14:43:52 -03:00
Santiago Carmuega
1d23f80843
refactor(interop): use batching for utxorpc ledger interface (#472) 2024-06-09 21:01:59 -03:00
Santiago Carmuega
6387897ad3
refactor(interop): use stateful mapper for u5 (#460) 2024-05-17 20:54:33 -03:00
Santiago Carmuega
0bb407d691
chore: apply lint recommendations (#458) 2024-05-14 21:14:19 -03:00
aleksandar
810088a378
feat(interop): add ledger context for utxorpc mapping logic (#450)
Co-authored-by: Aleksandar Djuric <aleksandardjuric@alethea.io>
2024-05-14 07:19:04 -03:00
Santiago Carmuega
8fde4a5e11
feat(interop): re-export utxorpc spec to unify downstream versions (#448) 2024-04-18 22:40:40 -03:00
Harper
c31e773ce2
feat: add Conway 2024-03 CDDL conformity (#424) 2024-04-01 14:02:52 -03:00
Santiago Carmuega
78414b6ce8
chore: update utxorpc-spec to 0.3.0 (#399) 2024-02-11 14:38:26 -03:00
Clark Alesna
6fc4074c02
fix(utxorpc): map missing struct values (#387)
Tx hash and block height are now correctly mapped into the corresponding utxorpc structures.
2024-02-11 13:19:13 -03:00
Harper
afa397f4ea
fix: return witness objects for conway era multieratx (#346) 2024-01-02 07:17:40 -03:00
Santiago Carmuega
c74255fd10
chore: fix clippy warnings (#262) 2023-06-11 21:41:23 -03:00
Santiago Carmuega
227b903bcb
feat(interop): add block mapping to u5c (#261) 2023-06-11 21:31:39 -03:00
Santiago Carmuega
35dda4d40f
feat: introduce UTxO RPC interop (#260) 2023-06-10 22:52:48 -03:00