Skip to content

Latest commit

 

History

History
1362 lines (869 loc) · 36.2 KB

File metadata and controls

1362 lines (869 loc) · 36.2 KB

QanAutoApi.QANApi

All URIs are relative to https://rpc-testnet.qanplatform.com

Method HTTP request Description
qanBlockNumber GET /blockNumber/ Returns the latest block number of the blockchain.
qanCall POST /call/ Executes a new message call immediately without creating a transaction on the block chain.
qanChainId GET /chainId/ Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.
qanEstimateGas POST /estimateGas/ Returns an estimation of gas for a given transaction.
qanFeeHistory POST /feeHistory/ Returns the collection of historical gas information.
qanGasPrice GET /gasPrice/ Returns the current gas price on the network in wei.
qanGetBalance GET /getBalance/{Address}/ Returns the balance of the account of given address.
qanGetBlockByHash GET /getBlockByHash/{Hash}/{TransactionDetailFlag}/ Returns information of the block matching the given block hash.
qanGetBlockByNumber GET /getBlockByNumber/{BlockNumber}/{TransactionDetailFlag}/ Returns information of the block matching the given block number.
qanGetBlockReceipts GET /getBlockReceipts/{BlockNumber}/ Returns all transaction receipts for a given block.
qanGetBlockTransactionCountByHash GET /getBlockTransactionCountByHash/{Hash}/ Returns the number of transactions for the block matching the given block hash.
qanGetBlockTransactionCountByNumber GET /getBlockTransactionCountByNumber/{BlockNumber}/ Returns the number of transactions for the block matching the given block number.
qanGetCode GET /getCode/{Address}/ Returns the compiled bytecode of a smart contract.
qanGetFilterChanges GET /getFilterChanges/{FilterId}/ Polling method for a filter, which returns an array of events that have occurred since the last poll.
qanGetFilterLogs GET /getFilterLogs/{Id}/ Returns an array of all logs matching filter with given id.
qanGetLogs POST /getLogs/ Returns an array of all logs matching a given filter object.
qanGetProof POST /getProof/ Returns the account and storage values of the specified account including the Merkle-proof.
qanGetStorageAt POST /getStorageAt/ Returns the value from a storage position at a given address.
qanGetTransactionByBlockHashAndIndex GET /getTransactionByBlockHashAndIndex/{blockHash}/{index}/ Returns information about a transaction given a blockhash and transaction index position.
qanGetTransactionByBlockNumberAndIndex GET /getTransactionByBlockNumberAndIndex/{blockNumber}/{index}/ Returns information about a transaction given a block number and transaction index position.
qanGetTransactionByHash GET /getTransactionByHash/{hash}/ Returns the information about a transaction from a transaction hash.
qanGetTransactionCount GET /getTransactionCount/{Address}/{BlockNumber}/ Returns the number of transactions sent from an address.
qanGetTransactionReceipt GET /getTransactionReceipt/{Hash}/ Returns the receipt of a transaction by transaction hash.
qanMaxPriorityFeePerGas GET /maxPriorityFeePerGas/ Get the priority fee needed to be included in a block.
qanNewBlockFilter GET /newBlockFilter/ Creates a filter in the node, to notify when a new block arrives.
qanNewFilter POST /newFilter/ Creates a filter object, based on filter options, to notify when the state changes (logs).
qanNewPendingTransactionFilter GET /newPendingTransactionFilter/ Creates a filter in the node to notify when new pending transactions arrive.
qanSendRawTransaction POST /sendRawTransaction/ Creates new message call transaction or a contract creation for signed transactions.
qanSyncing GET /syncing/ Returns an object with the sync status of the node if the node is out-of-sync and is syncing. Returns null when the node is already in sync.
qanUninstallFilter GET /uninstallFilter/{FilterId}/ Uninstalls a filter with the given filter id.
qanXlinkValid GET /xlinkValid/{Address}/ Returns the xlink validity time of the account of given address.

qanBlockNumber

OutputBlockNumber qanBlockNumber()

Returns the latest block number of the blockchain.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanBlockNumber((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputBlockNumber

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanCall

OutputCall qanCall(inputCall)

Executes a new message call immediately without creating a transaction on the block chain.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputCall = new QanAutoApi.InputCall(); // InputCall | 
apiInstance.qanCall(inputCall, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputCall InputCall

Return type

OutputCall

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanChainId

OutputChainId qanChainId()

Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanChainId((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputChainId

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanEstimateGas

OutputEstimateGas qanEstimateGas(inputEstimateGas)

Returns an estimation of gas for a given transaction.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputEstimateGas = new QanAutoApi.InputEstimateGas(); // InputEstimateGas | 
apiInstance.qanEstimateGas(inputEstimateGas, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputEstimateGas InputEstimateGas

Return type

OutputEstimateGas

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanFeeHistory

OutputFeeHistory qanFeeHistory(inputFeeHistory)

Returns the collection of historical gas information.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputFeeHistory = new QanAutoApi.InputFeeHistory(); // InputFeeHistory | 
apiInstance.qanFeeHistory(inputFeeHistory, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputFeeHistory InputFeeHistory

Return type

OutputFeeHistory

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanGasPrice

OutputGasPrice qanGasPrice()

Returns the current gas price on the network in wei.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanGasPrice((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputGasPrice

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetBalance

OutputGetBalance qanGetBalance(address, opts)

Returns the balance of the account of given address.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let address = "0xa1e4380a3b1f749673e270229993ee55f35663b4"; // String | A 20 bytes long hexadecimal value representing an address
let opts = {
  'blockNumber': "'latest'" // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
};
apiInstance.qanGetBalance(address, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
address String A 20 bytes long hexadecimal value representing an address
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending [optional] [default to 'latest']

Return type

OutputGetBalance

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetBlockByHash

OutputGetBlockByHash qanGetBlockByHash(hash, transactionDetailFlag)

Returns information of the block matching the given block hash.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let hash = "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd"; // String | The hash (32 bytes) of the block
let transactionDetailFlag = false; // Boolean | The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions
apiInstance.qanGetBlockByHash(hash, transactionDetailFlag, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
hash String The hash (32 bytes) of the block
transactionDetailFlag Boolean The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions [default to false]

Return type

OutputGetBlockByHash

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetBlockByNumber

OutputGetBlockByNumber qanGetBlockByNumber(blockNumber, transactionDetailFlag)

Returns information of the block matching the given block number.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let blockNumber = "'latest'"; // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
let transactionDetailFlag = false; // Boolean | The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions
apiInstance.qanGetBlockByNumber(blockNumber, transactionDetailFlag, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending [default to 'latest']
transactionDetailFlag Boolean The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions [default to false]

Return type

OutputGetBlockByNumber

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetBlockReceipts

OutputGetBlockReceipts qanGetBlockReceipts(blockNumber)

Returns all transaction receipts for a given block.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let blockNumber = "'latest'"; // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
apiInstance.qanGetBlockReceipts(blockNumber, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending [default to 'latest']

Return type

OutputGetBlockReceipts

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetBlockTransactionCountByHash

OutputGetBlockTransactionCountByHash qanGetBlockTransactionCountByHash(hash)

Returns the number of transactions for the block matching the given block hash.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let hash = "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd"; // String | The hash of the block
apiInstance.qanGetBlockTransactionCountByHash(hash, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
hash String The hash of the block

Return type

OutputGetBlockTransactionCountByHash

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetBlockTransactionCountByNumber

OutputGetBlockTransactionCountByNumber qanGetBlockTransactionCountByNumber(blockNumber)

Returns the number of transactions for the block matching the given block number.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let blockNumber = "latest"; // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
apiInstance.qanGetBlockTransactionCountByNumber(blockNumber, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending

Return type

OutputGetBlockTransactionCountByNumber

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetCode

OutputGetCode qanGetCode(address, opts)

Returns the compiled bytecode of a smart contract.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let address = "0xa1e4380a3b1f749673e270229993ee55f35663b4"; // String | The address of the smart contract from which the bytecode will be obtained
let opts = {
  'blockNumber': "latest" // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
};
apiInstance.qanGetCode(address, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
address String The address of the smart contract from which the bytecode will be obtained
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending [optional] [default to 'latest']

Return type

OutputGetCode

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetFilterChanges

OutputGetFilterChanges qanGetFilterChanges(filterId)

Polling method for a filter, which returns an array of events that have occurred since the last poll.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let filterId = "filterId_example"; // String | The filter id that is returned from getFilterChangesnewFilter, getFilterChangesnewBlockFilter or getFilterChangesnewPendingTransactionFilter
apiInstance.qanGetFilterChanges(filterId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
filterId String The filter id that is returned from getFilterChangesnewFilter, getFilterChangesnewBlockFilter or getFilterChangesnewPendingTransactionFilter

Return type

OutputGetFilterChanges

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetFilterLogs

OutputGetFilterLogs qanGetFilterLogs(id)

Returns an array of all logs matching filter with given id.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let id = "id_example"; // String | The filter ID
apiInstance.qanGetFilterLogs(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String The filter ID

Return type

OutputGetFilterLogs

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetLogs

OutputGetLogs qanGetLogs(inputGetLogs)

Returns an array of all logs matching a given filter object.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputGetLogs = new QanAutoApi.InputGetLogs(); // InputGetLogs | 
apiInstance.qanGetLogs(inputGetLogs, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputGetLogs InputGetLogs

Return type

OutputGetLogs

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanGetProof

OutputGetProof qanGetProof(inputGetProof)

Returns the account and storage values of the specified account including the Merkle-proof.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputGetProof = new QanAutoApi.InputGetProof(); // InputGetProof | 
apiInstance.qanGetProof(inputGetProof, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputGetProof InputGetProof

Return type

OutputGetProof

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanGetStorageAt

OutputGetStorageAt qanGetStorageAt(inputGetStorageAt)

Returns the value from a storage position at a given address.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputGetStorageAt = new QanAutoApi.InputGetStorageAt(); // InputGetStorageAt | 
apiInstance.qanGetStorageAt(inputGetStorageAt, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputGetStorageAt InputGetStorageAt

Return type

OutputGetStorageAt

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanGetTransactionByBlockHashAndIndex

OutputGetTransactionByBlockHashAndIndex qanGetTransactionByBlockHashAndIndex(blockHash, index)

Returns information about a transaction given a blockhash and transaction index position.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let blockHash = "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd"; // String | 
let index = "0"; // String | An integer of the transaction index position
apiInstance.qanGetTransactionByBlockHashAndIndex(blockHash, index, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
blockHash String
index String An integer of the transaction index position

Return type

OutputGetTransactionByBlockHashAndIndex

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetTransactionByBlockNumberAndIndex

OutputGetTransactionByBlockNumberAndIndex qanGetTransactionByBlockNumberAndIndex(blockNumber, index)

Returns information about a transaction given a block number and transaction index position.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let blockNumber = "latest"; // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
let index = "0"; // String | An integer of the transaction index position
apiInstance.qanGetTransactionByBlockNumberAndIndex(blockNumber, index, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending
index String An integer of the transaction index position

Return type

OutputGetTransactionByBlockNumberAndIndex

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetTransactionByHash

OutputGetTransactionByHash qanGetTransactionByHash(hash)

Returns the information about a transaction from a transaction hash.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let hash = "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"; // String | The hash of a transaction
apiInstance.qanGetTransactionByHash(hash, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
hash String The hash of a transaction

Return type

OutputGetTransactionByHash

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetTransactionCount

OutputGetTransactionCount qanGetTransactionCount(address, blockNumber)

Returns the number of transactions sent from an address.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let address = "0xa1e4380a3b1f749673e270229993ee55f35663b4"; // String | The address from which the transaction count to be checked
let blockNumber = "latest"; // String | The block number in hexadecimal or decimal format or the string latest, earliest, pending
apiInstance.qanGetTransactionCount(address, blockNumber, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
address String The address from which the transaction count to be checked
blockNumber String The block number in hexadecimal or decimal format or the string latest, earliest, pending

Return type

OutputGetTransactionCount

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanGetTransactionReceipt

OutputGetTransactionReceipt qanGetTransactionReceipt(hash)

Returns the receipt of a transaction by transaction hash.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let hash = "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd"; // String | The hash of a transaction
apiInstance.qanGetTransactionReceipt(hash, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
hash String The hash of a transaction

Return type

OutputGetTransactionReceipt

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanMaxPriorityFeePerGas

OutputMaxPriorityFeePerGas qanMaxPriorityFeePerGas()

Get the priority fee needed to be included in a block.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanMaxPriorityFeePerGas((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputMaxPriorityFeePerGas

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanNewBlockFilter

OutputNewBlockFilter qanNewBlockFilter()

Creates a filter in the node, to notify when a new block arrives.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanNewBlockFilter((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputNewBlockFilter

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanNewFilter

OutputNewFilter qanNewFilter(inputNewFilter)

Creates a filter object, based on filter options, to notify when the state changes (logs).

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputNewFilter = new QanAutoApi.InputNewFilter(); // InputNewFilter | 
apiInstance.qanNewFilter(inputNewFilter, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputNewFilter InputNewFilter

Return type

OutputNewFilter

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanNewPendingTransactionFilter

OutputNewPendingTransactionFilter qanNewPendingTransactionFilter()

Creates a filter in the node to notify when new pending transactions arrive.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanNewPendingTransactionFilter((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputNewPendingTransactionFilter

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanSendRawTransaction

OutputSendRawTransaction qanSendRawTransaction(inputSendRawTransaction)

Creates new message call transaction or a contract creation for signed transactions.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let inputSendRawTransaction = new QanAutoApi.InputSendRawTransaction(); // InputSendRawTransaction | 
apiInstance.qanSendRawTransaction(inputSendRawTransaction, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inputSendRawTransaction InputSendRawTransaction

Return type

OutputSendRawTransaction

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

qanSyncing

OutputSyncing qanSyncing()

Returns an object with the sync status of the node if the node is out-of-sync and is syncing. Returns null when the node is already in sync.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
apiInstance.qanSyncing((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

OutputSyncing

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanUninstallFilter

OutputUninstallFilter qanUninstallFilter(filterId)

Uninstalls a filter with the given filter id.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let filterId = "filterId_example"; // String | The filter ID that needs to be uninstalled. It should always be called when watch is no longer needed. Additionally, Filters timeout when they aren't requested with getFilterChanges for a period of time
apiInstance.qanUninstallFilter(filterId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
filterId String The filter ID that needs to be uninstalled. It should always be called when watch is no longer needed. Additionally, Filters timeout when they aren't requested with getFilterChanges for a period of time

Return type

OutputUninstallFilter

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

qanXlinkValid

OutputXlinkValid qanXlinkValid(address)

Returns the xlink validity time of the account of given address.

Example

import QanAutoApi from 'qan_auto_api';

let apiInstance = new QanAutoApi.QANApi();
let address = "address_example"; // String | 
apiInstance.qanXlinkValid(address, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
address String

Return type

OutputXlinkValid

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json