https://github.com/adamant-im/adamant-api-jsclient
ADAMANT Javascript API library
https://github.com/adamant-im/adamant-api-jsclient
adamant adamant-nodes adm anonymous anonymous-messenger bitcoin blockchain chat communication crypto crypto-wallet cryptocurrency decentralized-messenger encryption messenger private-keys secure secure-messenger wallet
Last synced: 11 days ago
JSON representation
ADAMANT Javascript API library
- Host: GitHub
- URL: https://github.com/adamant-im/adamant-api-jsclient
- Owner: Adamant-im
- License: gpl-3.0
- Created: 2018-11-27T15:55:17.000Z (almost 7 years ago)
- Default Branch: dev
- Last Pushed: 2025-08-08T18:28:57.000Z (2 months ago)
- Last Synced: 2025-08-29T19:20:08.842Z (about 2 months ago)
- Topics: adamant, adamant-nodes, adm, anonymous, anonymous-messenger, bitcoin, blockchain, chat, communication, crypto, crypto-wallet, cryptocurrency, decentralized-messenger, encryption, messenger, private-keys, secure, secure-messenger, wallet
- Language: TypeScript
- Homepage:
- Size: 705 KB
- Stars: 374
- Watchers: 111
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ADAMANT JavaScript API library
ADAMANT JavaScript API is a library intended to interact with ADAMANT blockchain for JavaScript developers. Also [ADAMANT Console](https://github.com/Adamant-im/adamant-console/wiki) and [ADAMANT node Direct API](https://github.com/Adamant-im/adamant/wiki/) are available.
Features:
- High reliability
- GET-requests to the blockchain
- Sending tokens
- Sending messages
- Creating a delegate
- Voting for delegates
- Caching public keys
- Encrypting and decrypting of messages
- Forming and signing transactions
- Working with ADM key pairs
- Generating crypto wallets (addresses and keys), bound to ADM account
- Working with ADAMANT epoch time
- Support for WebSocket connections
- Logging warnings, errors, info## Reliability
JS API shows decentralization in action—if a network node cannot fulfill your request, the library will redirect it to another node, and so on several times. You will get the result and you do not need to think about processing the request.
Health Check system pings all nodes in the list using [`/status`](https://github.com/Adamant-im/adamant/wiki/API-Specification#get-blockchain-and-network-status) endpoint, and connects to a node with actual height. When the library unable to process request with current node, it forces to re-initialize Health Check.
## Usage
Install library from npm:
```bash
npm i adamant-api
```Initialize the library:
```js
const { AdamantApi } = require('adamant-api')const nodes = [
"http://localhost:36666",
"https://endless.adamant.im",
"https://clown.adamant.im",
"http://23.226.231.225:36666",
"http://88.198.156.44:36666",
"https://lake.adamant.im"
];const api = new AdamantApi({
nodes,
});
```Request example:
```js
const response = await api.getBlocks()console.log(response.data)
```## Documentation
See [Wiki](https://github.com/Adamant-im/adamant-api-jsclient/wiki) for documentation and usage.