1.0.5 • Published 10 months ago

octacore-test v1.0.5

Weekly downloads
-
License
Apache 2.0
Repository
-
Last release
10 months ago

octa_core

OctaCore - JavaScript client for octa_core Welcome to the API documentation for our blockchain data service! Our service allows users to access and query data from various blockchain networks through a set of easy-to-use API endpoints. Whether you're looking for transaction history, block information, or on-chain analytics, our API has you covered. With our API, you can retrieve data from a variety of popular blockchain networks, including ethereum and polygon mainnets . Simply make a request to the appropriate endpoint with the necessary parameters, and you'll receive a response with the requested data in a convenient JSON format. We strive to make our API as user-friendly and reliable as possible, and are constantly working to expand our coverage and capabilities. If you have any questions or need assistance getting started, please don't hesitate to reach out to us. We hope that our API will be a valuable resource for your blockchain projects. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 1.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit http://www.octacore.io/support

Installation

For Node.js

npm

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

Then install it via:

npm install octa_core --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your octa_core from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('octa_core') in javascript files from the directory you ran the last command above from.

git

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

    npm install YOUR_USERNAME/octa_core --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, that's to say your javascript file where you actually use this library):

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 OctaCore = require('octa_core');

var defaultClient = OctaCore.ApiClient.instance;

// Configure API key authorization: JWT
var JWT = defaultClient.authentications['JWT'];
JWT.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT.apiKeyPrefix['Authorization'] = "Token"

var api = new OctaCore.AccountsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createWalletPost(callback);

Documentation for API Endpoints

All URIs are relative to https://api.octacore.io

ClassMethodHTTP requestDescription
OctaCore.AccountsApicreateWalletPostPOST /createWalletcreateWallet
OctaCore.AccountsApigetAllAssetsByAddressPostPOST /getAllAssetsByAddressgetAllAssetsByAddress
OctaCore.AccountsApigetBalanceMultiPostPOST /getBalanceMultigetBalanceMulti
OctaCore.AccountsApigetBalancePostPOST /getBalancegetBalance
OctaCore.AccountsApigetERC1155AssetsByAddressPostPOST /getERC1155AssetsByAddressgetERC1155AssetsByAddress
OctaCore.AccountsApigetERC20AssetsByAddressPostPOST /getERC20AssetsByAddressgetERC20AssetsByAddress
OctaCore.AccountsApigetERC721AssetsByAddressPostPOST /getERC721AssetsByAddressgetERC721AssetsByAddress
OctaCore.AccountsApigetNFTAssetsByAddressPostPOST /getNFTAssetsByAddressgetNFTAssetsByAddress
OctaCore.AccountsApigetPendingBalanceAtPostPOST /getPendingBalanceAtgetPendingBalanceAt
OctaCore.AccountsApigetSpenderAllowancePostPOST /getSpenderAllowancegetSpenderAllowance
OctaCore.AccountsApiisAddressValidPostPOST /isAddressValidisAddressValid
OctaCore.BlocksApigetAllTransactionsByBlockHashPostPOST /getAllTransactionsByBlockHashgetAllTransactionsByBlockHash
OctaCore.BlocksApigetAllTransactionsByBlockNumberPostPOST /getAllTransactionsByBlockNumbergetAllTransactionsByBlockNumber
OctaCore.BlocksApigetBlockDataByHashPostPOST /getBlockDataByHashgetBlockDataByHash
OctaCore.BlocksApigetBlockDataByNumberPostPOST /getBlockDataByNumbergetBlockDataByNumber
OctaCore.BlocksApigetBlockHeaderByHashPostPOST /getBlockHeaderByHashReturns the block header.
OctaCore.BlocksApigetBlockHeaderByNumberPostPOST /getBlockHeaderByNumbergetBlockHeaderByNumber
OctaCore.BlocksApigetLatestBlockNumberPostPOST /getLatestBlockNumbergetLatestBlockNumber
OctaCore.BlocksApigetTransactionCountByBlockHashPostPOST /getTransactionCountByBlockHashgetTransactionCountByBlockHash
OctaCore.ContractsApigetApprovalEventsByContractAdressPostPOST /getApprovalEventsByContractAdressgetApprovalEventsByContractAdress
OctaCore.ContractsApigetTransferEventsByContractAdressPostPOST /getTransferEventsByContractAdressgetTransferEventsByContractAdress
OctaCore.ContractsApiisContractPostPOST /isContractisContract
OctaCore.ENSApiensResolvePostPOST /ensResolveensResolve
OctaCore.ENSApiensReverseResolvePostPOST /ensReverseResolveensReverseResolve
OctaCore.MetadataApigetCodeAtPostPOST /getCodeAtgetCodeAt
OctaCore.MetadataApigetGasPricePostPOST /getGasPricegetGasPrice
OctaCore.MetadataApigetNonceAtPostPOST /getNonceAtgetNonceAt
OctaCore.MetadataApigetPeerCountPostPOST /getPeerCountgetPeerCount
OctaCore.MetadataApigetPendingTransactionCountPostPOST /getPendingTransactionCountgetPendingTransactionCount
OctaCore.MetadataApigetStorageAtPostPOST /getStorageAtgetStorageAt
OctaCore.NFTApigetNFTByIdPostPOST /getNFTByIdgetNFTById
OctaCore.NFTApigetNFTMetadataPostPOST /getNFTMetadatagetNFTMetadata
OctaCore.NFTApigetNFTOwnerPostPOST /getNFTOwnergetNFTOwner
OctaCore.NFTApigetNFTsForCollectionPostPOST /getNFTsForCollectiongetNFTsForCollection
OctaCore.NFTApigetTokenMetadataPostPOST /getTokenMetadatagetTokenMetadata
OctaCore.NFTApiisColelctionOwnerPostPOST /isColelctionOwnerisColelctionOwner
OctaCore.TransactionsApigetTransactionByBlockHashAndIndexPostPOST /getTransactionByBlockHashAndIndexgetTransactionByBlockHashAndIndex
OctaCore.TransactionsApigetTransactionDataByHashPostPOST /getTransactionDataByHashgetTransactionDataByHash

Documentation for Models

Documentation for Authorization

JWT

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header