// Retrieves a json representations of blocks.
Retrieves a json representations of blocks.
// Retrieves a json representations of blocks .
func Blocks(hashes []string) (map[string]map[string]string, error) {
	payload := map[string]interface{}{
		"hashes": hashes,
	}
	raw, err := client.call("blocks", payload)
	if err != nil {
		return nil, err
	}
	var r map[string]map[string]map[string]string
	if err = json.Unmarshal(raw, &r); err != nil {
		return nil, err
	}
	blocks, ok := r["blocks"]
	if !ok {
		return nil, errors.New("Response of blocks is empty")
	}
	return blocks, nil
}
func Blocks ( hashes [ ] string ) ( map [ string ] map [ string ] string , error ) { payload := map [ string ] interface { } { " " : hashes , } raw , err := client . call ( " " , payload ) if err != nil { return nil , err } var r map [ string ] map [ string ] map [ string ] string if err = json . Unmarshal ( raw , & r ) ; err != nil { return nil , err } blocks , ok := r [ " " ] if ! ok { return nil , errors . New ( " " ) } return blocks , nil }
Retrieves a json representations of blocks.
Retrieves a json representations of blocks .