Skip to content

Comdex/aleo-js-sdk

Repository files navigation

Aleo Client Javascript SDK

This is a NodeJS client SDK that allows you to interact with the public rpc endpoints and private rpc endpoints of Aleo network. The project is developed using typescript.

Install

yarn add aleo-js-sdk
# or with npm:
npm install --save aleo-js-sdk

Usage

Typescript:

import { AleoClient, AleoAuthClient } from 'aleo-js-sdk';
//public rpc
const aleoClient = new AleoClient('http://127.0.0.1:3030/');
//private rpc
const aleoAuthClient = new AleoAuthClient(
  'http://127.0.0.1:3030/',
  'username',
  'password'
);

const transaction_id = 'xxxxxxx';
aleoClient.get_transaction_info(transaction_id).then(console.log);

aleoAuthClient.create_account().then(console.log);

NodeJS:

const { AleoClient, AleoAuthClient } = require('aleo-js-sdk');
//public rpc
const aleoClient = new AleoClient('http://127.0.0.1:3030/');
//private rpc
const aleoAuthClient = new AleoAuthClient(
  'http://127.0.0.1:3030/',
  'username',
  'password'
);

const transaction_id = 'xxxxxxx';
aleoClient.get_transaction_info(transaction_id).then(console.log);

aleoAuthClient.create_account().then(console.log);

API Reference

About

A javascript client sdk for Aleo network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published