Node.js
In this section, we will delve into the details of the Circular Protocol official Node.js package.
Install
npm i circular-protocol-apiUsage 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