Class: Casper::Entity::BlockBody

Inherits:
Object
  • Object
show all
Defined in:
lib/entity/block_body.rb

Overview

BlockBody entity

Instance Method Summary collapse

Constructor Details

#initialize(body = {}) ⇒ BlockBody

Returns a new instance of BlockBody.

Parameters:

  • body (Hash) (defaults to: {})
  • [String] (Hash)

    a customizable set of options

  • [Array] (Hash)

    a customizable set of options



10
11
12
13
14
# File 'lib/entity/block_body.rb', line 10

def initialize(body =  {})
  @proposer = body[:proposer]
  @deploy_hashes = body[:deploy_hashes]
  @transfer_hashes = body[:transfer_hashes]
end

Instance Method Details

#get_deploy_hashesArray

Returns hex-encoded Deploy hashes.

Returns:

  • (Array)

    hex-encoded Deploy hashes.



23
24
25
# File 'lib/entity/block_body.rb', line 23

def get_deploy_hashes
  @deploy_hashes
end

#get_proposerString

Returns a hex-encoded cryptographic public key, including the algorithm tag prefix.

Returns:

  • (String)

    a hex-encoded cryptographic public key, including the algorithm tag prefix.



18
19
20
# File 'lib/entity/block_body.rb', line 18

def get_proposer
  @proposer
end

#get_transfer_hashesArray

Returns a vector of hex-encoded hashes identifying Transfers included in this block.

Returns:

  • (Array)

    a vector of hex-encoded hashes identifying Transfers included in this block.



29
30
31
# File 'lib/entity/block_body.rb', line 29

def get_transfer_hashes
  @transfer_hashes
end