@attocash/cli 0.1.2 → 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 +39 -0
- package/dist/application/app.d.ts +11 -0
- package/dist/application/app.js +37 -12
- package/dist/cli/cli.js +13 -2
- package/dist/cli/output.js +1 -1
- package/dist/spending/payments.js +5 -6
- package/dist/storage/state.d.ts +7 -0
- package/dist/storage/state.js +61 -8
- package/dist/wallet/background-receive.d.ts +30 -0
- package/dist/wallet/background-receive.js +117 -0
- package/dist/wallet/receive-daemon.d.ts +1 -0
- package/dist/wallet/receive-daemon.js +63 -0
- package/dist/wallet/work-daemon.d.ts +1 -0
- package/dist/wallet/work-daemon.js +20 -0
- package/dist/wallet/work.d.ts +31 -9
- package/dist/wallet/work.js +307 -78
- package/dist/watches/manager.d.ts +3 -3
- package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
- package/node_modules/@attocash/commons-core/package.json +1 -1
- package/node_modules/@attocash/commons-node/README.md +7 -0
- package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +17 -17
- package/node_modules/@attocash/commons-node/commons-commons-node.mjs +173 -173
- package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/package.json +3 -3
- package/node_modules/@attocash/commons-node-remote/package.json +4 -4
- package/node_modules/@attocash/commons-transport/package.json +2 -2
- package/node_modules/@attocash/commons-worker/package.json +3 -3
- package/node_modules/@attocash/commons-worker-remote/package.json +4 -4
- package/package.json +5 -5
|
@@ -39,6 +39,13 @@ val account = client.account(address.publicKey)
|
|
|
39
39
|
val accounts = client.account(listOf(address1, address2))
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
## Async subscriptions
|
|
43
|
+
|
|
44
|
+
Async client and monitor subscriptions report completion through `onCancel`.
|
|
45
|
+
Its parameter is `Throwable?`: a stream failure is passed through unchanged,
|
|
46
|
+
and normal completion or cancellation reports `null`. Callbacks previously
|
|
47
|
+
declared with an explicit `Exception?` parameter must accept `Throwable?`.
|
|
48
|
+
|
|
42
49
|
## Membership monitor
|
|
43
50
|
|
|
44
51
|
Track a dynamic set of addresses and derive streams from it.
|
|
@@ -181,21 +181,21 @@ export declare class AttoNodeClientAsync /* implements AutoCloseable */ {
|
|
|
181
181
|
get client(): any/* AttoNodeClient */;
|
|
182
182
|
accountByPublicKey(publicKey: AttoPublicKey): Promise<Nullable<AttoAccount>>;
|
|
183
183
|
accountByAddresses(addresses: Array<AttoAddress>): Promise<Array<AttoAccount>>;
|
|
184
|
-
onAccountAll(onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error
|
|
185
|
-
onAccountByPublicKey(publicKey: AttoPublicKey, onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error
|
|
186
|
-
onAccountByAddresses(addresses: Array<AttoAddress>, onAccount: (p0: AttoAccount) => void, onCancel: (p0: Nullable<Error
|
|
187
|
-
onReceivableByPublicKey(publicKey: AttoPublicKey, minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error
|
|
188
|
-
onReceivableByAddresses(addresses: Array<AttoAddress>, minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error
|
|
184
|
+
onAccountAll(onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
185
|
+
onAccountByPublicKey(publicKey: AttoPublicKey, onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
186
|
+
onAccountByAddresses(addresses: Array<AttoAddress>, onAccount: (p0: AttoAccount) => void, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
187
|
+
onReceivableByPublicKey(publicKey: AttoPublicKey, minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
188
|
+
onReceivableByAddresses(addresses: Array<AttoAddress>, minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
189
189
|
accountEntry(hash: AttoHash): Promise<AttoAccountEntry>;
|
|
190
|
-
onAccountEntryAll(onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error
|
|
191
|
-
onAccountEntryByHash(hash: AttoHash, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error
|
|
192
|
-
onAccountEntryByPublicKey(publicKey: AttoPublicKey, fromHeight: AttoHeight | undefined, toHeight: Nullable<AttoHeight> | undefined, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error
|
|
193
|
-
onAccountEntryByHeightSearch(heightSearch: HeightSearch, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error
|
|
190
|
+
onAccountEntryAll(onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
191
|
+
onAccountEntryByHash(hash: AttoHash, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
192
|
+
onAccountEntryByPublicKey(publicKey: AttoPublicKey, fromHeight: AttoHeight | undefined, toHeight: Nullable<AttoHeight> | undefined, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
193
|
+
onAccountEntryByHeightSearch(heightSearch: HeightSearch, onAccountEntry: (p0: AttoAccountEntry) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
194
194
|
transaction(hash: AttoHash): Promise<AttoTransaction>;
|
|
195
|
-
onTransactionAll(onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error
|
|
196
|
-
onTransactionByHash(hash: AttoHash, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error
|
|
197
|
-
onTransactionByPublicKey(publicKey: AttoPublicKey, fromHeight: AttoHeight | undefined, toHeight: Nullable<AttoHeight> | undefined, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error
|
|
198
|
-
onTransactionByHeightSearch(heightSearch: HeightSearch, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error
|
|
195
|
+
onTransactionAll(onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
196
|
+
onTransactionByHash(hash: AttoHash, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
197
|
+
onTransactionByPublicKey(publicKey: AttoPublicKey, fromHeight: AttoHeight | undefined, toHeight: Nullable<AttoHeight> | undefined, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
198
|
+
onTransactionByHeightSearch(heightSearch: HeightSearch, onTransaction: (p0: AttoTransaction) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
199
199
|
now(): Promise<AttoInstant>;
|
|
200
200
|
publish(transaction: AttoTransaction): Promise<void>;
|
|
201
201
|
voterWeight(address: AttoAddress): Promise<any/* AttoVoterWeight */>;
|
|
@@ -209,7 +209,7 @@ export declare namespace AttoNodeClientAsync {
|
|
|
209
209
|
export declare class AttoAccountEntryMonitorAsync /* implements AutoCloseable */ {
|
|
210
210
|
private constructor();
|
|
211
211
|
get accountEntryMonitor(): any/* AttoAccountEntryMonitor */;
|
|
212
|
-
onAccountEntry(onAccountEntry: any /*Suspend functions are not supported*/, onCancel: (p0: Nullable<Error
|
|
212
|
+
onAccountEntry(onAccountEntry: any /*Suspend functions are not supported*/, onCancel: (p0: Nullable<Error>) => void): AttoJob;
|
|
213
213
|
}
|
|
214
214
|
export declare namespace AttoAccountEntryMonitorAsync {
|
|
215
215
|
/** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
|
|
@@ -223,8 +223,8 @@ export declare class AttoAccountMonitorAsync /* implements AutoCloseable */ {
|
|
|
223
223
|
monitorAddressArray(addresses: Array<AttoAddress>): Promise<void>;
|
|
224
224
|
monitorAddress(address: AttoAddress): Promise<void>;
|
|
225
225
|
getAccounts(): Promise<Array<AttoAccount>>;
|
|
226
|
-
onAccount(onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error
|
|
227
|
-
onReceivable(minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error
|
|
226
|
+
onAccount(onAccount: (p0: AttoAccount) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
227
|
+
onReceivable(minAmount: AttoAmount | undefined, onReceivable: (p0: AttoReceivable) => any, onCancel: (p0: Nullable<Error>) => any): AttoJob;
|
|
228
228
|
}
|
|
229
229
|
export declare namespace AttoAccountMonitorAsync {
|
|
230
230
|
/** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
|
|
@@ -245,7 +245,7 @@ export declare namespace AttoAccountMonitorAsyncBuilder {
|
|
|
245
245
|
export declare class AttoTransactionMonitorAsync /* implements AutoCloseable */ {
|
|
246
246
|
private constructor();
|
|
247
247
|
get transactionMonitor(): any/* AttoTransactionMonitor */;
|
|
248
|
-
onTransaction(onTransaction: any /*Suspend functions are not supported*/, onCancel: (p0: Nullable<Error
|
|
248
|
+
onTransaction(onTransaction: any /*Suspend functions are not supported*/, onCancel: (p0: Nullable<Error>) => void): AttoJob;
|
|
249
249
|
}
|
|
250
250
|
export declare namespace AttoTransactionMonitorAsync {
|
|
251
251
|
/** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
|