Giter Club home page Giter Club logo

circularjs's Introduction

Circular Layer 1 Blockchain Protocol Interface Library

The Circular Layer 1 Blockchain Protocol Interface Library is a JavaScript library designed to integrate seamlessly with Circular's blockchain platforms. This open-source library, maintained by Circular Global Ledgers, Inc., provides a comprehensive suite of tools for interacting with blockchain networks, managing wallets, assets, smart contracts, and more.

Features

  • Blockchain Interaction: Directly interact with Circular's blockchain networks.
  • Smart Contracts: Deploy, test, and interact with smart contracts.
  • Wallet Management: Create, retrieve, and manage blockchain wallets and balances.
  • Asset Management: Handle asset transactions, including creation, transfer, and retrieval of asset details.
  • Domains Management: Resolve domain names to wallet addresses.
  • Transaction Management: Send, search, and validate transactions.
  • Analytics: Retrieve analytical data about the blockchain.

Installation

To use the Circular Library in your project, include it directly in your HTML or JavaScript file:

NodeJS/Typescript

Install dependency:

npm install circular-library
// test.mjs or test.ts
import Circular, { NAG_URL_DEFAULT } from "circular-library"

const NAG_KEY = process.env.NAG_KEY || '';
const NAG_URL = process.env.NAG_URL || NAG_URL_DEFAULT;
const circular = Circular(NAG_KEY, NAG_URL)

async function run() {
        const {Result, Node, Response} = await circular.GetBlockchains()
        console.log(Result, Node, Response);
}
run()

Browser

Setting it up

<script type="module" src="path_to_circular_library.js"></script>

<script type="module">

import CircularLibrary, { NAG_URL_DEFAULT } from "circular-library"

const Circular = CircularLibrary(
    'your_nag_key', 
        NAG_URL_DEFAULT
)
// Set your Network Access Gateway key, not necessary if given in the "constructor"
Circular.SetNAGKey('your_nag_key');

</script>

Using the library

Managing Wallets
// Register a new wallet on the blockchain
Circular.RegisterWallet('blockchain_id', 'public_key').then(response => {
    console.log(response);
});

Get wallet balance

Circular.GetWalletBalance('blockchain_id', 'wallet_address', 'asset_name').then(balance => {
    console.log(balance);
});

Handling Transactions

// Send a transaction
Circular.SendTransaction('transaction_id', 'from_address', 'to_address', 'timestamp', 'type', 'payload', 'nonce', 'signature', 'blockchain_id');

Smart Contracts

// Test a smart contract
Circular.TestContract('blockchain_id', 'developer_wallet_address', 'smart_contract_project').then(testResults => {
    console.log(testResults);
});

Contributing

Contributions to the Circular Library are welcome. Please ensure to follow the contribution guidelines and code of conduct.

License

This project is open source and available under the LICENSE for both private and commercial use.

Version

1.1.0

Authors and Acknowledgment

Originator: Gianluca De Novi, PhD

Contributors: Sebastian Lagemann, [Add contributors here]

Contact For support or collaboration, please contact [email protected].

This README file outlines the main features and usage of the library, providing a comprehensive guide for developers interested in utilizing the Circular blockchain interfaces. Adjust the paths and names as per your actual project setup.

circularjs's People

Contributors

circularprotocol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.