1.0.0-alpha01-fix • Published 10 months ago

@lyraxfoundation/lychain-core v1.0.0-alpha01-fix

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

LyChain Network

LyraxChain (LyChain) is a decentralized blockchain network and cryptocurrency built with TypeScript, designed to establish a robust and scalable digital currency ecosystem. It aims to provide a secure, efficient, and user-friendly platform for seamless transactions and decentralized applications (dApps).

The LyChain uses PostgreSQL to store and retrieve all data, even the other nodes goes offline or crashed, it will continue to run and synchronizing nodes when goes back online.

The Mainnet is available at Block Explorer and API at /api/v1.

API Server

This allows you to experiments with the API server. Test and try before creating a new app for LyChain.

pathdescriptionmethodparams
/authorizationTo get token for authorizationPOSTkey
/transaction/ledgersTo retrieve all chain data.GETn/a
/transaction/sendTo send transaction.POSTamount, to
/transaction/address/:addressRetrieve specific wallet transaction.GETn/a
/transaction/details/:hashRetrieve specific transaction details.GETn/a
/transaction/validateTo validate a transaction on the blockchain.POSTamount
/stake/pool/:addressRetrieve specific stake pool address.GETn/a
/wallet/address/:addressRetrieve specific wallet balance.GETn/a
/wallet/accountRetrieve wallet.POSTn/a
/wallet/newTo create a new wallet.POSTn/a

POST requires accessToken and content-type: application/json to make request. Add it through headers (Authorization: "Bearer eyGa...").

Get Started

Install

To install the node server on you local machine, run npm install -g @lyraxfoundation/lychain-core@latest or @lyraxfoundation/lychain-core@1.0.0-<version-name>-<version-number> for beta and alpha version.

Alpha version

versionnotesrelease
alphaInitial release.03/26/2025
alpha-01Bug fixes & improvements and optimization.TBH
alpha-02TBHTBH
alpha-03TBHTBH
alpha-03TBHTBH

Stable version

versionnotesrelease
1.0.0Current version03/26/2025

Build the source

To build the source from scratch, run npm install && npm run build from the root directory then run npm link to link globally and chmod +x <path-to-lychain> to change permission from root to user.

Start the node

On your console or terminal, run lychain --start.

This --start will start the node server on your local machine. Also--api will allow you to used the server api, --peer to enable peer to peer mode and --port to specify port for peer connection.

argumentsdescription
--startStart the node with basic function only, such as JSON-RPC. Best for private used.
--apiTo enable API server.
--peerTo enable P2P server.
--portCustom port for P2P.
--keyPrivate key.
--miningTo allow mining, requires private key.
--rateAmount to stake. Higher amount, higher reward chances.
--connectTo connect another node,

Once P2P server is established, you can connect to other LyChain node and make communication. The node will synchronize all nodes real time by connecting via --connect <host>.

paramsdescription
hostThe node url, such as ws://localhost:5000.

Start with mining

The node allows you to mine block by adding --mining, and --key <your-private-key> when you start the node server.

Example: lychain --start --key 0d44... --mining.

Manage Wallet

You can manage wallet directly in the CLI.

Not yet tested. May not work sometimes.

argumentsdescription
--walletTo start wallet instance.
--newTo create a new wallet.
--balanceTo check wallet balance.

Note

Beta and Alpha version is unstable, please use at your own risk. Don't use personal wallets here for the safety of your assets.

© 2025 Lyrax Foundation. All Rights Reserved.