|
| 1 | +// Copyright 2025 Blink Labs Software |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +package ledger |
| 16 | + |
| 17 | +import "github.com/blinklabs-io/gouroboros/ledger/leios" |
| 18 | + |
| 19 | +// The below are compatibility types, constants, and functions for the Leios era |
| 20 | +// to keep existing code working after a refactor of the ledger package |
| 21 | + |
| 22 | +// Leios types |
| 23 | +type ( |
| 24 | + LeiosBlockHeader = leios.LeiosBlockHeader |
| 25 | + LeiosEndorderBlock = leios.LeiosEndorserBlock |
| 26 | + LeiosRankingBlock = leios.LeiosRankingBlock |
| 27 | + LeiosTransaction = leios.LeiosTransaction |
| 28 | + LeiosTransactionBody = leios.LeiosTransactionBody |
| 29 | + LeiosTransactionWitnessSet = leios.LeiosTransactionWitnessSet |
| 30 | + LeiosProtocolParameters = leios.LeiosProtocolParameters |
| 31 | + LeiosProtocolParameterUpdate = leios.LeiosProtocolParameterUpdate |
| 32 | +) |
| 33 | + |
| 34 | +// Leios constants |
| 35 | +const ( |
| 36 | + EraIdLeios = leios.EraIdLeios |
| 37 | + BlockTypeLeiosRanking = leios.BlockTypeLeiosRanking |
| 38 | + BlockTypeLeiosEndorser = leios.BlockTypeLeiosEndorser |
| 39 | + BlockHeaderTypeLeios = leios.BlockHeaderTypeLeios |
| 40 | + TxTypeLeios = leios.TxTypeLeios |
| 41 | +) |
| 42 | + |
| 43 | +// Leios functions |
| 44 | +var ( |
| 45 | + NewLeiosEndorserBlockFromCbor = leios.NewLeiosEndorserBlockFromCbor |
| 46 | + NewLeiosRankingBlockFromCbor = leios.NewLeiosRankingBlockFromCbor |
| 47 | + NewLeiosBlockHeaderFromCbor = leios.NewLeiosBlockHeaderFromCbor |
| 48 | + NewLeiosTransactionFromCbor = leios.NewLeiosTransactionFromCbor |
| 49 | + NewLeiosTransactionBodyFromCbor = leios.NewLeiosTransactionBodyFromCbor |
| 50 | +) |
0 commit comments