https://github.com/berzanorg/aleo.js
🛸 Aleo JavaScript API
https://github.com/berzanorg/aleo.js
Last synced: about 2 months ago
JSON representation
🛸 Aleo JavaScript API
- Host: GitHub
- URL: https://github.com/berzanorg/aleo.js
- Owner: berzanorg
- License: mit
- Created: 2022-09-10T18:03:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-10T18:16:13.000Z (over 2 years ago)
- Last Synced: 2025-03-12T23:33:18.124Z (2 months ago)
- Language: TypeScript
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Aleo.js
### Aleo JavaScript API- 🚀 It has all the features you need while building a dApp on Aleo!
- 🛰️ A standardized way to develop something great!
- 🛸 Written in TypeScript to offer a safer experience!> The library just started to be developed, so it's not complete yet.
### Build Aleo dApps, easily.
```js
import { Connection } from 'aleo'// Create a new Connection object
const connection = new Connection('http://0.0.0.0:4180')// Get the latest block
const latestBlock = await connection.getLatestBlock()// Get the genesis block
const genesisBlock = await connection.getBlock(0)// Get the hash of the latest block
const latestHash = await connection.getLatestHash()// Get the height of the latest block
const latestHeight = await connection.getLatestHeight()// Get the transaction with given TX ID
const transaction = await connection.getTransaction('at1r9wercd6fsjm58klkqt8jrug55w4sgpj6tmcg0myk5n3nh5h5cyq589zfu')// Get all the transactions on the genesis block
const transactions = await connection.getTransactions(0)
```
### Documentation, as you type.

### Installation
You can install `Aleo.js` with your favorite package manager.#### NPM
```
npm install aleo
```#### Yarn
```
yarn add aleo
```#### PNPM
```
pnpm install aleo
```
### Development
You need [Node.JS](https://nodejs.org/) and [Git](https://git-scm.com/) installed.Clone the repository.
```
git clone https://github.com/BerzanXYZ/aleo.js.git
```Install the dependencies.
```
yarn install
```🎉 Your development environment is ready!
### Bugs
If you find any bug, please create a pull request.
> Made with ❤️ by Berzan