crossover
This commit is contained in:
15
backend-go/internal/protocols/ethereum/observer.go
Normal file
15
backend-go/internal/protocols/ethereum/observer.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package ethereum
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/kjannette/koin-ping/backend-go/internal/domain"
|
||||
)
|
||||
|
||||
// EthereumObserver defines the interface for blockchain interaction.
|
||||
// Any concrete implementation (JSON-RPC, WebSocket, mock) must satisfy this.
|
||||
type EthereumObserver interface {
|
||||
GetLatestBlockNumber(ctx context.Context) (int, error)
|
||||
GetBlockTransactions(ctx context.Context, blockNumber int) ([]domain.NormalizedTx, error)
|
||||
GetBalance(ctx context.Context, address string) (string, error)
|
||||
}
|
||||
Reference in New Issue
Block a user