Giter Club home page Giter Club logo

blockscout-api's Introduction

block_scout_api

BlockScoutApi - JavaScript client for block_scout_api API for BlockScout web app This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install block_scout_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var BlockScoutApi = require('block_scout_api');

var api = new BlockScoutApi.DefaultApi()
var addressHash = "addressHash_example"; // {String} Address hash

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAddress(addressHash, callback);

Documentation for API Endpoints

All URIs are relative to http://{server}/api/v2/

Class Method HTTP request Description
BlockScoutApi.DefaultApi getAddress GET /addresses/{address_hash} get address info
BlockScoutApi.DefaultApi getAddressBlocksValidated GET /addresses/{address_hash}/blocks-validated get blocks validated by address
BlockScoutApi.DefaultApi getAddressCoinBalanceHistory GET /addresses/{address_hash}/coin-balance-history get address coin balance history
BlockScoutApi.DefaultApi getAddressCoinBalanceHistoryByDay GET /addresses/{address_hash}/coin-balance-history-by-day get address coin balance history by day
BlockScoutApi.DefaultApi getAddressCounters GET /addresses/{address_hash}/counters get address counters
BlockScoutApi.DefaultApi getAddressInternalTxs GET /addresses/{address_hash}/internal-transactions get address internal txs
BlockScoutApi.DefaultApi getAddressLogs GET /addresses/{address_hash}/logs get address logs
BlockScoutApi.DefaultApi getAddressTokenBalances GET /addresses/{address_hash}/token-balances get blocks validated by address
BlockScoutApi.DefaultApi getAddressTokenTransfers GET /addresses/{address_hash}/token-transfers get address token transfers
BlockScoutApi.DefaultApi getAddressTokens GET /addresses/{address_hash}/tokens get blocks validated by address
BlockScoutApi.DefaultApi getAddressTxs GET /addresses/{address_hash}/transactions get address txs
BlockScoutApi.DefaultApi getAddressWithdrawals GET /addresses/{address_hash}/withdrawals get address withdrawals
BlockScoutApi.DefaultApi getAddresses GET /addresses get native coin holders list
BlockScoutApi.DefaultApi getBlock GET /blocks/{block_number_or_hash} get block info
BlockScoutApi.DefaultApi getBlockTxs GET /blocks/{block_number_or_hash}/transactions get block txs
BlockScoutApi.DefaultApi getBlockWithdrawals GET /blocks/{block_number_or_hash}/withdrawals get block withdrawals
BlockScoutApi.DefaultApi getBlocks GET /blocks get blocks
BlockScoutApi.DefaultApi getIndexingStatus GET /main-page/indexing-status get indexing status
BlockScoutApi.DefaultApi getInternalTxs GET /transactions/{transaction_hash}/internal-transactions get internal txs
BlockScoutApi.DefaultApi getJsonRpcUrl GET /config/json-rpc-url get json rpc url
BlockScoutApi.DefaultApi getLogs GET /transactions/{transaction_hash}/logs get logs
BlockScoutApi.DefaultApi getMainPageTokens GET /main-page/blocks get main page blocks
BlockScoutApi.DefaultApi getMainPageTxs GET /main-page/transactions get main page txs
BlockScoutApi.DefaultApi getMarketChart GET /stats/charts/market get market chart
BlockScoutApi.DefaultApi getNftInstance GET /tokens/{address_hash}/instances/{id} get NFT instance by id
BlockScoutApi.DefaultApi getNftInstanceTransfers GET /tokens/{address_hash}/instances/{id}/transfers get transfers of NFT instance
BlockScoutApi.DefaultApi getNftInstanceTransfersCount GET /tokens/{address_hash}/instances/{id}/transfers-count get transfers count of NFT instance
BlockScoutApi.DefaultApi getNftInstances GET /tokens/{address_hash}/instances get NFT instances
BlockScoutApi.DefaultApi getRawTrace GET /transactions/{transaction_hash}/raw-trace get raw trace
BlockScoutApi.DefaultApi getReadMethods GET /smart-contracts/{address_hash}/methods-read get read methods
BlockScoutApi.DefaultApi getReadMethodsProxy GET /smart-contracts/{address_hash}/methods-read-proxy get read methods proxy
BlockScoutApi.DefaultApi getSmartContract GET /smart-contracts/{address_hash} get smart contract
BlockScoutApi.DefaultApi getSmartContracts GET /smart-contracts get verified smart contracts
BlockScoutApi.DefaultApi getSmartContractsCounters GET /smart-contracts/counters get verified smart contracts counters
BlockScoutApi.DefaultApi getStateChanges GET /transactions/{transaction_hash}/state-changes get state changes
BlockScoutApi.DefaultApi getStats GET /stats get stats counters
BlockScoutApi.DefaultApi getToken GET /tokens/{address_hash} get token info
BlockScoutApi.DefaultApi getTokenCounters GET /tokens/{address_hash}/counters get token holders
BlockScoutApi.DefaultApi getTokenHolders GET /tokens/{address_hash}/holders get token holders
BlockScoutApi.DefaultApi getTokenInstanceHolders GET /tokens/{address_hash}/instances/{id}/holders get token instance holders
BlockScoutApi.DefaultApi getTokenTokenTransfers GET /tokens/{address_hash}/transfers get token token transfers
BlockScoutApi.DefaultApi getTokenTransfers GET /transactions/{transaction_hash}/token-transfers get token transfers
BlockScoutApi.DefaultApi getTokensList GET /tokens get tokens list
BlockScoutApi.DefaultApi getTx GET /transactions/{transaction_hash} get tx info
BlockScoutApi.DefaultApi getTxs GET /transactions get txs
BlockScoutApi.DefaultApi getTxsChart GET /stats/charts/transactions get txs chart
BlockScoutApi.DefaultApi getWithdrawals GET /withdrawals get withdrawals
BlockScoutApi.DefaultApi getWriteMethods GET /smart-contracts/{address_hash}/methods-write get write methods
BlockScoutApi.DefaultApi getWriteMethodsProxy GET /smart-contracts/{address_hash}/methods-write-proxy get write methods proxy
BlockScoutApi.DefaultApi queryReadMethod POST /smart-contracts/{address_hash}/query-read-method query read method
BlockScoutApi.DefaultApi search GET /search search
BlockScoutApi.DefaultApi searchRedirect GET /search/check-redirect search redirect

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

blockscout-api's People

Contributors

example123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.