Module: Solana::Ruby::Kit::Rpc::Api::GetBlockTime
- Extended by:
- T::Helpers, T::Sig
- Included in:
- Client
- Defined in:
- lib/solana/ruby/kit/rpc/api/get_block_time.rb
Overview
Returns the estimated production time of a block. Mirrors TypeScript's GetBlockTimeApi.getBlockTime.
Instance Method Summary collapse
Instance Method Details
#get_block_time(slot) ⇒ Object
18 19 20 21 |
# File 'lib/solana/ruby/kit/rpc/api/get_block_time.rb', line 18 def get_block_time(slot) raw = transport.request('getBlockTime', [slot]) raw.nil? ? nil : Kernel.Integer(raw) end |