@aztec/bot 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2

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/dest/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { Bot } from './bot.js';
2
- export { BotRunner } from './runner.js';
3
- export { BotConfig, getBotConfigFromEnv, getBotDefaultConfig, botConfigMappings, SupportedTokenContracts, } from './config.js';
4
- export { createBotRunnerRpcServer, getBotRunnerApiHandler } from './rpc.js';
5
- export * from './interface.js';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAC5E,cAAc,gBAAgB,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type ApiSchemaFor } from '@aztec/foundation/schemas';
2
- import { type BotConfig } from './config.js';
3
- export interface BotRunnerApi {
4
- start(): Promise<void>;
5
- stop(): Promise<void>;
6
- run(): Promise<void>;
7
- setup(): Promise<void>;
8
- getConfig(): Promise<BotConfig>;
9
- update(config: BotConfig): Promise<void>;
10
- }
11
- export declare const BotRunnerApiSchema: ApiSchemaFor<BotRunnerApi>;
12
- //# sourceMappingURL=interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI9D,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,YAAY,CAOzD,CAAC"}
package/dest/rpc.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { type ApiHandler } from '@aztec/foundation/json-rpc/server';
2
- import { type BotRunner } from './runner.js';
3
- /**
4
- * Wraps a bot runner with a JSON RPC HTTP server.
5
- * @param botRunner - The BotRunner.
6
- * @returns An JSON-RPC HTTP server
7
- */
8
- export declare function createBotRunnerRpcServer(botRunner: BotRunner): void;
9
- export declare function getBotRunnerApiHandler(botRunner: BotRunner): ApiHandler;
10
- //# sourceMappingURL=rpc.d.ts.map
package/dest/rpc.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAIpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,QAK5D;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAEvE"}
package/dest/runner.d.ts DELETED
@@ -1,49 +0,0 @@
1
- import { type AztecNode, type PXE } from '@aztec/aztec.js';
2
- import { type TelemetryClient, type Traceable, type Tracer } from '@aztec/telemetry-client';
3
- import { type BotConfig } from './config.js';
4
- import { type BotRunnerApi } from './interface.js';
5
- export declare class BotRunner implements BotRunnerApi, Traceable {
6
- #private;
7
- private config;
8
- private log;
9
- private bot?;
10
- private pxe?;
11
- private node;
12
- private runningPromise;
13
- private consecutiveErrors;
14
- private healthy;
15
- readonly tracer: Tracer;
16
- constructor(config: BotConfig, dependencies: {
17
- pxe?: PXE;
18
- node?: AztecNode;
19
- telemetry: TelemetryClient;
20
- });
21
- /** Initializes the bot if needed. Blocks until the bot setup is finished. */
22
- setup(): Promise<void>;
23
- private doSetup;
24
- /**
25
- * Initializes the bot if needed and starts sending txs at regular intervals.
26
- * Blocks until the bot setup is finished.
27
- */
28
- start(): Promise<void>;
29
- /**
30
- * Stops sending txs. Returns once all ongoing txs are finished.
31
- */
32
- stop(): Promise<void>;
33
- isHealthy(): boolean;
34
- /** Returns whether the bot is running. */
35
- isRunning(): boolean;
36
- /**
37
- * Updates the bot config and recreates the bot. Will stop and restart the bot automatically if it was
38
- * running when this method was called. Blocks until the new bot is set up.
39
- */
40
- update(config: BotConfig): Promise<void>;
41
- /**
42
- * Triggers a single iteration of the bot. Requires the bot to be initialized.
43
- * Blocks until the run is finished.
44
- */
45
- run(): Promise<void>;
46
- /** Returns the current configuration for the bot. */
47
- getConfig(): Promise<BotConfig>;
48
- }
49
- //# sourceMappingURL=runner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAuC,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAA8B,MAAM,yBAAyB,CAAC;AAGxH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,SAAU,YAAW,YAAY,EAAE,SAAS;;IAYrD,OAAO,CAAC,MAAM;IAXhB,OAAO,CAAC,GAAG,CAAuB;IAClC,OAAO,CAAC,GAAG,CAAC,CAAe;IAC3B,OAAO,CAAC,GAAG,CAAC,CAAM;IAClB,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,OAAO,CAAQ;IAEvB,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAGrB,MAAM,EAAE,SAAS,EACzB,YAAY,EAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,eAAe,CAAA;KAAE;IAW3E,6EAA6E;IAChE,KAAK;YAOJ,OAAO;IAMrB;;;OAGG;IACU,KAAK;IAQlB;;OAEG;IACU,IAAI;IAQV,SAAS;IAIhB,0CAA0C;IACnC,SAAS;IAIhB;;;OAGG;IACU,MAAM,CAAC,MAAM,EAAE,SAAS;IAerC;;;OAGG;IACU,GAAG;IAwBhB,qDAAqD;IAC9C,SAAS;CAuCjB"}
package/dest/utils.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { type AztecAddress } from '@aztec/circuits.js';
2
- import { type EasyPrivateTokenContract } from '@aztec/noir-contracts.js/EasyPrivateToken';
3
- import { type TokenContract } from '@aztec/noir-contracts.js/Token';
4
- /**
5
- * Gets the private and public balance of the given token for the given address.
6
- * @param token - Token contract.
7
- * @param who - Address to get the balance for.
8
- * @returns - Private and public token balances as bigints.
9
- */
10
- export declare function getBalances(token: TokenContract, who: AztecAddress): Promise<{
11
- privateBalance: bigint;
12
- publicBalance: bigint;
13
- }>;
14
- export declare function getPrivateBalance(token: EasyPrivateTokenContract, who: AztecAddress): Promise<bigint>;
15
- export declare function isStandardTokenContract(token: TokenContract | EasyPrivateTokenContract): token is TokenContract;
16
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAI5D;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAG3G;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,wBAAwB,GAAG,KAAK,IAAI,aAAa,CAE/G"}