@attocash/commons-test 6.3.1 → 6.5.0

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 ADDED
@@ -0,0 +1,169 @@
1
+ # @attocash/commons-test
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@attocash/commons-test.svg)](https://www.npmjs.com/package/@attocash/commons-test)
4
+ [![license](https://img.shields.io/github/license/attocash/commons.svg)](https://github.com/attocash/commons/blob/main/LICENSE)
5
+
6
+ Test utilities for Atto JavaScript and TypeScript integrations.
7
+
8
+ `@attocash/commons-test` provides local mock services for applications that use `@attocash/commons-js`. It starts a real Atto node container with a MySQL container and a real Work Server container, then exposes their mapped URLs so your tests can use the normal node, worker, wallet, and monitor clients.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install --save-dev @attocash/commons-test
14
+ npm install @attocash/commons-js
15
+ ```
16
+
17
+ This package is published as ESM and includes TypeScript declarations.
18
+
19
+ ## Requirements
20
+
21
+ - Node.js 18 or newer is recommended.
22
+ - Docker or Podman must be installed and running.
23
+ - The test process must be allowed to pull and run containers.
24
+ - Use ESM imports. In Node.js files, use `.mjs` or set `"type": "module"`.
25
+
26
+ Node.js examples that use the Atto clients should expose `require` for the underlying runtime:
27
+
28
+ ```js
29
+ import { createRequire } from 'node:module'
30
+
31
+ globalThis.require = createRequire(import.meta.url)
32
+ ```
33
+
34
+ ## What It Provides
35
+
36
+ - `AttoNodeMockAsyncBuilder`: starts a local Atto node backed by MySQL.
37
+ - `AttoWorkerMockAsyncBuilder`: starts a local Work Server.
38
+ - `baseUrl` properties that plug directly into `AttoNodeClientAsyncBuilder` and `AttoWorkerAsyncBuilder`.
39
+ - A generated local genesis transaction so tests can start with a funded account.
40
+ - Builder options for container names, images, MySQL settings, and custom genesis transactions.
41
+
42
+ ## Quick Example
43
+
44
+ ```js
45
+ import { createRequire } from 'node:module'
46
+ import {
47
+ AttoAmount,
48
+ AttoMnemonic,
49
+ AttoNodeClientAsyncBuilder,
50
+ AttoUnit,
51
+ AttoWalletAsyncBuilder,
52
+ AttoWorkerAsyncBuilder,
53
+ toAttoIndex,
54
+ toPrivateKey,
55
+ toSeedAsync,
56
+ } from '@attocash/commons-js'
57
+ import {
58
+ AttoNodeMockAsyncBuilder,
59
+ AttoWorkerMockAsyncBuilder,
60
+ } from '@attocash/commons-test'
61
+
62
+ globalThis.require = createRequire(import.meta.url)
63
+
64
+ const mnemonic = AttoMnemonic.generate()
65
+ const seed = await toSeedAsync(mnemonic)
66
+ const genesisPrivateKey = toPrivateKey(seed, toAttoIndex(0))
67
+
68
+ const nodeMock = await new AttoNodeMockAsyncBuilder(genesisPrivateKey).build()
69
+ const workerMock = await new AttoWorkerMockAsyncBuilder().build()
70
+
71
+ try {
72
+ await nodeMock.start()
73
+ await workerMock.start()
74
+
75
+ const nodeClient = new AttoNodeClientAsyncBuilder(nodeMock.baseUrl).build()
76
+ const worker = new AttoWorkerAsyncBuilder(workerMock.baseUrl).build()
77
+
78
+ const wallet = new AttoWalletAsyncBuilder(nodeClient, worker)
79
+ .signerProviderSeed(seed)
80
+ .build()
81
+
82
+ const sender = toAttoIndex(0)
83
+ const receiver = toAttoIndex(1)
84
+
85
+ await wallet.openAccount(sender)
86
+ await wallet.openAccount(receiver)
87
+
88
+ const receiverAddress = await wallet.getAddress(receiver)
89
+ const amount = AttoAmount.from(AttoUnit.ATTO, '1')
90
+ const transaction = await wallet.sendByIndex(sender, receiverAddress, amount, null)
91
+
92
+ console.log(`Published ${transaction.hash}`)
93
+ } finally {
94
+ nodeMock.close()
95
+ workerMock.close()
96
+ }
97
+ ```
98
+
99
+ ## Custom Images and Names
100
+
101
+ Use builder methods when a test suite needs pinned images, isolated container names, or custom MySQL settings.
102
+
103
+ ```js
104
+ const nodeMock = await new AttoNodeMockAsyncBuilder(genesisPrivateKey)
105
+ .name('atto-node-test')
106
+ .image('ghcr.io/attocash/node:live')
107
+ .mysqlImage('mysql:8.4')
108
+ .dbName('node')
109
+ .dbUser('root')
110
+ .dbPassword('root')
111
+ .build()
112
+
113
+ const workerMock = await new AttoWorkerMockAsyncBuilder()
114
+ .name('atto-worker-test')
115
+ .image('ghcr.io/attocash/work-server:cpu')
116
+ .build()
117
+ ```
118
+
119
+ ## Lifecycle
120
+
121
+ Always close mocks in `finally` or your test framework's teardown hook.
122
+
123
+ ```js
124
+ let nodeMock
125
+ let workerMock
126
+
127
+ beforeAll(async () => {
128
+ nodeMock = await new AttoNodeMockAsyncBuilder(genesisPrivateKey).build()
129
+ workerMock = await new AttoWorkerMockAsyncBuilder().build()
130
+
131
+ await nodeMock.start()
132
+ await workerMock.start()
133
+ })
134
+
135
+ afterAll(() => {
136
+ nodeMock?.close()
137
+ workerMock?.close()
138
+ })
139
+ ```
140
+
141
+ `baseUrl` is available only after `start()` has completed.
142
+
143
+ ## Full Example
144
+
145
+ The repository includes a runnable JavaScript example that uses `@attocash/commons-test` with `@attocash/commons-js` to start mock services, create a wallet, open accounts, send transactions, and listen to monitors:
146
+
147
+ - [examples/js-client](https://github.com/attocash/commons/tree/main/examples/js-client)
148
+
149
+ ## API Summary
150
+
151
+ | Export | Purpose |
152
+ | --- | --- |
153
+ | `AttoNodeMockAsyncBuilder` | Builds a node mock backed by an Atto node container and a MySQL container. |
154
+ | `AttoNodeMockAsync` | Starts, closes, and exposes the node mock `baseUrl` and `genesisTransaction`. |
155
+ | `AttoWorkerMockAsyncBuilder` | Builds a Work Server mock container. |
156
+ | `AttoWorkerMockAsync` | Starts, closes, and exposes the worker mock `baseUrl`. |
157
+ | `AttoNodeMockConfiguration` | Configuration object for lower-level Kotlin/JVM use. |
158
+
159
+ ## Documentation
160
+
161
+ - [Atto documentation](https://atto.cash/docs)
162
+ - [Integration overview](https://atto.cash/docs/integration)
163
+ - [Node integration](https://atto.cash/docs/integration/node)
164
+ - [Work Server integration](https://atto.cash/docs/integration/work-server)
165
+ - [Atto Commons repository](https://github.com/attocash/commons)
166
+
167
+ ## License
168
+
169
+ [BSD 3-Clause](https://github.com/attocash/commons/blob/main/LICENSE)
@@ -10,7 +10,9 @@ export declare namespace KtMap {
10
10
  function fromJsMap<K, V>(map: ReadonlyMap<K, V>): KtMap<K, V>;
11
11
  }
12
12
  /** @deprecated */
13
- export declare const initHook: { get(): any; };
13
+ export declare const initHook: {
14
+ get(): any;
15
+ };
14
16
  export declare class AttoAccount implements HeightSupport, AddressSupport {
15
17
  constructor(publicKey: AttoPublicKey, network: AttoNetwork, version: AttoVersion, algorithm: AttoAlgorithm, height: AttoHeight, balance: AttoAmount, lastTransactionHash: AttoHash, lastTransactionTimestamp: AttoInstant, representativeAlgorithm: AttoAlgorithm, representativePublicKey: AttoPublicKey);
16
18
  get publicKey(): AttoPublicKey;
@@ -29,7 +31,7 @@ export declare class AttoAccount implements HeightSupport, AddressSupport {
29
31
  toString(): string;
30
32
  hashCode(): number;
31
33
  equals(other: Nullable<any>): boolean;
32
- readonly __doNotUseOrImplementIt: HeightSupport["__doNotUseOrImplementIt"] & AddressSupport["__doNotUseOrImplementIt"];
34
+ readonly __doNotUseOrImplementIt: AddressSupport["__doNotUseOrImplementIt"] & HeightSupport["__doNotUseOrImplementIt"];
33
35
  }
34
36
  export declare namespace AttoAccount {
35
37
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -66,7 +68,7 @@ export declare class AttoAccountEntry implements HeightSupport, AddressSupport {
66
68
  toString(): string;
67
69
  hashCode(): number;
68
70
  equals(other: Nullable<any>): boolean;
69
- readonly __doNotUseOrImplementIt: HeightSupport["__doNotUseOrImplementIt"] & AddressSupport["__doNotUseOrImplementIt"];
71
+ readonly __doNotUseOrImplementIt: AddressSupport["__doNotUseOrImplementIt"] & HeightSupport["__doNotUseOrImplementIt"];
70
72
  }
71
73
  export declare namespace AttoAccountEntry {
72
74
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -117,14 +119,14 @@ export declare abstract class AttoAlgorithm {
117
119
  get name(): "V1";
118
120
  get ordinal(): 0;
119
121
  };
122
+ static values(): [typeof AttoAlgorithm.V1];
123
+ static valueOf(value: string): AttoAlgorithm;
120
124
  get name(): "V1";
121
125
  get ordinal(): 0;
122
126
  get code(): any/* UByte */;
123
127
  get privateKeySize(): number;
124
128
  get publicKeySize(): number;
125
129
  get hashSize(): number;
126
- static values(): Array<AttoAlgorithm>;
127
- static valueOf(value: string): AttoAlgorithm;
128
130
  }
129
131
  export declare namespace AttoAlgorithm {
130
132
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -153,11 +155,11 @@ export declare abstract class AttoUnit {
153
155
  get name(): "RAW";
154
156
  get ordinal(): 1;
155
157
  };
158
+ static values(): [typeof AttoUnit.ATTO, typeof AttoUnit.RAW];
159
+ static valueOf(value: string): AttoUnit;
156
160
  get name(): "ATTO" | "RAW";
157
161
  get ordinal(): 0 | 1;
158
162
  get prefix(): string;
159
- static values(): Array<AttoUnit>;
160
- static valueOf(value: string): AttoUnit;
161
163
  }
162
164
  export declare namespace AttoUnit {
163
165
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -218,10 +220,10 @@ export declare abstract class AttoBlockType {
218
220
  get name(): "CHANGE";
219
221
  get ordinal(): 4;
220
222
  };
223
+ static values(): [typeof AttoBlockType.UNKNOWN, typeof AttoBlockType.OPEN, typeof AttoBlockType.RECEIVE, typeof AttoBlockType.SEND, typeof AttoBlockType.CHANGE];
224
+ static valueOf(value: string): AttoBlockType;
221
225
  get name(): "UNKNOWN" | "OPEN" | "RECEIVE" | "SEND" | "CHANGE";
222
226
  get ordinal(): 0 | 1 | 2 | 3 | 4;
223
- static values(): Array<AttoBlockType>;
224
- static valueOf(value: string): AttoBlockType;
225
227
  }
226
228
  export declare namespace AttoBlockType {
227
229
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -266,7 +268,7 @@ export declare interface AttoBlock extends HeightSupport, AddressSupport, AttoHa
266
268
  isValid(): boolean;
267
269
  readonly __doNotUseOrImplementIt: {
268
270
  readonly "cash.atto.commons.AttoBlock": unique symbol;
269
- } & HeightSupport["__doNotUseOrImplementIt"] & AddressSupport["__doNotUseOrImplementIt"] & AttoHashable["__doNotUseOrImplementIt"] & AttoSerializable["__doNotUseOrImplementIt"];
271
+ } & AttoSerializable["__doNotUseOrImplementIt"] & AttoHashable["__doNotUseOrImplementIt"] & AddressSupport["__doNotUseOrImplementIt"] & HeightSupport["__doNotUseOrImplementIt"];
270
272
  }
271
273
  export declare namespace AttoBlock {
272
274
  abstract class Companion extends KtSingleton<Companion.$metadata$.constructor>() {
@@ -326,7 +328,7 @@ export declare class AttoSendBlock implements AttoBlock, PreviousSupport {
326
328
  equals(other: Nullable<any>): boolean;
327
329
  isValid(): boolean;
328
330
  toByteArray(): Int8Array;
329
- readonly __doNotUseOrImplementIt: AttoBlock["__doNotUseOrImplementIt"] & PreviousSupport["__doNotUseOrImplementIt"];
331
+ readonly __doNotUseOrImplementIt: PreviousSupport["__doNotUseOrImplementIt"] & AttoBlock["__doNotUseOrImplementIt"];
330
332
  }
331
333
  export declare namespace AttoSendBlock {
332
334
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -367,7 +369,7 @@ export declare class AttoReceiveBlock implements AttoBlock, PreviousSupport, Rec
367
369
  validate(): AttoValidation;
368
370
  isValid(): boolean;
369
371
  toByteArray(): Int8Array;
370
- readonly __doNotUseOrImplementIt: AttoBlock["__doNotUseOrImplementIt"] & PreviousSupport["__doNotUseOrImplementIt"] & ReceiveSupport["__doNotUseOrImplementIt"];
372
+ readonly __doNotUseOrImplementIt: ReceiveSupport["__doNotUseOrImplementIt"] & PreviousSupport["__doNotUseOrImplementIt"] & AttoBlock["__doNotUseOrImplementIt"];
371
373
  }
372
374
  export declare namespace AttoReceiveBlock {
373
375
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -410,7 +412,7 @@ export declare class AttoOpenBlock implements AttoBlock, ReceiveSupport, Represe
410
412
  validate(): AttoValidation;
411
413
  isValid(): boolean;
412
414
  toByteArray(): Int8Array;
413
- readonly __doNotUseOrImplementIt: AttoBlock["__doNotUseOrImplementIt"] & ReceiveSupport["__doNotUseOrImplementIt"] & RepresentativeSupport["__doNotUseOrImplementIt"];
415
+ readonly __doNotUseOrImplementIt: RepresentativeSupport["__doNotUseOrImplementIt"] & ReceiveSupport["__doNotUseOrImplementIt"] & AttoBlock["__doNotUseOrImplementIt"];
414
416
  }
415
417
  export declare namespace AttoOpenBlock {
416
418
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -452,7 +454,7 @@ export declare class AttoChangeBlock implements AttoBlock, PreviousSupport, Repr
452
454
  validate(): AttoValidation;
453
455
  isValid(): boolean;
454
456
  toByteArray(): Int8Array;
455
- readonly __doNotUseOrImplementIt: AttoBlock["__doNotUseOrImplementIt"] & PreviousSupport["__doNotUseOrImplementIt"] & RepresentativeSupport["__doNotUseOrImplementIt"];
457
+ readonly __doNotUseOrImplementIt: RepresentativeSupport["__doNotUseOrImplementIt"] & PreviousSupport["__doNotUseOrImplementIt"] & AttoBlock["__doNotUseOrImplementIt"];
456
458
  }
457
459
  export declare namespace AttoChangeBlock {
458
460
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -657,12 +659,12 @@ export declare abstract class AttoNetwork {
657
659
  get name(): "UNKNOWN";
658
660
  get ordinal(): 4;
659
661
  };
662
+ static values(): [typeof AttoNetwork.LIVE, typeof AttoNetwork.BETA, typeof AttoNetwork.DEV, typeof AttoNetwork.LOCAL, typeof AttoNetwork.UNKNOWN];
663
+ static valueOf(value: string): AttoNetwork;
660
664
  get name(): "LIVE" | "BETA" | "DEV" | "LOCAL" | "UNKNOWN";
661
665
  get ordinal(): 0 | 1 | 2 | 3 | 4;
662
666
  get code(): any/* UByte */;
663
667
  get thresholdIncreaseFactor(): bigint;
664
- static values(): Array<AttoNetwork>;
665
- static valueOf(value: string): AttoNetwork;
666
668
  }
667
669
  export declare namespace AttoNetwork {
668
670
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -829,6 +831,7 @@ export declare namespace AttoSigner {
829
831
  }
830
832
  }
831
833
  }
834
+ export declare function privateKeyToSigner(_this_: AttoPrivateKey): AttoSigner;
832
835
  export declare class AttoTransaction implements HeightSupport, AddressSupport, AttoSerializable {
833
836
  constructor(block: AttoBlock, signature: AttoSignature, work: AttoWork);
834
837
  get block(): AttoBlock;
@@ -845,7 +848,7 @@ export declare class AttoTransaction implements HeightSupport, AddressSupport, A
845
848
  hashCode(): number;
846
849
  equals(other: Nullable<any>): boolean;
847
850
  toByteArray(): Int8Array;
848
- readonly __doNotUseOrImplementIt: HeightSupport["__doNotUseOrImplementIt"] & AddressSupport["__doNotUseOrImplementIt"] & AttoSerializable["__doNotUseOrImplementIt"];
851
+ readonly __doNotUseOrImplementIt: AttoSerializable["__doNotUseOrImplementIt"] & AddressSupport["__doNotUseOrImplementIt"] & HeightSupport["__doNotUseOrImplementIt"];
849
852
  }
850
853
  export declare namespace AttoTransaction {
851
854
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -902,7 +905,7 @@ export declare class AttoVote implements AttoHashable, AttoSerializable {
902
905
  hashCode(): number;
903
906
  equals(other: Nullable<any>): boolean;
904
907
  toByteArray(): Int8Array;
905
- readonly __doNotUseOrImplementIt: AttoHashable["__doNotUseOrImplementIt"] & AttoSerializable["__doNotUseOrImplementIt"];
908
+ readonly __doNotUseOrImplementIt: AttoSerializable["__doNotUseOrImplementIt"] & AttoHashable["__doNotUseOrImplementIt"];
906
909
  }
907
910
  export declare namespace AttoVote {
908
911
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -1045,6 +1048,8 @@ export declare namespace HeightSearch {
1045
1048
  }
1046
1049
  }
1047
1050
  }
1051
+ export declare function accountToJson(_this_: AttoAccount): string;
1052
+ export declare function accountFromJson(_this_: string): AttoAccount;
1048
1053
  export declare function receivableToJson(_this_: AttoReceivable): string;
1049
1054
  export declare function receivableFromJson(_this_: string): AttoReceivable;
1050
1055
  export declare function transactionToJson(_this_: AttoTransaction): string;
@@ -1082,18 +1087,24 @@ export declare class AttoNodeClientAsync /* implements AutoCloseable */ {
1082
1087
  get client(): any/* AttoNodeClient */;
1083
1088
  accountByPublicKey(publicKey: AttoPublicKey): Promise<Nullable<AttoAccount>>;
1084
1089
  accountByAddresses(addresses: Array<AttoAddress>): Promise<Array<AttoAccount>>;
1090
+ onAccountAll(onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1085
1091
  onAccountByPublicKey(publicKey: AttoPublicKey, onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1086
1092
  onAccountByAddresses(addresses: Array<AttoAddress>, onAccount: (p0: AttoAccount) => void, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1087
1093
  onReceivableByPublicKey(publicKey: AttoPublicKey, minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1088
1094
  onReceivableByAddresses(addresses: Array<AttoAddress>, minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1089
1095
  accountEntry(hash: AttoHash): Promise<AttoAccountEntry>;
1096
+ onAccountEntryAll(onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1097
+ onAccountEntryByHash(hash: AttoHash, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1090
1098
  onAccountEntryByPublicKey(publicKey: AttoPublicKey, fromHeight: AttoHeight | undefined, toHeight: Nullable<AttoHeight> | undefined, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1091
1099
  onAccountEntryByHeightSearch(heightSearch: HeightSearch, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1092
1100
  transaction(hash: AttoHash): Promise<AttoTransaction>;
1101
+ onTransactionAll(onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1102
+ onTransactionByHash(hash: AttoHash, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1093
1103
  onTransactionByPublicKey(publicKey: AttoPublicKey, fromHeight: AttoHeight | undefined, toHeight: Nullable<AttoHeight> | undefined, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1094
1104
  onTransactionByHeightSearch(heightSearch: HeightSearch, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1095
1105
  now(): Promise<AttoInstant>;
1096
1106
  publish(transaction: AttoTransaction): Promise<void>;
1107
+ voterWeight(address: AttoAddress): Promise<any/* AttoVoterWeight */>;
1097
1108
  }
1098
1109
  export declare namespace AttoNodeClientAsync {
1099
1110
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -1115,9 +1126,10 @@ export declare namespace AttoAccountEntryMonitorAsync {
1115
1126
  export declare class AttoAccountMonitorAsync /* implements AutoCloseable */ {
1116
1127
  private constructor();
1117
1128
  get accountMonitor(): any/* AttoAccountMonitor */;
1118
- monitorCollection(addresses: any/* Collection<AttoAddress> */): Promise<void>;
1129
+ monitorAddressArray(addresses: Array<AttoAddress>): Promise<void>;
1119
1130
  monitorAddress(address: AttoAddress): Promise<void>;
1120
- getAccounts(): Promise<any/* Collection<AttoAccount> */>;
1131
+ getAccounts(): Promise<Array<AttoAccount>>;
1132
+ onAccount(onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1121
1133
  onReceivable(minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error>/* Nullable<Exception> */) => any): any/* AttoJob */;
1122
1134
  }
1123
1135
  export declare namespace AttoAccountMonitorAsync {