From 54615db0e38ad80f48746a411408260eae5cbeb5 Mon Sep 17 00:00:00 2001 From: Aurora Gaffney Date: Sun, 25 Aug 2024 16:18:56 -0500 Subject: [PATCH] chore: split ledger era compat types to separate files --- ledger/allegra.go | 42 ++++++++++ ledger/alonzo.go | 46 +++++++++++ ledger/babbage.go | 47 ++++++++++++ ledger/byron.go | 48 ++++++++++++ ledger/compat.go | 191 ---------------------------------------------- ledger/conway.go | 45 +++++++++++ ledger/mary.go | 47 ++++++++++++ ledger/shelley.go | 49 ++++++++++++ 8 files changed, 324 insertions(+), 191 deletions(-) create mode 100644 ledger/allegra.go create mode 100644 ledger/alonzo.go create mode 100644 ledger/babbage.go create mode 100644 ledger/byron.go create mode 100644 ledger/conway.go create mode 100644 ledger/mary.go create mode 100644 ledger/shelley.go diff --git a/ledger/allegra.go b/ledger/allegra.go new file mode 100644 index 00000000..57b15923 --- /dev/null +++ b/ledger/allegra.go @@ -0,0 +1,42 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/allegra" + +// The below are compatability types, constants, and functions for the Allegra era +// to keep existing code working after a refactor of the ledger package + +// Allegra types +type AllegraBlock = allegra.AllegraBlock +type AllegraTransaction = allegra.AllegraTransaction +type AllegraTransactionBody = allegra.AllegraTransactionBody +type AllegraProtocolParameters = allegra.AllegraProtocolParameters +type AllegraProtocolParameterUpdate = allegra.AllegraProtocolParameterUpdate + +// Allegra constants +const ( + EraIdAllegra = allegra.EraIdAllegra + BlockTypeAllegra = allegra.BlockTypeAllegra + BlockHeaderTypeAllegra = allegra.BlockHeaderTypeAllegra + TxTypeAllegra = allegra.TxTypeAllegra +) + +// Allegra functions +var ( + NewAllegraBlockFromCbor = allegra.NewAllegraBlockFromCbor + NewAllegraTransactionFromCbor = allegra.NewAllegraTransactionFromCbor + NewAllegraTransactionBodyFromCbor = allegra.NewAllegraTransactionBodyFromCbor +) diff --git a/ledger/alonzo.go b/ledger/alonzo.go new file mode 100644 index 00000000..55fa6b8a --- /dev/null +++ b/ledger/alonzo.go @@ -0,0 +1,46 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/alonzo" + +// The below are compatability types, constants, and functions for the Alonzo era +// to keep existing code working after a refactor of the ledger package + +// Alonzo types +type AlonzoBlock = alonzo.AlonzoBlock +type AlonzoBlockHeader = alonzo.AlonzoBlockHeader +type AlonzoTransaction = alonzo.AlonzoTransaction +type AlonzoTransactionBody = alonzo.AlonzoTransactionBody +type AlonzoTransactionOutput = alonzo.AlonzoTransactionOutput +type AlonzoTransactionWitnessSet = alonzo.AlonzoTransactionWitnessSet +type AlonzoProtocolParameters = alonzo.AlonzoProtocolParameters +type AlonzoProtocolParameterUpdate = alonzo.AlonzoProtocolParameterUpdate + +// Alonzo constants +const ( + EraIdAlonzo = alonzo.EraIdAlonzo + BlockTypeAlonzo = alonzo.BlockTypeAlonzo + BlockHeaderTypeAlonzo = alonzo.BlockHeaderTypeAlonzo + TxTypeAlonzo = alonzo.TxTypeAlonzo +) + +// Alonzo functions +var ( + NewAlonzoBlockFromCbor = alonzo.NewAlonzoBlockFromCbor + NewAlonzoTransactionFromCbor = alonzo.NewAlonzoTransactionFromCbor + NewAlonzoTransactionBodyFromCbor = alonzo.NewAlonzoTransactionBodyFromCbor + NewAlonzoTransactionOutputFromCbor = alonzo.NewAlonzoTransactionOutputFromCbor +) diff --git a/ledger/babbage.go b/ledger/babbage.go new file mode 100644 index 00000000..c351f974 --- /dev/null +++ b/ledger/babbage.go @@ -0,0 +1,47 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/babbage" + +// The below are compatability types, constants, and functions for the Babbage era +// to keep existing code working after a refactor of the ledger package + +// Babbage types +type BabbageBlock = babbage.BabbageBlock +type BabbageBlockHeader = babbage.BabbageBlockHeader +type BabbageTransaction = babbage.BabbageTransaction +type BabbageTransactionBody = babbage.BabbageTransactionBody +type BabbageTransactionOutput = babbage.BabbageTransactionOutput +type BabbageTransactionWitnessSet = babbage.BabbageTransactionWitnessSet +type BabbageProtocolParameters = babbage.BabbageProtocolParameters +type BabbageProtocolParameterUpdate = babbage.BabbageProtocolParameterUpdate + +// Babbage constants +const ( + EraIdBabbage = babbage.EraIdBabbage + BlockTypeBabbage = babbage.BlockTypeBabbage + BlockHeaderTypeBabbage = babbage.BlockHeaderTypeBabbage + TxTypeBabbage = babbage.TxTypeBabbage +) + +// Babbage functions +var ( + NewBabbageBlockFromCbor = babbage.NewBabbageBlockFromCbor + NewBabbageBlockHeaderFromCbor = babbage.NewBabbageBlockHeaderFromCbor + NewBabbageTransactionFromCbor = babbage.NewBabbageTransactionFromCbor + NewBabbageTransactionBodyFromCbor = babbage.NewBabbageTransactionBodyFromCbor + NewBabbageTransactionOutputFromCbor = babbage.NewBabbageTransactionOutputFromCbor +) diff --git a/ledger/byron.go b/ledger/byron.go new file mode 100644 index 00000000..0e4bbf5d --- /dev/null +++ b/ledger/byron.go @@ -0,0 +1,48 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/byron" + +// The below are compatability types, constants, and functions for the Byron era +// to keep existing code working after a refactor of the ledger package + +// Byron types +type ByronEpochBoundaryBlock = byron.ByronEpochBoundaryBlock +type ByronMainBlock = byron.ByronMainBlock +type ByronEpochBounaryBlockHeader = byron.ByronEpochBoundaryBlockHeader +type ByronMainBlockHeader = byron.ByronMainBlockHeader +type ByronTransaction = byron.ByronTransaction +type ByronTransactionInput = byron.ByronTransactionInput +type ByronTransactionOutput = byron.ByronTransactionOutput + +// Byron constants +const ( + EraIdByron = byron.EraIdByron + BlockTypeByronEbb = byron.BlockTypeByronEbb + BlockTypeByronMain = byron.BlockTypeByronMain + BlockHeaderTypeByron = byron.BlockHeaderTypeByron + TxTypeByron = byron.TxTypeByron +) + +// Byron functions +var ( + NewByronEpochBoundaryBlockFromCbor = byron.NewByronEpochBoundaryBlockFromCbor + NewByronMainBlockFromCbor = byron.NewByronMainBlockFromCbor + NewByronEpochBoundaryBlockHeaderFromCbor = byron.NewByronEpochBoundaryBlockHeaderFromCbor + NewByronMainBlockHeaderFromCbor = byron.NewByronMainBlockHeaderFromCbor + NewByronTransactionInput = byron.NewByronTransactionInput + NewByronTransactionFromCbor = byron.NewByronTransactionFromCbor +) diff --git a/ledger/compat.go b/ledger/compat.go index e1e58703..c1fb78b3 100644 --- a/ledger/compat.go +++ b/ledger/compat.go @@ -15,14 +15,7 @@ package ledger import ( - "github.com/blinklabs-io/gouroboros/ledger/allegra" - "github.com/blinklabs-io/gouroboros/ledger/alonzo" - "github.com/blinklabs-io/gouroboros/ledger/babbage" - "github.com/blinklabs-io/gouroboros/ledger/byron" "github.com/blinklabs-io/gouroboros/ledger/common" - "github.com/blinklabs-io/gouroboros/ledger/conway" - "github.com/blinklabs-io/gouroboros/ledger/mary" - "github.com/blinklabs-io/gouroboros/ledger/shelley" ) // The below are compatability types and functions to keep existing code working @@ -79,187 +72,3 @@ type AssetFingerprint = common.AssetFingerprint func NewAssetFingerprint(policyId []byte, assetName []byte) AssetFingerprint { return common.NewAssetFingerprint(policyId, assetName) } - -// Byron types -type ByronEpochBoundaryBlock = byron.ByronEpochBoundaryBlock -type ByronMainBlock = byron.ByronMainBlock -type ByronEpochBounaryBlockHeader = byron.ByronEpochBoundaryBlockHeader -type ByronMainBlockHeader = byron.ByronMainBlockHeader -type ByronTransaction = byron.ByronTransaction -type ByronTransactionInput = byron.ByronTransactionInput -type ByronTransactionOutput = byron.ByronTransactionOutput - -// Byron constants -const ( - EraIdByron = byron.EraIdByron - BlockTypeByronEbb = byron.BlockTypeByronEbb - BlockTypeByronMain = byron.BlockTypeByronMain - BlockHeaderTypeByron = byron.BlockHeaderTypeByron - TxTypeByron = byron.TxTypeByron -) - -// Byron functions -var ( - NewByronEpochBoundaryBlockFromCbor = byron.NewByronEpochBoundaryBlockFromCbor - NewByronMainBlockFromCbor = byron.NewByronMainBlockFromCbor - NewByronEpochBoundaryBlockHeaderFromCbor = byron.NewByronEpochBoundaryBlockHeaderFromCbor - NewByronMainBlockHeaderFromCbor = byron.NewByronMainBlockHeaderFromCbor - NewByronTransactionInput = byron.NewByronTransactionInput - NewByronTransactionFromCbor = byron.NewByronTransactionFromCbor -) - -// Shelley types -type ShelleyBlock = shelley.ShelleyBlock -type ShelleyBlockHeader = shelley.ShelleyBlockHeader -type ShelleyTransaction = shelley.ShelleyTransaction -type ShelleyTransactionBody = shelley.ShelleyTransactionBody -type ShelleyTransactionInput = shelley.ShelleyTransactionInput -type ShelleyTransactionOutput = shelley.ShelleyTransactionOutput -type ShelleyTransactionWitnessSet = shelley.ShelleyTransactionWitnessSet -type ShelleyProtocolParameters = shelley.ShelleyProtocolParameters -type ShelleyProtocolParameterUpdate = shelley.ShelleyProtocolParameterUpdate - -// Shelley constants -const ( - EraIdShelley = shelley.EraIdShelley - BlockTypeShelley = shelley.BlockTypeShelley - BlockHeaderTypeShelley = shelley.BlockHeaderTypeShelley - TxTypeShelley = shelley.TxTypeShelley -) - -// Shelley functions -var ( - NewShelleyBlockFromCbor = shelley.NewShelleyBlockFromCbor - NewShelleyBlockHeaderFromCbor = shelley.NewShelleyBlockHeaderFromCbor - NewShelleyTransactionInput = shelley.NewShelleyTransactionInput - NewShelleyTransactionFromCbor = shelley.NewShelleyTransactionFromCbor - NewShelleyTransactionBodyFromCbor = shelley.NewShelleyTransactionBodyFromCbor - NewShelleyTransactionOutputFromCbor = shelley.NewShelleyTransactionOutputFromCbor -) - -// Allegra types -type AllegraBlock = allegra.AllegraBlock -type AllegraTransaction = allegra.AllegraTransaction -type AllegraTransactionBody = allegra.AllegraTransactionBody -type AllegraProtocolParameters = allegra.AllegraProtocolParameters -type AllegraProtocolParameterUpdate = allegra.AllegraProtocolParameterUpdate - -// Allegra constants -const ( - EraIdAllegra = allegra.EraIdAllegra - BlockTypeAllegra = allegra.BlockTypeAllegra - BlockHeaderTypeAllegra = allegra.BlockHeaderTypeAllegra - TxTypeAllegra = allegra.TxTypeAllegra -) - -// Allegra functions -var ( - NewAllegraBlockFromCbor = allegra.NewAllegraBlockFromCbor - NewAllegraTransactionFromCbor = allegra.NewAllegraTransactionFromCbor - NewAllegraTransactionBodyFromCbor = allegra.NewAllegraTransactionBodyFromCbor -) - -// Mary types -type MaryBlock = mary.MaryBlock -type MaryBlockHeader = mary.MaryBlockHeader -type MaryTransaction = mary.MaryTransaction -type MaryTransactionBody = mary.MaryTransactionBody -type MaryTransactionOutput = mary.MaryTransactionOutput -type MaryTransactionOutputValue = mary.MaryTransactionOutputValue -type MaryTransactionWitnessSet = mary.MaryTransactionWitnessSet -type MaryProtocolParameters = mary.MaryProtocolParameters -type MaryProtocolParameterUpdate = mary.MaryProtocolParameterUpdate - -// Mary constants -const ( - EraIdMary = mary.EraIdMary - BlockTypeMary = mary.BlockTypeMary - BlockHeaderTypeMary = mary.BlockHeaderTypeMary - TxTypeMary = mary.TxTypeMary -) - -// Mary functions -var ( - NewMaryBlockFromCbor = mary.NewMaryBlockFromCbor - NewMaryTransactionFromCbor = mary.NewMaryTransactionFromCbor - NewMaryTransactionBodyFromCbor = mary.NewMaryTransactionBodyFromCbor - NewMaryTransactionOutputFromCbor = mary.NewMaryTransactionOutputFromCbor -) - -// Alonzo types -type AlonzoBlock = alonzo.AlonzoBlock -type AlonzoBlockHeader = alonzo.AlonzoBlockHeader -type AlonzoTransaction = alonzo.AlonzoTransaction -type AlonzoTransactionBody = alonzo.AlonzoTransactionBody -type AlonzoTransactionOutput = alonzo.AlonzoTransactionOutput -type AlonzoTransactionWitnessSet = alonzo.AlonzoTransactionWitnessSet -type AlonzoProtocolParameters = alonzo.AlonzoProtocolParameters -type AlonzoProtocolParameterUpdate = alonzo.AlonzoProtocolParameterUpdate - -// Alonzo constants -const ( - EraIdAlonzo = alonzo.EraIdAlonzo - BlockTypeAlonzo = alonzo.BlockTypeAlonzo - BlockHeaderTypeAlonzo = alonzo.BlockHeaderTypeAlonzo - TxTypeAlonzo = alonzo.TxTypeAlonzo -) - -// Alonzo functions -var ( - NewAlonzoBlockFromCbor = alonzo.NewAlonzoBlockFromCbor - NewAlonzoTransactionFromCbor = alonzo.NewAlonzoTransactionFromCbor - NewAlonzoTransactionBodyFromCbor = alonzo.NewAlonzoTransactionBodyFromCbor - NewAlonzoTransactionOutputFromCbor = alonzo.NewAlonzoTransactionOutputFromCbor -) - -// Babbage types -type BabbageBlock = babbage.BabbageBlock -type BabbageBlockHeader = babbage.BabbageBlockHeader -type BabbageTransaction = babbage.BabbageTransaction -type BabbageTransactionBody = babbage.BabbageTransactionBody -type BabbageTransactionOutput = babbage.BabbageTransactionOutput -type BabbageTransactionWitnessSet = babbage.BabbageTransactionWitnessSet -type BabbageProtocolParameters = babbage.BabbageProtocolParameters -type BabbageProtocolParameterUpdate = babbage.BabbageProtocolParameterUpdate - -// Babbage constants -const ( - EraIdBabbage = babbage.EraIdBabbage - BlockTypeBabbage = babbage.BlockTypeBabbage - BlockHeaderTypeBabbage = babbage.BlockHeaderTypeBabbage - TxTypeBabbage = babbage.TxTypeBabbage -) - -// Babbage functions -var ( - NewBabbageBlockFromCbor = babbage.NewBabbageBlockFromCbor - NewBabbageBlockHeaderFromCbor = babbage.NewBabbageBlockHeaderFromCbor - NewBabbageTransactionFromCbor = babbage.NewBabbageTransactionFromCbor - NewBabbageTransactionBodyFromCbor = babbage.NewBabbageTransactionBodyFromCbor - NewBabbageTransactionOutputFromCbor = babbage.NewBabbageTransactionOutputFromCbor -) - -// Conway types -type ConwayBlock = conway.ConwayBlock -type ConwayBlockHeader = conway.ConwayBlockHeader -type ConwayTransaction = conway.ConwayTransaction -type ConwayTransactionBody = conway.ConwayTransactionBody -type ConwayTransactionWitnessSet = conway.ConwayTransactionWitnessSet -type ConwayProtocolParameters = conway.ConwayProtocolParameters -type ConwayProtocolParameterUpdate = conway.ConwayProtocolParameterUpdate - -// Conway constants -const ( - EraIdConway = conway.EraIdConway - BlockTypeConway = conway.BlockTypeConway - BlockHeaderTypeConway = conway.BlockHeaderTypeConway - TxTypeConway = conway.TxTypeConway -) - -// Conway functions -var ( - NewConwayBlockFromCbor = conway.NewConwayBlockFromCbor - NewConwayBlockHeaderFromCbor = conway.NewConwayBlockHeaderFromCbor - NewConwayTransactionFromCbor = conway.NewConwayTransactionFromCbor - NewConwayTransactionBodyFromCbor = conway.NewConwayTransactionBodyFromCbor -) diff --git a/ledger/conway.go b/ledger/conway.go new file mode 100644 index 00000000..a3913857 --- /dev/null +++ b/ledger/conway.go @@ -0,0 +1,45 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/conway" + +// The below are compatability types, constants, and functions for the Conway era +// to keep existing code working after a refactor of the ledger package + +// Conway types +type ConwayBlock = conway.ConwayBlock +type ConwayBlockHeader = conway.ConwayBlockHeader +type ConwayTransaction = conway.ConwayTransaction +type ConwayTransactionBody = conway.ConwayTransactionBody +type ConwayTransactionWitnessSet = conway.ConwayTransactionWitnessSet +type ConwayProtocolParameters = conway.ConwayProtocolParameters +type ConwayProtocolParameterUpdate = conway.ConwayProtocolParameterUpdate + +// Conway constants +const ( + EraIdConway = conway.EraIdConway + BlockTypeConway = conway.BlockTypeConway + BlockHeaderTypeConway = conway.BlockHeaderTypeConway + TxTypeConway = conway.TxTypeConway +) + +// Conway functions +var ( + NewConwayBlockFromCbor = conway.NewConwayBlockFromCbor + NewConwayBlockHeaderFromCbor = conway.NewConwayBlockHeaderFromCbor + NewConwayTransactionFromCbor = conway.NewConwayTransactionFromCbor + NewConwayTransactionBodyFromCbor = conway.NewConwayTransactionBodyFromCbor +) diff --git a/ledger/mary.go b/ledger/mary.go new file mode 100644 index 00000000..36e50c8d --- /dev/null +++ b/ledger/mary.go @@ -0,0 +1,47 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/mary" + +// The below are compatability types, constants, and functions for the Mary era +// to keep existing code working after a refactor of the ledger package + +// Mary types +type MaryBlock = mary.MaryBlock +type MaryBlockHeader = mary.MaryBlockHeader +type MaryTransaction = mary.MaryTransaction +type MaryTransactionBody = mary.MaryTransactionBody +type MaryTransactionOutput = mary.MaryTransactionOutput +type MaryTransactionOutputValue = mary.MaryTransactionOutputValue +type MaryTransactionWitnessSet = mary.MaryTransactionWitnessSet +type MaryProtocolParameters = mary.MaryProtocolParameters +type MaryProtocolParameterUpdate = mary.MaryProtocolParameterUpdate + +// Mary constants +const ( + EraIdMary = mary.EraIdMary + BlockTypeMary = mary.BlockTypeMary + BlockHeaderTypeMary = mary.BlockHeaderTypeMary + TxTypeMary = mary.TxTypeMary +) + +// Mary functions +var ( + NewMaryBlockFromCbor = mary.NewMaryBlockFromCbor + NewMaryTransactionFromCbor = mary.NewMaryTransactionFromCbor + NewMaryTransactionBodyFromCbor = mary.NewMaryTransactionBodyFromCbor + NewMaryTransactionOutputFromCbor = mary.NewMaryTransactionOutputFromCbor +) diff --git a/ledger/shelley.go b/ledger/shelley.go new file mode 100644 index 00000000..30e99770 --- /dev/null +++ b/ledger/shelley.go @@ -0,0 +1,49 @@ +// Copyright 2024 Blink Labs Software +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ledger + +import "github.com/blinklabs-io/gouroboros/ledger/shelley" + +// The below are compatability types, constants, and functions for the Shelley era +// to keep existing code working after a refactor of the ledger package + +// Shelley types +type ShelleyBlock = shelley.ShelleyBlock +type ShelleyBlockHeader = shelley.ShelleyBlockHeader +type ShelleyTransaction = shelley.ShelleyTransaction +type ShelleyTransactionBody = shelley.ShelleyTransactionBody +type ShelleyTransactionInput = shelley.ShelleyTransactionInput +type ShelleyTransactionOutput = shelley.ShelleyTransactionOutput +type ShelleyTransactionWitnessSet = shelley.ShelleyTransactionWitnessSet +type ShelleyProtocolParameters = shelley.ShelleyProtocolParameters +type ShelleyProtocolParameterUpdate = shelley.ShelleyProtocolParameterUpdate + +// Shelley constants +const ( + EraIdShelley = shelley.EraIdShelley + BlockTypeShelley = shelley.BlockTypeShelley + BlockHeaderTypeShelley = shelley.BlockHeaderTypeShelley + TxTypeShelley = shelley.TxTypeShelley +) + +// Shelley functions +var ( + NewShelleyBlockFromCbor = shelley.NewShelleyBlockFromCbor + NewShelleyBlockHeaderFromCbor = shelley.NewShelleyBlockHeaderFromCbor + NewShelleyTransactionInput = shelley.NewShelleyTransactionInput + NewShelleyTransactionFromCbor = shelley.NewShelleyTransactionFromCbor + NewShelleyTransactionBodyFromCbor = shelley.NewShelleyTransactionBodyFromCbor + NewShelleyTransactionOutputFromCbor = shelley.NewShelleyTransactionOutputFromCbor +)