class CryptoApis::ZilliqaApi
Attributes
Public Class Methods
# File lib/crypto_apis/api/zilliqa_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get Latest Mined Zilliqa Block Through this endpoint users can obtain information on the latest block that has been mined on the Zilliqa blockchain. Data could include the current and previous block hashes, transaction count, and more. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetLatestMinedZilliqaBlockR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 28 def get_latest_mined_zilliqa_block(network, opts = {}) data, _status_code, _headers = get_latest_mined_zilliqa_block_with_http_info(network, opts) data end
Get Latest Mined Zilliqa Block Through this endpoint users can obtain information on the latest block that has been mined on the Zilliqa blockchain. Data could include the current and previous block hashes, transaction count, and more. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [Array<(GetLatestMinedZilliqaBlockR
, Integer, Hash)>] GetLatestMinedZilliqaBlockR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 39 def get_latest_mined_zilliqa_block_with_http_info(network, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.get_latest_mined_zilliqa_block ...' 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 ZilliqaApi.get_latest_mined_zilliqa_block" end # verify enum value allowable_values = ["mainnet"] 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-data/zilliqa-specific/{network}/blocks/last'.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] || 'GetLatestMinedZilliqaBlockR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.get_latest_mined_zilliqa_block", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#get_latest_mined_zilliqa_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get Zilliqa Address Details Through this endpoint customers can obtain information address details from the Zilliqa blockchain. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param address [String] Defines the specific transaction's address. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetZilliqaAddressDetailsR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 100 def get_zilliqa_address_details(network, address, opts = {}) data, _status_code, _headers = get_zilliqa_address_details_with_http_info(network, address, opts) data end
Get Zilliqa Address Details Through this endpoint customers can obtain information address details from the Zilliqa blockchain. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param address [String] Defines the specific transaction's address. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [Array<(GetZilliqaAddressDetailsR
, Integer, Hash)>] GetZilliqaAddressDetailsR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 112 def get_zilliqa_address_details_with_http_info(network, address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.get_zilliqa_address_details ...' 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 ZilliqaApi.get_zilliqa_address_details" end # verify enum value allowable_values = ["mainnet"] 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 'address' is set if @api_client.config.client_side_validation && address.nil? fail ArgumentError, "Missing the required parameter 'address' when calling ZilliqaApi.get_zilliqa_address_details" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/addresses/{address}'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'address' + '}', CGI.escape(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] || 'GetZilliqaAddressDetailsR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.get_zilliqa_address_details", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#get_zilliqa_address_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get Zilliqa Block Details By Block Hash Through this endpoint customers can obtain block details from the Zilliqa blockchain by providing the block Hash parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetZilliqaBlockDetailsByBlockHashR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 177 def get_zilliqa_block_details_by_block_hash(network, block_hash, opts = {}) data, _status_code, _headers = get_zilliqa_block_details_by_block_hash_with_http_info(network, block_hash, opts) data end
Get Zilliqa Block Details By Block Hash Through this endpoint customers can obtain block details from the Zilliqa blockchain by providing the block Hash parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [Array<(GetZilliqaBlockDetailsByBlockHashR
, Integer, Hash)>] GetZilliqaBlockDetailsByBlockHashR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 189 def get_zilliqa_block_details_by_block_hash_with_http_info(network, block_hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.get_zilliqa_block_details_by_block_hash ...' 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 ZilliqaApi.get_zilliqa_block_details_by_block_hash" end # verify enum value allowable_values = ["mainnet"] 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 'block_hash' is set if @api_client.config.client_side_validation && block_hash.nil? fail ArgumentError, "Missing the required parameter 'block_hash' when calling ZilliqaApi.get_zilliqa_block_details_by_block_hash" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/blocks/hash/{blockHash}'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockHash' + '}', CGI.escape(block_hash.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] || 'GetZilliqaBlockDetailsByBlockHashR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.get_zilliqa_block_details_by_block_hash", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#get_zilliqa_block_details_by_block_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get Zilliqa Block Details By Block Height Through this endpoint customers can obtain block details from the Zilliqa blockchain by providing the block Height parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", are test networks. @param block_height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block". @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetZilliqaBlockDetailsByBlockHeightR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 254 def get_zilliqa_block_details_by_block_height(network, block_height, opts = {}) data, _status_code, _headers = get_zilliqa_block_details_by_block_height_with_http_info(network, block_height, opts) data end
Get Zilliqa Block Details By Block Height Through this endpoint customers can obtain block details from the Zilliqa blockchain by providing the block Height parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", are test networks. @param block_height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block". @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [Array<(GetZilliqaBlockDetailsByBlockHeightR
, Integer, Hash)>] GetZilliqaBlockDetailsByBlockHeightR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 266 def get_zilliqa_block_details_by_block_height_with_http_info(network, block_height, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.get_zilliqa_block_details_by_block_height ...' 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 ZilliqaApi.get_zilliqa_block_details_by_block_height" end # verify enum value allowable_values = ["mainnet"] 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 'block_height' is set if @api_client.config.client_side_validation && block_height.nil? fail ArgumentError, "Missing the required parameter 'block_height' when calling ZilliqaApi.get_zilliqa_block_details_by_block_height" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/blocks/height/{blockHeight}'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockHeight' + '}', CGI.escape(block_height.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] || 'GetZilliqaBlockDetailsByBlockHeightR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.get_zilliqa_block_details_by_block_height", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#get_zilliqa_block_details_by_block_height\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get Zilliqa Transaction Details by Transaction ID Through this endpoint customers can obtain transaction details on the Zilliqa blockchain by providing a Transaction ID parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param transaction_hash [String] String identifier of the transaction @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [GetZilliqaTransactionDetailsByTransactionIDR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 331 def get_zilliqa_transaction_details_by_transaction_id(network, transaction_hash, opts = {}) data, _status_code, _headers = get_zilliqa_transaction_details_by_transaction_id_with_http_info(network, transaction_hash, opts) data end
Get Zilliqa Transaction Details by Transaction ID Through this endpoint customers can obtain transaction details on the Zilliqa blockchain by providing a Transaction ID parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param transaction_hash [String] String identifier of the transaction @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @return [Array<(GetZilliqaTransactionDetailsByTransactionIDR
, Integer, Hash)>] GetZilliqaTransactionDetailsByTransactionIDR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 343 def get_zilliqa_transaction_details_by_transaction_id_with_http_info(network, transaction_hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.get_zilliqa_transaction_details_by_transaction_id ...' 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 ZilliqaApi.get_zilliqa_transaction_details_by_transaction_id" end # verify enum value allowable_values = ["mainnet"] 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 'transaction_hash' is set if @api_client.config.client_side_validation && transaction_hash.nil? fail ArgumentError, "Missing the required parameter 'transaction_hash' when calling ZilliqaApi.get_zilliqa_transaction_details_by_transaction_id" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/transactions/{transactionHash}'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'transactionHash' + '}', CGI.escape(transaction_hash.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] || 'GetZilliqaTransactionDetailsByTransactionIDR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.get_zilliqa_transaction_details_by_transaction_id", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#get_zilliqa_transaction_details_by_transaction_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Zilliqa Transactions by Address Through this endpoint customers can list transactions on the Zilliqa blockchain by the address parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param address [String] Defines the specific address of the sender. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListZilliqaTransactionsByAddressR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 410 def list_zilliqa_transactions_by_address(network, address, opts = {}) data, _status_code, _headers = list_zilliqa_transactions_by_address_with_http_info(network, address, opts) data end
List Zilliqa Transactions by Address Through this endpoint customers can list transactions on the Zilliqa blockchain by the address parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param address [String] Defines the specific address of the sender. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListZilliqaTransactionsByAddressR
, Integer, Hash)>] ListZilliqaTransactionsByAddressR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 424 def list_zilliqa_transactions_by_address_with_http_info(network, address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.list_zilliqa_transactions_by_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 ZilliqaApi.list_zilliqa_transactions_by_address" end # verify enum value allowable_values = ["mainnet"] 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 'address' is set if @api_client.config.client_side_validation && address.nil? fail ArgumentError, "Missing the required parameter 'address' when calling ZilliqaApi.list_zilliqa_transactions_by_address" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/addresses/{address}/transactions'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'address' + '}', CGI.escape(address.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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] || 'ListZilliqaTransactionsByAddressR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.list_zilliqa_transactions_by_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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#list_zilliqa_transactions_by_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Zilliqa Transactions By Block Hash Through this endpoint customers can list transactions on the Zilliqa blockchain by the block hash parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListZilliqaTransactionsByBlockHashR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 493 def list_zilliqa_transactions_by_block_hash(network, block_hash, opts = {}) data, _status_code, _headers = list_zilliqa_transactions_by_block_hash_with_http_info(network, block_hash, opts) data end
List Zilliqa Transactions By Block Hash Through this endpoint customers can list transactions on the Zilliqa blockchain by the block hash parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param block_hash [String] Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm. @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListZilliqaTransactionsByBlockHashR
, Integer, Hash)>] ListZilliqaTransactionsByBlockHashR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 507 def list_zilliqa_transactions_by_block_hash_with_http_info(network, block_hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.list_zilliqa_transactions_by_block_hash ...' 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 ZilliqaApi.list_zilliqa_transactions_by_block_hash" end # verify enum value allowable_values = ["mainnet"] 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 'block_hash' is set if @api_client.config.client_side_validation && block_hash.nil? fail ArgumentError, "Missing the required parameter 'block_hash' when calling ZilliqaApi.list_zilliqa_transactions_by_block_hash" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/blocks/hash/{blockHash}/transactions'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockHash' + '}', CGI.escape(block_hash.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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] || 'ListZilliqaTransactionsByBlockHashR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.list_zilliqa_transactions_by_block_hash", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#list_zilliqa_transactions_by_block_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Zilliqa Transactions By Block Height Through this endpoint customers can list transactions on the Zilliqa blockchain by the block height parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param block_height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block". @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. (default to 50) @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. (default to 0) @return [ListZilliqaTransactionsByBlockHeightR]
# File lib/crypto_apis/api/zilliqa_api.rb, line 576 def list_zilliqa_transactions_by_block_height(network, block_height, opts = {}) data, _status_code, _headers = list_zilliqa_transactions_by_block_height_with_http_info(network, block_height, opts) data end
List Zilliqa Transactions By Block Height Through this endpoint customers can list transactions on the Zilliqa blockchain by the block height parameter. @param network [String] Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "rinkeby" are test networks. @param block_height [Integer] Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block". @param [Hash] opts the optional parameters @option opts [String] :context In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. @option opts [Integer] :limit Defines how many items should be returned in the response per page basis. @option opts [Integer] :offset The starting index of the response items, i.e. where the response should start listing the returned items. @return [Array<(ListZilliqaTransactionsByBlockHeightR
, Integer, Hash)>] ListZilliqaTransactionsByBlockHeightR
data, response status code and response headers
# File lib/crypto_apis/api/zilliqa_api.rb, line 590 def list_zilliqa_transactions_by_block_height_with_http_info(network, block_height, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZilliqaApi.list_zilliqa_transactions_by_block_height ...' 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 ZilliqaApi.list_zilliqa_transactions_by_block_height" end # verify enum value allowable_values = ["mainnet"] 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 'block_height' is set if @api_client.config.client_side_validation && block_height.nil? fail ArgumentError, "Missing the required parameter 'block_height' when calling ZilliqaApi.list_zilliqa_transactions_by_block_height" end # resource path local_var_path = '/blockchain-data/zilliqa-specific/{network}/blocks/height/{blockHeight}/transactions'.sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'blockHeight' + '}', CGI.escape(block_height.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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] || 'ListZilliqaTransactionsByBlockHeightR' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] new_options = opts.merge( :operation => :"ZilliqaApi.list_zilliqa_transactions_by_block_height", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ZilliqaApi#list_zilliqa_transactions_by_block_height\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end