-
Notifications
You must be signed in to change notification settings - Fork 238
/
Copy pathrpc_get_txs_confirmations.go
48 lines (40 loc) · 1.45 KB
/
rpc_get_txs_confirmations.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package appmessage
// TxIDConfirmationsPair is an appmessage corresponding to
// its respective RPC message
type TxIDConfirmationsPair struct {
TxID string
Confirmations int64
}
// GetTxsConfirmationsRequestMessage is an appmessage corresponding to
// its respective RPC message
type GetTxsConfirmationsRequestMessage struct {
baseMessage
TxIDs []string
}
// Command returns the protocol command string for the message
func (msg *GetTxsConfirmationsRequestMessage) Command() MessageCommand {
return CmdGetTxsConfirmationsRequestMessage
}
// NewGetTxsConfirmationsRequest returns a instance of the message
func NewGetTxsConfirmationsRequest(txIDs []string) *GetTxsConfirmationsRequestMessage {
return &GetTxsConfirmationsRequestMessage{
TxIDs: txIDs,
}
}
// GetTxsConfirmationsResponseMessage is an appmessage corresponding to
// its respective RPC message
type GetTxsConfirmationsResponseMessage struct {
baseMessage
TxIDConfirmationsPairs []*TxIDConfirmationsPair
Error *RPCError
}
// Command returns the protocol command string for the message
func (msg *GetTxsConfirmationsResponseMessage) Command() MessageCommand {
return CmdGetTxsConfirmationsResponseMessage
}
// NewGetTxsConfirmationsResponse returns an instance of the message
func NewGetTxsConfirmationsResponse(txIDConfirmationsPairs []*TxIDConfirmationsPair) *GetTxsConfirmationsResponseMessage {
return &GetTxsConfirmationsResponseMessage{
TxIDConfirmationsPairs: txIDConfirmationsPairs,
}
}