### Circular Protocol API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/getting-started/circular-apis/setting-up-a-wallet This section provides comprehensive API documentation for Circular Protocol functions, covering wallet operations, contract interactions, asset management, block data retrieval, transaction handling, and cryptographic utilities. It details methods, parameters, and return values for both Dart and Go implementations. ```APIDOC Wallet Management: getWallet() - Retrieves wallet information. - Parameters: None - Returns: Wallet details. getWalletBalance() - Retrieves the balance of a wallet. - Parameters: None - Returns: Wallet balance. getWalletNonce() - Retrieves the nonce for a wallet. - Parameters: None - Returns: Wallet nonce. registerWallet() - Registers a new wallet. - Parameters: Wallet details. - Returns: Confirmation of registration. Contract Interaction: callContract(contractAddress, functionSignature, parameters) - Calls a smart contract function. - Parameters: - contractAddress: The address of the contract. - functionSignature: The signature of the function to call. - parameters: The parameters for the function. - Returns: The result of the contract call. callContractWithPlainConsoleOutput(contractAddress, functionSignature, parameters) - Calls a smart contract function and outputs the result to the console. - Parameters: - contractAddress: The address of the contract. - functionSignature: The signature of the function to call. - parameters: The parameters for the function. - Returns: The result of the contract call. Asset Management: getAssetList() - Retrieves a list of available assets. - Parameters: None - Returns: A list of assets. getAsset(assetId) - Retrieves details for a specific asset. - Parameters: - assetId: The ID of the asset. - Returns: Asset details. getAssetSupply(assetId) - Retrieves the supply of a specific asset. - Parameters: - assetId: The ID of the asset. - Returns: The asset supply. Block Information: getBlockRange(startBlock, endBlock) - Retrieves a range of blocks. - Parameters: - startBlock: The starting block number. - endBlock: The ending block number. - Returns: A list of blocks. getBlock(blockNumber) - Retrieves a specific block. - Parameters: - blockNumber: The block number. - Returns: Block details. getBlockCount() - Retrieves the total number of blocks. - Parameters: None - Returns: The block count. getBlockchains() - Retrieves a list of supported blockchains. - Parameters: None - Returns: A list of blockchains. Transaction Handling: getTransactionByID(transactionId) - Retrieves a transaction by its ID. - Parameters: - transactionId: The ID of the transaction. - Returns: Transaction details. getTransactionByNode(nodeId) - Retrieves transactions associated with a node. - Parameters: - nodeId: The ID of the node. - Returns: A list of transactions. getTransactionByAddress(address) - Retrieves transactions associated with an address. - Parameters: - address: The address. - Returns: A list of transactions. getTransactionByDate(date) - Retrieves transactions within a specific date range. - Parameters: - date: The date. - Returns: A list of transactions. sendTransaction(transactionData) - Sends a transaction. - Parameters: - transactionData: The data for the transaction. - Returns: Transaction status. Cryptographic Operations: signMessage(message, privateKey) - Signs a message with a private key. - Parameters: - message: The message to sign. - privateKey: The private key. - Returns: The signature. verifySignature(message, signature, publicKey) - Verifies a signature against a message and public key. - Parameters: - message: The original message. - signature: The signature to verify. - publicKey: The public key. - Returns: Boolean indicating verification success. getPublicKey(privateKey) - Derives the public key from a private key. - Parameters: - privateKey: The private key. - Returns: The public key. getKeysFromString(seedPhrase) - Derives keys from a seed phrase. - Parameters: - seedPhrase: The seed phrase. - Returns: Derived keys. getKeysFromListOfStrings(seedPhraseList) - Derives keys from a list of seed phrases. - Parameters: - seedPhraseList: A list of seed phrases. - Returns: Derived keys. Analytics: getAnalytics() - Retrieves analytics data. - Parameters: None - Returns: Analytics data. ``` -------------------------------- ### Get Blockchain Analytics Example Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/node.js/getanalytics Example usage of the getAnalytics function in JavaScript to retrieve blockchain data. ```javascript async function getAnalyticsExample(blockchainAddress) { try { var analytics = await CircularProtocolAPI.getAnalytics(blockchainAddress); console.log(JSON.stringify(analytics, null, 2)); return analytics; } catch (error) { console.error("Error fetching analytics:", error); return null; } } // Example usage: var blockchain = "0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; getAnalyticsExample(blockchain); ``` -------------------------------- ### Javascript API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/getting-started/circular-apis/setting-up-a-wallet Enables integration with the Circular Protocol within Javascript environments, including mainnet interactions, wallet management, contract calls, and asset retrieval. ```APIDOC checkWallet() - Checks the status or existence of a wallet. getWallet() - Retrieves wallet information. getWalletBalance(walletAddress: string) - Fetches the balance of a specific wallet address. getWalletNonce(walletAddress: string) - Retrieves the nonce for a given wallet address. callContract(contractAddress: string, functionName: string, args: any[]) - Calls a function on a smart contract. testContract(contractAddress: string, functionName: string, args: any[]) - Tests a function on a smart contract without executing it. registerWallet(walletData: object) - Registers a new wallet. getDomain(domainName: string) - Retrieves information about a domain. getAssetList() - Fetches a list of available assets. getAsset(assetId: string) - Retrieves details for a specific asset. getAssetSupply(assetId: string) - Gets the total supply of a specific asset. getBlockRange(startBlock: number, endBlock: number) - Retrieves a range of blocks. getBlock(blockNumber: number) - Fetches a specific block by its number. getBlockCount() - Gets the total number of blocks on the chain. getAnalytics() - Retrieves analytics data. getBlockchains() - Fetches a list of available blockchains. getTransactionbyID(transactionId: string) - Retrieves a transaction by its unique ID. getTransactionbyNode(nodeId: string) - Retrieves transactions associated with a specific node. getTransactionbyAddress(address: string) - Fetches transactions related to a given address. getTransactionbyDate(date: string) - Retrieves transactions made on a specific date. getTransactionOutcome(transactionId: string) - Gets the outcome of a specific transaction. getPendingTransaction() - Retrieves pending transactions. sendTransaction(transactionData: object) - Submits a new transaction to the network. signMessage(message: string, privateKey: string) - Signs a message using a private key. verifySignature(message: string, signature: string, publicKey: string) - Verifies a message signature using a public key. ``` -------------------------------- ### Get Asset Supply Example Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/javascript/getassetsupply An example demonstrating how to use the `getAssetSupply` function in JavaScript to fetch the supply of an asset. ```javascript var blockchain = "0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; var name = "CIRX"; var supply = await CircularProtocolAPI.getAssetSupply(blockchain, name); ``` -------------------------------- ### TypeScript API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/getting-started/circular-apis/setting-up-a-wallet API documentation for TypeScript functions and library usage within the Circular Protocol. Covers wallet operations, asset management, and transaction handling. ```APIDOC Including TypeScript Library: Information on how to include and use the Circular Protocol TypeScript library. SetNAGKey & SetNAGURL: Functions for setting NAG key and URL. GetWallet: Retrieves wallet information. RegisterWallet: Registers a new wallet. GetAsset: Retrieves asset details. GetAssetSupply: Retrieves the supply of an asset. GetBlock: Retrieves block information. SendTransaction: Sends a transaction to the network. SignMessage: Signs a message with the wallet's private key. getFormattedTimestamp: Retrieves the current timestamp in a formatted string. Transferring an Asset: Documentation on the process of transferring an asset. ``` -------------------------------- ### Get Transactions by Node Example (Dart) Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/dart/gettransactionbynode Example usage of the getTransactionByNode method from the CircularAPI. Demonstrates how to instantiate the API client and call the method with sample parameters. ```dart import'package:circular_api/circular_api.dart'; voidmain() async { final circular =CircularAPI(); final blockchain ="0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; final node ="8a93c6b6f8d166097ddfeb3e5e3a2998b35e0b6f0bd2e31a8a130a11b6749279"; final wallet =await circular.getTransactionByNode(blockchain, node, 0, 1); } ``` -------------------------------- ### Go API Functions Source: https://circular-protocol.gitbook.io/standard-apis/getting-started/circular-apis/setting-up-a-wallet Provides access to core Circular Protocol functionalities including transaction status, sending transactions, message signing, signature verification, and key management. ```APIDOC GetTransactionOutcome(): Retrieves the outcome of a transaction. SendTransaction(): Submits a transaction to the network. SignMessage(): Signs a message with a private key. VerifySignature(): Verifies the signature of a message. GetPublicKey(): Retrieves the public key associated with an address. GetKeysFromString(): Derives keys from a string. ``` -------------------------------- ### PHP Example for getDomain() Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/php/getdomain Provides a complete PHP code example demonstrating how to use the getDomain() method with the CircularProtocolAPI class, including setup and method call. ```php require'vendor/autoload.php'; useCircularProtocolApiCircularProtocolAPI; $circular =newCircularProtocolAPI(); $blockchain ="0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; $name ="testingDomainName"; $result = $circular->getDomain($blockchain, $name); ``` -------------------------------- ### Install Circular Protocol Go Package Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go Instructions for installing the Circular Protocol Go package using go get and go mod tidy, followed by how to import it into your Go project. ```go goget-ugithub.com/circular-protocol/circular-go ``` ```go gomodtidy ``` ```go import ( "github.com/circular-protocol/circular-go/circular_protocol_api" "github.com/circular-protocol/circular-go/utils" ) ``` -------------------------------- ### Node.js API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/getting-started/circular-apis/setting-up-a-wallet Provides access to various blockchain data and utility functions through a Node.js environment. Includes methods for analytics, transaction retrieval, message signing, and data conversion. ```APIDOC getAnalytics() - Retrieves analytics data. getBlockchains() - Fetches a list of available blockchains. getTransactionbyID(transactionId: string) - Retrieves a transaction by its unique ID. getTransactionbyNode(nodeId: string) - Retrieves transactions associated with a specific node. getTransactionbyAddress(address: string) - Fetches transactions related to a given address. getTransactionbyDate(date: string) - Retrieves transactions made on a specific date. getTransactionOutcome(transactionId: string) - Gets the outcome of a specific transaction. getPendingTransaction() - Retrieves pending transactions. sendTransaction(transactionData: object) - Submits a new transaction to the network. signMessage(message: string, privateKey: string) - Signs a message using a private key. verifySignature(message: string, signature: string, publicKey: string) - Verifies a message signature using a public key. getPublicKey(privateKey: string) - Derives the public key from a private key. stringToHex(inputString: string) - Converts a string to its hexadecimal representation. hexToString(hexString: string) - Converts a hexadecimal string back to a readable string. hexFix(hexString: string) - Fixes or formats a hexadecimal string. setNAGKey(key: string) - Sets the Network Access Gateway (NAG) key. setNAGURL(url: string) - Sets the Network Access Gateway (NAG) URL. getFormattedTimestamp() - Returns the current timestamp in a formatted string. ``` -------------------------------- ### PHP getFormattedTimestamp() Example Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/node.js/getformattedtimestamp Demonstrates how to use the getFormattedTimestamp() function to get the current date and time in a specific format. ```PHP function getFormattedTimestamp() { // Returns the date and the time in format YYYY:MM:DD-hh:mm:ss return "2024:10:09-21:45:00"; } var dateTime = getFormattedTimestamp(); // dateTime will be "2024:10:09-21:45:00" ``` -------------------------------- ### JavaScript API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/getting-started/circular-apis/setting-up-a-wallet API documentation for JavaScript functions provided by the Circular Protocol. Includes methods for signature verification, key management, and data conversion. ```APIDOC verifySignature(): Verifies a digital signature. getPublicKey(): Retrieves the public key. stringToHex(input: string): Converts a string to its hexadecimal representation. hexToString(input: string): Converts a hexadecimal string to its original string representation. hexFix(input: string): Fixes or formats a hexadecimal string. setNAGKey(key: string): Sets the NAG key. setNAGURL(url: string): Sets the NAG URL. getFormattedTimestamp(): Retrieves the current timestamp in a formatted string. ``` -------------------------------- ### Circular Protocol API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/apis/registering-a-new-wallet This section provides comprehensive API documentation for Circular Protocol functions, covering wallet operations, contract interactions, asset management, block data retrieval, transaction handling, and cryptographic utilities. It details methods, parameters, and return values for both Dart and Go implementations. ```APIDOC Wallet Management: getWallet() - Retrieves wallet information. - Parameters: None - Returns: Wallet details. getWalletBalance() - Retrieves the balance of a wallet. - Parameters: None - Returns: Wallet balance. getWalletNonce() - Retrieves the nonce for a wallet. - Parameters: None - Returns: Wallet nonce. registerWallet() - Registers a new wallet. - Parameters: Wallet details. - Returns: Confirmation of registration. Contract Interaction: callContract(contractAddress, functionSignature, parameters) - Calls a smart contract function. - Parameters: - contractAddress: The address of the contract. - functionSignature: The signature of the function to call. - parameters: The parameters for the function. - Returns: The result of the contract call. callContractWithPlainConsoleOutput(contractAddress, functionSignature, parameters) - Calls a smart contract function and outputs the result to the console. - Parameters: - contractAddress: The address of the contract. - functionSignature: The signature of the function to call. - parameters: The parameters for the function. - Returns: The result of the contract call. Asset Management: getAssetList() - Retrieves a list of available assets. - Parameters: None - Returns: A list of assets. getAsset(assetId) - Retrieves details for a specific asset. - Parameters: - assetId: The ID of the asset. - Returns: Asset details. getAssetSupply(assetId) - Retrieves the supply of a specific asset. - Parameters: - assetId: The ID of the asset. - Returns: The asset supply. Block Information: getBlockRange(startBlock, endBlock) - Retrieves a range of blocks. - Parameters: - startBlock: The starting block number. - endBlock: The ending block number. - Returns: A list of blocks. getBlock(blockNumber) - Retrieves a specific block. - Parameters: - blockNumber: The block number. - Returns: Block details. getBlockCount() - Retrieves the total number of blocks. - Parameters: None - Returns: The block count. getBlockchains() - Retrieves a list of supported blockchains. - Parameters: None - Returns: A list of blockchains. Transaction Handling: getTransactionByID(transactionId) - Retrieves a transaction by its ID. - Parameters: - transactionId: The ID of the transaction. - Returns: Transaction details. getTransactionByNode(nodeId) - Retrieves transactions associated with a node. - Parameters: - nodeId: The ID of the node. - Returns: A list of transactions. getTransactionByAddress(address) - Retrieves transactions associated with an address. - Parameters: - address: The address. - Returns: A list of transactions. getTransactionByDate(date) - Retrieves transactions within a specific date range. - Parameters: - date: The date. - Returns: A list of transactions. sendTransaction(transactionData) - Sends a transaction. - Parameters: - transactionData: The data for the transaction. - Returns: Transaction status. Cryptographic Operations: signMessage(message, privateKey) - Signs a message with a private key. - Parameters: - message: The message to sign. - privateKey: The private key. - Returns: The signature. verifySignature(message, signature, publicKey) - Verifies a signature against a message and public key. - Parameters: - message: The original message. - signature: The signature to verify. - publicKey: The public key. - Returns: Boolean indicating verification success. getPublicKey(privateKey) - Derives the public key from a private key. - Parameters: - privateKey: The private key. - Returns: The public key. getKeysFromString(seedPhrase) - Derives keys from a seed phrase. - Parameters: - seedPhrase: The seed phrase. - Returns: Derived keys. getKeysFromListOfStrings(seedPhraseList) - Derives keys from a list of seed phrases. - Parameters: - seedPhraseList: A list of seed phrases. - Returns: Derived keys. Analytics: getAnalytics() - Retrieves analytics data. - Parameters: None - Returns: Analytics data. ``` -------------------------------- ### Get Wallet Balance - Wallet Not Found Response Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/apis/get-wallet-balance Example JSON response when the specified wallet does not exist on the blockchain. ```JSON { "Result":108, "Response":"Wallet Not found", "Node":"02fc8b01bfc5dc2911941871e6de81f5f6fe60f3961343f802ad78e7e077ea32" } ``` -------------------------------- ### Arduino API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go/getassetlist Placeholder for Arduino API documentation. ```APIDOC Arduino API documentation not yet available. ``` -------------------------------- ### Get Wallet Nonce in JavaScript Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/javascript/getwalletnonce Example of how to use the getWalletNonce method in JavaScript to retrieve a wallet's nonce from a blockchain. ```javascript var blockchain = "0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; var address = "0x8b1dd25076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd945083738"; var nonce = await CircularProtocolAPI.getWalletNonce(blockchain, address); console.log(nonce); ``` -------------------------------- ### Get Wallet Nonce in Dart Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/dart/getwalletnonce Example of how to use the `getWalletNonce` method in Dart to fetch a wallet's nonce from a blockchain. ```dart import 'package:circular_api/circular_api.dart'; void main() async { final circular = CircularAPI(); final blockchain = "8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; final address = "0x248ea24763f3aeb2590114257b0b95ebc8fc40e287574aa25379bb24c6d661ec"; try { final wallet = await circular.getWalletNonce(blockchain, address); print('Wallet Nonce: ${wallet['Response']['Nonce']}'); } catch (e) { print('Error fetching wallet nonce: $e'); } } ``` -------------------------------- ### C# API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go/getassetlist Placeholder for C# API documentation. ```APIDOC C# API documentation not yet available. ``` -------------------------------- ### C# API Functions Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/apis/registering-a-new-wallet Placeholder for C# API functions for Circular Protocol integration. -------------------------------- ### Python Package Usage Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/python Details on installing and using the Circular Protocol official Python package, including example usage scenarios. ```APIDOC Installation: - Instructions for installing the Python package. Example of usage: - Demonstrates how to integrate and use the package in Python applications. ``` -------------------------------- ### Get Wallet Balance - Invalid Format Response Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/apis/get-wallet-balance Example JSON response when the provided blockchain or wallet address is in an incorrect format. ```JSON { "Result":118, "Response":"Wrong Format", "Node":"02fc8b01bfc5dc2911941871e6de81f5f6fe60f3961343f802ad78e7e077ea32" } ``` -------------------------------- ### C++ API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go/getassetlist Placeholder for C++ API documentation. ```APIDOC C++ API documentation not yet available. ``` -------------------------------- ### Circular Protocol API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/apis/get-the-asset-list This section provides comprehensive API documentation for Circular Protocol functions, covering wallet operations, contract interactions, asset management, block data retrieval, transaction handling, and cryptographic utilities. It details methods, parameters, and return values for both Dart and Go implementations. ```APIDOC Wallet Management: getWallet() - Retrieves wallet information. - Parameters: None - Returns: Wallet details. getWalletBalance() - Retrieves the balance of a wallet. - Parameters: None - Returns: Wallet balance. getWalletNonce() - Retrieves the nonce for a wallet. - Parameters: None - Returns: Wallet nonce. registerWallet() - Registers a new wallet. - Parameters: Wallet details. - Returns: Confirmation of registration. Contract Interaction: callContract(contractAddress, functionSignature, parameters) - Calls a smart contract function. - Parameters: - contractAddress: The address of the contract. - functionSignature: The signature of the function to call. - parameters: The parameters for the function. - Returns: The result of the contract call. callContractWithPlainConsoleOutput(contractAddress, functionSignature, parameters) - Calls a smart contract function and outputs the result to the console. - Parameters: - contractAddress: The address of the contract. - functionSignature: The signature of the function to call. - parameters: The parameters for the function. - Returns: The result of the contract call. Asset Management: getAssetList() - Retrieves a list of available assets. - Parameters: None - Returns: A list of assets. getAsset(assetId) - Retrieves details for a specific asset. - Parameters: - assetId: The ID of the asset. - Returns: Asset details. getAssetSupply(assetId) - Retrieves the supply of a specific asset. - Parameters: - assetId: The ID of the asset. - Returns: The asset supply. Block Information: getBlockRange(startBlock, endBlock) - Retrieves a range of blocks. - Parameters: - startBlock: The starting block number. - endBlock: The ending block number. - Returns: A list of blocks. getBlock(blockNumber) - Retrieves a specific block. - Parameters: - blockNumber: The block number. - Returns: Block details. getBlockCount() - Retrieves the total number of blocks. - Parameters: None - Returns: The block count. getBlockchains() - Retrieves a list of supported blockchains. - Parameters: None - Returns: A list of blockchains. Transaction Handling: getTransactionByID(transactionId) - Retrieves a transaction by its ID. - Parameters: - transactionId: The ID of the transaction. - Returns: Transaction details. getTransactionByNode(nodeId) - Retrieves transactions associated with a node. - Parameters: - nodeId: The ID of the node. - Returns: A list of transactions. getTransactionByAddress(address) - Retrieves transactions associated with an address. - Parameters: - address: The address. - Returns: A list of transactions. getTransactionByDate(date) - Retrieves transactions within a specific date range. - Parameters: - date: The date. - Returns: A list of transactions. sendTransaction(transactionData) - Sends a transaction. - Parameters: - transactionData: The data for the transaction. - Returns: Transaction status. Cryptographic Operations: signMessage(message, privateKey) - Signs a message with a private key. - Parameters: - message: The message to sign. - privateKey: The private key. - Returns: The signature. verifySignature(message, signature, publicKey) - Verifies a signature against a message and public key. - Parameters: - message: The original message. - signature: The signature to verify. - publicKey: The public key. - Returns: Boolean indicating verification success. getPublicKey(privateKey) - Derives the public key from a private key. - Parameters: - privateKey: The private key. - Returns: The public key. getKeysFromString(seedPhrase) - Derives keys from a seed phrase. - Parameters: - seedPhrase: The seed phrase. - Returns: Derived keys. getKeysFromListOfStrings(seedPhraseList) - Derives keys from a list of seed phrases. - Parameters: - seedPhraseList: A list of seed phrases. - Returns: Derived keys. Analytics: getAnalytics() - Retrieves analytics data. - Parameters: None - Returns: Analytics data. ``` -------------------------------- ### Get Wallet Nonce Example Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/node.js/getwalletnonce Demonstrates how to use the getWalletNonce method in JavaScript to fetch the nonce for a specific wallet address on a given blockchain. ```JavaScript var blockchain ="0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; var address ="0x8b1dd25076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd945083738"; var nonce = await CircularProtocolAPI.getWalletNonce(blockchain, address); ``` -------------------------------- ### Get Block Count Example Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/node.js/getblockcount Demonstrates how to use the getBlockCount function to retrieve the block count for a given blockchain address using JavaScript. ```javascript var blockchain = "0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2"; var count = await CircularProtocolAPI.getBlockCount(blockchain); ``` -------------------------------- ### C++ API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go/getwalletnonce Placeholder for C++ API documentation. ```APIDOC C++ API documentation not yet available. ``` -------------------------------- ### Get Wallet Balance - Success Response Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/apis/get-wallet-balance Example JSON response when the wallet balance is successfully retrieved. It includes the balance amount and a description of the asset. ```JSON { "Result":200, "Response": { "Balance":1989449.200000, "Description":"Circular Coin" }, "Node":"02fc8b01bfc5dc2911941871e6de81f5f6fe60f3961343f802ad78e7e077ea32" } ``` -------------------------------- ### Rust API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go/getassetlist Placeholder for Rust API documentation. ```APIDOC Rust API documentation not yet available. ``` -------------------------------- ### Transferring an Asset Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/typescript Guide and examples on how to transfer assets between wallets on the Circular Network using the TypeScript library. This involves creating and signing a transfer transaction. ```typescript import { CircularSDK } from 'circular-sdk'; const sdk = new CircularSDK(); // Example function to transfer an asset (requires detailed transaction construction) async function transferAsset( fromAddress: string, toAddress: string, assetId: string, amount: number ) { // This is a conceptual example. Actual implementation requires: // 1. Fetching nonces and gas prices. // 2. Constructing the transaction payload for asset transfer. // 3. Signing the transaction. // 4. Sending the transaction using sdk.sendTransaction(). console.log(`Attempting to transfer ${amount} of asset ${assetId} from ${fromAddress} to ${toAddress}`); // Placeholder for actual transaction creation and sending logic // const signedTx = await createAndSignTransferTx(fromAddress, toAddress, assetId, amount); // if (signedTx) { // await sdk.sendTransaction(signedTx); // } } // Example usage: // transferAsset('sender_address', 'receiver_address', 'asset_token_id', 100); ``` -------------------------------- ### Arduino API Documentation Source: https://circular-protocol.gitbook.io/standard-apis/api-docs/go/getblock Placeholder for Arduino API documentation. ```APIDOC Arduino API documentation not yet available. ```