{"id":43150833,"url":"https://github.com/attocash/commons","last_synced_at":"2026-02-05T00:02:57.509Z","repository":{"id":184841647,"uuid":"635020090","full_name":"attocash/commons","owner":"attocash","description":"Atto Commons offers a set of utilities for signing, seed generation, block hashing, and account creation.","archived":false,"fork":false,"pushed_at":"2026-01-31T23:22:24.000Z","size":1353,"stargazers_count":2,"open_issues_count":9,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-01T10:30:29.170Z","etag":null,"topics":["atto","commons","cryptocurrency","library"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/attocash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-01T19:34:46.000Z","updated_at":"2026-01-31T23:22:27.000Z","dependencies_parsed_at":"2023-07-30T15:37:11.311Z","dependency_job_id":"fdc10e39-6fc6-45a8-8092-cffec2e2ac45","html_url":"https://github.com/attocash/commons","commit_stats":null,"previous_names":["attocash/commons"],"tags_count":92,"template":false,"template_full_name":null,"purl":"pkg:github/attocash/commons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attocash%2Fcommons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attocash%2Fcommons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attocash%2Fcommons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attocash%2Fcommons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attocash","download_url":"https://codeload.github.com/attocash/commons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attocash%2Fcommons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29101794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T22:44:52.815Z","status":"ssl_error","status_checked_at":"2026-02-04T22:44:16.428Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atto","commons","cryptocurrency","library"],"created_at":"2026-02-01T00:11:28.403Z","updated_at":"2026-02-05T00:02:53.471Z","avatar_url":"https://github.com/attocash.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Atto Commons\n\nA multiplatform library of building blocks for Atto applications. It provides primitives (mnemonics, keys, addresses, blocks), client tooling to talk to a node, wallet utilities, and proof‑of‑work workers (CPU/OpenCL/remote). Kotlin/JVM, Kotlin/JS, and Kotlin/Wasm are supported where applicable.\n\nNOTE: The API is evolving and may include breaking changes between releases.\n\n## Modules\n\n- commons-core — primitives: mnemonic/seed, keys, addresses, blocks/transactions, serialization, utilities.\n- commons-node — node operations and monitors (account membership, transactions, account entries).\n- commons-node-remote — remote HTTP client for talking to a node.\n- commons-signer-remote — remote signer client for external key management.\n- commons-wallet — simple wallet utilities built on top of node + worker.\n- commons-worker — CPU proof‑of‑work implementation.\n- commons-worker-opencl — OpenCL proof‑of‑work implementation (JVM only).\n- commons-worker-remote — talk to a remote worker service.\n- commons-spring-boot-starter — Spring Boot integrations for Atto services.\n- commons-js — JavaScript/TypeScript bindings packaged as `@attocash/commons-js`.\n\nEach module has its own README with detailed examples based on tests. Start here for a quick taste.\n\n## Installation\n\nGradle coordinates vary per module, for example:\n\n```kotlin\ndependencies {\n  // Core primitives\n  implementation(\"cash.atto:commons-core:\u003cversion\u003e\")\n  // Node client (remote over HTTP)\n  implementation(\"cash.atto:commons-node-remote:\u003cversion\u003e\")\n  // Wallet utilities\n  implementation(\"cash.atto:commons-wallet:\u003cversion\u003e\")\n  // CPU worker (pure Kotlin)\n  implementation(\"cash.atto:commons-worker:\u003cversion\u003e\")\n  // OpenCL worker (JVM)\n  runtimeOnly(\"cash.atto:commons-worker-opencl:\u003cversion\u003e\")\n}\n```\n\nOn JS/Node you can use the NPM package:\n\n```sh\nnpm i @attocash/commons-js\n```\n\n## Quick start\n\n- Generate a mnemonic and derive a seed (suspend):\n\n```kotlin\nval mnemonic = AttoMnemonic.generate()\nval seed = mnemonic.toSeed()\n```\n\n- Derive keys and address:\n\n```kotlin\nval privateKey = seed.toPrivateKey(0U)\nval publicKey = privateKey.toPublicKey()\nval address = AttoAddress(AttoAlgorithm.V1, publicKey)\n```\n\n- Connect to a node and a worker (remote services):\n\n```kotlin\nval client = AttoNodeClient.remote(\"http://localhost:8080\")\nval worker = AttoWorker.remote(\"http://localhost:8085\")\n```\n\n- Create a wallet, open accounts, and send funds (based on tests):\n\n```kotlin\nval wallet = AttoWallet.create(client, worker, seed)\n\n// Open index 0 (often the genesis in tests) and a few more\nwallet.openAccount(0U.toAttoIndex())\nwallet.openAccount(1U.toAttoIndex(), 3U.toAttoIndex())\n\n// Query balances\nval balance0 = wallet.getAccount(0U.toAttoIndex())!!.balance\n\n// Send 1 ATTO from account 0 to account 2\nval amount = AttoAmount.from(AttoUnit.ATTO, \"1\")\nval toAddress = wallet.getAddress(2U.toAttoIndex())\nval tx = wallet.send(0U.toAttoIndex(), toAddress, amount)\n```\n\n- Listen to node monitors and acknowledge progress:\n\n```kotlin\nval accountMonitor = client.createAccountMonitor()\nval txnMonitor = accountMonitor.toTransactionMonitor { 1U.toAttoHeight() }\n\n// Collect first message\nval msg = txnMonitor.stream().first()\nmsg.acknowledge()\n```\n\nFor full examples and advanced flows (auto-receive, account-entry monitor, OpenCL), see the module READMEs below.\n\n## Module READMEs\n\n- commons-core/README.md — primitives and serialization examples\n- commons-wallet/README.md — wallet setup, send/receive, auto-receiver, monitors\n- commons-node/README.md — node client and monitors\n- commons-node-remote/README.md — remote node client\n- commons-signer-remote/README.md — remote signer client\n- commons-worker/README.md — CPU PoW\n- commons-worker-opencl/README.md — OpenCL PoW\n- commons-worker-remote/README.md — remote worker client\n- commons-spring-boot-starter/README.md — Spring Boot integration\n- commons-js/README.md — JS/TS usage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattocash%2Fcommons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattocash%2Fcommons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattocash%2Fcommons/lists"}