Home
Softono
a

adamant-im

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
9

Software by adamant-im

adamant
Open Source

adamant

# ADAMANT ADAMANT is a **decentralized blockchain-based messaging platform**. Applications use ADAMANT as an anonymous and encrypted relay and storage layer to enable secure messaging features. Examples include the [Messenger app](https://github.com/Adamant-im/adamant-im), [Blockchain 2FA](https://github.com/Adamant-im/adamant-2fa), and [Exchange bot](https://github.com/Adamant-im/adamant-exchangebot). For more information, refer to the ADAMANT website: - Clear web: https://adamant.im - Tor: http://adamantim24okpwfr4wxjgsh6vtw4odoiabhsfaqaktnfqzrjrspjuid.onion ![ADAMANT nodes](./img/adm-nodes.jpeg) Additional information: - [How decentralized blockchain messenger works](https://news.adamant.im/how-decentralized-blockchain-messenger-works-b9932834a639) - [Encryption overview in ADAMANT Messenger](https://news.adamant.im/encryption-overview-in-adamant-messenger-878ecec1ff78) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) ## Node and API Documentation Comprehensive [Node specification](https://docs.adamant.im) is available. It covers the Fair dPoS consensus algorithm, decentralization principles, node installation and configuration, and other core concepts. The documentation also details API endpoints for managing accounts, transactions, chats, and key-value storage (KVS). Additionally, it provides guidance on creating new accounts and encrypting or decrypting messages, and data types. See also: - [ADAMANT Improvement Proposals (AIPs)](https://aips.adamant.im) ## Installation, Configuration and Running ADM node Refer to [ADAMANT Node documentation](https://docs.adamant.im/own-node/installation.html) for complete installation instructions. It includes hardware requirements, installation scripts, and step-by-step guides for setting up an ADM blockchain node on various operating systems, including Linux, macOS, and Windows. ### Critical Shutdown Notice Stop the node with graceful shutdown. When running in the foreground, press `Ctrl+C` and wait until cleanup finishes. Do not use `kill -9`, forced terminal termination, or any other uncatchable process kill unless the process is already unrecoverably stuck. The node stores derived consensus state in memory mirror tables such as `mem_accounts` and `mem_round`. A forced kill can interrupt block, transaction, or round writes and leave those tables inconsistent with the persisted blockchain. On the next startup this may force a full memory-state rebuild from the beginning of the chain: ```text [WRN] loader Detected unapplied rounds in mem_round [WRN] loader Recreating memory tables [inf] loader Rebuilding blockchain, current block height: 1 ``` If this happens, do not try to repair `mem_*` tables with manual SQL edits. The reliable recovery options are restoring a trusted database snapshot or letting the node rebuild/replay derived state from the blockchain. ### Test Environment You may want to test the node in a safe environment before running a `mainnet` node. The `testnet` configuration allows to experiment and run tests without affecting the `mainnet`. Refer to [ADAMANT Node Testnet](https://docs.adamant.im/own-node/testnet.html) section of documentation. ### Configuration Overrides Startup config can be overridden without editing `config.json` or `test/config.json`. Overrides are applied in this order: selected config file, each `--config-overrides` file in command-line order, repeated `--config-set` values, then legacy CLI shortcuts such as `--port`, `--address`, `--peers`, `--log`, and `--snapshot`. The final resolved config is validated against the node config schema before startup. Use dot paths that match the config object shape: ```sh node app.js \ --config test/config.json \ --genesis test/genesisBlock.json \ --config-set consensusActivationHeights.fairSystem=4359465 \ --config-set 'redis={ "url": "redis://127.0.0.1:6379/1", "password": null }' ``` The same flags work through npm scripts: ```sh npm run start -- --config-set port=36667 npm run start:testnet -- --config-set api.access.public=true ``` The `--config-overrides` file type is selected by extension. Any non-`.json` file is parsed as env-style content with one `key=value` override per line: ```dotenv consensusActivationHeights.fairSystem=4359465 redis={ "url": "redis://127.0.0.1:6379/1", "password": null } ``` Run with: ```sh node app.js \ --config test/config.json \ --genesis test/genesisBlock.json \ --config-overrides test/config.overrides.env ``` Files ending in `.json` are parsed as nested JSON partial overrides: ```json { "consensusActivationHeights": { "fairSystem": 4359465 }, "redis": { "url": "redis://127.0.0.1:6379/1", "password": null } } ``` Run with: ```sh node app.js \ --config test/config.json \ --genesis test/genesisBlock.json \ --config-overrides test/config.overrides.json ``` Values are parsed as JSON first, so numbers, booleans, `null`, arrays, and objects keep their types. Non-JSON values are treated as strings. Unknown paths, unsafe path segments, malformed JSON arrays or objects, and schema-invalid values fail before startup. Be careful when overriding `consensusActivationHeights.*`: using activation heights that do not match the selected network can make a node diverge from that network. ### Localnet Use localnet when you need several ADAMANT nodes on one machine without connecting to public peers: ```sh npm run start:localnet -- --nodes 3 npm run status:localnet npm run stop:localnet npm run drop:localnet ``` `start:localnet` runs nodes in the background with: - `test/config.default.json` as the base config; - `test/genesisBlock.json` as the genesis block; - `test/genesisPasses.json` as the genesis delegate passphrase source; - `--config-overrides test/config.localnet.json` by default; - one generated per-node override file under `.localnet/node-N/`. Every node gets isolated ports, PostgreSQL database names, Redis database indexes, process output files, and ADAMANT log files. The default log layout is: ```text logs-localnet/ node-1/ adamant_localnet.log adamant_localnet_debug.log node-2/ node-3/ ``` The localnet manifest is written to `.localnet/manifest.json` and includes node endpoints, PIDs, database names, Redis URLs, generated override paths, log paths, and configured delegate counts. Scenario tools can consume this manifest instead of guessing localnet ports. Use `status:localnet` to inspect localnet without attaching to node processes: ```sh npm run status:localnet ``` It reads the manifest, checks every managed PID, requests `/api/node/status` and `/api/peers` from every node, reports the number of configured forging delegates, and shows the last successful forging log timestamp with its age in seconds. The reported broadhash consensus is calculated live from current connected peer records; if `/api/node/status` still has an older cached consensus value, status output shows it as `cached`. Localnet uses the testnet genesis block by default. The node derives `nethash` from `genesisBlock.payloadHash`, which is the SHA-256 payload hash verified from the genesis block transactions. It is not a random identifier. If you use a different genesis block, every localnet node must use the same genesis block and resulting nethash. By default, genesis delegate passphrases are distributed across localnet nodes. For one to three nodes, all nodes receive delegate passphrases. For more than three nodes, the last node is non-forging and the remaining nodes receive the passphrases as evenly as possible. By default, `start:localnet` tries to create missing per-node PostgreSQL databases and keeps them persistent across restarts: ```text adamant_localnet_node_1 adamant_localnet_node_2 adamant_localnet_node_3 ``` The created databases are owned by the configured node DB user, `adamanttest` by default. Database creation uses the current PostgreSQL user unless `--db-admin-user` is provided: ```sh npm run start:localnet -- --nodes 3 --db-admin-user postgres ``` If the databases already exist, startup continues. If your local PostgreSQL user cannot create databases, create them manually, pass a PostgreSQL admin user, or start with `--skip-db-create` after the databases exist. `stop:localnet` reads `.localnet/manifest.json`, sends `SIGTERM` to every managed node, and waits for the normal ADAMANT cleanup path. It does not use forced process termination. Localnet databases are not dropped by default. To stop localnet and drop its PostgreSQL databases in one command: ```sh npm run stop:localnet -- --drop-on-stop ``` Use `drop:localnet` when you want a full localnet database cleanup even if no nodes are currently running: ```sh npm run drop:localnet ``` ## Tests Refer to [CONTRIBUTING.md](./.github/CONTRIBUTING.md) ## Authors - ADAMANT community developers <[email protected]> - ADAMANT Foundation <[email protected]> - ADAMANT TECH LABS LP <[email protected]> - Boris Povod <[email protected]> - Pavel Nekrasov <[email protected]> - Sebastian Stupurac <[email protected]> - Oliver Beddows <[email protected]> - Isabella Dell <[email protected]> - Marius Serek <[email protected]> - Maciej Baj <[email protected]> ## License Copyright © 2025 ADAMANT community developers Copyright © 2020-2025 ADAMANT Foundation Copyright © 2017-2020 ADAMANT TECH LABS LP Copyright © 2016-2017 Lisk Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the [GNU General Public License](https://github.com/LiskHQ/lisk/tree/master/LICENSE) along with this program. If not, see <http://www.gnu.org/licenses/>. --- This program also incorporates work previously released with lisk `0.7.0` (and earlier) versions under the [MIT License](https://opensource.org/licenses/MIT). To comply with the requirements of that license, the following permission notice, applicable to those parts of the code only, is included below: Copyright © 2016-2017 Lisk Foundation Copyright © 2015 Crypti Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Security Crypto & Blockchain
915 Github Stars
adamant-tradebot
Open Source

adamant-tradebot

ADAMANT’s market-making bot is software that enables trading on cryptocurrency exchanges. It helps generate trading volume, maintain spread and liquidity, set price ranges, and build a live-like dynamic order book. This is the free version — suitable for small crypto projects with low liquidity, traded on centralized exchanges from the open list. For premium features, see [https://marketmaking.app/cex-mm/mm-features](https://marketmaking.app/cex-mm/mm-features/). # Market-making bot In Market-making mode, the bot automatically places and executes orders to generate trading volume, maintain spread and liquidity, build live-like dynamic order books, and track token prices. Market making is useful for: * Cryptocurrency projects (token issuers) * Cryptocurrency exchanges See [marketmaking.app](https://marketmaking.app) to explore the bot’s full list of features. ![Trading chart](./assets/Making-chart.png) ![Market Making & OrderBook Building](./assets/OrderBook-Builder.gif) # Profit trading Profit Trading is a mode where the bot executes orders based on a chosen strategy. For profit-trading functionality, see our other software—[CoinOptimus](https://github.com/Adamant-im/adamant-coinoptimus). # Features * Easy to install and configure * Initial fill order books * Dynamic order book building * Place buy and sell limit or market orders * Market making with 4 policies: spread, orderbook, optimal, and depth * Spread & liquidity/depth maintenance * Price range setting * Arbitrage token price on other trade pairs or exchanges * Managed with your commands using ADAMANT Messenger ## Premium features For premium features, see [https://marketmaking.app/cex-mm/mm-features](https://marketmaking.app/cex-mm/mm-features/). # Supported exchanges In the free version, the bot supports the following exchanges out of the box: * [P2PB2B](https://p2pb2b.com) * [Azbit](https://azbit.com?referralCode=9YVWYAF) * [StakeCube](https://stakecube.net/?team=adm) * [Coinstore](https://h5.coinstore.com/h5/signup?invitCode=o951vZ) * [FameEX](https://www.fameex.com/en-US/commissiondispense?code=MKKAWV) * [NonKYC](https://nonkyc.io?ref=655b4df9eb13acde84677358) * More exchanges available in the premium version To add support for other exchanges, see [https://marketmaking.app/cex-mm/mm-features/#add-more-exchanges](https://marketmaking.app/cex-mm/mm-features/#add-more-exchanges). # Usage and Installation After installation, you control the bot directly via a secure ADAMANT Messenger chat. The bot is fully self-hosted. [Installation and usage guide](https://marketmaking.app/cex-mm/installation/). [Command reference](https://marketmaking.app/cex-mm/command-reference/). ## Requirements * Ubuntu 20+, centOS 8+ (we didn't test others) * NodeJS v18+ * MongoDB ([installation instructions](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/)) ## Setup ``` su - adamant git clone https://github.com/Adamant-im/adamant-tradebot cd ./adamant-tradebot npm i ``` ## Pre-launch tuning The bot will use `config.jsonc` if available, or `config.default.jsonc` otherwise. ``` cp config.default.jsonc config.jsonc nano config.jsonc ``` Parameters: see comments in `config.jsonc`. ## Launching You can start the bot with the `node app` command, but it is recommended to run it under a process manager: ``` pm2 start app.js --name tradebot ``` Remember to add tradebot to `pm2 startup` or cron. ## Updating ``` su - adamant cd ./adamant-tradebot pm2 stop tradebot git pull npm i ``` Revise `config.jsonc` if `config.default.jsonc` changed. Then `pm2 restart tradebot`.

ML Frameworks Crypto & Blockchain
798 Github Stars
adamant-im
Open Source

adamant-im

[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/adamant-im/adamant-im/preview.yml)](https://github.com/Adamant-im/adamant-im/actions/workflows/preview.yml) [![GitHub commit activity (branch)](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Adamant-im/adamant-im/gh-pages/commits.json)](https://github.com/Adamant-im/adamant-im/commits) [![GitHub release (with filter)](https://img.shields.io/github/v/release/adamant-im/adamant-im?color=24bd13)](https://github.com/Adamant-im/adamant-im/releases) [![Static Badge](https://img.shields.io/badge/Slack-brightgreen?logo=slack&logoColor=white&labelColor=fa8f02&color=grey&link=https%3A%2F%2Fjoin.slack.com%2Ft%2Fadamant-im%2Fshared_invite%2Fzt-3n32uqh3-TmTM4qPAKcp3PzrPMtKETQ)](https://join.slack.com/t/adamant-im/shared_invite/zt-3n32uqh3-TmTM4qPAKcp3PzrPMtKETQ) [![Static Badge](https://img.shields.io/badge/Twitter-brightgreen?logo=x&logoColor=white&labelColor=blue&color=grey&link=https%3A%2F%2Ftwitter.com%2Fadamant_im)](https://twitter.com/adamant_im) # ADAMANT Messenger PWA ADAMANT Messenger is an open-source decentralized messenger and non-custodial wallet built on the ADAMANT blockchain. This repository contains the main client for Web, Tor, Android (Capacitor), and Desktop (Electron). ADAMANT is designed around privacy, censorship resistance, and user custody. Accounts do not require phone numbers or emails, private keys stay on the user side, and the client can work with distributed nodes instead of a single provider. > Your ADAMANT passphrase cannot be recovered by developers, support, or infrastructure operators. Store it offline and treat it like a wallet seed phrase. ## Why ADAMANT - No phone numbers, no emails, no contact-book scraping by default - End-to-end encrypted messaging using Diffie-Hellman Curve25519, Salsa20, Poly1305, SHA-256, and Ed25519 - Censorship-resistant account model backed by a decentralized blockchain network - Non-custodial wallets and in-chat crypto transfers with full user-side key control - Multi-node architecture with failover, self-hostability, and Tor-friendly deployment options ## What This Repository Powers - Progressive Web App for the public web - Tor build for users who need stronger network anonymity - Electron desktop app for macOS, Windows, and Linux - Capacitor Android app ## Highlights - Anonymous onboarding without a phone number or email - Encrypted chats with blockchain-backed message ordering and authenticity - Built-in wallets for ADM, BTC, ETH, DOGE, DASH, USDT, USDC, and ERC20 tokens - In-chat transfers, exchanger flows, and Adelina AI chat integration - IPFS-based file sharing for attachments and media - Custom node configuration with health checks and failover - Open-source, community-driven, and self-hostable by design ## Official Links | Resource | Link | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Website | [adamant.im](https://adamant.im) | | Apps | [adamant.im/#adm-apps](https://adamant.im/#adm-apps) | | Documentation | [docs.adamant.im](https://docs.adamant.im) | | Whitepaper | [adamant-whitepaper-en.pdf](https://adamant.im/whitepaper/adamant-whitepaper-en.pdf) | | Releases | [GitHub Releases](https://github.com/Adamant-im/adamant-im/releases) | | Media pack | [media_pack.zip](https://adamant.im/img/media_pack.zip) | | Project profile | [About ADAMANT: Description and Details](https://docs.google.com/document/d/e/2PACX-1vR_SndPoXvRvntay9Pn9A_xbI1n940GvSAENiU5SuYcznFT-6a7X0RqH50vCgJR-QmXPLe1s_1DRtl6/pub) | ### Community PWA Deployments Mainnet app: - GitHub Pages auto-build: [adamant-im.github.io/adamant-im](https://adamant-im.github.io/adamant-im/) from `master` only due to GitHub Pages limitations - Vercel auto-build: [msg2.adamant.im](https://msg2.adamant.im) from `master` on Vercel US - Server-side auto-build: [msg.adamant.im](https://msg.adamant.im) and [adm.im](https://adm.im) from `master` - Server-side auto-build: [msgtest.adamant.im](https://msgtest.adamant.im) from `dev` - Server-side Tor auto-build: <http://adamant6457join2rxdkr2y7iqatar7n4n72lordxeknj435i4cjhpyd.onion> from `master` - Server-side Tor auto-build: <http://il2fcw65jrrv4au7mtuvodzfwtc6hje6r4ooz7yoqu2jl422b44iofyd.onion> from `dev` - Vercel auto-build: [dev.adamant.im](https://dev.adamant.im) from the `dev` branch on Vercel US - Massa DeWeb auto-build: [adm.massahub.network](https://adm.massahub.network) from `master`, hosted on the Massa blockchain - GitHub Actions auto-build can also be configured by any user for their own `master` deployment Testnet app: - GitHub Actions auto-build in Surge: [msg-adamant-testnet.surge.sh](https://msg-adamant-testnet.surge.sh) from `master`, mirrored at <http://msg-testnet.adamant.im> (HTTP-only for the mirror) - GitHub Actions auto-build in Surge: [dev-adamant-testnet.surge.sh](https://dev-adamant-testnet.surge.sh) from `dev`, mirrored at <http://dev-testnet.adamant.im> (HTTP-only for the mirror) ## Quick Start Recommended environment: - Node.js `^20.19.0 || >=22.12.0` - npm `>=10` Clone and run the app locally: ```bash git clone --recursive https://github.com/Adamant-im/adamant-im.git cd adamant-im npm install npm run dev ``` Start a local HTTPS dev server with hot reload: ```bash npm run dev-https ``` `npm run https` is kept as a shortcut for the same flow. ## Common Commands | Task | Command | | --------------------------------------- | -------------------------- | | Start local development | `npm run dev` | | Start local HTTPS development | `npm run dev-https` | | Start localnet development on `0.0.0.0` | `npm run dev:localnet` | | Start testnet development | `npm run dev:testnet` | | Start Tor-mode development | `npm run dev:tor` | | Build production PWA | `npm run build` | | Build testnet PWA | `npm run build:testnet` | | Build Tor PWA | `npm run build:tor` | | Preview production build | `npm run serve` | | Preview testnet build | `npm run serve:testnet` | | Build Electron app | `npm run electron:build` | | Run Electron in development | `npm run electron:dev` | | Preview Electron production build | `npm run electron:serve` | | Prepare Android build assets | `npm run android:prebuild` | | Open Android Studio project | `npm run android:open` | | Run Android app on device/emulator | `npm run android:run` | ### CSP hardening on Vercel builds Vercel preview/dev hosts use the same soft CSP profile as production domains (including current `unsafe-inline` and `unsafe-eval` allowances) to avoid behavior drift between environments. Strict CSP hardening (removing `unsafe-eval`) is tracked separately and must be done only after runtime dependency cleanup. ## Validation Baseline validation for non-trivial changes: ```bash npm run lint npm run typecheck npm run test -- --run ``` Useful additional checks: ```bash npm run build npm run test:e2e ``` When changes affect schema-driven artifacts: ```bash npm run schema:generate npm run wallets:types:generate ``` ## Playwright Smoke Checks Install Chromium for local e2e runs: ```bash npm run test:e2e:install ``` Run the smoke suite: ```bash npm run test:e2e ``` Run with extended artifacts: ```bash npm run test:e2e:detailed ``` Open the latest HTML report: ```bash npm run test:e2e:report ``` ## Desktop and Android Notes Run Electron locally: ```bash npm run electron:dev ``` Force legacy Chrome extension-based Vue DevTools inside Electron: ```bash ELECTRON_USE_CHROME_DEVTOOLS_EXTENSION=true npm run electron:dev ``` Keep DevTools open while suppressing noisy Chromium logs in terminal: ```bash npm run electron:dev ``` Disable log suppression and show full Chromium/Electron internals: ```bash ELECTRON_SUPPRESS_CHROMIUM_LOGS=false npm run electron:dev ``` Build Electron packages: ```bash npm run electron:build ``` Build a macOS arm64 app and notarize it: ```bash npm run electron:build:mac:arm64:notarize ``` Preview the Electron production build: ```bash npm run electron:serve ``` ### macOS signing and notarization (local/CI) For distributable macOS builds, use a valid `Developer ID Application` certificate and notarization. The notarization hook (`scripts/electron/notarize.cjs`) supports 3 auth strategies: 1. Apple ID + app-specific password 2. Keychain profile (`xcrun notarytool store-credentials`) 3. App Store Connect API key Supported environment variables: ```bash # Common APPLE_NOTARIZE=true # Strategy 1 (Apple ID) APPLE_ID=... APPLE_APP_SPECIFIC_PASSWORD=... APPLE_TEAM_ID=... # Strategy 2 (Keychain profile) APPLE_KEYCHAIN_PROFILE=... # optional APPLE_KEYCHAIN=... # Strategy 3 (App Store Connect API key) APPLE_API_KEY=/absolute/path/to/AuthKey_XXXXXXXXXX.p8 APPLE_API_KEY_ID=XXXXXXXXXX # optional for team keys APPLE_API_ISSUER=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ``` Local builds can store these variables in `electron-builder.env.local` or `electron-builder.env` and the hook will load them automatically. For Apple ID strategy, `APPLE_APP_PASSWORD` is also accepted as an alias for `APPLE_APP_SPECIFIC_PASSWORD`. Code-signing for `electron-builder`: ```bash # local identity in Keychain CSC_NAME="Developer ID Application: <Company> (<TEAM_ID>)" # or CI/base64 P12 CSC_LINK=... CSC_KEY_PASSWORD=... ``` Prepare and open Android project: ```bash npm run android:prebuild npm run android:open ``` Build and sign Android app: ```bash cp capacitor.env.example capacitor.env npm run android:build ``` ## Self-hosted If you are unable to access [adm.im](https://adm.im) (e.g., due to censorship), you can run a self-hosted instance of ADAMANT Messenger to: - Increase reliability and decentralization of the ADAMANT Messenger ecosystem - Help other users access the messenger in countries with strong Internet limitations We always encourage people to build it from source. As an option, you can build and deploy the app to GitHub Pages. Follow the instructions below. ### Enable GH Actions 1. Fork the repository 2. Go to the repository **Settings** 3. Navigate to the **Pages** tab 4. Set the source as **GitHub Actions** ### Run GH Workflow 1. Go to the **Actions** tab 2. Enable workflows 3. Select the **GitHub Pages** workflow 4. Click **Run workflow** 5. Wait until the build succeeds 6. Open ADAMANT Messenger at `username.github.io/adamant-im` You can as well point your GitHub Pages subdomain to a [custom domain](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site). ## Security and Privacy Notes - Private keys are derived and stored client-side - Do not log or share passphrases, mnemonic material, or exported private keys - Treat the browser runtime as potentially hostile and prefer trusted devices - For stronger network anonymity, use the Tor build or a self-hosted instance ## Contributing Issues and pull requests are welcome. When contributing, prioritize security, privacy, decentralization, and compatibility with the existing ADAMANT protocol and user data. Before opening a substantial PR, it is helpful to run: ```bash npm run lint npm run typecheck npm run test -- --run npm run build ```

Communication Crypto & Blockchain
771 Github Stars
ETH-transactions-storage
Open Source

ETH-transactions-storage

# Indexer for Ethereum to get transaction list by ETH address Known Ethereum nodes lack the functionality to get a transaction list for an ETH address (account). This Indexer allows one to explore ETH and ERC20 transactions by Ethereum address and obtain a history of any user|wallet in just a move as Etherscan does. Indexer is written in Python. It works as a service in the background: - Connects to Ethereum node (works well with Geth, Nethermind, or other node, which provides http/ws/ipc API) - Stores all transactions in the Postgres database - Provides data for API to get transactions by address with postgrest Sample request: ![Indexer's request example](./assets/indexer-request.png) ## Stored information All indexed transactions include (database field names shown): - `time` is a transaction's timestamp - `txfrom` sender's Ethereum address - `txto` recipient's Ethereum address - `value` stores the amount of ETH transferred - `gas` indicates `gasUsed` - `gasprice` indicates `gasPrice` - `block` is a transaction's block number - `txhash` is a transaction's hash - `contract_to` indicates the recipient's Ethereum address in case of a token transfer - `contract_value` stores amount of ERC20 transaction in its tokens - `status` tx status To reduce storage requirements, Indexer stores only token transfer ERC20 transactions, started with `0xa9059cbb` in raw tx input. An example: ``` { "time": 1576008898, "txfrom": "0x6B924750e56A674A2Ad01FBF09C7c9012f16f094", "txto": "0x1143E097e134F3407eF6B088672CCECE9A4f8CDD", "gas": 21000, "gasprice": 2500000000, "block": 9084957, "txhash": "0xcf56a031dfc89f5a3686cd441ea97ae96a66f5809a4c8c1b370485a04fb37e0e", "value": 1200000000000000, "contract_to": "", "contract_value": "", "status": true } ``` Refers to transaction 0xcf56a031dfc89f5a3686cd441ea97ae96a66f5809a4c8c1b370485a04fb37e0e. ## Ethereum Indexer's API To get Ethereum transactions by address, Postgrest is used. It provides RESTful API to the Postgres index database. After an index is created, you can use requests like ``` curl -k -X GET "http://localhost:3000/?and=(contract_to.eq.,or(txfrom.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98,txto.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98))&order=time.desc&limit=25" ``` The request will show the 25 last transactions for Ethereum address 0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 (Bittrex), ordered by timestamp. For API reference, see [Postgrest](https://postgrest.org/en/stable/api.html). # Ethereum Indexer Setup ## Prerequisites - Ethereum node with RPC API enabled: Geth, Nethermind, etc. - Python 3 - Postgresql - Postgrest for API - nginx or other web server (in case of public API) ## Installation ### Ethereum Node Make sure your Ethereum node is installed and fully synced. You can check its API and best block height with the command: ``` curl --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 ``` ### Python modules Install Python 3. Install python modules: ``` apt install python3-pip pip3 install web3 pip3 install psycopg2 ``` ### PostgreSQL Install Postgres. Create Postgres user/role: ``` bash su - postgres #switch to psql admin user createuser -s api_user ``` Where `api_user` is a user who will run the indexer service. (As example, we create a superuser. You can use your own grants.) Create database `index` for Ethereum transaction index: ``` sql CREATE DATABASE index; ``` Add tables into `index` using SQL script `create_tables.sql`: ``` bash psql -f create_tables.sql index ``` For case-insensitive comparisons, we use `citex` data type instead of `text`. Create database indexes to request tx data fast. **It's better to allow this tool to store initial tx data until the current block first, and then create these indexes. Filling initial tx data will be faster this way.** Create recommended database indexes: ``` bash psql -f create_indexes.sql index ``` Create additional database indexes: ``` bash psql -f create_indexes_add.sql index ``` Additional indexes cover more complex requests, such as getting Ethereum-only or specific token transactions for an address. [See Request examples](#api-request-examples). Remember to grant privileges to psql database `index` and tables for users you need. Example: ``` sql \c index GRANT ALL ON ethtxs TO api_user; GRANT ALL ON aval TO api_user; GRANT ALL ON max_block TO api_user; GRANT ALL PRIVILEGES ON DATABASE index TO api_user; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO api_user; ``` ### Ethereum transaction Indexer `ethsync.py` is a script that makes an Ethereum transaction index. It accepts the following env variables: - DB_NAME: Postgres database name. Example: `index`. - ETH_URL: Ethereum node url to reach the node. Supports websocket, http and ipc. See examples in `ethsync.py`. - START_BLOCK: the first block to synchronize from. Default is 1. - CONFIRMATIONS_BLOCK: the number of blocks to leave out of the synch from the end. I.e., last block is current `blockNumber - CONFIRMATIONS_BLOCK`. Default is 0. - PERIOD: Number of seconds between synchronization. Default is 20 sec. - LOG_FILE: optional file path and name where s=to save logs. If not provided, use StreamHandler. The indexer can fetch transactions not from the beginning, but from a particular block number `START_BLOCK`. It will speed up the indexing process and reduce database size. For a reference: - index size starting from 5,555,555 block to 9,000,000 (3.5 mln blocks) is about 190 GB - index size starting from 11,000,000 block to 12,230,000 (1 mln blocks) is about 83 GB - index size starting from 14,600,000 block to 15,100,000 (0.5 mln blocks) is about 27 GB - index size starting from 14,600,000 block to 18,100,000 (3.5 mln blocks) with additional indexes is about 289 GB At first start, the Indexer will store transactions starting from the block you set. It will take time. After that, it will check for new blocks every `PERIOD` seconds and update the index. Sample run string: ``` DB_NAME=index ETH_URL=http://127.0.0.1:8545 START_BLOCK=14600000 LOG_FILE=/home/api_user/ETH-transactions-storage/ethsync.log python3 /home/api_user/ETH-transactions-storage/ethsync.py ``` We recommend running the Indexer script `ethsync.py` as a background service to ensure it will be restarted in case of failure. See `ethsync.service` as an example. Copy it to /lib/systemd/system/ethsync.service, update according to your settings, then register a service: ``` systemctl start ethsync.service systemctl enable ethsync.service ``` Note, that indexing takes time. To check the indexing process, get the last indexed block: ``` psql -d index -c 'SELECT MAX(block) FROM ethtxs;' ``` And compare it to the Ethereum node's best block. ### Troubleshooting To test the connection from the script, set a connection line in `ethtest.py`, and run it. In case of success, it will print the current Ethereum's last block. To test a connection to a Postgres database `index`, run `pgtest.py`. ### Transaction API with Postgrest [Install and configure](https://postgrest.org/en/stable/install.html) Postgrest. Here is an example of running API for user `api_user` connected to `index` database on the 3000 port: ``` db-uri = "postgres://api_user@/index" db-schema = "public" db-anon-role = "api_user" db-pool = 10 server-host = "127.0.0.1" server-port = 3000 ``` Make sure you add Postgrest in crontab for autostart on reboot: ``` @reboot cd /usr/share && /usr/bin/postgrest ./postgrest.conf ``` ### Make Indexer's API public If you need to provide public API, use any web server like nginx and set a proxy to Postgrest port in config: ``` location /ethtxs { proxy_pass http://127.0.0.1:3000; } location /aval { proxy_pass http://127.0.0.1:3000; } location /max_block { proxy_pass http://127.0.0.1:3000; } ``` This way, endpoints will be available: - `/ethtxs` used to fetch Ethereum transactions by address - `/aval` returns the status of service. Endpoint `aval` is a table with `status` field just to check API availability. - `/max_block` returns max Ethereum-indexed block Example: ``` https://yourdomain.com/max_block ``` ## Dockerized and docker-compose by Guénolé de Cadoudal ([email protected]) In the `docker-compose.yml`, you find a configuration that shows how this tool can be embedded in a docker configuration with the following processes: - postgres db: to store the indexed data - postgREST tool to expose the data as a REST api (see above comments) - GETH node in POA mode. It can be Nethermind or another node, but it has not been tested - EthSync tool (this tool) [Set env variables](#ethereum-transaction-indexer). # API request examples Get the last 25 Ethereum transactions without ERC-20 transactions for address 0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98: ``` curl -k -X GET "http://localhost:3000/ethtxs?and=(contract_to.eq.,or(txfrom.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98,txto.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98))&order=time.desc&limit=25" ``` Get the last 25 USDT transactions for address 0xabfDF505fFd5587D9E7707dFB47F45AF1f03E275: ``` curl -k -X GET "http://localhost:3000/ethtxs?and=(txto.eq.0xdac17f958d2ee523a2206206994597c13d831ec7,or(txfrom.eq.0xabfDF505fFd5587D9E7707dFB47F45AF1f03E275,contract_to.eq.000000000000000000000000abfDF505fFd5587D9E7707dFB47F45AF1f03E275))&order=time.desc&limit=25" ``` Get the last 25 ERC-20 transactions without Ethereum transactions for address 0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98: ``` curl -k -X GET "http://localhost:3000/ethtxs?and=(contract_to.neq.,or(txfrom.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98,txto.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98))&order=time.desc&limit=25" ``` Get last 25 transactions for both ERC-20 and Ethereum for address 0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98: ``` curl -k -X GET "http://localhost:3000/ethtxs?and=(or(txfrom.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98,txto.eq.0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98))&order=time.desc&limit=25" ``` # License Copyright © 2020-2024 ADAMANT Foundation Copyright © 2017-2020 ADAMANT TECH LABS LP This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Database Crypto & Blockchain
575 Github Stars
adamant-console
Open Source

adamant-console

# Adamant-console Adamant-console is Command-line utilities to interact with ADAMANT blockchain. It allows you to run commands like send tokens, create new address and get information. ## Understanding interaction with ADAMANT blockchain ADAMANT has _only secure API_, and you cannot transfer passphrase to node to make any action with wallet. Instead, node _requires signed transaction_ to make any action. Adamant-console connects to ADAMANT nodes on your choice (set in configuration file), it can be any node, locally installed on your machine, or from other side of the Earth. As Console doesn’t transfer passphrases to nodes, it's safe to connect to any node. Node you connect should have [API enabled](https://medium.com/adamant-im/how-to-run-your-adamant-node-on-ubuntu-990e391e8fcc#fe7e). You can use any programming languages to interact with Adamant-console, like PHP, Python, NodeJS, bash. Alternative ways to interact with ADAMANT blockchain: - [Direct node's API](https://github.com/Adamant-im/adamant/wiki) - [JS API library](https://github.com/Adamant-im/adamant-api-jsclient/wiki) ## Installing and configuring The installation and configuration are described in [Adamant-console Wiki](https://github.com/Adamant-im/adamant-console/wiki/Installation-and-configuration). Note, by default, `network` parameter set to `testnet`. If you want to work with mainnet, set the value to `mainnet`. ## Using Console There are 3 ways of using ADAMANT Console tool: - Command-line interface (CLI). List of available for commands see in [Adamant-console Wiki](https://github.com/Adamant-im/adamant-console/wiki/Available-Commands). - JSON-RPC. To use this interface, [start JSON-RPC daemon](https://github.com/Adamant-im/adamant-console/wiki/JSON-RPC) on Adamant-console. - Directly through the built-in library. The available methods see in [Adamant-console Wiki](https://github.com/Adamant-im/adamant-console/wiki/Running-Commands-in-Adamant-library) also. See [Running Commands in Adamant console](https://github.com/Adamant-im/adamant-console/wiki/Running-Commands-in-Adamant-console). ## Integration notes with ADM token for Exchanges See [Integration notes with ADM token for Exchanges](https://medium.com/adamant-im/integration-notes-with-adm-token-for-exchanges-d51a80c36aaf). Document describes how to create accounts for deposits, get balances and transactions info, as well as, how to make withdrawals.

Crypto & Blockchain Terminal & CLI Tools
497 Github Stars
pool
Open Source

pool

# ADAMANT Forging Pool > Read more about [Forging, delegates, Fair dPoS, and how to run your Forging pool](https://medium.com/adamant-im/earning-money-on-adm-forging-4c7b6eb15516) > This software is a successor of outdated [v2 Forging pool](https://github.com/Adamant-im/adamant-pool) <br> <p align="center"> <img src="./assets/logo.png#gh-light-mode-only" height="60"/> <img src="./assets/logo-dark.png#gh-dark-mode-only" height="60"/> </p> <p align="center"> Calculate and transfer voters’ rewards automatically. </p> <h1></h1> - :rainbow: Easy to install - :handshake: Reliable, uses decentralized network advantages - :hammer_and_wrench: Customizable (using config file) - :scroll: History stored in local files (powered by [lowdb](https://github.com/typicode/lowdb)) - :rocket: Minimum server requirements: 1 vCPU and 512 MB of RAM - :carpentry_saw: You can setup the pool on a separate machine without a node - :chart_with_upwards_trend: Dashboard for voters with mobile version support - :bell: Notification system via ADAMANT or Slack for admin ## Installation ### Requirements - NodeJS v16+ (already installed if you have a node on your machine) ### Setup Clone the repository with pool into a newly created directory: ``` git clone https://github.com/Adamant-im/pool ``` Move to directory with the cloned repository: ``` cd pool ``` Install dependencies using npm or any other package manager: ``` npm install ``` Build a website: ``` npm run build:web ``` ### Pre-launch tuning Copy default config as `config.jsonc`: ``` cp config.default.jsonc config.jsonc ``` And edit that file by inserting the pool's secret phrase as the minimum configuration, e.g. using `nano`: ``` nano config.jsonc ``` > See comments in `config.default.jsonc` for more parameters. ### Migration from v2 To migrate a database from v2 run the migration script with the specified path to the target pool or database: ```sh # or ~/adamant-pool/db $ node scripts/migrate.mjs ~/adamant-pool ``` In order for the changes to take effect, you will need to restart your pool. ## Launching You can start the pool using `npm` command: ``` npm run start ``` but we recommend to use a process manager to start the pool, f.e. [`pm2`](https://pm2.keymetrics.io/): ``` pm2 start ./scripts/start.sh --name "adamantpool" ``` ## Add pool to cron Edit crontab file using the command below: ``` crontab -e ``` and paste the string: ``` @reboot cd /home/adamant/pool && pm2 start /home/adamant/pool/scripts/start.sh --name "adamantpool" ``` ## Contribution Please have a look at the [CONTRIBUTING.md](./.github/CONTRIBUTING.md)

Crypto & Blockchain
484 Github Stars
adamant-api-jsclient
Open Source

adamant-api-jsclient

# 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.

Communication Crypto & Blockchain
468 Github Stars
adamant-iOS
Open Source

adamant-iOS

# ADAMANT Messenger for iOS iOS native client for ADAMANT Messenger. Available at [App Store](https://itunes.apple.com/app/adamant-messenger/id1341473829). You can use this repository to build your own version of ADAMANT iOS application. ADAMANT is the most secure and anonymous messenger, encrypted with Blockchain. Highlights: - The most secure and anonymous messenger (see comparison table on Website) - PWA version is also available https://msg.adamant.im/ - Trusted. Open-source project. - Brand new Fair dPoS blockchain concensus - The only one which is Blockchain-powered - Integrated crypto transfers Read more about ADAMANT Project at [adamant.im](https://adamant.im) ## Build Setup Clone and run ``` bash pod install ```

Mobile Development Crypto & Blockchain
468 Github Stars
adamant-2fa
Open Source

adamant-2fa

# ADAMANT 2FA Demo Application ## What is ADAMANT 2FA ADAMANT 2FA is a service to deliver one-time passwords (OTP) to ADAMANT Messenger account. It's cheaper, more secure and reliable than SMS. [ADAMANT 2FA advantages](https://medium.com/adamant-im/adamant-is-working-on-a-perfect-2fa-solution-15280b8a3349). Live demo is available at [2fa-demo.adamant.im](https://2fa-demo.adamant.im/signup). For details read [Presenting ADAMANT 2FA](https://medium.com/adamant-im/presenting-adamant-2fa-838db2322f7a). ## Prerequisites * [PostgreSQL](https://www.postgresql.org/download/) ## Setup Clone repository and install dependencies: ``` bash git clone https://github.com/Adamant-im/adamant-2fa.git cd adamant-2fa && npm i cd client && yarn install cd ../ ``` Create db-user and 2fa database: ``` sudo -u postgres psql postgres=# CREATE USER "adamant-2fa" WITH PASSWORD 'password'; postgres=# CREATE DATABASE "adamant-2fa" WITH OWNER "adamant-2fa"; ``` Set up md5 auth method. Get hba_file path: ``` postgres=# SHOW hba_file; hba_file ------------------------------------- /usr/local/var/postgres/pg_hba.conf (1 row) ``` Update hba_file and restart postgresql: ``` bash sudo nano /usr/local/var/postgres/pg_hba.conf local adamant-2fa adamant-2fa md5 sudo service postgresql restart ``` Create tables for Loopback models: ``` bash cd server && node create-lb-tables.js cd ../ ``` Set up ADAMANT `passPhrase` to send 2fa codes from: ``` cp config.default.json config.json nano config.json ``` The 2FA app uses `config.json` file. Enter your ADM passphrase into `passPhrase` field. Make sure this account has ADM to send messages with 2fa codes. [How to create ADM account and get free tokens](https://medium.com/adamant-im/how-to-start-with-a-blockchain-messenger-54d1eb9704e6). Note: 2FA demo uses [adamant-console](https://github.com/Adamant-im/adamant-console/) to send 2fa codes. If you have this tool installed separately, make sure it's default config doesn't exist, or set to `mainnet` and correct `passPhrase`. Note: If the app doesn't send 2FA codes, debug console shows `{"success":false,"errorMessage":"Wrong 'passPhrase' parameter"}`. Make sure you've created `config.json` in the root directory (where `package.json` located), and you've set `passPhrase` and `network` parameters. ## Start ### Serve (Dev mode) ``` bash node . cd client && yarn serve ``` ### Build ``` cd client && yarn build yarn serve-build ``` ### Launch as process manager process We recommend to use a process manager to start the program, f. e. [`pm2`](https://pm2.keymetrics.io/): ``` pm2 start ./server/server.js --name 2fa-demo-server pm2 start ./client/server.js --name 2fa-demo-client ``` ## How to connect ADAMANT 2FA to your service If you own a service (as email, exchange, financial interface, etc.) and want to add 2FA security for users, connect ADAMANT 2FA. To use ADAMANT 2FA, clone this project and modify client and server parts. Read more: [How to connect ADAMANT 2FA to your business](https://medium.com/adamant-im/go-to-secure-2fa-on-a-blockchain-344500a5f010).

Crypto & Blockchain SSO & Authentication
256 Github Stars