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
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -17,26 +17,12 @@ package ledger
17
17
import (
18
18
"fmt"
19
19
20
- utxorpc "github.com/utxorpc/go-codegen/utxorpc/v1alpha/cardano "
20
+ "github.com/blinklabs-io/gouroboros/ledger/common "
21
21
)
22
22
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
40
26
41
27
func NewBlockFromCbor (blockType uint , data []byte ) (Block , error ) {
42
28
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