@attocash/n8n-nodes-atto 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,55 +4,99 @@
4
4
  [![n8n Atto Node CI](https://github.com/attocash/integrations/actions/workflows/n8n-node-package.yml/badge.svg)](https://github.com/attocash/integrations/actions/workflows/n8n-node-package.yml)
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/attocash/integrations/blob/main/LICENSE)
6
6
 
7
- n8n community node package for Atto cryptocurrency wallet, transaction, account, and trigger automation. The nodes delegate address derivation, signing, node access, wallet operations, streams, and test mocks to Atto Commons packages instead of implementing Atto protocol logic locally.
7
+ Use Atto from n8n workflows.
8
8
 
9
- ## Install in n8n
9
+ This package adds action and trigger nodes for Atto addresses, accounts, receivables, transactions, and representatives. Signing, address derivation, node calls, wallet operations, streams, and test mocks come from Atto Commons.
10
10
 
11
- Install the npm package from **Settings** > **Community Nodes** in a self-hosted n8n instance:
11
+ ## Install
12
+
13
+ In self-hosted n8n, open **Settings** > **Community Nodes** and install:
12
14
 
13
15
  ```text
14
16
  @attocash/n8n-nodes-atto
15
17
  ```
16
18
 
17
- n8n's **Browse** button opens npm search for packages tagged with `n8n-community-node-package`. This package includes that keyword so it is discoverable from the n8n community-node flow after it is published to npm.
19
+ Restart n8n if the nodes do not appear right away.
20
+
21
+ ## What You Can Build
22
+
23
+ The package includes two nodes:
24
+
25
+ - **Atto**: derive addresses, read account state, list receivables, receive an incoming receivable, list transactions/account entries, send transactions, and change representatives.
26
+ - **Atto Trigger**: start workflows from receivables, account updates, transactions, or account entries.
27
+
28
+ Typical workflows:
29
+
30
+ - Receive a payment when a receivable appears.
31
+ - Send a payment from the address derived from your credential.
32
+ - Build a ping/pong flow that receives an incoming amount and sends the same amount back.
33
+ - Watch an address for account entries or transaction updates.
34
+
35
+ ## Credentials
36
+
37
+ Create an **Atto API** credential in n8n.
38
+
39
+ Required for node access:
40
+
41
+ - **Node Base URL**: Atto node HTTP API, for example `http://localhost:8080`.
42
+ - **Worker Base URL**: Atto work server HTTP API, for example `http://localhost:8085`.
43
+
44
+ Optional API auth:
45
+
46
+ - **API Key**
47
+ - **API Key Header**
48
+ - **API Key Prefix**
49
+
50
+ Required for signing actions:
51
+
52
+ - **Wallet Secret Type**: mnemonic phrase or private key.
53
+ - **Wallet Secret**: encrypted by n8n and used only when signing.
54
+ - **Key Index**: derivation index for mnemonic secrets.
55
+
56
+ The credential test only checks that **Node Base URL** responds to `GET /`. It does not send the wallet secret.
57
+
58
+ For real funds, store wallet material in n8n credentials. Node-parameter secrets are useful for local derivation and tests, but n8n may keep node parameters in execution records depending on your instance settings.
18
59
 
19
60
  ## Nodes
20
61
 
21
62
  ### Atto
22
63
 
23
- - Address: Derive an Atto address and public key from a mnemonic or hex private key.
24
- - Account: Get balance, representative, height, and frontier for an address.
25
- - Receivable: Get receivable entries, receive the receivable from the incoming item, or wait for the next pending entry for the credentials address.
26
- - Transaction: Get transactions by hash or bounded stream query, or send from the credentials-derived address.
27
- - Account Entry: Get account entries by hash or bounded stream query.
28
- - Representative: Change the representative for the credentials-derived address.
64
+ Resources and operations:
65
+
66
+ - **Address > Derive**: derive an Atto address and public key from a mnemonic or hex private key.
67
+ - **Account > Get**: read balance, representative, height, and frontier for an address.
68
+ - **Receivable > Get**: collect receivables for the credential-derived address or manual addresses.
69
+ - **Receivable > Receive**: receive the receivable from the incoming item.
70
+ - **Transaction > Get**: fetch by hash or collect a bounded transaction stream.
71
+ - **Transaction > Send**: send from the credential-derived address.
72
+ - **Account Entry > Get**: fetch by hash or collect a bounded account-entry stream.
73
+ - **Representative > Change**: change the representative for the credential-derived address.
74
+
75
+ Signing actions derive the source address from the wallet secret and key index. You do not need to pass a manual source address. Send and receive use a 60 second publish timeout by default.
29
76
 
30
77
  ### Atto Trigger
31
78
 
32
- - Receivable: Trigger when a receivable is available for the credentials-derived address or manual addresses.
33
- - Account Update: Trigger from account state updates.
34
- - Transaction: Trigger from transactions by hash, address stream, or all stream.
35
- - Account Entry: Trigger from account entries by hash, address stream, or all stream.
79
+ Trigger events:
36
80
 
37
- ## Credentials
81
+ - **Receivable**: fires when a receivable appears for the credential-derived address or manual addresses.
82
+ - **Account Update**: fires when account state changes.
83
+ - **Transaction**: watches by hash, address stream, or all supported transactions.
84
+ - **Account Entry**: watches by hash, address stream, or all supported account entries.
38
85
 
39
- Create an **Atto API** credential in n8n:
86
+ ## Example Workflows
40
87
 
41
- - Node Base URL: Atto node HTTP API, for example `http://localhost:8080`.
42
- - Worker Base URL: Atto work server HTTP API, for example `http://localhost:8085`.
43
- - API Key: optional key sent to both services.
44
- - API Key Header and Prefix: defaults to `Authorization: Bearer <key>`.
45
- - Wallet Secret Type: mnemonic phrase or private key. Atto Commons currently expects 24-word mnemonic phrases.
46
- - Wallet Secret: encrypted by n8n and used only for signing.
47
- - Key Index: derivation index for mnemonic secrets.
88
+ Importable examples live in [`examples`](./examples):
48
89
 
49
- The n8n credential test performs a read-only `GET /` against **Node Base URL** to verify the configured node endpoint is reachable. It does not send the wallet secret.
90
+ - [`send-transaction.json`](./examples/send-transaction.json): manual trigger to send Atto.
91
+ - [`incoming-to-receive.json`](./examples/incoming-to-receive.json): receivable trigger piped into **Receivable > Receive**.
92
+ - [`ping-pong-receivable.json`](./examples/ping-pong-receivable.json): receive an incoming amount and send the same raw amount back to the sender.
93
+ - [`receivable-trigger.json`](./examples/receivable-trigger.json): trigger-only receivable watcher.
50
94
 
51
- For one-off derivation and tests, the action node can read the secret from node parameters instead of credentials. For real funds, prefer encrypted n8n credentials; workflow node parameters can appear in failed execution records depending on n8n redaction settings. Secrets are never returned in successful node output.
95
+ After importing an example, attach your **Atto API** credential and replace any placeholder addresses before running transaction operations.
52
96
 
53
- Signing actions derive the source address from the wallet secret and key index. Send, receive, and representative-change operations do not require a manual source address. Send and receive use a 60 second publish timeout by default.
97
+ ## Local Development
54
98
 
55
- ## Build And Test
99
+ Install dependencies and run the checks:
56
100
 
57
101
  ```bash
58
102
  npm install
@@ -69,9 +113,9 @@ To require the mock-container integration path:
69
113
  ATTO_TEST_INTEGRATION=1 npm run test:integration
70
114
  ```
71
115
 
72
- ## Local n8n
116
+ ### Run n8n With Podman
73
117
 
74
- Build first, then mount this package as a community node package:
118
+ From this package directory:
75
119
 
76
120
  ```bash
77
121
  npm run build
@@ -87,11 +131,11 @@ podman run --rm -it \
87
131
  docker.io/n8nio/n8n:latest
88
132
  ```
89
133
 
90
- Open `http://localhost:5678`, create a workflow, and add the **Atto** or **Atto Trigger** node.
134
+ Open `http://localhost:5678`, create a workflow, and add **Atto** or **Atto Trigger**.
91
135
 
92
- ### Install from a checkout inside the n8n container
136
+ ### Install From A Checkout Inside n8n
93
137
 
94
- If you have shell access inside the n8n container, clone this repository and run the installer from the package directory:
138
+ If you have shell access inside the n8n container:
95
139
 
96
140
  ```bash
97
141
  cd /tmp
@@ -100,17 +144,20 @@ cd integrations/n8n-node
100
144
  npm run install:n8n
101
145
  ```
102
146
 
103
- The script installs build dependencies, builds and validates the package, packs it, and installs the generated `.tgz` into `${N8N_USER_FOLDER:-$HOME/.n8n}/nodes`. Override the destination with `N8N_NODES_DIR=/path/to/nodes npm run install:n8n`. Use `RUN_TESTS=1 npm run install:n8n` only when the container can run the test dependencies.
147
+ The installer builds, validates, packs, and installs the generated `.tgz` into `${N8N_USER_FOLDER:-$HOME/.n8n}/nodes`.
104
148
 
105
- Restart n8n after the script finishes.
149
+ Optional overrides:
106
150
 
107
- ## Usage
151
+ ```bash
152
+ N8N_NODES_DIR=/path/to/nodes npm run install:n8n
153
+ RUN_TESTS=1 npm run install:n8n
154
+ ```
108
155
 
109
- See `examples/send-transaction.json`, `examples/incoming-to-receive.json`, `examples/ping-pong-receivable.json`, and `examples/receivable-trigger.json` for importable workflow shapes. `incoming-to-receive.json` pipes the **Atto Trigger** receivable output into **Atto** → **Receivable** → **Receive Pending** with **Receivable Source** set to **Input Item**. Replace placeholder addresses and attach an **Atto API** credential before running transaction operations.
156
+ Restart n8n after the script finishes.
110
157
 
111
- ## Release
158
+ ## Maintainers
112
159
 
113
- The n8n package is versioned independently from other integrations in this repository. Update `n8n-node/package.json` with normal semver when you want to attempt a new release. Multiple commits can keep the same attempted version until the release is approved.
160
+ This package is versioned independently from other integrations in this repository. Use normal semver in `n8n-node/package.json`; release tags use the package-specific format `n8n-node-vX.Y.Z`.
114
161
 
115
162
  ```bash
116
163
  cd n8n-node
@@ -120,11 +167,12 @@ git commit -m "Release n8n Atto node vX.Y.Z"
120
167
  git push origin main
121
168
  ```
122
169
 
123
- The GitHub Actions workflow runs lint, tests, and packing for pull requests and n8n-related pushes to `main`. Main pushes upload the attempted package artifact immediately, then wait for approval in the GitHub environment named `release`. After approval, the workflow creates the package-specific tag `n8n-node-vX.Y.Z`, publishes `@attocash/n8n-nodes-atto@X.Y.Z` to npm with provenance, and creates the GitHub Release with the `.tgz` attached. Configure npm Trusted Publishing for this repository and workflow file, or set the `NPM_TOKEN` repository secret as a fallback.
170
+ On pushes to `main`, GitHub Actions tests and packs the attempted version, uploads the `.tgz` artifact, then waits for approval in the `release` environment. After approval, it creates the tag, publishes `@attocash/n8n-nodes-atto` to npm, and creates the GitHub release.
171
+
172
+ Configure npm Trusted Publishing for `.github/workflows/n8n-node-package.yml`. `NPM_TOKEN` is supported as a fallback.
124
173
 
125
- ## Implementation Notes
174
+ ## Notes
126
175
 
127
- - Runtime protocol behavior comes from Atto Commons split packages: `@attocash/commons-core`, `@attocash/commons-node`, `@attocash/commons-node-remote`, `@attocash/commons-wallet`, and `@attocash/commons-worker-remote`.
128
- - The Atto Commons package code is bundled into the action and trigger node files so the published n8n community node has no runtime dependencies beyond n8n.
129
- - The aggregate `@attocash/commons-js@6.7.1-patch.1` package was not used because its published runtime entrypoint does not expose the APIs used by the current Commons JS example.
130
- - Hex private keys should use the format accepted by `AttoPrivateKey.Companion.parse`.
176
+ - Runtime Atto behavior comes from Atto Commons split packages: `@attocash/commons-core`, `@attocash/commons-node`, `@attocash/commons-node-remote`, `@attocash/commons-wallet`, and `@attocash/commons-worker-remote`.
177
+ - Atto Commons code is bundled into the built action and trigger node files, so the published n8n package has no runtime dependencies beyond n8n.
178
+ - Hex private keys must use the format accepted by `AttoPrivateKey.Companion.parse`.
@@ -109875,8 +109875,11 @@ var require_operations = __commonJS({
109875
109875
  exports2.deriveAccountFromSecret = void 0;
109876
109876
  exports2.deriveAddressFromSecret = deriveAddressFromSecret;
109877
109877
  exports2.createNodeClient = createNodeClient;
109878
+ exports2.createWorkerClient = createWorkerClient;
109879
+ exports2.clearWorkerClientCache = clearWorkerClientCache;
109878
109880
  exports2.executeAttoOperation = executeAttoOperation;
109879
109881
  exports2.createAttoTriggerSubscription = createAttoTriggerSubscription;
109882
+ var node_crypto_1 = require("node:crypto");
109880
109883
  var commons_core_1 = (init_commons_commons_core(), __toCommonJS(commons_commons_core_exports));
109881
109884
  var commons_node_1 = (init_commons_commons_node(), __toCommonJS(commons_commons_node_exports));
109882
109885
  var commons_node_remote_1 = (init_commons_commons_node_remote(), __toCommonJS(commons_commons_node_remote_exports));
@@ -109884,6 +109887,8 @@ var require_operations = __commonJS({
109884
109887
  var commons_worker_remote_1 = (init_commons_commons_worker_remote(), __toCommonJS(commons_commons_worker_remote_exports));
109885
109888
  var DEFAULT_STREAM_TIMEOUT_MS = 5e3;
109886
109889
  var DEFAULT_PUBLISH_TIMEOUT_MS = 6e4;
109890
+ var MAX_WORKER_CLIENT_CACHE_SIZE = 32;
109891
+ var workerClientCache = /* @__PURE__ */ new Map();
109887
109892
  function normalizeCredentials(credentials) {
109888
109893
  return credentials ?? {};
109889
109894
  }
@@ -109907,12 +109912,6 @@ var require_operations = __commonJS({
109907
109912
  throw new Error(`${fieldName} must be greater than zero`);
109908
109913
  return timeoutMs;
109909
109914
  }
109910
- function parseReceivableSource(value) {
109911
- const source = text(value || "input");
109912
- if (source === "input" || source === "wait")
109913
- return source;
109914
- throw new Error("Receivable Source must be input or wait");
109915
- }
109916
109915
  function parseSecretType(value, fieldName) {
109917
109916
  if (value === "mnemonic" || value === "privateKey")
109918
109917
  return value;
@@ -109991,14 +109990,61 @@ var require_operations = __commonJS({
109991
109990
  const prefix3 = text(credentials.authHeaderPrefix);
109992
109991
  return builder.header(header3, prefix3 ? `${prefix3} ${apiKey}` : apiKey);
109993
109992
  }
109993
+ function sha256(value) {
109994
+ return (0, node_crypto_1.createHash)("sha256").update(value).digest("hex");
109995
+ }
109996
+ function workerClientCacheKey(credentials) {
109997
+ const workerUrl = requireWorkerUrl(credentials);
109998
+ const apiKey = text(credentials.apiKey);
109999
+ if (!apiKey) {
110000
+ return JSON.stringify({
110001
+ workerUrl,
110002
+ auth: "none"
110003
+ });
110004
+ }
110005
+ const header3 = text(credentials.authHeaderName || "Authorization");
110006
+ if (!header3)
110007
+ throw new Error("API Key Header is required when API Key is set");
110008
+ const prefix3 = text(credentials.authHeaderPrefix);
110009
+ const headerValue = prefix3 ? `${prefix3} ${apiKey}` : apiKey;
110010
+ return JSON.stringify({
110011
+ workerUrl,
110012
+ header: header3,
110013
+ headerValueHash: sha256(headerValue)
110014
+ });
110015
+ }
109994
110016
  function createNodeClient(credentials) {
109995
110017
  const attoCredentials = normalizeCredentials(credentials);
109996
110018
  return applyHeaders(new commons_node_remote_1.AttoNodeClientAsyncBuilder(requireNodeUrl(attoCredentials)), attoCredentials).build();
109997
110019
  }
110020
+ function createWorkerClient(credentials) {
110021
+ const attoCredentials = normalizeCredentials(credentials);
110022
+ const cacheKey = workerClientCacheKey(attoCredentials);
110023
+ const cachedWorker = workerClientCache.get(cacheKey);
110024
+ if (cachedWorker)
110025
+ return cachedWorker;
110026
+ const worker = applyHeaders(new commons_worker_remote_1.AttoWorkerAsyncBuilder(requireWorkerUrl(attoCredentials)), attoCredentials).cached(true).build();
110027
+ if (workerClientCache.size >= MAX_WORKER_CLIENT_CACHE_SIZE) {
110028
+ const oldestKey = workerClientCache.keys().next().value;
110029
+ if (typeof oldestKey === "string")
110030
+ workerClientCache.delete(oldestKey);
110031
+ }
110032
+ workerClientCache.set(cacheKey, worker);
110033
+ return worker;
110034
+ }
110035
+ function clearWorkerClientCache() {
110036
+ for (const worker of workerClientCache.values()) {
110037
+ try {
110038
+ worker.close?.();
110039
+ } catch {
110040
+ }
110041
+ }
110042
+ workerClientCache.clear();
110043
+ }
109998
110044
  async function createWalletRuntime(parameters, credentials) {
109999
110045
  const derived = await deriveAddressFromSecret(parameters, credentials);
110000
110046
  const node = createNodeClient(credentials);
110001
- const worker = applyHeaders(new commons_worker_remote_1.AttoWorkerAsyncBuilder(requireWorkerUrl(credentials)), credentials).cached(true).build();
110047
+ const worker = createWorkerClient(credentials);
110002
110048
  const builder = new commons_wallet_1.AttoWalletAsyncBuilder(node, worker);
110003
110049
  if (derived.seed) {
110004
110050
  builder.signerProviderSeed(derived.seed);
@@ -110211,12 +110257,6 @@ var require_operations = __commonJS({
110211
110257
  });
110212
110258
  });
110213
110259
  }
110214
- async function firstReceivable(node, address, minAmount, timeoutMs) {
110215
- const [receivable] = await collectStream((onItem, onCancel) => node.onReceivableByAddresses([address], minAmount, onItem, onCancel), { maxItems: 1, timeoutMs });
110216
- if (!receivable)
110217
- throw new Error(`No receivable Atto transaction found within ${timeoutMs}ms`);
110218
- return receivable;
110219
- }
110220
110260
  function inputItem(parameters) {
110221
110261
  const item = parameters.inputItem;
110222
110262
  if (!item || typeof item !== "object" || Array.isArray(item)) {
@@ -110234,11 +110274,6 @@ var require_operations = __commonJS({
110234
110274
  throw new Error("Input item must contain a valid Atto receivable object");
110235
110275
  }
110236
110276
  }
110237
- function assertMinimumAmount(receivable, minAmount) {
110238
- if (BigInt(receivable.amount.toString()) < BigInt(minAmount.toString())) {
110239
- throw new Error("Input receivable amount is below Minimum Amount");
110240
- }
110241
- }
110242
110277
  async function withTimeout(promise2, timeoutMs, operationName) {
110243
110278
  let timer;
110244
110279
  try {
@@ -110358,15 +110393,12 @@ var require_operations = __commonJS({
110358
110393
  };
110359
110394
  }
110360
110395
  if (operation === "receivePending") {
110361
- const minAmount = parseAmount(parameters.minAmount ?? "1", parameters.minAmountUnit ?? "RAW", "Minimum Amount");
110362
110396
  const timeoutMs = positiveTimeout(parameters.timeoutMs ?? DEFAULT_PUBLISH_TIMEOUT_MS, "Timeout");
110363
- const receivableSource = parseReceivableSource(parameters.receivableSource);
110397
+ const receivable = parseInputReceivable(parameters);
110364
110398
  const requestedRepresentative = parseOptionalAddress(parameters.receiveRepresentativeAddress ?? parameters.representativeAddress, "Representative Address");
110365
110399
  const runtime = await createWalletRuntime(parameters, attoCredentials);
110366
110400
  assertOptionalSameAddress(runtime.derived.address, parseOptionalAddress(parameters.receiveAddress, "Address"), "Address");
110367
- const receivable = receivableSource === "input" ? parseInputReceivable(parameters) : await firstReceivable(runtime.node, runtime.derived.address, minAmount, timeoutMs);
110368
110401
  assertSameAddress(runtime.derived.address, receivable.receiverAddress, "Receivable Address");
110369
- assertMinimumAmount(receivable, minAmount);
110370
110402
  const representative = requestedRepresentative ?? runtime.derived.address;
110371
110403
  const transaction = await withTimeout(Promise.resolve(runtime.wallet.receive(receivable, representative, null)), timeoutMs, "Receive transaction");
110372
110404
  return {
@@ -110450,7 +110482,7 @@ var OPERATION_PARAMETER_NAMES = {
110450
110482
  getReceivables: ["addressSource", "addresses", "minAmount", "minAmountUnit", "maxItems", "timeoutMs"],
110451
110483
  getTransactions: ["queryMode", "addresses", "hash", "fromHeight", "toHeight", "maxItems", "timeoutMs"],
110452
110484
  sendTransaction: [...SECRET_PARAMETER_NAMES, "destinationAddress", "amount", "amountUnit", "timeoutMs"],
110453
- receivePending: [...SECRET_PARAMETER_NAMES, "receivableSource", "minAmount", "minAmountUnit", "representativeAddress", "timeoutMs"],
110485
+ receivePending: [...SECRET_PARAMETER_NAMES, "representativeAddress", "timeoutMs"],
110454
110486
  getAccountEntries: ["queryMode", "addresses", "hash", "fromHeight", "toHeight", "maxItems", "timeoutMs"],
110455
110487
  changeRepresentative: [...SECRET_PARAMETER_NAMES, "representativeAddress"]
110456
110488
  };
@@ -110485,7 +110517,6 @@ var DEFAULT_PARAMETER_VALUES = {
110485
110517
  destinationAddress: "",
110486
110518
  amount: "",
110487
110519
  amountUnit: "ATTO",
110488
- receivableSource: "input",
110489
110520
  minAmount: "1",
110490
110521
  minAmountUnit: "RAW",
110491
110522
  representativeAddress: "",
@@ -110617,9 +110648,9 @@ var Atto = class {
110617
110648
  action: "Get a receivable"
110618
110649
  },
110619
110650
  {
110620
- name: "Receive Pending",
110651
+ name: "Receive",
110621
110652
  value: "receivePending",
110622
- action: "Receive pending a receivable"
110653
+ action: "Receive a receivable"
110623
110654
  }
110624
110655
  ],
110625
110656
  default: "getReceivables"
@@ -110939,28 +110970,6 @@ var Atto = class {
110939
110970
  },
110940
110971
  description: "Unit used for Amount"
110941
110972
  },
110942
- {
110943
- displayName: "Receivable Source",
110944
- name: "receivableSource",
110945
- type: "options",
110946
- options: [
110947
- {
110948
- name: "Input Item",
110949
- value: "input"
110950
- },
110951
- {
110952
- name: "Wait for Next Receivable",
110953
- value: "wait"
110954
- }
110955
- ],
110956
- default: "input",
110957
- displayOptions: {
110958
- show: {
110959
- operation: ["receivePending"]
110960
- }
110961
- },
110962
- description: "Whether to receive the receivable in the incoming item or wait for the next matching receivable"
110963
- },
110964
110973
  {
110965
110974
  displayName: "Minimum Amount",
110966
110975
  name: "minAmount",
@@ -110968,7 +110977,7 @@ var Atto = class {
110968
110977
  default: "1",
110969
110978
  displayOptions: {
110970
110979
  show: {
110971
- operation: ["getReceivables", "receivePending"]
110980
+ operation: ["getReceivables"]
110972
110981
  }
110973
110982
  },
110974
110983
  description: "Smallest receivable amount to match"
@@ -110981,7 +110990,7 @@ var Atto = class {
110981
110990
  default: "RAW",
110982
110991
  displayOptions: {
110983
110992
  show: {
110984
- operation: ["getReceivables", "receivePending"]
110993
+ operation: ["getReceivables"]
110985
110994
  }
110986
110995
  },
110987
110996
  description: "Unit used for Minimum Amount"
@@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;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE;4BACL,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D;wBACD,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;qBAC/B,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBAED,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;YAC7E,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAtkBD,oBAskBC"}
@@ -1,5 +1,6 @@
1
1
  import { AttoAddress, AttoPrivateKey, toPublicKey, toSeedAsync } from '@attocash/commons-core';
2
2
  import { type AttoNodeClientAsync } from '@attocash/commons-node-remote';
3
+ import { type AttoWorkerAsync } from '@attocash/commons-worker-remote';
3
4
  import type { ICredentialDataDecryptedObject, IDataObject } from 'n8n-workflow';
4
5
  export type AttoOperation = 'deriveAddress' | 'deriveAccount' | 'getAccount' | 'getReceivables' | 'getTransactions' | 'sendTransaction' | 'receivePending' | 'getAccountEntries' | 'changeRepresentative';
5
6
  export type AttoTriggerEvent = 'receivable' | 'account' | 'transaction' | 'accountEntry';
@@ -30,6 +31,8 @@ export type AttoTriggerSubscription = {
30
31
  export declare function deriveAddressFromSecret(parameters: AttoParameters, credentials?: ICredentialDataDecryptedObject): Promise<DerivedAddress>;
31
32
  export declare const deriveAccountFromSecret: typeof deriveAddressFromSecret;
32
33
  export declare function createNodeClient(credentials: ICredentialDataDecryptedObject | AttoCredentials | undefined): AttoNodeClientAsync;
34
+ export declare function createWorkerClient(credentials: ICredentialDataDecryptedObject | AttoCredentials | undefined): AttoWorkerAsync;
35
+ export declare function clearWorkerClientCache(): void;
33
36
  export declare function executeAttoOperation(operation: AttoOperation, parameters: AttoParameters, credentials?: ICredentialDataDecryptedObject): Promise<AttoOperationResult>;
34
37
  export declare function createAttoTriggerSubscription(event: AttoTriggerEvent, parameters: AttoParameters, credentials: ICredentialDataDecryptedObject | undefined, emit: (data: IDataObject) => void, emitError: (error: Error) => void): Promise<AttoTriggerSubscription>;
35
38
  export {};
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deriveAccountFromSecret = void 0;
4
4
  exports.deriveAddressFromSecret = deriveAddressFromSecret;
5
5
  exports.createNodeClient = createNodeClient;
6
+ exports.createWorkerClient = createWorkerClient;
7
+ exports.clearWorkerClientCache = clearWorkerClientCache;
6
8
  exports.executeAttoOperation = executeAttoOperation;
7
9
  exports.createAttoTriggerSubscription = createAttoTriggerSubscription;
10
+ const node_crypto_1 = require("node:crypto");
8
11
  const commons_core_1 = require("@attocash/commons-core");
9
12
  const commons_node_1 = require("@attocash/commons-node");
10
13
  const commons_node_remote_1 = require("@attocash/commons-node-remote");
@@ -12,6 +15,8 @@ const commons_wallet_1 = require("@attocash/commons-wallet");
12
15
  const commons_worker_remote_1 = require("@attocash/commons-worker-remote");
13
16
  const DEFAULT_STREAM_TIMEOUT_MS = 5000;
14
17
  const DEFAULT_PUBLISH_TIMEOUT_MS = 60000;
18
+ const MAX_WORKER_CLIENT_CACHE_SIZE = 32;
19
+ const workerClientCache = new Map();
15
20
  function normalizeCredentials(credentials) {
16
21
  return (credentials ?? {});
17
22
  }
@@ -35,12 +40,6 @@ function positiveTimeout(value, fieldName) {
35
40
  throw new Error(`${fieldName} must be greater than zero`);
36
41
  return timeoutMs;
37
42
  }
38
- function parseReceivableSource(value) {
39
- const source = text(value || 'input');
40
- if (source === 'input' || source === 'wait')
41
- return source;
42
- throw new Error('Receivable Source must be input or wait');
43
- }
44
43
  function parseSecretType(value, fieldName) {
45
44
  if (value === 'mnemonic' || value === 'privateKey')
46
45
  return value;
@@ -119,16 +118,64 @@ function applyHeaders(builder, credentials) {
119
118
  const prefix = text(credentials.authHeaderPrefix);
120
119
  return builder.header(header, prefix ? `${prefix} ${apiKey}` : apiKey);
121
120
  }
121
+ function sha256(value) {
122
+ return (0, node_crypto_1.createHash)('sha256').update(value).digest('hex');
123
+ }
124
+ function workerClientCacheKey(credentials) {
125
+ const workerUrl = requireWorkerUrl(credentials);
126
+ const apiKey = text(credentials.apiKey);
127
+ if (!apiKey) {
128
+ return JSON.stringify({
129
+ workerUrl,
130
+ auth: 'none',
131
+ });
132
+ }
133
+ const header = text(credentials.authHeaderName || 'Authorization');
134
+ if (!header)
135
+ throw new Error('API Key Header is required when API Key is set');
136
+ const prefix = text(credentials.authHeaderPrefix);
137
+ const headerValue = prefix ? `${prefix} ${apiKey}` : apiKey;
138
+ return JSON.stringify({
139
+ workerUrl,
140
+ header,
141
+ headerValueHash: sha256(headerValue),
142
+ });
143
+ }
122
144
  function createNodeClient(credentials) {
123
145
  const attoCredentials = normalizeCredentials(credentials);
124
146
  return applyHeaders(new commons_node_remote_1.AttoNodeClientAsyncBuilder(requireNodeUrl(attoCredentials)), attoCredentials).build();
125
147
  }
148
+ function createWorkerClient(credentials) {
149
+ const attoCredentials = normalizeCredentials(credentials);
150
+ const cacheKey = workerClientCacheKey(attoCredentials);
151
+ const cachedWorker = workerClientCache.get(cacheKey);
152
+ if (cachedWorker)
153
+ return cachedWorker;
154
+ const worker = applyHeaders(new commons_worker_remote_1.AttoWorkerAsyncBuilder(requireWorkerUrl(attoCredentials)), attoCredentials)
155
+ .cached(true)
156
+ .build();
157
+ if (workerClientCache.size >= MAX_WORKER_CLIENT_CACHE_SIZE) {
158
+ const oldestKey = workerClientCache.keys().next().value;
159
+ if (typeof oldestKey === 'string')
160
+ workerClientCache.delete(oldestKey);
161
+ }
162
+ workerClientCache.set(cacheKey, worker);
163
+ return worker;
164
+ }
165
+ function clearWorkerClientCache() {
166
+ for (const worker of workerClientCache.values()) {
167
+ try {
168
+ worker.close?.();
169
+ }
170
+ catch {
171
+ }
172
+ }
173
+ workerClientCache.clear();
174
+ }
126
175
  async function createWalletRuntime(parameters, credentials) {
127
176
  const derived = await deriveAddressFromSecret(parameters, credentials);
128
177
  const node = createNodeClient(credentials);
129
- const worker = applyHeaders(new commons_worker_remote_1.AttoWorkerAsyncBuilder(requireWorkerUrl(credentials)), credentials)
130
- .cached(true)
131
- .build();
178
+ const worker = createWorkerClient(credentials);
132
179
  const builder = new commons_wallet_1.AttoWalletAsyncBuilder(node, worker);
133
180
  if (derived.seed) {
134
181
  builder.signerProviderSeed(derived.seed);
@@ -357,12 +404,6 @@ async function collectStream(start, options) {
357
404
  });
358
405
  });
359
406
  }
360
- async function firstReceivable(node, address, minAmount, timeoutMs) {
361
- const [receivable] = await collectStream((onItem, onCancel) => node.onReceivableByAddresses([address], minAmount, onItem, onCancel), { maxItems: 1, timeoutMs });
362
- if (!receivable)
363
- throw new Error(`No receivable Atto transaction found within ${timeoutMs}ms`);
364
- return receivable;
365
- }
366
407
  function inputItem(parameters) {
367
408
  const item = parameters.inputItem;
368
409
  if (!item || typeof item !== 'object' || Array.isArray(item)) {
@@ -381,11 +422,6 @@ function parseInputReceivable(parameters) {
381
422
  throw new Error('Input item must contain a valid Atto receivable object');
382
423
  }
383
424
  }
384
- function assertMinimumAmount(receivable, minAmount) {
385
- if (BigInt(receivable.amount.toString()) < BigInt(minAmount.toString())) {
386
- throw new Error('Input receivable amount is below Minimum Amount');
387
- }
388
- }
389
425
  async function withTimeout(promise, timeoutMs, operationName) {
390
426
  let timer;
391
427
  try {
@@ -506,17 +542,12 @@ async function executeAttoOperation(operation, parameters, credentials) {
506
542
  };
507
543
  }
508
544
  if (operation === 'receivePending') {
509
- const minAmount = parseAmount(parameters.minAmount ?? '1', parameters.minAmountUnit ?? 'RAW', 'Minimum Amount');
510
545
  const timeoutMs = positiveTimeout(parameters.timeoutMs ?? DEFAULT_PUBLISH_TIMEOUT_MS, 'Timeout');
511
- const receivableSource = parseReceivableSource(parameters.receivableSource);
546
+ const receivable = parseInputReceivable(parameters);
512
547
  const requestedRepresentative = parseOptionalAddress(parameters.receiveRepresentativeAddress ?? parameters.representativeAddress, 'Representative Address');
513
548
  const runtime = await createWalletRuntime(parameters, attoCredentials);
514
549
  assertOptionalSameAddress(runtime.derived.address, parseOptionalAddress(parameters.receiveAddress, 'Address'), 'Address');
515
- const receivable = receivableSource === 'input'
516
- ? parseInputReceivable(parameters)
517
- : await firstReceivable(runtime.node, runtime.derived.address, minAmount, timeoutMs);
518
550
  assertSameAddress(runtime.derived.address, receivable.receiverAddress, 'Receivable Address');
519
- assertMinimumAmount(receivable, minAmount);
520
551
  const representative = requestedRepresentative ?? runtime.derived.address;
521
552
  const transaction = await withTimeout(Promise.resolve(runtime.wallet.receive(receivable, representative, null)), timeoutMs, 'Receive transaction');
522
553
  return {