-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathresources.go
More file actions
34 lines (28 loc) · 775 Bytes
/
resources.go
File metadata and controls
34 lines (28 loc) · 775 Bytes
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
package resources
import "github.com/multiversx/mx-chain-proxy-go/data"
type resourceApiResponse struct {
Error string `json:"error"`
Code data.ReturnCode `json:"code"`
}
// GetErrorMessage gets the error message
func (resource *resourceApiResponse) GetErrorMessage() string {
return resource.Error
}
// BlockSummary is an internal resource
type BlockSummary struct {
Nonce uint64
Hash string
PreviousBlockHash string
Timestamp int64
TimestampMs int64
}
// Currency is an internal resource
type Currency struct {
Symbol string `json:"symbol"`
Decimals int32 `json:"decimals"`
}
// BlockCoordinates is an API resource
type BlockCoordinates struct {
Nonce uint64 `json:"nonce"`
Hash string `json:"hash"`
}