generated from mrz1836/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
interface.go
29 lines (24 loc) · 965 Bytes
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package nownodes
import "context"
// AddressService is the address related requests
type AddressService interface {
GetAddress(ctx context.Context, chain Blockchain, address string) (*AddressInfo, error)
}
// MempoolService is the mempool related requests
type MempoolService interface {
GetMempoolEntry(ctx context.Context, chain Blockchain, txID, id string) (*MempoolEntryResult, error)
}
// TransactionService is the transaction related requests
type TransactionService interface {
GetTransaction(ctx context.Context, chain Blockchain, txID string) (*TransactionInfo, error)
SendTransaction(ctx context.Context, chain Blockchain, txHex string) (*BroadcastResult, error)
SendRawTransaction(ctx context.Context, chain Blockchain, txHex, id string) (*BroadcastResult, error)
}
// ClientInterface is the client interface
type ClientInterface interface {
AddressService
MempoolService
TransactionService
HTTPClient() HTTPInterface
UserAgent() string
}