diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml index 347e552..3f7911c 100644 --- a/.github/workflows/specs.yml +++ b/.github/workflows/specs.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - ruby-version: ['3.1', '3.2'] + ruby-version: ['3.2'] steps: - uses: actions/checkout@v4 diff --git a/.ruby-version b/.ruby-version index 0aec50e..f15386a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.4 +3.2.10 diff --git a/.yardoc/checksums b/.yardoc/checksums index 964175b..7aae3e4 100644 --- a/.yardoc/checksums +++ b/.yardoc/checksums @@ -1,12 +1,13 @@ +README.md 0e2df2c668a20fd23ab54a352eb632bf274456c6 +lib/generators/solana_rpc_ruby/install_generator.rb be08023f5bd5713af079d750318c01949285edc1 +lib/generators/templates/solana_rpc_ruby_config.rb 614dfbb52b39499ebb8becce868dfe932ee37f6c lib/solana_rpc_ruby.rb 66c68256a6f5d5af498845a7a332a1ba9a7e8a15 -lib/solana_rpc_ruby/version.rb 3c52ea753d0503dd7d0e09754eb4a1fb6c1008eb -lib/solana_rpc_ruby/response.rb 1b96e3ac9c672907920e72b22ec817fde6e31feb -lib/solana_rpc_ruby/api_error.rb 7ef5dccd1b997cb03dc29e90791ecaf23161563e lib/solana_rpc_ruby/api_client.rb 8a5da83a4fa99887e3c130c05b990d633a92f0dd +lib/solana_rpc_ruby/api_error.rb 7ef5dccd1b997cb03dc29e90791ecaf23161563e +lib/solana_rpc_ruby/helper_methods.rb 97fc86b808eb2c985171bce78aa21d3df5e8f715 +lib/solana_rpc_ruby/methods_wrapper.rb d79a07678772e5dfb86982bf13bf324a1daa3d73 lib/solana_rpc_ruby/request_body.rb e77127adb2eb1a8e063d8b3b63dfd57e9be4d9f8 -lib/solana_rpc_ruby/helper_methods.rb b7cc271c0e7bf646c204cc659c7cb1fa1695f93d -lib/solana_rpc_ruby/methods_wrapper.rb 90580dccd7637802dc84c37f1357b331b9ca4683 +lib/solana_rpc_ruby/response.rb 1b96e3ac9c672907920e72b22ec817fde6e31feb +lib/solana_rpc_ruby/version.rb a0bfad180d7c0c689388b5b197b1cbfb38dfee85 lib/solana_rpc_ruby/websocket_client.rb f29146a845db1797d8c4bb0e4d065dbd84190f9d -lib/solana_rpc_ruby/websocket_methods_wrapper.rb 4d073503a5451c38b7d47fcc74f96048777cbf93 -lib/generators/templates/solana_rpc_ruby_config.rb 614dfbb52b39499ebb8becce868dfe932ee37f6c -lib/generators/solana_rpc_ruby/install_generator.rb be08023f5bd5713af079d750318c01949285edc1 +lib/solana_rpc_ruby/websocket_methods_wrapper.rb 19487674c8a23db31eb7a5ecfe3999a8886eb98b diff --git a/.yardoc/object_types b/.yardoc/object_types index 14e7af9..5521bcb 100644 Binary files a/.yardoc/object_types and b/.yardoc/object_types differ diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat index 2a0998d..7c0a0a5 100644 Binary files a/.yardoc/objects/root.dat and b/.yardoc/objects/root.dat differ diff --git a/Gemfile.lock b/Gemfile.lock index 8969f3d..e56dcef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,51 +66,61 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) base64 (0.3.0) - bigdecimal (3.2.3) + bigdecimal (4.0.1) builder (3.3.0) codecov (0.6.0) simplecov (>= 0.15, < 0.22) coderay (1.1.3) - concurrent-ruby (1.3.5) - crack (1.0.0) + concurrent-ruby (1.3.6) + crack (1.0.1) bigdecimal rexml crass (1.0.6) - date (3.4.1) + date (3.5.1) diff-lcs (1.6.2) docile (1.4.1) dotenv (2.8.1) + drb (2.2.3) erubi (1.13.1) eventmachine (1.2.7) faye-websocket (0.12.0) eventmachine (>= 0.12.0) websocket-driver (>= 0.8.0) - globalid (1.2.1) + globalid (1.3.0) activesupport (>= 6.1) hashdiff (1.2.1) - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - json (2.13.2) + io-console (0.8.2) + json (2.19.1) + json-schema (6.2.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) - loofah (2.24.1) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.4) + marcel (1.1.0) + mcp (0.8.0) + json-schema (>= 4.1) method_source (1.1.0) mini_mime (1.1.5) - minitest (5.25.5) - net-imap (0.5.10) + minitest (6.0.2) + drb (~> 2.0) + prism (~> 1.5) + net-imap (0.6.3) date net-protocol net-pop (0.1.2) @@ -119,22 +129,23 @@ GEM timeout net-smtp (0.5.1) net-protocol - nio4r (2.7.4) - nokogiri (1.18.10-arm64-darwin) + nio4r (2.7.5) + nokogiri (1.19.1-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.19.1-x86_64-linux-gnu) racc (~> 1.4) parallel (1.27.0) - parser (3.3.9.0) + parser (3.3.10.2) ast (~> 2.4.1) racc - prism (1.5.1) - pry (0.15.2) + prism (1.9.0) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (6.0.2) + reline (>= 0.6.0) + public_suffix (7.0.5) racc (1.8.1) - rack (2.2.17) + rack (2.2.22) rack-test (2.2.0) rack (>= 1.3) rails (6.1.7.10) @@ -156,8 +167,8 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (6.1.7.10) actionpack (= 6.1.7.10) @@ -166,19 +177,21 @@ GEM rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) - rake (13.3.0) + rake (13.3.1) regexp_parser (2.11.3) + reline (0.6.3) + io-console (~> 0.5) rexml (3.4.4) - rspec (3.13.1) + rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.5) + rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.5) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (4.1.2) @@ -189,31 +202,32 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.13.5) - rubocop (1.80.2) + rspec-support (3.13.7) + rubocop (1.85.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.46.0, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.46.0) + rubocop-ast (1.49.0) parser (>= 3.3.7.2) - prism (~> 1.4) + prism (~> 1.7) rubocop-capybara (2.22.1) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) - rubocop-factory_bot (2.27.1) + rubocop-factory_bot (2.28.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) - rubocop-performance (1.26.0) + rubocop-performance (1.26.1) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.44.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) rubocop-rspec (2.31.0) rubocop (~> 1.40) rubocop-capybara (~> 2.17) @@ -236,16 +250,15 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - thor (1.4.0) - timeout (0.4.3) + thor (1.5.0) + timeout (0.6.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) - vcr (6.3.1) - base64 - webmock (3.25.1) + unicode-emoji (4.2.0) + vcr (6.4.0) + webmock (3.26.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -253,10 +266,10 @@ GEM base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.5) PLATFORMS - arm64-darwin-24 + arm64-darwin-25 x86_64-linux DEPENDENCIES @@ -277,4 +290,4 @@ DEPENDENCIES webmock (~> 3.13) BUNDLED WITH - 2.3.26 + 2.4.19 diff --git a/README.md b/README.md index 3755bce..01af04f 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ ![Stars](https://img.shields.io/github/stars/Block-Logic/solana-rpc-ruby.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) # solana_rpc_ruby -A Solana RPC Client for Ruby. This gem provides a wrapper methods for Solana RPC JSON API https://docs.solana.com/developing/clients/jsonrpc-api. +A Solana RPC Client for Ruby. This gem provides a wrapper methods for Solana RPC JSON API https://solana.com/docs/rpc. ## Getting started ### Requirements -This gem requires Ruby 2.7+ (as denoted in the `.ruby-version` file) and it has Rails 6.0+ on board. It MIGHT work with lower versions, but was not tested with them. +This gem requires Ruby 3.2+ (as denoted in the `.ruby-version` file) and it has Rails 6.0+ on board. It MIGHT work with lower versions, but was not tested with them. Add the following line to your Gemfile: @@ -198,9 +198,36 @@ Gem is coming with demo scripts that you can run and test API and Websockets. 3. Run `ruby demo.rb` or `ruby demo_ws_METHOD.rb` to see example output. 4. Check the gem or Solana JSON RPC API docs to get more information about method usage and modify demo scripts loosely. +### Method lists + +#### HTTP methods (`SolanaRpcRuby::MethodsWrapper`) +Current methods: +`get_account_info`, `get_balance`, `get_block`, `get_block_height`, `get_block_production`, `get_block_commitment`, +`get_blocks`, `get_blocks_with_limit`, `get_block_time`, `get_cluster_nodes`, `get_epoch_info`, `get_epoch_schedule`, +`get_fee_for_message`, `get_first_available_block`, `get_genesis_hash`, `get_health`, `get_highest_snapshot_slot`, +`get_identity`, `get_inflation_governor`, `get_inflation_rate`, `get_inflation_reward`, `get_largest_accounts`, +`get_latest_blockhash`, `get_leader_schedule`, `get_max_retransmit_slot`, `get_max_shred_insert_slot`, +`get_minimum_balance_for_rent_exemption`, `get_multiple_accounts`, `get_program_accounts`, +`get_recent_performance_samples`, `get_recent_prioritization_fees`, `get_signatures_for_address`, `get_signature_statuses`, `get_slot`, +`get_slot_leader`, `get_slot_leaders`, `get_stake_activation`, `get_stake_minimum_delegation`, `get_supply`, +`get_token_account_balance`, `get_token_accounts_by_delegate`, `get_token_accounts_by_owner`, +`get_token_largest_accounts`, `get_token_supply`, `get_transaction`, `get_transaction_count`, `get_version`, +`get_vote_accounts`, `is_blockhash_valid`, `minimum_ledger_slot`, `request_airdrop`, `send_transaction`, +`simulate_transaction`. + +Deprecated compatibility methods: +`get_confirmed_blocks`, `get_fee_calculator_for_blockhash`, `get_fee_rate_governor`, `get_fees`, +`get_recent_blockhash`, `get_snapshot_slot`. + +#### Websocket methods (`SolanaRpcRuby::WebsocketsMethodsWrapper`) +`account_subscribe`, `account_unsubscribe`, `block_subscribe`, `block_unsubscribe`, `logs_subscribe`, +`logs_unsubscribe`, `program_subscribe`, `program_unsubscribe`, `signature_subscribe`, `signature_unsubscribe`, +`slot_subscribe`, `slot_unsubscribe`, `slots_updates_subscribe`, `slots_updates_unsubscribe`, `root_subscribe`, +`root_unsubscribe`, `vote_subscribe`, `vote_unsubscribe`. + All info about methods you can find in the docs on: https://www.rubydoc.info/github/Block-Logic/solana-rpc-ruby/main/SolanaRpcRuby -Also, as a reference you can use docs from solana: https://docs.solana.com/developing/clients/jsonrpc-api +Also, as a reference you can use docs from solana: https://solana.com/docs/rpc ## License Copyright (c) [Block Logic Team]. License type is [MIT](https://github.com/Block-Logic/solana-rpc-ruby/blob/main/LICENSE). diff --git a/doc/SolanaRpcRuby.html b/doc/SolanaRpcRuby.html index 6ce6ef9..23ef799 100644 --- a/doc/SolanaRpcRuby.html +++ b/doc/SolanaRpcRuby.html @@ -6,7 +6,7 @@ Module: SolanaRpcRuby - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -79,7 +79,7 @@
Defined in:
lib/solana_rpc_ruby.rb,
- lib/solana_rpc_ruby/version.rb,
lib/solana_rpc_ruby/response.rb,
lib/solana_rpc_ruby/api_error.rb,
lib/solana_rpc_ruby/api_client.rb,
lib/solana_rpc_ruby/request_body.rb,
lib/solana_rpc_ruby/helper_methods.rb,
lib/solana_rpc_ruby/methods_wrapper.rb,
lib/solana_rpc_ruby/websocket_client.rb,
lib/solana_rpc_ruby/websocket_methods_wrapper.rb,
lib/generators/solana_rpc_ruby/install_generator.rb
+ lib/generators/solana_rpc_ruby/install_generator.rb,
lib/solana_rpc_ruby/api_client.rb,
lib/solana_rpc_ruby/api_error.rb,
lib/solana_rpc_ruby/helper_methods.rb,
lib/solana_rpc_ruby/methods_wrapper.rb,
lib/solana_rpc_ruby/request_body.rb,
lib/solana_rpc_ruby/response.rb,
lib/solana_rpc_ruby/version.rb,
lib/solana_rpc_ruby/websocket_client.rb,
lib/solana_rpc_ruby/websocket_methods_wrapper.rb
@@ -120,7 +120,7 @@

VERSION =
-
'1.3.1'
+
'2.0.0'
@@ -543,9 +543,9 @@

diff --git a/doc/SolanaRpcRuby/ApiClient.html b/doc/SolanaRpcRuby/ApiClient.html index 5552014..b8a67af 100644 --- a/doc/SolanaRpcRuby/ApiClient.html +++ b/doc/SolanaRpcRuby/ApiClient.html @@ -6,7 +6,7 @@ Class: SolanaRpcRuby::ApiClient - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -628,9 +628,9 @@

diff --git a/doc/SolanaRpcRuby/ApiError.html b/doc/SolanaRpcRuby/ApiError.html index c490931..37e1101 100644 --- a/doc/SolanaRpcRuby/ApiError.html +++ b/doc/SolanaRpcRuby/ApiError.html @@ -6,7 +6,7 @@ Exception: SolanaRpcRuby::ApiError - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -427,9 +427,9 @@

diff --git a/doc/SolanaRpcRuby/Generators.html b/doc/SolanaRpcRuby/Generators.html index 01603e0..1d5707a 100644 --- a/doc/SolanaRpcRuby/Generators.html +++ b/doc/SolanaRpcRuby/Generators.html @@ -6,7 +6,7 @@ Module: SolanaRpcRuby::Generators - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -105,9 +105,9 @@

Defined Under Namespace

diff --git a/doc/SolanaRpcRuby/Generators/InstallGenerator.html b/doc/SolanaRpcRuby/Generators/InstallGenerator.html index 7f476ef..7dd67c7 100644 --- a/doc/SolanaRpcRuby/Generators/InstallGenerator.html +++ b/doc/SolanaRpcRuby/Generators/InstallGenerator.html @@ -6,7 +6,7 @@ Class: SolanaRpcRuby::Generators::InstallGenerator - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -183,9 +183,9 @@

diff --git a/doc/SolanaRpcRuby/HelperMethods.html b/doc/SolanaRpcRuby/HelperMethods.html index 1e3821b..952642b 100644 --- a/doc/SolanaRpcRuby/HelperMethods.html +++ b/doc/SolanaRpcRuby/HelperMethods.html @@ -6,7 +6,7 @@ Module: SolanaRpcRuby::HelperMethods - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -241,7 +241,7 @@

raise ArgumentError, 'Object must be a String, Array or Hash or Integer or nil class.' end - object.nil? || object.try(:empty?) + object.nil? || (object.respond_to?(:empty?) && object.empty?) end @@ -330,9 +330,9 @@

diff --git a/doc/SolanaRpcRuby/MethodsWrapper.html b/doc/SolanaRpcRuby/MethodsWrapper.html index ccda24e..4a52f2c 100644 --- a/doc/SolanaRpcRuby/MethodsWrapper.html +++ b/doc/SolanaRpcRuby/MethodsWrapper.html @@ -6,7 +6,7 @@ Class: SolanaRpcRuby::MethodsWrapper - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -529,7 +529,7 @@

-

Returns epoch schedule information from this cluster's genesis config.

+

Returns epoch schedule information from this cluster’s genesis config.

@@ -1060,6 +1060,30 @@

Returns a list of recent performance samples, in reverse slot order.

+ + + +
  • + + + #get_recent_prioritization_fees(addresses = []) ⇒ Response, ApiError + + + + + + + + + + + + + +
    +

    Returns a list of prioritization fees from recent blocks.

    +
    +
  • @@ -1228,6 +1252,30 @@

    Returns epoch activation information for a stake account.

    + + + +
  • + + + #get_stake_minimum_delegation(commitment: nil) ⇒ Response, ApiError + + + + + + + + + + + + + +
    +

    Returns the stake minimum delegation, in lamports.

    +
    +
  • @@ -1378,7 +1426,7 @@

  • - #get_transaction(transaction_signature, encoding: '', commitment: nil) ⇒ Response, ApiError + #get_transaction(transaction_signature, encoding: '', commitment: nil, max_supported_transaction_version: nil) ⇒ Response, ApiError @@ -3307,24 +3355,24 @@

     
     
    -1372
    -1373
    -1374
    -1375
    -1376
    -1377
    -1378
    -1379
    -1380
    -1381
    -1382
    -1383
    -1384
    -1385
    -1386
    +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1372
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1416
     
     def get_confirmed_blocks(start_slot, end_slot: nil)
       warn 'DEPRECATED: Please use getBlocks instead. This method is expected to be removed in solana-core v1.8'
    @@ -3465,7 +3513,7 @@ 

    -

    Returns epoch schedule information from this cluster's genesis config

    +

    Returns epoch schedule information from this cluster’s genesis config

    @@ -3611,27 +3659,27 @@

     
     
    -1398
    -1399
    -1400
    -1401
    -1402
    -1403
    -1404
    -1405
    -1406
    -1407
    -1408
    -1409
    -1410
    -1411
    -1412
    -1413
    -1414
    -1415
    +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1398
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1442
     
     def get_fee_calculator_for_blockhash(query_blockhash, commitment: nil)
       warn "DEPRECATED: Please use isBlockhashValid or getFeeForMessage instead. This method is expected to be removed in solana-core v2.0"
    @@ -3830,19 +3878,19 @@ 

     
     
    -1424
    -1425
    -1426
    -1427
    -1428
    -1429
    -1430
    -1431
    -1432
    -1433
    +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1424
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1468
     
     def get_fee_rate_governor
       warn "DEPRECATED Please check solana docs for substitution."
    @@ -3930,25 +3978,25 @@ 

     
     
    -1445
    -1446
    -1447
    -1448
    -1449
    -1450
    -1451
    -1452
    -1453
    -1454
    -1455
    -1456
    -1457
    -1458
    -1459
    -1460
    +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1445
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1489
     
     def get_fees(commitment: nil)
       warn "DEPRECATED: Please use getFeeForMessage instead This method is expected to be removed in solana-core v2.0"
    @@ -5014,7 +5062,10 @@ 

    570 571 572 -573

    +573 +574 +575 +576
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 557
    @@ -5026,11 +5077,14 @@ 

    params = [] params_hash = {} - params_hash['epoch'] = epoch unless epoch.nil? params_hash['identity'] = identity unless identity.empty? params_hash['commitment'] = commitment unless blank?(commitment) - params << params_hash unless params_hash.empty? + params << epoch unless epoch.nil? + unless params_hash.empty? + params << nil if epoch.nil? + params << params_hash + end body = create_json_body(method, method_params: params) @@ -5092,17 +5146,17 @@

     
     
    -580
    -581
    -582
     583
     584
     585
     586
    -587
    +587 +588 +589 +590

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 580
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 583
     
     def get_max_retransmit_slot
       http_method = :post
    @@ -5168,17 +5222,17 @@ 

     
     
    -593
    -594
    -595
     596
     597
     598
     599
    -600
    +600 +601 +602 +603

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 593
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 596
     
     def get_max_shred_insert_slot
       http_method = :post
    @@ -5272,9 +5326,6 @@ 

    -610 -611 -612 613 614 615 @@ -5290,10 +5341,13 @@

    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 610 +
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 613
     
     def get_minimum_balance_for_rent_exemption(
           ,
    @@ -5457,9 +5511,6 @@ 

     
     
    -642
    -643
    -644
     645
     646
     647
    @@ -5479,10 +5530,13 @@ 

    661 662 663 -664

    +664 +665 +666 +667

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 642
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 645
     
     def get_multiple_accounts(
           pubkeys,
    @@ -5715,9 +5769,6 @@ 

     
     
    -685
    -686
    -687
     688
     689
     690
    @@ -5741,10 +5792,13 @@ 

    708 709 710 -711

    +711 +712 +713 +714

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 685
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 688
     
     def get_program_accounts(
           pubkey,
    @@ -5846,25 +5900,25 @@ 

     
     
    -1472
    -1473
    -1474
    -1475
    -1476
    -1477
    -1478
    -1479
    -1480
    -1481
    -1482
    -1483
    -1484
    -1485
    -1486
    -1487
    +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1472
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1516
     
     def get_recent_blockhash(commitment: nil)
       warn "DEPRECATED: Please use getFeeForMessage instead This method is expected to be removed in solana-core v2.0"
    @@ -5955,9 +6009,6 @@ 

     
     
    -721
    -722
    -723
     724
     725
     726
    @@ -5966,10 +6017,13 @@ 

    729 730 731 -732

    +732 +733 +734 +735

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 721
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 724
     
     def get_recent_performance_samples(limit: nil)
       http_method = :post
    @@ -5986,6 +6040,110 @@ 

    + + +
    +

    + + #get_recent_prioritization_fees(addresses = []) ⇒ Response, ApiError + + + + + +

    +
    + +

    Returns a list of prioritization fees from recent blocks.

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + addresses + + + (Array<String>) + + + (defaults to: []) + + + — +
      +

      up to 128 account addresses

      +
      + +
    • + +
    + +

    Returns:

    +
      + +
    • + + + (Response, ApiError) + + + + — +
      +

      Response when success, ApiError on failure.

      +
      + +
    • + +
    + +

    See Also:

    + + +
    + + + + +
    +
    +
    +
    +1370
    +1371
    +1372
    +1373
    +1374
    +1375
    +1376
    +1377
    +1378
    +1379
    +1380
    +
    +
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1370
    +
    +def get_recent_prioritization_fees(addresses = [])
    +  http_method = :post
    +  method = create_method_name(__method__)
    +
    +  params = []
    +  params << addresses unless addresses.empty?
    +
    +  body = create_json_body(method, method_params: params)
    +
    +  send_request(body, http_method)
    +end
    +
    @@ -6067,9 +6225,6 @@

     
     
    -785
    -786
    -787
     788
     789
     790
    @@ -6085,10 +6240,13 @@ 

    800 801 802 -803

    +803 +804 +805 +806

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 785
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 788
     
     def get_signature_statuses(
           transaction_signatures,
    @@ -6234,9 +6392,6 @@ 

     
     
    -748
    -749
    -750
     751
     752
     753
    @@ -6258,10 +6413,13 @@ 

    769 770 771 -772

    +772 +773 +774 +775

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 748
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 751
     
     def get_signatures_for_address(
           ,
    @@ -6361,9 +6519,6 @@ 

     
     
    -812
    -813
    -814
     815
     816
     817
    @@ -6375,10 +6530,13 @@ 

    823 824 825 -826

    +826 +827 +828 +829

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 812
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 815
     
     def get_slot(commitment: nil)
       http_method = :post
    @@ -6468,9 +6626,6 @@ 

     
     
    -835
    -836
    -837
     838
     839
     840
    @@ -6482,10 +6637,13 @@ 

    846 847 848 -849

    +849 +850 +851 +852

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 835
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 838
     
     def get_slot_leader(commitment: nil)
       http_method = :post
    @@ -6584,19 +6742,19 @@ 

     
     
    -859
    -860
    -861
     862
     863
     864
     865
     866
     867
    -868
    +868 +869 +870 +871

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 859
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 862
     
     def get_slot_leaders(start_slot, limit)
       http_method = :post
    @@ -6667,18 +6825,18 @@ 

     
     
    -1496
    -1497
    -1498
    -1499
    -1500
    -1501
    -1502
    -1503
    -1504
    +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1496
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1540
     
     def get_snapshot_slot
       warn "DEPRECATED: Please use getHighestSnapshotSlot instead This method is expected to be removed in solana-core v2.0"
    @@ -6786,9 +6944,6 @@ 

     
     
    -879
    -880
    -881
     882
     883
     884
    @@ -6802,10 +6957,13 @@ 

    892 893 894 -895

    +895 +896 +897 +898

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 879
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 882
     
     def get_stake_activation(pubkey, commitment: nil, epoch: nil)
       http_method = :post
    @@ -6827,6 +6985,109 @@ 

    + + +
    +

    + + #get_stake_minimum_delegation(commitment: nil) ⇒ Response, ApiError + + + + + +

    +
    + +

    Returns the stake minimum delegation, in lamports.

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + commitment + + + (String) + + + (defaults to: nil) + + +
    • + +
    + +

    Returns:

    +
      + +
    • + + + (Response, ApiError) + + + + — +
      +

      Response when success, ApiError on failure.

      +
      + +
    • + +
    + +

    See Also:

    + + +
    + + + + +
    +
    +
    +
    +1389
    +1390
    +1391
    +1392
    +1393
    +1394
    +1395
    +1396
    +1397
    +1398
    +1399
    +1400
    +1401
    +
    +
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1389
    +
    +def get_stake_minimum_delegation(commitment: nil)
    +  http_method = :post
    +  method = create_method_name(__method__)
    +
    +  params = []
    +  params_hash = {}
    +  params_hash['commitment'] = commitment unless blank?(commitment)
    +  params << params_hash unless params_hash.empty?
    +
    +  body = create_json_body(method, method_params: params)
    +
    +  send_request(body, http_method)
    +end
    +
    @@ -6910,9 +7171,6 @@

     
     
    -905
    -906
    -907
     908
     909
     910
    @@ -6926,10 +7184,13 @@ 

    918 919 920 -921

    +921 +922 +923 +924

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 905
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 908
     
     def get_supply(commitment: nil, exclude_non_circulating_accounts_list: nil)
       http_method = :post
    @@ -6939,7 +7200,7 @@ 

    params_hash = {} params_hash['commitment'] = commitment unless blank?(commitment) - params_hash['exclude_non_circulating_accounts_list'] = exclude_non_circulating_accounts_list \ + params_hash['excludeNonCirculatingAccountsList'] = exclude_non_circulating_accounts_list \ unless exclude_non_circulating_accounts_list.nil? params << params_hash unless params_hash.empty? @@ -7032,9 +7293,6 @@

     
     
    -931
    -932
    -933
     934
     935
     936
    @@ -7047,10 +7305,13 @@ 

    943 944 945 -946

    +946 +947 +948 +949

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 931
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 934
     
     def (, commitment: nil)
       http_method = :post
    @@ -7256,9 +7517,6 @@ 

     
     
    -964
    -965
    -966
     967
     968
     969
    @@ -7288,10 +7546,13 @@ 

    993 994 995 -996

    +996 +997 +998 +999

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 964
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 967
     
     def get_token_accounts_by_delegate(
           ,
    @@ -7514,9 +7775,6 @@ 

     
     
    -1014
    -1015
    -1016
     1017
     1018
     1019
    @@ -7547,10 +7805,13 @@ 

    1044 1045 1046 -1047

    +1047 +1048 +1049 +1050

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1014
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1017
     
     def get_token_accounts_by_owner(
           ,
    @@ -7670,9 +7931,6 @@ 

     
     
    -1057
    -1058
    -1059
     1060
     1061
     1062
    @@ -7689,10 +7947,13 @@ 

    1073 1074 1075 -1076

    +1076 +1077 +1078 +1079

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1057
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1060
     
     def get_token_largest_accounts(
           token_mint_pubkey,
    @@ -7798,9 +8059,6 @@ 

     
     
    -1086
    -1087
    -1088
     1089
     1090
     1091
    @@ -7817,10 +8075,13 @@ 

    1102 1103 1104 -1105

    +1105 +1106 +1107 +1108

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1086
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1089
     
     def get_token_supply(
       token_mint_pubkey,
    @@ -7850,7 +8111,7 @@ 

    - #get_transaction(transaction_signature, encoding: '', commitment: nil) ⇒ Response, ApiError + #get_transaction(transaction_signature, encoding: '', commitment: nil, max_supported_transaction_version: nil) ⇒ Response, ApiError @@ -7939,9 +8200,6 @@

     
     
    -1116
    -1117
    -1118
     1119
     1120
     1121
    @@ -7955,12 +8213,16 @@ 

    1129 1130 1131 -1132

    +1132 +1133 +1134 +1135 +1136

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1116
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1119
     
    -def get_transaction(transaction_signature, encoding: '', commitment: nil)
    +def get_transaction(transaction_signature, encoding: '', commitment: nil, max_supported_transaction_version: nil)
       http_method = :post
       method =  create_method_name(__method__)
     
    @@ -7969,6 +8231,7 @@ 

    params_hash['commitment'] = commitment unless blank?(commitment) params_hash['encoding'] = encoding unless blank?(encoding) + params_hash['maxSupportedTransactionVersion'] = max_supported_transaction_version unless blank?(max_supported_transaction_version) params << transaction_signature params << params_hash unless params_hash.empty? @@ -8050,10 +8313,6 @@

     
     
    -1141
    -1142
    -1143
    -1144
     1145
     1146
     1147
    @@ -8064,10 +8323,14 @@ 

    1152 1153 1154 -1155

    +1155 +1156 +1157 +1158 +1159

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1141
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1145
     
     def get_transaction_count(commitment: nil)
       http_method = :post
    @@ -8140,17 +8403,17 @@ 

     
     
    -1162
    -1163
    -1164
    -1165
     1166
     1167
     1168
    -1169
    +1169 +1170 +1171 +1172 +1173

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1162
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1166
     
     def get_version
       http_method = :post
    @@ -8277,10 +8540,6 @@ 

     
     
    -1181
    -1182
    -1183
    -1184
     1185
     1186
     1187
    @@ -8299,10 +8558,14 @@ 

    1200 1201 1202 -1203

    +1203 +1204 +1205 +1206 +1207

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1181
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1185
     
     def get_vote_accounts(
       commitment: nil,
    @@ -8318,8 +8581,8 @@ 

    params_hash['votePubkey'] = vote_pubkey unless blank?(vote_pubkey) params_hash['commitment'] = commitment unless blank?(commitment) - params_hash['keep_unstaked_delinquents'] = keep_unstaked_delinquents unless keep_unstaked_delinquents.nil? - params_hash['delinquent_slot_distance'] = delinquent_slot_distance unless blank?(delinquent_slot_distance) + params_hash['keepUnstakedDelinquents'] = keep_unstaked_delinquents unless keep_unstaked_delinquents.nil? + params_hash['delinquentSlotDistance'] = delinquent_slot_distance unless blank?(delinquent_slot_distance) params << params_hash unless params_hash.empty? @@ -8413,10 +8676,6 @@

     
     
    -1214
    -1215
    -1216
    -1217
     1218
     1219
     1220
    @@ -8428,10 +8687,14 @@ 

    1226 1227 1228 -1229

    +1229 +1230 +1231 +1232 +1233

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1214
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1218
     
     def is_blockhash_valid(blockhash, commitment: nil)
       http_method = :post
    @@ -8505,17 +8768,17 @@ 

     
     
    -1237
    -1238
    -1239
    -1240
     1241
     1242
     1243
    -1244
    +1244 +1245 +1246 +1247 +1248

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1237
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1241
     
     def minimum_ledger_slot
       http_method = :post
    @@ -8620,10 +8883,6 @@ 

     
     
    -1255
    -1256
    -1257
    -1258
     1259
     1260
     1261
    @@ -8635,10 +8894,14 @@ 

    1267 1268 1269 -1270

    +1270 +1271 +1272 +1273 +1274

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1255
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1259
     
     def request_airdrop(pubkey, lamports, commitment: nil)
       http_method = :post
    @@ -8779,10 +9042,6 @@ 

     
     
    -1283
    -1284
    -1285
    -1286
     1287
     1288
     1289
    @@ -8803,10 +9062,14 @@ 

    1304 1305 1306 -1307

    +1307 +1308 +1309 +1310 +1311

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1283
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1287
     
     def send_transaction(
           transaction_signature,
    @@ -8824,7 +9087,7 @@ 

    params_hash['skipPreFlight'] = skip_pre_flight unless skip_pre_flight.nil? params_hash['preflightCommitment'] = pre_flight_commitment unless blank?(pre_flight_commitment) params_hash['encoding'] = encoding unless blank?(encoding) - params_hash['max_retries'] = max_retries unless blank?(max_retries) + params_hash['maxRetries'] = max_retries unless blank?(max_retries) params << transaction_signature params << params_hash unless params_hash.empty? @@ -8993,10 +9256,6 @@

     
     
    -1324
    -1325
    -1326
    -1327
     1328
     1329
     1330
    @@ -9026,10 +9285,14 @@ 

    1354 1355 1356 -1357

    +1357 +1358 +1359 +1360 +1361

    -
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1324
    +      
    # File 'lib/solana_rpc_ruby/methods_wrapper.rb', line 1328
     
     def simulate_transaction(
           transaction_signature,
    @@ -9075,9 +9338,9 @@ 

    diff --git a/doc/SolanaRpcRuby/RequestBody.html b/doc/SolanaRpcRuby/RequestBody.html index 75aefdd..ffd525b 100644 --- a/doc/SolanaRpcRuby/RequestBody.html +++ b/doc/SolanaRpcRuby/RequestBody.html @@ -6,7 +6,7 @@ Module: SolanaRpcRuby::RequestBody - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -392,9 +392,9 @@

    diff --git a/doc/SolanaRpcRuby/Response.html b/doc/SolanaRpcRuby/Response.html index f538c00..d9c06b0 100644 --- a/doc/SolanaRpcRuby/Response.html +++ b/doc/SolanaRpcRuby/Response.html @@ -6,7 +6,7 @@ Class: SolanaRpcRuby::Response - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -562,9 +562,9 @@

    diff --git a/doc/SolanaRpcRuby/WebsocketClient.html b/doc/SolanaRpcRuby/WebsocketClient.html index 05c14db..0c298ed 100644 --- a/doc/SolanaRpcRuby/WebsocketClient.html +++ b/doc/SolanaRpcRuby/WebsocketClient.html @@ -6,7 +6,7 @@ Class: SolanaRpcRuby::WebsocketClient - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -240,7 +240,7 @@

    -

    Connects with cluster's websocket.

    +

    Connects with cluster’s websocket.

  • @@ -519,7 +519,7 @@

    -

    Connects with cluster's websocket.

    +

    Connects with cluster’s websocket.

    @@ -729,9 +729,9 @@

    diff --git a/doc/SolanaRpcRuby/WebsocketsMethodsWrapper.html b/doc/SolanaRpcRuby/WebsocketsMethodsWrapper.html index 56198d1..41971b1 100644 --- a/doc/SolanaRpcRuby/WebsocketsMethodsWrapper.html +++ b/doc/SolanaRpcRuby/WebsocketsMethodsWrapper.html @@ -6,7 +6,7 @@ Class: SolanaRpcRuby::WebsocketsMethodsWrapper - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -1246,7 +1246,7 @@

    -

    # 'all' or public key as base-58 endcoded string

    +

    # ‘all’ or public key as base-58 encoded string

    @@ -2866,9 +2866,9 @@

    diff --git a/doc/_index.html b/doc/_index.html index ce21545..7c48d13 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -4,7 +4,7 @@ - Documentation by YARD 0.9.28 + Documentation by YARD 0.9.37 @@ -52,7 +52,7 @@
    -

    Documentation by YARD 0.9.28

    +

    Documentation by YARD 0.9.37

    Alphabetic Index

    @@ -226,9 +226,9 @@

    Namespace Listing A-Z

    diff --git a/doc/class_list.html b/doc/class_list.html index 0f0d570..da0f94a 100644 --- a/doc/class_list.html +++ b/doc/class_list.html @@ -1,5 +1,5 @@ - + @@ -38,12 +38,15 @@

    Class List

    - + diff --git a/doc/css/full_list.css b/doc/css/full_list.css index fa35982..6eef5e4 100644 --- a/doc/css/full_list.css +++ b/doc/css/full_list.css @@ -20,8 +20,8 @@ h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } #content.insearch #noresults { margin-left: 7px; } li.collapsed ul { display: none; } li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } +li.collapsed a.toggle { cursor: default; background-position: top left; } +li { color: #666; cursor: pointer; } li.deprecated { text-decoration: line-through; font-style: italic; } li.odd { background: #f0f0f0; } li.even { background: #fafafa; } @@ -47,7 +47,7 @@ li small { display: block; font-size: 0.8em; } li small:before { content: ""; } li small:after { content: ""; } li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } +#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; } #content.insearch #search { background-position: center right; } #search input { width: 110px; } diff --git a/doc/css/style.css b/doc/css/style.css index eb0dbc8..f169a65 100644 --- a/doc/css/style.css +++ b/doc/css/style.css @@ -82,6 +82,11 @@ body { #search { display: none; } } +@media (max-width: 320px) { + body { height: 100%; overflow: hidden; overflow-wrap: break-word; } + #main { height: 100%; overflow: auto; } +} + #main img { max-width: 100%; } h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } @@ -106,6 +111,7 @@ h2 small a { position: relative; padding: 2px 7px; } +a { font-weight: 550; } .clear { clear: both; } .inline { display: inline; } .inline p:first-child { display: inline; } diff --git a/doc/file.README.html b/doc/file.README.html index 7706559..fc1b962 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -6,7 +6,7 @@ File: README - — Documentation by YARD 0.9.28 + — Documentation by YARD 0.9.37 @@ -62,13 +62,13 @@

    solana_rpc_ruby

    -

    A Solana RPC Client for Ruby. This gem provides a wrapper methods for Solana RPC JSON API docs.solana.com/developing/clients/jsonrpc-api.

    +

    A Solana RPC Client for Ruby. This gem provides a wrapper methods for Solana RPC JSON API solana.com/docs/rpc.

    Getting started

    Requirements

    -

    This gem requires Ruby 2.7+ (as denoted in the .ruby-version file) and it has Rails 6.0+ on board. It MIGHT work with lower versions, but was not tested with them.

    +

    This gem requires Ruby 3.2+ (as denoted in the .ruby-version file) and it has Rails 6.0+ on board. It MIGHT work with lower versions, but was not tested with them.

    Add the following line to your Gemfile:

    @@ -146,31 +146,54 @@

    Subscription Websocket (BETA)Websockets usage in Rails

    -

    You can easily plug-in websockets connection to your rails app by using ActionCable. Here is an example for development environment. More explanation on Action Cable here: www.pluralsight.com/guides/updating-a-rails-app’s-wall-feed-in-real-time-with-actioncable

    +

    You can easily plug-in websockets connection to your rails app by using ActionCable. Here is an example for development environment. More explanation on Action Cable here: www.pluralsight.com/guides/updating-a-rails-app’s-wall-feed-in-real-time-with-actioncable

    1. Make sure that you have action_cable and solana_rpc_ruby gems installed properly. Also install redis unless you have it.

    2. -

      Mount action_cable in routes.rb. ruby Rails.application.routes.draw do mount ActionCable.server => '/cable' ... end

      +

      Mount action_cable in routes.rb.

      + +
      Rails.application.routes.draw do
      +  mount ActionCable.server => '/cable'
      +  ...
      +end
      +
    3. -

      Update config/environments/development.rb. ruby config.action_cable.url = "ws://localhost:3000/cable" config.action_cable.allowed_request_origins = [/http:\/\/*/, /https:\/\/*/]

      +

      Update config/environments/development.rb.

      + +
      config.action_cable.url = "ws://localhost:3000/cable"
      +config.action_cable.allowed_request_origins = [/http:\/\/*/, /https:\/\/*/]
      +
    4. -

      Update adapter in cable.yml. ruby development: adapter: redis url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>

      +

      Update adapter in cable.yml.

      + +
      development:
      +  adapter: redis
      +  url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
      +
    5. -

      Create a channel. ruby rails g channel wall

      +

      Create a channel.

      + +
      rails g channel wall
      +
    6. -

      Your wall_channel.rb should look like this: "`ruby class WallChannel < ApplicationCable::Channel def subscribed stream_from "wall_channel" end

      -
    +

    Your wall_channel.rb should look like this:

    -

    def unsubscribed # Any cleanup needed when channel is unsubscribed end end “`

    -
    1. -

      Your wall_channel.js should look like this (json keys are configured for root_subscription method response): “`js import consumer from “./consumer”

      +

      "'ruby class WallChannel < ApplicationCable::Channel def subscribed stream_from "wall_channel" end

    +

    def unsubscribed # Any cleanup needed when channel is unsubscribed end end

    + +
    
    +6. Your `wall_channel.js` should look like this (json keys are configured for `root_subscription` method response):
    +
    + +

    js import consumer from “./consumer”

    +

    consumer.subscriptions.create(“WallChannel”, { connected() { console.log(“Connected to WallChannel”); // Called when the subscription is ready for use on the server },

    disconnected() { // Called when the subscription has been terminated by the server },

    -

    received(data) { let wall = document.getElementById('wall');

    +

    received(data) { let wall = document.getElementById(‘wall’);

    wall.innerHTML += "<p>Result: "+ data['message']['result'] + "</p>";
     // Called when there's incoming data on the websocket for this channel
    @@ -182,10 +205,13 @@ 

    Websockets usage in Rails

    7. Create placeholder somewhere in your view for messages.
    -

    html <div id='wall' style='overflow-y: scroll; height:400px;''> <h1>Solana subscription messages</h1> </div> “`

    -
    1. -

      Create a script with a block to run websockets (script/websockets_solana.rb). “`ruby require_relative '../config/environment'

      -
    +

    html <div id=‘wall’ style=‘overflow-y: scroll; height:400px;”> <h1>Solana subscription messages</h1> </div>

    + +
    
    +8. Create a script with a block to run websockets (`script/websockets_solana.rb`).
    +
    + +

    ruby require_relative ‘../config/environment’

    ws_method_wrapper = SolanaRpcRuby::WebsocketsMethodsWrapper.new

    @@ -193,9 +219,11 @@

    json } ) end

    +

    ActionCable.server.broadcast( “wall_channel”, { message: json } ) end

    -

    ws_method_wrapper.root_subscribe(&block) “ 9. Runrails s, open webpage where you put your placeholder. 10. Openlocalhost:3000/address_with_websockets_view. 11. Runrails r script/websockets_solana.rb` in another terminal window. 12. You should see incoming websocket messages on your webpage.

    +

    ws_method_wrapper.root_subscribe(&block)

    + +

    9. Runrails s, open webpage where you put your placeholder. 10. Openlocalhost:3000/address_with_websockets_view. 11. Runrails r script/websockets_solana.rb` in another terminal window. 12. You should see incoming websocket messages on your webpage.

    Demo scripts

    @@ -210,6 +238,18 @@

    Demo scripts

    Check the gem or Solana JSON RPC API docs to get more information about method usage and modify demo scripts loosely.

    +

    Method lists

    + +

    HTTP methods (SolanaRpcRuby::MethodsWrapper)

    + +

    Current methods: get_account_info, get_balance, get_block, get_block_height, get_block_production, get_block_commitment, get_blocks, get_blocks_with_limit, get_block_time, get_cluster_nodes, get_epoch_info, get_epoch_schedule, get_fee_for_message, get_first_available_block, get_genesis_hash, get_health, get_highest_snapshot_slot, get_identity, get_inflation_governor, get_inflation_rate, get_inflation_reward, get_largest_accounts, get_latest_blockhash, get_leader_schedule, get_max_retransmit_slot, get_max_shred_insert_slot, get_minimum_balance_for_rent_exemption, get_multiple_accounts, get_program_accounts, get_recent_performance_samples, get_recent_prioritization_fees, get_signatures_for_address, get_signature_statuses, get_slot, get_slot_leader, get_slot_leaders, get_stake_activation, get_stake_minimum_delegation, get_supply, get_token_account_balance, get_token_accounts_by_delegate, get_token_accounts_by_owner, get_token_largest_accounts, get_token_supply, get_transaction, get_transaction_count, get_version, get_vote_accounts, is_blockhash_valid, minimum_ledger_slot, request_airdrop, send_transaction, simulate_transaction.

    + +

    Deprecated compatibility methods: get_confirmed_blocks, get_fee_calculator_for_blockhash, get_fee_rate_governor, get_fees, get_recent_blockhash, get_snapshot_slot.

    + +

    Websocket methods (SolanaRpcRuby::WebsocketsMethodsWrapper)

    + +

    account_subscribe, account_unsubscribe, block_subscribe, block_unsubscribe, logs_subscribe, logs_unsubscribe, program_subscribe, program_unsubscribe, signature_subscribe, signature_unsubscribe, slot_subscribe, slot_unsubscribe, slots_updates_subscribe, slots_updates_unsubscribe, root_subscribe, root_unsubscribe, vote_subscribe, vote_unsubscribe.

    +

    All info about methods you can find in the docs on: www.rubydoc.info/github/Block-Logic/solana-rpc-ruby/main/SolanaRpcRuby

    Also, as a reference you can use docs from solana: docs.solana.com/developing/clients/jsonrpc-api

    @@ -220,9 +260,9 @@

    License

    diff --git a/doc/file_list.html b/doc/file_list.html index 2b6df40..05465df 100644 --- a/doc/file_list.html +++ b/doc/file_list.html @@ -1,5 +1,5 @@ - + @@ -38,7 +38,10 @@

    File List

    - +