Offline Signing with Atto Commons
In this tutorial, we demonstrate how to integrate with the Atto network at a low level using the Atto Commons libraries (available for JavaScript/TypeScript, Kotlin, and Java). This approach allows you to generate and manage keys, construct transactions offline, and interact directly with an Atto node – all without relying on the Wallet Server component. This is ideal for advanced integrators (such as exchanges or custodians) who require full control over key management and offline signing.
Note: Atto uses Ed25519 elliptic curve cryptography for its account keys and signatures. This means you can leverage third-party tools or HSMs for key derivation and signing if desired. In this guide, however, we will use the Atto Commons library for all key and transaction operations for consistency and simplicity.
Before proceeding, ensure you have access to the following components in your environment:
- An Atto Historical Node (with its REST API endpoint) connected to the main network.
- An Atto Work Server for generating the Proof-of-Work required by transactions.
Typically, integrators will run their own historical node and work server. For testing, you may use Atto's public endpoints (available upon request). In the code examples below, we will use the main network configuration.
Installation
Make sure the Atto Commons libraries are available in your project:
- JavaScript
- Kotlin
- Java
npm i @attocash/commons-js
implementation("cash.atto:commons-node-remote:$commonsVersion")
implementation("cash.atto:commons-worker-remote:$commonsVersion")
<!-- Maven -->
<dependency>
<groupId>cash.atto</groupId>
<artifactId>commons-node-remote-jvm</artifactId>
<version>${commonsVersion}</version>
</dependency>
<dependency>
<groupId>cash.atto</groupId>
<artifactId>commons-worker-remote-jvm</artifactId>
<version>${commonsVersion}</version>
</dependency>
// Gradle (Groovy DSL)
implementation "cash.atto:commons-node-remote:${commonsVersion}"
implementation "cash.atto:commons-worker-remote:${commonsVersion}"