File tree Expand file tree Collapse file tree 2 files changed +26
-19
lines changed
Expand file tree Collapse file tree 2 files changed +26
-19
lines changed Original file line number Diff line number Diff line change 1- // Copyright 2023 Blink Labs Software
1+ // Copyright 2024 Blink Labs Software
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -17,26 +17,12 @@ package ledger
1717import (
1818 "fmt"
1919
20- utxorpc "github.com/utxorpc/go-codegen/utxorpc/v1alpha/cardano "
20+ "github.com/blinklabs-io/gouroboros/ledger/common "
2121)
2222
23- type Block interface {
24- BlockHeader
25- Type () int
26- Transactions () []Transaction
27- Utxorpc () * utxorpc.Block
28- }
29-
30- type BlockHeader interface {
31- Hash () string
32- PrevHash () string
33- BlockNumber () uint64
34- SlotNumber () uint64
35- IssuerVkey () IssuerVkey
36- BlockBodySize () uint64
37- Era () Era
38- Cbor () []byte
39- }
23+ // Compatibility aliases
24+ type Block = common.Block
25+ type BlockHeader = common.BlockHeader
4026
4127func NewBlockFromCbor (blockType uint , data []byte ) (Block , error ) {
4228 switch blockType {
Original file line number Diff line number Diff line change 1+ package common
2+
3+ import utxorpc "github.com/utxorpc/go-codegen/utxorpc/v1alpha/cardano"
4+
5+ type Block interface {
6+ BlockHeader
7+ Type () int
8+ Transactions () []Transaction
9+ Utxorpc () * utxorpc.Block
10+ }
11+
12+ type BlockHeader interface {
13+ Hash () string
14+ PrevHash () string
15+ BlockNumber () uint64
16+ SlotNumber () uint64
17+ IssuerVkey () IssuerVkey
18+ BlockBodySize () uint64
19+ Era () Era
20+ Cbor () []byte
21+ }
You can’t perform that action at this time.
0 commit comments