Class: SolanaRB::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/solana-ruby/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key = nil) ⇒ Client

Returns a new instance of Client.



9
10
11
# File 'lib/solana-ruby/client.rb', line 9

def initialize(api_key = nil)
  @api_key = api_key
end

Instance Method Details

#get_account_info(pubkey, options = {}) ⇒ Object



13
14
15
# File 'lib/solana-ruby/client.rb', line 13

def (pubkey, options = {})
  request('getAccountInfo', [pubkey, options])
end

#get_balance(pubkey, options = {}) ⇒ Object



17
18
19
# File 'lib/solana-ruby/client.rb', line 17

def get_balance(pubkey, options = {})
  request('getBalance', [pubkey, options])
end

#get_block(slot_number, options = {}) ⇒ Object



21
22
23
# File 'lib/solana-ruby/client.rb', line 21

def get_block(slot_number, options = {})
  request('getBlock', [slot_number, options])
end

#get_block_commitment(slot_number, options = {}) ⇒ Object



25
26
27
# File 'lib/solana-ruby/client.rb', line 25

def get_block_commitment(slot_number, options = {})
  request('getBlockCommitment', [slot_number, options])
end

#get_block_height(options = {}) ⇒ Object



29
30
31
# File 'lib/solana-ruby/client.rb', line 29

def get_block_height(options = {})
  request('getBlockHeight', [options])
end

#get_block_production(options = {}) ⇒ Object



33
34
35
# File 'lib/solana-ruby/client.rb', line 33

def get_block_production(options = {})
  request('getBlockProduction', [options])
end

#get_block_time(slot_number, options = {}) ⇒ Object



37
38
39
# File 'lib/solana-ruby/client.rb', line 37

def get_block_time(slot_number, options = {})
  request('getBlockTime', [slot_number, options])
end

#get_blocks(start_slot, end_slot, options = {}) ⇒ Object



41
42
43
# File 'lib/solana-ruby/client.rb', line 41

def get_blocks(start_slot, end_slot, options = {})
  request('getBlocks', [start_slot, end_slot, options])
end

#get_blocks_with_limit(start_slot, limit, options = {}) ⇒ Object



45
46
47
# File 'lib/solana-ruby/client.rb', line 45

def get_blocks_with_limit(start_slot, limit, options = {})
  request('getBlocksWithLimit', [start_slot, limit, options])
end

#get_cluster_nodes(options = {}) ⇒ Object



49
50
51
# File 'lib/solana-ruby/client.rb', line 49

def get_cluster_nodes(options = {})
  request('getClusterNodes', [options])
end

#get_epoch_info(options = {}) ⇒ Object



53
54
55
# File 'lib/solana-ruby/client.rb', line 53

def get_epoch_info(options = {})
  request('getEpochInfo', [options])
end

#get_epoch_schedule(options = {}) ⇒ Object



57
58
59
# File 'lib/solana-ruby/client.rb', line 57

def get_epoch_schedule(options = {})
  request('getEpochSchedule', [options])
end

#get_fee_for_message(message, options = {}) ⇒ Object



61
62
63
# File 'lib/solana-ruby/client.rb', line 61

def get_fee_for_message(message, options = {})
  request('getFeeForMessage', [message, options])
end

#get_first_available_block(options = {}) ⇒ Object



65
66
67
# File 'lib/solana-ruby/client.rb', line 65

def get_first_available_block(options = {})
  request('getFirstAvailableBlock', [options])
end

#get_genesis_hash(options = {}) ⇒ Object



69
70
71
# File 'lib/solana-ruby/client.rb', line 69

def get_genesis_hash(options = {})
  request('getGenesisHash', [options])
end

#get_health(options = {}) ⇒ Object



73
74
75
# File 'lib/solana-ruby/client.rb', line 73

def get_health(options = {})
  request('getHealth', [options])
end

#get_highest_snapshot_slot(options = {}) ⇒ Object



77
78
79
# File 'lib/solana-ruby/client.rb', line 77

def get_highest_snapshot_slot(options = {})
  request('getHighestSnapshotSlot', [options])
end

#get_identity(options = {}) ⇒ Object



81
82
83
# File 'lib/solana-ruby/client.rb', line 81

def get_identity(options = {})
  request('getIdentity', [options])
end

#get_inflation_governor(options = {}) ⇒ Object



85
86
87
# File 'lib/solana-ruby/client.rb', line 85

def get_inflation_governor(options = {})
  request('getInflationGovernor', [options])
end

#get_inflation_rate(options = {}) ⇒ Object



89
90
91
# File 'lib/solana-ruby/client.rb', line 89

def get_inflation_rate(options = {})
  request('getInflationRate', [options])
end

#get_inflation_reward(addresses, options = {}) ⇒ Object



93
94
95
# File 'lib/solana-ruby/client.rb', line 93

def get_inflation_reward(addresses, options = {})
  request('getInflationReward', [addresses, options])
end

#get_largest_accounts(options = {}) ⇒ Object



97
98
99
# File 'lib/solana-ruby/client.rb', line 97

def get_largest_accounts(options = {})
  request('getLargestAccounts', [options])
end

#get_latest_blockhash(options = {}) ⇒ Object



101
102
103
# File 'lib/solana-ruby/client.rb', line 101

def get_latest_blockhash(options = {})
  request('getLatestBlockhash', [options])
end

#get_leader_schedule(options = {}) ⇒ Object



105
106
107
# File 'lib/solana-ruby/client.rb', line 105

def get_leader_schedule(options = {})
  request('getLeaderSchedule', [options])
end

#get_max_retransmit_slot(options = {}) ⇒ Object



109
110
111
# File 'lib/solana-ruby/client.rb', line 109

def get_max_retransmit_slot(options = {})
  request('getMaxRetransmitSlot', [options])
end

#get_max_shred_insert_slot(options = {}) ⇒ Object



113
114
115
# File 'lib/solana-ruby/client.rb', line 113

def get_max_shred_insert_slot(options = {})
  request('getMaxShredInsertSlot', [options])
end

#get_minimum_balance_for_rent_exemption(data_length, options = {}) ⇒ Object



117
118
119
# File 'lib/solana-ruby/client.rb', line 117

def get_minimum_balance_for_rent_exemption(data_length, options = {})
  request('getMinimumBalanceForRentExemption', [data_length, options])
end

#get_multiple_accounts(pubkeys, options = {}) ⇒ Object



121
122
123
# File 'lib/solana-ruby/client.rb', line 121

def get_multiple_accounts(pubkeys, options = {})
  request('getMultipleAccounts', [pubkeys, options])
end

#get_program_accounts(pubkey, options = {}) ⇒ Object



125
126
127
# File 'lib/solana-ruby/client.rb', line 125

def get_program_accounts(pubkey, options = {})
  request('getProgramAccounts', [pubkey, options])
end

#get_recent_performance_samples(options = {}) ⇒ Object



129
130
131
# File 'lib/solana-ruby/client.rb', line 129

def get_recent_performance_samples(options = {})
  request('getRecentPerformanceSamples', [options])
end

#get_recent_prioritization_fees(options = {}) ⇒ Object



133
134
135
# File 'lib/solana-ruby/client.rb', line 133

def get_recent_prioritization_fees(options = {})
  request('getRecentPrioritizationFees', [options])
end

#get_signature_statuses(signatures, options = {}) ⇒ Object



137
138
139
# File 'lib/solana-ruby/client.rb', line 137

def get_signature_statuses(signatures, options = {})
  request('getSignatureStatuses', [signatures, options])
end

#get_signatures_for_address(address, options = {}) ⇒ Object



141
142
143
# File 'lib/solana-ruby/client.rb', line 141

def get_signatures_for_address(address, options = {})
  request('getSignaturesForAddress', [address, options])
end

#get_slot(options = {}) ⇒ Object



145
146
147
# File 'lib/solana-ruby/client.rb', line 145

def get_slot(options = {})
  request('getSlot', [options])
end

#get_slot_leader(options = {}) ⇒ Object



149
150
151
# File 'lib/solana-ruby/client.rb', line 149

def get_slot_leader(options = {})
  request('getSlotLeader', [options])
end

#get_slot_leaders(start_slot, limit, options = {}) ⇒ Object



153
154
155
# File 'lib/solana-ruby/client.rb', line 153

def get_slot_leaders(start_slot, limit, options = {})
  request('getSlotLeaders', [start_slot, limit, options])
end

#get_stake_activation(pubkey, options = {}) ⇒ Object



157
158
159
# File 'lib/solana-ruby/client.rb', line 157

def get_stake_activation(pubkey, options = {})
  request('getStakeActivation', [pubkey, options])
end

#get_stake_minimum_delegation(options = {}) ⇒ Object



161
162
163
# File 'lib/solana-ruby/client.rb', line 161

def get_stake_minimum_delegation(options = {})
  request('getStakeMinimumDelegation', [options])
end

#get_supply(options = {}) ⇒ Object



165
166
167
# File 'lib/solana-ruby/client.rb', line 165

def get_supply(options = {})
  request('getSupply', [options])
end

#get_token_account_balance(pubkey, options = {}) ⇒ Object



169
170
171
# File 'lib/solana-ruby/client.rb', line 169

def (pubkey, options = {})
  request('getTokenAccountBalance', [pubkey, options])
end

#get_token_accounts_by_delegate(delegate, opts = {}, options = {}) ⇒ Object



173
174
175
# File 'lib/solana-ruby/client.rb', line 173

def get_token_accounts_by_delegate(delegate, opts = {}, options = {})
  request('getTokenAccountsByDelegate', [delegate, opts, options])
end

#get_token_accounts_by_owner(owner, opts = {}, options = {}) ⇒ Object



177
178
179
# File 'lib/solana-ruby/client.rb', line 177

def get_token_accounts_by_owner(owner, opts = {}, options = {})
  request('getTokenAccountsByOwner', [owner, opts, options])
end

#get_token_largest_accounts(pubkey, options = {}) ⇒ Object



181
182
183
# File 'lib/solana-ruby/client.rb', line 181

def get_token_largest_accounts(pubkey, options = {})
  request('getTokenLargestAccounts', [pubkey, options])
end

#get_token_supply(pubkey, options = {}) ⇒ Object



185
186
187
# File 'lib/solana-ruby/client.rb', line 185

def get_token_supply(pubkey, options = {})
  request('getTokenSupply', [pubkey, options])
end

#get_transaction(signature, options = {}) ⇒ Object



189
190
191
# File 'lib/solana-ruby/client.rb', line 189

def get_transaction(signature, options = {})
  request('getTransaction', [signature, options])
end

#get_transaction_count(options = {}) ⇒ Object



193
194
195
# File 'lib/solana-ruby/client.rb', line 193

def get_transaction_count(options = {})
  request('getTransactionCount', [options])
end

#get_version(options = {}) ⇒ Object



197
198
199
# File 'lib/solana-ruby/client.rb', line 197

def get_version(options = {})
  request('getVersion', [options])
end

#get_vote_accounts(options = {}) ⇒ Object



201
202
203
# File 'lib/solana-ruby/client.rb', line 201

def get_vote_accounts(options = {})
  request('getVoteAccounts', [options])
end

#is_blockhash_valid(blockhash, options = {}) ⇒ Object



205
206
207
# File 'lib/solana-ruby/client.rb', line 205

def is_blockhash_valid(blockhash, options = {})
  request('isBlockhashValid', [blockhash, options])
end

#minimum_ledger_slot(options = {}) ⇒ Object



209
210
211
# File 'lib/solana-ruby/client.rb', line 209

def minimum_ledger_slot(options = {})
  request('minimumLedgerSlot', [options])
end

#request_airdrop(pubkey, lamports, options = {}) ⇒ Object



213
214
215
# File 'lib/solana-ruby/client.rb', line 213

def request_airdrop(pubkey, lamports, options = {})
  request('requestAirdrop', [pubkey, lamports, options])
end

#send_transaction(transaction, options = {}) ⇒ Object



217
218
219
# File 'lib/solana-ruby/client.rb', line 217

def send_transaction(transaction, options = {})
  request('sendTransaction', [transaction, options])
end

#simulate_transaction(transaction, options = {}) ⇒ Object



221
222
223
# File 'lib/solana-ruby/client.rb', line 221

def simulate_transaction(transaction, options = {})
  request('simulateTransaction', [transaction, options])
end