Module: SolanaRuby::HttpMethods::BlockhashMethods
- Defined in:
- lib/solana_ruby/http_methods/blockhash_methods.rb
Overview
Blockhash Related HTTP Methods
Instance Method Summary collapse
- #get_fee_for_message(blockhash, options = { commitment: "processed" }) ⇒ Object
- #get_latest_blockhash ⇒ Object
- #get_latest_blockhash_and_context ⇒ Object
- #is_blockhash_valid?(blockhash, options = { commitment: "processed" }) ⇒ Boolean
Instance Method Details
#get_fee_for_message(blockhash, options = { commitment: "processed" }) ⇒ Object
17 18 19 20 21 |
# File 'lib/solana_ruby/http_methods/blockhash_methods.rb', line 17 def (blockhash, = { commitment: "processed" }) params = [blockhash, ] fee_for_blockhash_info = request("getFeeForMessage", params) fee_for_blockhash_info["result"] end |
#get_latest_blockhash ⇒ Object
7 8 9 10 |
# File 'lib/solana_ruby/http_methods/blockhash_methods.rb', line 7 def get_latest_blockhash recent_blockhash_info = get_latest_blockhash_and_context recent_blockhash_info["value"] end |
#get_latest_blockhash_and_context ⇒ Object
12 13 14 15 |
# File 'lib/solana_ruby/http_methods/blockhash_methods.rb', line 12 def get_latest_blockhash_and_context recent_blockhash_info = request("getLatestBlockhash") recent_blockhash_info["result"] end |
#is_blockhash_valid?(blockhash, options = { commitment: "processed" }) ⇒ Boolean
23 24 25 26 27 |
# File 'lib/solana_ruby/http_methods/blockhash_methods.rb', line 23 def is_blockhash_valid?(blockhash, = { commitment: "processed" }) params = [blockhash, ] blockhash_info = request("isBlockhashValid", params) blockhash_info["result"]["value"] end |