# OctaCore.AccountsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**createWalletPost**](AccountsApi.md#createWalletPost) | **POST** /createWallet | createWallet
[**getAllAssetsByAddressPost**](AccountsApi.md#getAllAssetsByAddressPost) | **POST** /getAllAssetsByAddress | getAllAssetsByAddress
[**getBalanceMultiPost**](AccountsApi.md#getBalanceMultiPost) | **POST** /getBalanceMulti | getBalanceMulti
[**getBalancePost**](AccountsApi.md#getBalancePost) | **POST** /getBalance | getBalance
[**getERC1155AssetsByAddressPost**](AccountsApi.md#getERC1155AssetsByAddressPost) | **POST** /getERC1155AssetsByAddress | getERC1155AssetsByAddress
[**getERC20AssetsByAddressPost**](AccountsApi.md#getERC20AssetsByAddressPost) | **POST** /getERC20AssetsByAddress | getERC20AssetsByAddress
[**getERC721AssetsByAddressPost**](AccountsApi.md#getERC721AssetsByAddressPost) | **POST** /getERC721AssetsByAddress | getERC721AssetsByAddress
[**getNFTAssetsByAddressPost**](AccountsApi.md#getNFTAssetsByAddressPost) | **POST** /getNFTAssetsByAddress | getNFTAssetsByAddress
[**getPendingBalanceAtPost**](AccountsApi.md#getPendingBalanceAtPost) | **POST** /getPendingBalanceAt | getPendingBalanceAt
[**getSpenderAllowancePost**](AccountsApi.md#getSpenderAllowancePost) | **POST** /getSpenderAllowance | getSpenderAllowance
[**isAddressValidPost**](AccountsApi.md#isAddressValidPost) | **POST** /isAddressValid | isAddressValid


<a name="createWalletPost"></a>
# **createWalletPost**
> createWalletPost()

createWallet

Generates a new wallet and returns private key and public key The /createWallet API endpoint allows you to generate a new blockchain wallet and returns the private key and public key for the wallet. Use cases: Allowing a user to create a new wallet within a decentralized application. Providing a backend service for generating new wallets.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

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

### Parameters
This endpoint does not need any parameter.

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getAllAssetsByAddressPost"></a>
# **getAllAssetsByAddressPost**
> getAllAssetsByAddressPost(chain, input)

getAllAssetsByAddress

Get all assets owned by a given address. The /getAllAssetsByAddress API endpoint allows you to retrieve a list of all assets owned by a given blockchain address. ###  Use cases: + Displaying a user's asset portfolio on a wallet or exchange platform. + Allowing a user to view and manage their assets within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Account Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getAllAssetsByAddressPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Account Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getBalanceMultiPost"></a>
# **getBalanceMultiPost**
> getBalanceMultiPost(chain, input)

getBalanceMulti

The /getBalanceMulti is a function that allows developers to retrieve the balances of a multiple blockchain addresses on any particular blockchain . The balance refers to the amount of native cryptocurrency/token that is held in that address. This information can be used for a variety of purposes, including: ###  Use cases: + Displaying the balances of multiple addresses on a wallet or exchange platform. + Allowing a user to view the balances of multiple addresses within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressBalanceReq(); // ModelsAddressBalanceReq | User Addresses(comma-seperated)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getBalanceMultiPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressBalanceReq**](ModelsAddressBalanceReq.md)| User Addresses(comma-seperated) | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getBalancePost"></a>
# **getBalancePost**
> getBalancePost(chain, input)

getBalance

The /getBalance API endpoint is a function that allows developers to retrieve the balance of a specific blockchain address on any particular blockchain . The balance refers to the amount of native cryptocurrency/token that is held in that address. This information can be used for a variety of purposes, including: ###  Use cases: + Displaying a user's balance on a wallet or exchange platform: This is a common use case for this type of API. + Wallet and exchange platforms can use the /getBalance endpoint to retrieve the balance of a user's address and display it on their platform, allowing the user to see how much of a particular cryptocurrency they own. + Allowing a user to view their balance within a decentralized application (dApp): dApps can also use the /getBalance endpoint to retrieve the balance of a user's address and display it within the dApp, allowing the user to see how much of a particular cryptocurrency they own and can use within the dApp. + Analysing and tracking the flow of cryptocurrency: The /getBalance API endpoint can also be used by developers to track the flow of cryptocurrency between different addresses, this could be useful for tracking the balance of an address for a given cryptocurrency over time, or for identifying large transactions or changes in balance. + Auditing and compliance: The /getBalance API endpoint can also be used by auditing and compliance teams to check the balance of an address at a given time, this is useful for compliance with regulations and preventing illegal activities.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressBalanceReq(); // ModelsAddressBalanceReq | User Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getBalancePost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressBalanceReq**](ModelsAddressBalanceReq.md)| User Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getERC1155AssetsByAddressPost"></a>
# **getERC1155AssetsByAddressPost**
> getERC1155AssetsByAddressPost(chain, input)

getERC1155AssetsByAddress

Returns all ERC1155 assets of a account The /getERC1155AssetsByAddress API endpoint allows you to retrieve a list of all ERC1155 assets owned by a given blockchain address. ERC1155 assets are a type of digital asset that are built on EVM-compatible platforms and adhere to a specific set of standards, allowing them to be easily traded on Ethereum and other compatible platforms. Unlike ERC20 and ERC721 assets, which are either fungible (interchangeable) or non-fungible (unique), ERC1155 assets can be both fungible and non-fungible within the same contract. ###  Use cases: + Displaying a user's ERC1155 asset portfolio on a wallet or exchange platform. + Allowing a user to view and manage their ERC1155 assets within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Account Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getERC1155AssetsByAddressPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Account Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getERC20AssetsByAddressPost"></a>
# **getERC20AssetsByAddressPost**
> getERC20AssetsByAddressPost(chain, input)

getERC20AssetsByAddress

Returns all ERC20 assets of a account The /getERC20AssetsByAddress API endpoint allows you to retrieve a list of all ERC20 assets owned by a given blockchain address. ERC-20 tokens are a standardized form of digital asset that are built on top of the Ethereum Virtual Machine (EVM) platform, following a set of rules and standards outlined in the ERC-20 specification. These tokens can represent any kind of asset, such as a currency, a commodity, a utility, or a non-fungible asset, and can be easily traded on Ethereum and other compatible platforms. Because ERC-20 tokens follow a well-defined set of standards, they are widely accepted and widely supported by a variety of decentralized applications and exchanges, making them an easy and convenient choice for developers and users alike. ###  Use cases: + Displaying a user's ERC20 asset portfolio on a wallet or exchange platform. + Allowing a user to view and manage their ERC20 assets within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Account Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getERC20AssetsByAddressPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Account Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getERC721AssetsByAddressPost"></a>
# **getERC721AssetsByAddressPost**
> getERC721AssetsByAddressPost(chain, input)

getERC721AssetsByAddress

Returns all ERC721 assets of a account The /getERC721AssetsByAddress API endpoint allows you to retrieve a list of all ERC721 assets owned by a given blockchain address. ERC721 assets are a type of non-fungible token (NFT) that are built on EVM compatible platform and adhere to a specific set of standards, allowing them to be easily traded on Ethereum and other compatible platforms. ###  Use cases: + Displaying a user's ERC721 asset portfolio on a wallet or exchange platform. + Allowing a user to view and manage their ERC721 assets within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Account Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getERC721AssetsByAddressPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Account Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getNFTAssetsByAddressPost"></a>
# **getNFTAssetsByAddressPost**
> getNFTAssetsByAddressPost(chain, input)

getNFTAssetsByAddress

Returns all Nfts of a accountAddress. The /getNFTAssetsByAddress API endpoint allows you to retrieve a list of all non-fungible tokens (NFTs) owned by a given blockchain address. NFTs are a type of digital asset that are built on a blockchain platform and represent a unique item or asset, such as a piece of art, a collectible, or a virtual real estate property. ###  Use cases: + Displaying a user's NFT asset portfolio on a wallet or exchange platform. + Allowing a user to view and manage their NFT assets within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Account Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getNFTAssetsByAddressPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Account Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getPendingBalanceAtPost"></a>
# **getPendingBalanceAtPost**
> getPendingBalanceAtPost(chain, input)

getPendingBalanceAt

Returns the wei balance of the given account in the pending state. /n The /getPendingBalanceAt API endpoint allows you to retrieve the balance of a given blockchain address in the \"pending\" state, which means that the balance is in the process of being updated as part of a transaction that has not yet been included in a block. ###  Use cases: + Displaying a user's pending balance on a wallet or exchange platform. + Allowing a user to view their pending balance within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Account Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getPendingBalanceAtPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Account Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getSpenderAllowancePost"></a>
# **getSpenderAllowancePost**
> getSpenderAllowancePost(chain, input)

getSpenderAllowance

The /getSpenderAllowance API endpoint allows you to retrieve the allowance of a given spender for a specific ERC20 token, as set by the owner of the token. The allowance is the maximum amount of the ERC20 token that the spender is authorized to transfer on behalf of the owner. ###  Use cases: + Displaying a user's allowance for a specific ERC20 token on a wallet or exchange platform. + Allowing a user to view their allowance for a specific ERC20 token within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsGetSpenderAllowanceRequestBody(); // ModelsGetSpenderAllowanceRequestBody | addresses


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.getSpenderAllowancePost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsGetSpenderAllowanceRequestBody**](ModelsGetSpenderAllowanceRequestBody.md)| addresses | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="isAddressValidPost"></a>
# **isAddressValidPost**
> isAddressValidPost(chain, input)

isAddressValid

The /isAddressValid API endpoint allows you to verify if a given address is a valid address on the blockchain. This can be useful for checking if an address has been correctly formatted and belongs to an existing account. ###  Use cases: + Validating user-provided addresses on a wallet or exchange platform. + Allowing a user to verify the correctness of an address within a decentralized application.

### Example
```javascript
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 = 'Token';

var apiInstance = new OctaCore.AccountsApi();

var chain = "chain_example"; // String | Chain to be requested in.

var input = new OctaCore.ModelsAddressReq(); // ModelsAddressReq | Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.isAddressValidPost(chain, input, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **chain** | **String**| Chain to be requested in. | 
 **input** | [**ModelsAddressReq**](ModelsAddressReq.md)| Address | 

### Return type

null (empty response body)

### Authorization

[JWT](../README.md#JWT)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

