{"_id":"@attocash/commons-wallet","_rev":"6-0b2eec6e989323f82a9d0f2c3d23571f","name":"@attocash/commons-wallet","dist-tags":{"latest":"8.0.2"},"versions":{"6.7.0":{"name":"@attocash/commons-wallet","version":"6.7.0","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-wallet@6.7.0","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"196dfa53a87d4ce9ce3dc0af9b2c0f21d8d9298d","tarball":"https://registry.npmjs.org/@attocash/commons-wallet/-/commons-wallet-6.7.0.tgz","fileCount":6,"integrity":"sha512-vr/cN7bEVyMsqxESWgmSkUWunabRZGRvFj1M/dUcy5QSW7tC8yIJ30zNzunUZeUtq7BskI2T9SR4x0/neDViNQ==","signatures":[{"sig":"MEYCIQCWa40AX2AqfpG2Mrb7joM3qWxIto3o8qCPYepfn2wTLQIhAK+jPkz/CpmHkhO5gbgDjFYQhSPs0vTZ5fGawXUWfVJT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4141472},"main":"commons-commons-wallet.mjs","_from":"file:commons-wallet/build/packages/attocash-commons-wallet-6.7.0.tgz","types":"commons-commons-wallet.d.mts","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"_resolved":"/var/home/felipe/IdeaProjects/commons/commons-wallet/build/packages/attocash-commons-wallet-6.7.0.tgz","_integrity":"sha512-vr/cN7bEVyMsqxESWgmSkUWunabRZGRvFj1M/dUcy5QSW7tC8yIJ30zNzunUZeUtq7BskI2T9SR4x0/neDViNQ==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"_npmVersion":"10.9.7","description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"ws":"8.18.3","@js-joda/core":"3.2.0","@stablelib/hmac":"1.0.1","@stablelib/sha256":"1.0.1","@stablelib/sha512":"1.0.1","@stablelib/blake2b":"1.0.1","@stablelib/ed25519":"1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-wallet_6.7.0_1779911973523_0.1463820483372653","host":"s3://npm-registry-packages-npm-production"}},"6.7.1":{"name":"@attocash/commons-wallet","version":"6.7.1","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-wallet@6.7.1","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"e5c1974a2b4866117d386e4ba7a7bc4aeea52256","tarball":"https://registry.npmjs.org/@attocash/commons-wallet/-/commons-wallet-6.7.1.tgz","fileCount":62,"integrity":"sha512-FYLUalO8kYTTWkZI+1cM1gaaEoNnAmPiOtCSmA7gCakE2bbVV3NGRd4k82/CeKcFRWfJWXOidM5BmhKDHQdKKw==","signatures":[{"sig":"MEUCIQDMd3zEh/Y7KHDT02fwj3WQwGMqZVTiSWhVz+yCV0SjvAIgfVIIDsgoS5ZESk+X6DfVpp1Kc4mVz0a6sclYPXjZPWo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3610856},"main":"commons-commons-wallet.mjs","types":"commons-commons-wallet.d.mts","gitHead":"1a3e41024f75a8372be02aab0eb9e6ed7b92d87f","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"_npmVersion":"11.5.1","description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","directories":{},"_nodeVersion":"24.6.0","dependencies":{"ws":"8.18.3","@js-joda/core":"3.2.0","@stablelib/hmac":"1.0.1","@stablelib/sha256":"1.0.1","@stablelib/sha512":"1.0.1","@stablelib/blake2b":"1.0.1","@stablelib/ed25519":"1.0.1","@attocash/commons-core":"6.7.1","@attocash/commons-node":"6.7.1","@attocash/commons-node-remote":"6.7.1","@attocash/commons-worker-remote":"6.7.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-wallet_6.7.1_1779996274484_0.43808296421748083","host":"s3://npm-registry-packages-npm-production"}},"6.7.1-patch.1":{"name":"@attocash/commons-wallet","version":"6.7.1-patch.1","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-wallet@6.7.1-patch.1","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"29a677db9ca757d3f442b84db7ab35c94b5aefed","tarball":"https://registry.npmjs.org/@attocash/commons-wallet/-/commons-wallet-6.7.1-patch.1.tgz","fileCount":46,"integrity":"sha512-SKsZ/ugbG+Ry8pYEvFL21HeujMW9jH2wCUpke5JoHAZPATw6bC9+AlavhkGI0ubesC9mraMeMuewW2YGAQCFtg==","signatures":[{"sig":"MEUCIG9o2A/11sUbxfQ3a6PvKov/wll5+yDmP7iTUlepX87FAiEAuFd3qxEJ+VtjyK7SNi/Fq+OG3rpSEBAhIuqcDnsziGU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1450299},"main":"commons-commons-wallet.mjs","_from":"file:commons-wallet/build/tmp/packJsPackage/attocash-commons-wallet-6.7.1-patch.1.tgz","types":"commons-commons-wallet.d.mts","_npmUser":{"name":"attocash","email":"felipe@atto.cash"},"_resolved":"/var/home/felipe/IdeaProjects/commons/commons-wallet/build/tmp/packJsPackage/attocash-commons-wallet-6.7.1-patch.1.tgz","_integrity":"sha512-SKsZ/ugbG+Ry8pYEvFL21HeujMW9jH2wCUpke5JoHAZPATw6bC9+AlavhkGI0ubesC9mraMeMuewW2YGAQCFtg==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"_npmVersion":"11.5.1","description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"ws":"8.18.3","@js-joda/core":"3.2.0","@stablelib/hmac":"1.0.1","@stablelib/sha256":"1.0.1","@stablelib/sha512":"1.0.1","@stablelib/blake2b":"1.0.1","@stablelib/ed25519":"1.0.1","@attocash/commons-core":"6.7.1-patch.1","@attocash/commons-node":"6.7.1-patch.1","@attocash/commons-node-remote":"6.7.1-patch.1","@attocash/commons-worker-remote":"6.7.1-patch.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-wallet_6.7.1-patch.1_1780002739143_0.47384746095988484","host":"s3://npm-registry-packages-npm-production"}},"7.0.2":{"name":"@attocash/commons-wallet","version":"7.0.2","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-wallet@7.0.2","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"47779ef181bf3272b8989d57323490bffdeca7a5","tarball":"https://registry.npmjs.org/@attocash/commons-wallet/-/commons-wallet-7.0.2.tgz","fileCount":14,"integrity":"sha512-zLrq4A0xrnTuAjCmlRtFfGwFmH8J62erhGHLfwwMulWfJVPnmlcw+tgHUKAi0I1/3KfSHiHO6DdXmRxRWgahIw==","signatures":[{"sig":"MEUCIFzlWQYYM38gCrxlrowPIe6BApfTUVY/7n1P8hjqaTG2AiEAlPQ416u5HO53sPUF6CM3M5XUj7NwxKZoO/qXBCSgMFg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-wallet@7.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":376882},"main":"commons-commons-wallet.mjs","_from":"file:commons-wallet/build/packages/attocash-commons-wallet-7.0.2.tgz","types":"commons-commons-wallet.d.mts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b98e2551-f76c-4887-90af-82f850e651db"}},"_resolved":"/home/runner/work/commons/commons/commons-wallet/build/packages/attocash-commons-wallet-7.0.2.tgz","_integrity":"sha512-zLrq4A0xrnTuAjCmlRtFfGwFmH8J62erhGHLfwwMulWfJVPnmlcw+tgHUKAi0I1/3KfSHiHO6DdXmRxRWgahIw==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"_npmVersion":"11.16.0","description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"ws":"8.20.1","@js-joda/core":"3.2.0","@noble/hashes":"2.2.0","@attocash/commons-core":"7.0.2","@attocash/commons-node":"7.0.2","@attocash/commons-worker":"7.0.2","@attocash/commons-transport":"7.0.2","@attocash/commons-node-remote":"7.0.2","@attocash/commons-worker-remote":"7.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-wallet_7.0.2_1785094496586_0.8597037171287636","host":"s3://npm-registry-packages-npm-production"}},"8.0.0":{"name":"@attocash/commons-wallet","version":"8.0.0","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"license":"BSD-3-Clause","_id":"@attocash/commons-wallet@8.0.0","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"homepage":"https://atto.cash","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"37514086d7c8bfbf479ab156dff5f3dea596b975","tarball":"https://registry.npmjs.org/@attocash/commons-wallet/-/commons-wallet-8.0.0.tgz","fileCount":14,"integrity":"sha512-hF20U6TyTZjRm/mx4Vm9Pf0yWIW9SZaWzI08kLwLPBViL9O8SmZ9TA6zgC4QPxYeZkEA+/HtpDrPVeA1qQCUQw==","signatures":[{"sig":"MEUCIQDVjx1M7zbwM4ahjMcAPneJAMUDTac1dZWxsJR/dn/fzwIgZ8GjNaIYHCeO/b2xK3Lva249ktRKhXpzNrn+JHwDM44=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIAffyCKk8pLfITNFFuu0WuMApK4Z06zPcfd3z0rfCbJtAiAXXzrkN9DYR8PrudD3ZTPu1VZBtyvaDs5v13HsTydx+w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-wallet@8.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":376882},"main":"commons-commons-wallet.mjs","_from":"file:commons-wallet/build/packages/attocash-commons-wallet-8.0.0.tgz","types":"commons-commons-wallet.d.mts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b98e2551-f76c-4887-90af-82f850e651db"}},"_resolved":"/home/runner/work/commons/commons/commons-wallet/build/packages/attocash-commons-wallet-8.0.0.tgz","_integrity":"sha512-hF20U6TyTZjRm/mx4Vm9Pf0yWIW9SZaWzI08kLwLPBViL9O8SmZ9TA6zgC4QPxYeZkEA+/HtpDrPVeA1qQCUQw==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"_npmVersion":"11.19.0","description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"ws":"8.20.1","@js-joda/core":"3.2.0","@noble/hashes":"2.2.0","@attocash/commons-core":"8.0.0","@attocash/commons-node":"8.0.0","@attocash/commons-worker":"8.0.0","@attocash/commons-transport":"8.0.0","@attocash/commons-node-remote":"8.0.0","@attocash/commons-worker-remote":"8.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/commons-wallet_8.0.0_1788898524674_0.796591961367014","host":"s3://npm-registry-packages-npm-production"}},"8.0.2":{"_id":"@attocash/commons-wallet@8.0.2","bugs":{"url":"https://github.com/attocash/commons/issues"},"dist":{"shasum":"b1539b0ff1a8ce310ac17d459e654b8909fee98c","tarball":"https://registry.npmjs.org/@attocash/commons-wallet/-/commons-wallet-8.0.2.tgz","fileCount":14,"integrity":"sha512-WlrrT77WCdTdaEvTtwJnv3R1AMLXO5DZx6OSFu6hJvR+vgAck6YfyktP8DzXHobC3kqlzAOVBiQp2foeRkIcIg==","signatures":[{"sig":"MEYCIQCSUbhwEHCfK0AHpq7FtlKa3vwlViLwv2TmCDXTNn6ufQIhAKh9SmUMKd4IocPzDDuTAUQj1GJTBB5E1wTKLg10FLbZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCN14E79Oceu3mfsRBWUATUJ8979SKI+sLdqlnvu/3iewIhAIcq6AFutcToqrhOTsV7olfR780hX0jD9tCP7sjAmR6N"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@attocash%2fcommons-wallet@8.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":427983},"main":"commons-commons-wallet.mjs","name":"@attocash/commons-wallet","_from":"file:commons-wallet/build/packages/attocash-commons-wallet-8.0.2.tgz","types":"commons-commons-wallet.d.mts","license":"BSD-3-Clause","version":"8.0.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"b98e2551-f76c-4887-90af-82f850e651db"}},"homepage":"https://atto.cash","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"_resolved":"/home/runner/work/commons/commons/commons-wallet/build/packages/attocash-commons-wallet-8.0.2.tgz","_integrity":"sha512-WlrrT77WCdTdaEvTtwJnv3R1AMLXO5DZx6OSFu6hJvR+vgAck6YfyktP8DzXHobC3kqlzAOVBiQp2foeRkIcIg==","repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"_npmVersion":"11.19.0","description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","directories":{},"maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"_nodeVersion":"24.21.0","dependencies":{"ws":"8.20.1","@js-joda/core":"3.2.0","@noble/hashes":"2.2.0","@attocash/commons-core":"8.0.2","@attocash/commons-node":"8.0.2","@attocash/commons-worker":"8.0.2","@attocash/commons-transport":"8.0.2","@attocash/commons-node-remote":"8.0.2","@attocash/commons-worker-remote":"8.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commons-wallet_8.0.2_1790705928214_0.9130374110558235"}}},"time":{"created":"2026-05-27T19:59:33.307Z","modified":"2026-09-29T18:18:48.639Z","6.7.0":"2026-05-27T19:59:33.740Z","6.7.1":"2026-05-28T19:24:34.701Z","6.7.1-patch.1":"2026-05-28T21:12:19.338Z","7.0.2":"2026-07-26T19:34:56.740Z","8.0.0":"2026-09-08T20:15:24.777Z","8.0.2":"2026-09-29T18:18:48.313Z"},"bugs":{"url":"https://github.com/attocash/commons/issues"},"license":"BSD-3-Clause","homepage":"https://atto.cash","keywords":["atto","kotlin","kotlin-js","cryptocurrency"],"repository":{"url":"git+https://github.com/attocash/commons.git","type":"git","directory":"commons-wallet"},"description":"Wallet utilities for deriving accounts, opening accounts, sending funds, and receiving funds.","maintainers":[{"name":"attocash","email":"felipe@atto.cash"}],"readme":"# commons-wallet\n\nA thin wallet utility layer built on top of the node client and a PoW worker. Provides helpers to:\n\n- Derive addresses from a seed (per index)\n- Open accounts, send funds, and query balances\n- Start an auto-receiver that listens for receivables and publishes receive/open blocks\n\nExamples below are distilled from `commons-wallet` and integration tests.\n\n## Installation\n\nGradle:\n\n```kotlin\nimplementation(\"cash.atto:commons-wallet:<version>\")\n```\n\nNPM:\n\n```sh\nnpm install @attocash/commons-core @attocash/commons-node @attocash/commons-node-remote\nnpm install @attocash/commons-worker @attocash/commons-worker-remote @attocash/commons-wallet\n```\n\n## Setup\n\n```kotlin\n// Primitives\nval mnemonic = AttoMnemonic.generate()\nval seed = mnemonic.toSeed()\n\n// Remote services (replace with your endpoints)\nval client = AttoNodeClient.remote(\"http://localhost:8080\")\nval worker = AttoWorker.remote(\"http://localhost:8085\")\n\n// Wallet instance\nval wallet = AttoWallet.create(client, worker, seed)\n```\n\n## Open accounts\n\n```kotlin\n// Often index 0 is the first account\nwallet.openAccount(0U.toAttoIndex())\n\n// Open multiple accounts at once\nwallet.openAccount(1U.toAttoIndex(), 3U.toAttoIndex())\n\n// Get the public address for an index\nval address2 = wallet.getAddress(2U.toAttoIndex())\n```\n\n## Query balances and state\n\n```kotlin\nval account0 = wallet.getAccount(0U.toAttoIndex())\nval balance0 = account0?.balance // AttoAmount or null if not opened yet\n```\n\n## Send funds\n\n```kotlin\nval amount = AttoAmount.from(AttoUnit.ATTO, \"1\")\nval destination = wallet.getAddress(2U.toAttoIndex())\nval tx = wallet.send(0U.toAttoIndex(), destination, amount)\n```\n\n## Monitors and auto-receive\n\nYou can subscribe to node monitors and acknowledge processed heights. Start an auto-receiver to handle incoming\nreceivables.\n\n```kotlin\n// Create account membership monitor from the client\nval accountMonitor = client.createAccountMonitor()\n\n// Start auto-receiver: provide a representative address supplier\nval receiverJob = wallet.startAutoReceiver(accountMonitor) {\n  AttoAddress(AttoAlgorithm.V1, AttoPublicKey(ByteArray(32)))\n}\n\n// Transaction monitor: track transactions from the current height forward\nval initialHeights = mapOf(/* address -> nextHeight */)\nval txnMonitor = accountMonitor.toTransactionMonitor { address ->\n  initialHeights[address] ?: 1U.toAttoHeight()\n}\n\n// Collect and acknowledge a message\nval msg = txnMonitor.stream().first()\nmsg.acknowledge() // move the height forward\n\n// When done\nreceiverJob.cancel()\n```\n\nSee `commons-wallet/src/commonTest/kotlin/cash/atto/commons/wallet/AttoWalletTest.kt` for a full scenario.\n","readmeFilename":"README.md"}