Class: CryptoApis::FeaturesApi
- Inherits:
-
Object
- Object
- CryptoApis::FeaturesApi
- Defined in:
- lib/crypto_apis/api/features_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#broadcast_locally_signed_transaction(blockchain, network, opts = {}) ⇒ BroadcastLocallySignedTransactionR
Broadcast Locally Signed Transaction Through this endpoint customers can broadcast transactions that have been already signed locally.
-
#broadcast_locally_signed_transaction_with_http_info(blockchain, network, opts = {}) ⇒ Array<(BroadcastLocallySignedTransactionR, Integer, Hash)>
Broadcast Locally Signed Transaction Through this endpoint customers can broadcast transactions that have been already signed locally.
-
#convert_bitcoin_cash_address(blockchain, network, opts = {}) ⇒ ConvertBitcoinCashAddressR
Convert Bitcoin Cash Address Through this endpoint customers will be able to convert addresses for the BCH (Bitcoin Cash) protocol from BCH legacy to cash address and vice versa.
-
#convert_bitcoin_cash_address_with_http_info(blockchain, network, opts = {}) ⇒ Array<(ConvertBitcoinCashAddressR, Integer, Hash)>
Convert Bitcoin Cash Address Through this endpoint customers will be able to convert addresses for the BCH (Bitcoin Cash) protocol from BCH legacy to cash address and vice versa.
-
#decode_raw_transaction_hex(blockchain, network, opts = {}) ⇒ DecodeRawTransactionHexR
Decode Raw Transaction Hex Through this endpoint customers can decode a raw transaction hex and see the decoded transactions’ details.
-
#decode_raw_transaction_hex_with_http_info(blockchain, network, opts = {}) ⇒ Array<(DecodeRawTransactionHexR, Integer, Hash)>
Decode Raw Transaction Hex Through this endpoint customers can decode a raw transaction hex and see the decoded transactions' details.
-
#decode_x_address(blockchain, network, x_address, opts = {}) ⇒ DecodeXAddressR
Decode X-Address Through this endpoint, customers can decode an encoded XRP address with tag, by providing the specific x-address.
-
#decode_x_address_with_http_info(blockchain, network, x_address, opts = {}) ⇒ Array<(DecodeXAddressR, Integer, Hash)>
Decode X-Address Through this endpoint, customers can decode an encoded XRP address with tag, by providing the specific x-address.
-
#derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses(blockchain, extended_public_key, network, opts = {}) ⇒ DeriveHDWalletXPubYPubZPubChangeOrReceivingAddressesR
Derive HD Wallet (xPub, yPub, zPub) Change Or Receiving Addresses Through this endpoint, customers can derive up to 10 addresses - both change and receive, from a certain HD Wallet (xPub, yPub, zPub), by providing an extended public key.
-
#derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(DeriveHDWalletXPubYPubZPubChangeOrReceivingAddressesR, Integer, Hash)>
Derive HD Wallet (xPub, yPub, zPub) Change Or Receiving Addresses Through this endpoint, customers can derive up to 10 addresses - both change and receive, from a certain HD Wallet (xPub, yPub, zPub), by providing an extended public key.
-
#encode_x_address(address_tag, blockchain, classic_address, network, opts = {}) ⇒ EncodeXAddressR
Encode X-Address Through this endpoint, customers can encode an encoded XRP address with tag, by providing the specific x-address.
-
#encode_x_address_with_http_info(address_tag, blockchain, classic_address, network, opts = {}) ⇒ Array<(EncodeXAddressR, Integer, Hash)>
Encode X-Address Through this endpoint, customers can encode an encoded XRP address with tag, by providing the specific x-address.
-
#estimate_gas_limit(blockchain, network, opts = {}) ⇒ EstimateGasLimitR
Estimate Gas Limit This endpoint helps customer in estimating the gas limit needed for a transaction.
-
#estimate_gas_limit_with_http_info(blockchain, network, opts = {}) ⇒ Array<(EstimateGasLimitR, Integer, Hash)>
Estimate Gas Limit This endpoint helps customer in estimating the gas limit needed for a transaction.
-
#estimate_token_gas_limit(blockchain, network, opts = {}) ⇒ EstimateTokenGasLimitR
Estimate Token Gas Limit This endpoint helps customer in estimating the Contract Gas Limit needed for a transaction.
-
#estimate_token_gas_limit_with_http_info(blockchain, network, opts = {}) ⇒ Array<(EstimateTokenGasLimitR, Integer, Hash)>
Estimate Token Gas Limit This endpoint helps customer in estimating the Contract Gas Limit needed for a transaction.
-
#get_eip_1559_fee_recommendations(network, blockchain, opts = {}) ⇒ GetEIP1559FeeRecommendationsR
Get EIP 1559 Fee Recommendations Through this endpoint customers can obtain fee recommendations specifically for EIP 1559.
-
#get_eip_1559_fee_recommendations_with_http_info(network, blockchain, opts = {}) ⇒ Array<(GetEIP1559FeeRecommendationsR, Integer, Hash)>
Get EIP 1559 Fee Recommendations Through this endpoint customers can obtain fee recommendations specifically for EIP 1559.
-
#initialize(api_client = ApiClient.default) ⇒ FeaturesApi
constructor
A new instance of FeaturesApi.
-
#validate_address(blockchain, network, opts = {}) ⇒ ValidateAddressR
Validate Address This endpoint checks user public addresses whether they are valid or not.
-
#validate_address_with_http_info(blockchain, network, opts = {}) ⇒ Array<(ValidateAddressR, Integer, Hash)>
Validate Address This endpoint checks user public addresses whether they are valid or not.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FeaturesApi
Returns a new instance of FeaturesApi.
19 20 21 |
# File 'lib/crypto_apis/api/features_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/crypto_apis/api/features_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#broadcast_locally_signed_transaction(blockchain, network, opts = {}) ⇒ BroadcastLocallySignedTransactionR
Broadcast Locally Signed Transaction Through this endpoint customers can broadcast transactions that have been already signed locally. Instead of using a node for broadcasting a signed transaction users can use this endpoint. We then keep the user posted about the status by sending you a callback with a success or failure status. warningThis can be prepared and signed only locally, not through the API. We can provide support only for the process of broadcasting./warning
30 31 32 33 |
# File 'lib/crypto_apis/api/features_api.rb', line 30 def broadcast_locally_signed_transaction(blockchain, network, opts = {}) data, _status_code, _headers = broadcast_locally_signed_transaction_with_http_info(blockchain, network, opts) data end |
#broadcast_locally_signed_transaction_with_http_info(blockchain, network, opts = {}) ⇒ Array<(BroadcastLocallySignedTransactionR, Integer, Hash)>
Broadcast Locally Signed Transaction Through this endpoint customers can broadcast transactions that have been already signed locally. Instead of using a node for broadcasting a signed transaction users can use this endpoint. We then keep the user posted about the status by sending you a callback with a success or failure status. warningThis can be prepared and signed only locally, not through the API. We can provide support only for the process of broadcasting./warning
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/crypto_apis/api/features_api.rb', line 43 def broadcast_locally_signed_transaction_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.broadcast_locally_signed_transaction ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.broadcast_locally_signed_transaction" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "zcash", "binance-smart-chain", "xrp", "polygon"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.broadcast_locally_signed_transaction" end # verify enum value allowable_values = ["mainnet", "testnet", "goerli", "mordor", "mumbai"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/transactions/broadcast'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'broadcast_locally_signed_transaction_rb']) # return_type return_type = opts[:debug_return_type] || 'BroadcastLocallySignedTransactionR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.broadcast_locally_signed_transaction", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#broadcast_locally_signed_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#convert_bitcoin_cash_address(blockchain, network, opts = {}) ⇒ ConvertBitcoinCashAddressR
Convert Bitcoin Cash Address Through this endpoint customers will be able to convert addresses for the BCH (Bitcoin Cash) protocol from BCH legacy to cash address and vice versa.
119 120 121 122 |
# File 'lib/crypto_apis/api/features_api.rb', line 119 def convert_bitcoin_cash_address(blockchain, network, opts = {}) data, _status_code, _headers = convert_bitcoin_cash_address_with_http_info(blockchain, network, opts) data end |
#convert_bitcoin_cash_address_with_http_info(blockchain, network, opts = {}) ⇒ Array<(ConvertBitcoinCashAddressR, Integer, Hash)>
Convert Bitcoin Cash Address Through this endpoint customers will be able to convert addresses for the BCH (Bitcoin Cash) protocol from BCH legacy to cash address and vice versa.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/crypto_apis/api/features_api.rb', line 132 def convert_bitcoin_cash_address_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.convert_bitcoin_cash_address ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.convert_bitcoin_cash_address" end # verify enum value allowable_values = ["bitcoin-cash"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.convert_bitcoin_cash_address" end # verify enum value allowable_values = ["mainnet", "testnet"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/address/convert'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'convert_bitcoin_cash_address_rb']) # return_type return_type = opts[:debug_return_type] || 'ConvertBitcoinCashAddressR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.convert_bitcoin_cash_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#convert_bitcoin_cash_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#decode_raw_transaction_hex(blockchain, network, opts = {}) ⇒ DecodeRawTransactionHexR
Decode Raw Transaction Hex Through this endpoint customers can decode a raw transaction hex and see the decoded transactions’ details.
208 209 210 211 |
# File 'lib/crypto_apis/api/features_api.rb', line 208 def decode_raw_transaction_hex(blockchain, network, opts = {}) data, _status_code, _headers = decode_raw_transaction_hex_with_http_info(blockchain, network, opts) data end |
#decode_raw_transaction_hex_with_http_info(blockchain, network, opts = {}) ⇒ Array<(DecodeRawTransactionHexR, Integer, Hash)>
Decode Raw Transaction Hex Through this endpoint customers can decode a raw transaction hex and see the decoded transactions' details.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/crypto_apis/api/features_api.rb', line 221 def decode_raw_transaction_hex_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.decode_raw_transaction_hex ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.decode_raw_transaction_hex" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "binance-smart-chain", "zcash"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.decode_raw_transaction_hex" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/decode-raw-transaction'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'decode_raw_transaction_hex_rb']) # return_type return_type = opts[:debug_return_type] || 'DecodeRawTransactionHexR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.decode_raw_transaction_hex", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#decode_raw_transaction_hex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#decode_x_address(blockchain, network, x_address, opts = {}) ⇒ DecodeXAddressR
Decode X-Address Through this endpoint, customers can decode an encoded XRP address with tag, by providing the specific x-address. The response includes the decoded classic address and the tag.
297 298 299 300 |
# File 'lib/crypto_apis/api/features_api.rb', line 297 def decode_x_address(blockchain, network, x_address, opts = {}) data, _status_code, _headers = decode_x_address_with_http_info(blockchain, network, x_address, opts) data end |
#decode_x_address_with_http_info(blockchain, network, x_address, opts = {}) ⇒ Array<(DecodeXAddressR, Integer, Hash)>
Decode X-Address Through this endpoint, customers can decode an encoded XRP address with tag, by providing the specific x-address. The response includes the decoded classic address and the tag.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/crypto_apis/api/features_api.rb', line 310 def decode_x_address_with_http_info(blockchain, network, x_address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.decode_x_address ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.decode_x_address" end # verify enum value allowable_values = ["xrp"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.decode_x_address" end # verify enum value allowable_values = ["mainnet", "testnet"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # verify the required parameter 'x_address' is set if @api_client.config.client_side_validation && x_address.nil? fail ArgumentError, "Missing the required parameter 'x_address' when calling FeaturesApi.decode_x_address" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/decode-x-address/{xAddress}'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'xAddress' + '}', CGI.escape(x_address.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DecodeXAddressR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.decode_x_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#decode_x_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses(blockchain, extended_public_key, network, opts = {}) ⇒ DeriveHDWalletXPubYPubZPubChangeOrReceivingAddressesR
Derive HD Wallet (xPub, yPub, zPub) Change Or Receiving Addresses Through this endpoint, customers can derive up to 10 addresses - both change and receive, from a certain HD Wallet (xPub, yPub, zPub), by providing an extended public key. By default the system creates a receiving/deposit address, unless the isChange attribute is set to ‘true’. In that case the system derives a ‘change’ address. The change address can be derived only for UTXO based blockchains, for all the rest, this endpoint always creates a deposit/receiving address.
389 390 391 392 |
# File 'lib/crypto_apis/api/features_api.rb', line 389 def derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses(blockchain, extended_public_key, network, opts = {}) data, _status_code, _headers = derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses_with_http_info(blockchain, extended_public_key, network, opts) data end |
#derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses_with_http_info(blockchain, extended_public_key, network, opts = {}) ⇒ Array<(DeriveHDWalletXPubYPubZPubChangeOrReceivingAddressesR, Integer, Hash)>
Derive HD Wallet (xPub, yPub, zPub) Change Or Receiving Addresses Through this endpoint, customers can derive up to 10 addresses - both change and receive, from a certain HD Wallet (xPub, yPub, zPub), by providing an extended public key. By default the system creates a receiving/deposit address, unless the isChange attribute is set to 'true'. In that case the system derives a 'change' address. The change address can be derived only for UTXO based blockchains, for all the rest, this endpoint always creates a deposit/receiving address.
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/crypto_apis/api/features_api.rb', line 406 def derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses_with_http_info(blockchain, extended_public_key, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "binance-smart-chain", "zcash", "tron"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'extended_public_key' is set if @api_client.config.client_side_validation && extended_public_key.nil? fail ArgumentError, "Missing the required parameter 'extended_public_key' when calling FeaturesApi.derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "nile", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end allowable_values = ["p2pkh", "p2sh", "p2wpkh", "standard", "p2sh-cash", "p2pkh-cash", "classic"] if @api_client.config.client_side_validation && opts[:'address_format'] && !allowable_values.include?(opts[:'address_format']) fail ArgumentError, "invalid value for \"address_format\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/hd/{extendedPublicKey}/addresses/derive-address'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'extendedPublicKey' + '}', CGI.escape(extended_public_key.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'addressFormat'] = opts[:'address_format'] if !opts[:'address_format'].nil? query_params[:'addressesCount'] = opts[:'addresses_count'] if !opts[:'addresses_count'].nil? query_params[:'isChange'] = opts[:'is_change'] if !opts[:'is_change'].nil? query_params[:'startIndex'] = opts[:'start_index'] if !opts[:'start_index'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeriveHDWalletXPubYPubZPubChangeOrReceivingAddressesR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#derive_hd_wallet__x_pub_y_pub_z_pub_change_or_receiving_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#encode_x_address(address_tag, blockchain, classic_address, network, opts = {}) ⇒ EncodeXAddressR
Encode X-Address Through this endpoint, customers can encode an encoded XRP address with tag, by providing the specific x-address. The response includes the encoded classic address and the tag.
490 491 492 493 |
# File 'lib/crypto_apis/api/features_api.rb', line 490 def encode_x_address(address_tag, blockchain, classic_address, network, opts = {}) data, _status_code, _headers = encode_x_address_with_http_info(address_tag, blockchain, classic_address, network, opts) data end |
#encode_x_address_with_http_info(address_tag, blockchain, classic_address, network, opts = {}) ⇒ Array<(EncodeXAddressR, Integer, Hash)>
Encode X-Address Through this endpoint, customers can encode an encoded XRP address with tag, by providing the specific x-address. The response includes the encoded classic address and the tag.
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/crypto_apis/api/features_api.rb', line 504 def encode_x_address_with_http_info(address_tag, blockchain, classic_address, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.encode_x_address ...' end # verify the required parameter 'address_tag' is set if @api_client.config.client_side_validation && address_tag.nil? fail ArgumentError, "Missing the required parameter 'address_tag' when calling FeaturesApi.encode_x_address" end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.encode_x_address" end # verify enum value allowable_values = ["xrp"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'classic_address' is set if @api_client.config.client_side_validation && classic_address.nil? fail ArgumentError, "Missing the required parameter 'classic_address' when calling FeaturesApi.encode_x_address" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.encode_x_address" end # verify enum value allowable_values = ["mainnet", "testnet"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/encode-x-address/{classicAddress}/{addressTag}'.sub('{' + 'addressTag' + '}', CGI.escape(address_tag.to_s)).sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'classicAddress' + '}', CGI.escape(classic_address.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EncodeXAddressR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.encode_x_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#encode_x_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#estimate_gas_limit(blockchain, network, opts = {}) ⇒ EstimateGasLimitR
Estimate Gas Limit This endpoint helps customer in estimating the gas limit needed for a transaction. It gives information for gas expenses when sending ether to contracts or making a transaction with additional data in it.
583 584 585 586 |
# File 'lib/crypto_apis/api/features_api.rb', line 583 def estimate_gas_limit(blockchain, network, opts = {}) data, _status_code, _headers = estimate_gas_limit_with_http_info(blockchain, network, opts) data end |
#estimate_gas_limit_with_http_info(blockchain, network, opts = {}) ⇒ Array<(EstimateGasLimitR, Integer, Hash)>
Estimate Gas Limit This endpoint helps customer in estimating the gas limit needed for a transaction. It gives information for gas expenses when sending ether to contracts or making a transaction with additional data in it.
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
# File 'lib/crypto_apis/api/features_api.rb', line 596 def estimate_gas_limit_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.estimate_gas_limit ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.estimate_gas_limit" end # verify enum value allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.estimate_gas_limit" end # verify enum value allowable_values = ["mainnet", "mordor", "testnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/gas-limit'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'estimate_gas_limit_rb']) # return_type return_type = opts[:debug_return_type] || 'EstimateGasLimitR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.estimate_gas_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#estimate_gas_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#estimate_token_gas_limit(blockchain, network, opts = {}) ⇒ EstimateTokenGasLimitR
Estimate Token Gas Limit This endpoint helps customer in estimating the Contract Gas Limit needed for a transaction. It gives information for gas expenses for a specific contract when sending ethers or making a transaction with additional data in it.
672 673 674 675 |
# File 'lib/crypto_apis/api/features_api.rb', line 672 def estimate_token_gas_limit(blockchain, network, opts = {}) data, _status_code, _headers = estimate_token_gas_limit_with_http_info(blockchain, network, opts) data end |
#estimate_token_gas_limit_with_http_info(blockchain, network, opts = {}) ⇒ Array<(EstimateTokenGasLimitR, Integer, Hash)>
Estimate Token Gas Limit This endpoint helps customer in estimating the Contract Gas Limit needed for a transaction. It gives information for gas expenses for a specific contract when sending ethers or making a transaction with additional data in it.
685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/crypto_apis/api/features_api.rb', line 685 def estimate_token_gas_limit_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.estimate_token_gas_limit ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.estimate_token_gas_limit" end # verify enum value allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.estimate_token_gas_limit" end # verify enum value allowable_values = ["mainnet", "mordor", "testnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/gas-limit/contract'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'estimate_token_gas_limit_rb']) # return_type return_type = opts[:debug_return_type] || 'EstimateTokenGasLimitR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.estimate_token_gas_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#estimate_token_gas_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_eip_1559_fee_recommendations(network, blockchain, opts = {}) ⇒ GetEIP1559FeeRecommendationsR
Get EIP 1559 Fee Recommendations Through this endpoint customers can obtain fee recommendations specifically for EIP 1559.
760 761 762 763 |
# File 'lib/crypto_apis/api/features_api.rb', line 760 def get_eip_1559_fee_recommendations(network, blockchain, opts = {}) data, _status_code, _headers = get_eip_1559_fee_recommendations_with_http_info(network, blockchain, opts) data end |
#get_eip_1559_fee_recommendations_with_http_info(network, blockchain, opts = {}) ⇒ Array<(GetEIP1559FeeRecommendationsR, Integer, Hash)>
Get EIP 1559 Fee Recommendations Through this endpoint customers can obtain fee recommendations specifically for EIP 1559.
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 |
# File 'lib/crypto_apis/api/features_api.rb', line 772 def get_eip_1559_fee_recommendations_with_http_info(network, blockchain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.get_eip_1559_fee_recommendations ...' end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.get_eip_1559_fee_recommendations" end # verify enum value allowable_values = ["mainnet", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.get_eip_1559_fee_recommendations" end # verify enum value allowable_values = ["ethereum"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/fees/eip1559'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEIP1559FeeRecommendationsR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.get_eip_1559_fee_recommendations", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#get_eip_1559_fee_recommendations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate_address(blockchain, network, opts = {}) ⇒ ValidateAddressR
Validate Address This endpoint checks user public addresses whether they are valid or not.
843 844 845 846 |
# File 'lib/crypto_apis/api/features_api.rb', line 843 def validate_address(blockchain, network, opts = {}) data, _status_code, _headers = validate_address_with_http_info(blockchain, network, opts) data end |
#validate_address_with_http_info(blockchain, network, opts = {}) ⇒ Array<(ValidateAddressR, Integer, Hash)>
Validate Address This endpoint checks user public addresses whether they are valid or not.
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 |
# File 'lib/crypto_apis/api/features_api.rb', line 856 def validate_address_with_http_info(blockchain, network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeaturesApi.validate_address ...' end # verify the required parameter 'blockchain' is set if @api_client.config.client_side_validation && blockchain.nil? fail ArgumentError, "Missing the required parameter 'blockchain' when calling FeaturesApi.validate_address" end # verify enum value allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "ethereum", "ethereum-classic", "xrp", "zilliqa", "binance-smart-chain", "zcash", "tron"] if @api_client.config.client_side_validation && !allowable_values.include?(blockchain) fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}" end # verify the required parameter 'network' is set if @api_client.config.client_side_validation && network.nil? fail ArgumentError, "Missing the required parameter 'network' when calling FeaturesApi.validate_address" end # verify enum value allowable_values = ["mainnet", "testnet", "mordor", "nile", "goerli"] if @api_client.config.client_side_validation && !allowable_values.include?(network) fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}" end # resource path local_var_path = '/blockchain-tools/{blockchain}/{network}/addresses/validate'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'validate_address_rb']) # return_type return_type = opts[:debug_return_type] || 'ValidateAddressR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"FeaturesApi.validate_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FeaturesApi#validate_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |