Class: Privy::Models::BlockInfo

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/block_info.rb,
sig/privy/models/block_info.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(number:, timestamp:) ⇒ BlockInfo

Block metadata for a wallet transfer event.

Parameters:

  • number (Float)

    The block number.

  • timestamp (Float)

    The block timestamp.

  • number: (Float)
  • timestamp: (Float)


# File 'lib/privy/models/block_info.rb', line 18

Instance Attribute Details

#numberFloat

The block number.

Parameters:

  • value (Float)

Returns:

  • (Float)


10
# File 'lib/privy/models/block_info.rb', line 10

required :number, Float

#timestampFloat

The block timestamp.

Parameters:

  • value (Float)

Returns:

  • (Float)


16
# File 'lib/privy/models/block_info.rb', line 16

required :timestamp, Float

Instance Method Details

#to_hash{ number: Float, timestamp: Float }

Returns:

  • ({ number: Float, timestamp: Float })


12
# File 'sig/privy/models/block_info.rbs', line 12

def to_hash: -> { number: Float, timestamp: Float }