Node.js

In this section, we will delve into the details of the Circular Protocol official Node.js package.

The Circular Blockchain API suite provides a robust and efficient interface for interacting with the Circular Protocol, a decentralized and highly scalable blockchain network. These APIs enable developers to integrate, query, and execute operations on the Circular Protocol blockchain, supporting a wide range of decentralized applications (dApps), financial transactions, and smart contracts.

Install

Clone the GitHub repository and link manually the package or run:

npm i circular-protocol-api

Usage for ES Modules

import CircularProtocolAPI from 'circular-protocol-api';

var walletExists = await CircularProtocolAPI.getWallet('BlockchainHex', 'WalletAddressHex');
console.log(walletExists)

Usage for CommonJS

const CircularProtocolAPI = require('circular-protocol-api');

(async () => {
    try {
        const blockchain = 'your-blockchain';
        const wallet = 'your-wallet';
        const walletExists = await CircularProtocolAPI.getWallet(blockchain, wallet); // 60-second timeout, 5-second interval
        console.log('Wallet exists:', walletExists);
    } catch (error) {
        console.error('Error:', error);
    }
})();

Last updated