Class: Beaconcha::Slot

Inherits:
Object
  • Object
show all
Defined in:
lib/beaconcha/slot.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, uri_base: nil) ⇒ Slot

Returns a new instance of Slot.



3
4
5
6
# File 'lib/beaconcha/slot.rb', line 3

def initialize(api_key: nil, uri_base: nil)
  Beaconcha.configuration.api_key = api_key if api_key
  Beaconcha.configuration.uri_base = uri_base if uri_base
end

Instance Method Details

#attestations(id:) ⇒ Object



12
13
14
# File 'lib/beaconcha/slot.rb', line 12

def attestations(id:)
  Beaconcha::Client.get(path: "/slot/#{id}/attestations")
end

#attesterslashings(id:) ⇒ Object



16
17
18
# File 'lib/beaconcha/slot.rb', line 16

def attesterslashings(id:)
  Beaconcha::Client.get(path: "/slot/#{id}/attesterslashings")
end

#deposits(id:) ⇒ Object



20
21
22
# File 'lib/beaconcha/slot.rb', line 20

def deposits(id:)
  Beaconcha::Client.get(path: "/slot/#{id}/deposits")
end

#proposerslashings(id:) ⇒ Object



24
25
26
# File 'lib/beaconcha/slot.rb', line 24

def proposerslashings(id:)
  Beaconcha::Client.get(path: "/slot/#{id}/proposerslashings")
end

#retrieve(id:) ⇒ Object



8
9
10
# File 'lib/beaconcha/slot.rb', line 8

def retrieve(id:)
  Beaconcha::Client.get(path: "/slot/#{id}")
end

#voluntaryexits(id:) ⇒ Object



28
29
30
# File 'lib/beaconcha/slot.rb', line 28

def voluntaryexits(id:)
  Beaconcha::Client.get(path: "/slot/#{id}/voluntaryexits")
end