Package not found. Please check the package name and try again.

@aztec/bot 0.77.0-testnet-ignition.26 → 0.77.0-testnet-ignition.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/bot",
3
- "version": "0.77.0-testnet-ignition.26",
3
+ "version": "0.77.0-testnet-ignition.28",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -52,16 +52,16 @@
52
52
  ]
53
53
  },
54
54
  "dependencies": {
55
- "@aztec/accounts": "0.77.0-testnet-ignition.26",
56
- "@aztec/aztec.js": "0.77.0-testnet-ignition.26",
57
- "@aztec/entrypoints": "0.77.0-testnet-ignition.26",
58
- "@aztec/ethereum": "0.77.0-testnet-ignition.26",
59
- "@aztec/foundation": "0.77.0-testnet-ignition.26",
60
- "@aztec/noir-contracts.js": "0.77.0-testnet-ignition.26",
61
- "@aztec/noir-protocol-circuits-types": "0.77.0-testnet-ignition.26",
62
- "@aztec/protocol-contracts": "0.77.0-testnet-ignition.26",
63
- "@aztec/stdlib": "0.77.0-testnet-ignition.26",
64
- "@aztec/telemetry-client": "0.77.0-testnet-ignition.26",
55
+ "@aztec/accounts": "0.77.0-testnet-ignition.28",
56
+ "@aztec/aztec.js": "0.77.0-testnet-ignition.28",
57
+ "@aztec/entrypoints": "0.77.0-testnet-ignition.28",
58
+ "@aztec/ethereum": "0.77.0-testnet-ignition.28",
59
+ "@aztec/foundation": "0.77.0-testnet-ignition.28",
60
+ "@aztec/noir-contracts.js": "0.77.0-testnet-ignition.28",
61
+ "@aztec/noir-protocol-circuits-types": "0.77.0-testnet-ignition.28",
62
+ "@aztec/protocol-contracts": "0.77.0-testnet-ignition.28",
63
+ "@aztec/stdlib": "0.77.0-testnet-ignition.28",
64
+ "@aztec/telemetry-client": "0.77.0-testnet-ignition.28",
65
65
  "source-map-support": "^0.5.21",
66
66
  "tslib": "^2.4.0",
67
67
  "zod": "^3.23.8"
package/dest/bot.d.ts DELETED
@@ -1,33 +0,0 @@
1
- import { type AztecAddress, type Wallet } from '@aztec/aztec.js';
2
- import type { EasyPrivateTokenContract } from '@aztec/noir-contracts.js/EasyPrivateToken';
3
- import type { TokenContract } from '@aztec/noir-contracts.js/Token';
4
- import type { AztecNode, PXE } from '@aztec/stdlib/interfaces/client';
5
- import type { BotConfig } from './config.js';
6
- export declare class Bot {
7
- readonly wallet: Wallet;
8
- readonly token: TokenContract | EasyPrivateTokenContract;
9
- readonly recipient: AztecAddress;
10
- config: BotConfig;
11
- private log;
12
- private attempts;
13
- private successes;
14
- protected constructor(wallet: Wallet, token: TokenContract | EasyPrivateTokenContract, recipient: AztecAddress, config: BotConfig);
15
- static create(config: BotConfig, dependencies?: {
16
- pxe?: PXE;
17
- node?: AztecNode;
18
- }): Promise<Bot>;
19
- updateConfig(config: Partial<BotConfig>): void;
20
- run(): Promise<void>;
21
- getBalances(): Promise<{
22
- sender: {
23
- privateBalance: bigint;
24
- publicBalance: bigint;
25
- };
26
- recipient: {
27
- privateBalance: bigint;
28
- publicBalance: bigint;
29
- };
30
- }>;
31
- private getSendMethodOpts;
32
- }
33
- //# sourceMappingURL=bot.d.ts.map
package/dest/bot.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAIjB,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAGpE,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,qBAAa,GAAG;aAOI,MAAM,EAAE,MAAM;aACd,KAAK,EAAE,aAAa,GAAG,wBAAwB;aAC/C,SAAS,EAAE,YAAY;IAChC,MAAM,EAAE,SAAS;IAT1B,OAAO,CAAC,GAAG,CAAuB;IAElC,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,SAAS,CAAa;IAE9B,SAAS,aACS,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,GAAG,wBAAwB,EAC/C,SAAS,EAAE,YAAY,EAChC,MAAM,EAAE,SAAS;WAGb,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,GAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAO,GAAG,OAAO,CAAC,GAAG,CAAC;IAKjG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC;IAKjC,GAAG;IAoEH,WAAW;;;;;;;;;;IAoBxB,OAAO,CAAC,iBAAiB;CAkB1B"}
package/dest/config.d.ts DELETED
@@ -1,186 +0,0 @@
1
- import { type ConfigMappingsType } from '@aztec/foundation/config';
2
- import { Fr } from '@aztec/foundation/fields';
3
- import { type ZodFor } from '@aztec/stdlib/schemas';
4
- import type { ComponentsVersions } from '@aztec/stdlib/versioning';
5
- import { z } from 'zod';
6
- declare const BotFollowChain: readonly ["NONE", "PENDING", "PROVEN"];
7
- type BotFollowChain = (typeof BotFollowChain)[number];
8
- export declare enum SupportedTokenContracts {
9
- TokenContract = "TokenContract",
10
- EasyPrivateTokenContract = "EasyPrivateTokenContract"
11
- }
12
- export type BotConfig = {
13
- /** The URL to the Aztec node to check for tx pool status. */
14
- nodeUrl: string | undefined;
15
- /** URL to the PXE for sending txs, or undefined if an in-proc PXE is used. */
16
- pxeUrl: string | undefined;
17
- /** Url of the ethereum host. */
18
- l1RpcUrls: string[] | undefined;
19
- /** The mnemonic for the account to bridge fee juice from L1. */
20
- l1Mnemonic: string | undefined;
21
- /** The private key for the account to bridge fee juice from L1. */
22
- l1PrivateKey: string | undefined;
23
- /** Signing private key for the sender account. */
24
- senderPrivateKey: Fr | undefined;
25
- /** Encryption secret for a recipient account. */
26
- recipientEncryptionSecret: Fr;
27
- /** Salt for the token contract deployment. */
28
- tokenSalt: Fr;
29
- /** Every how many seconds should a new tx be sent. */
30
- txIntervalSeconds: number;
31
- /** How many private token transfers are executed per tx. */
32
- privateTransfersPerTx: number;
33
- /** How many public token transfers are executed per tx. */
34
- publicTransfersPerTx: number;
35
- /** How to handle fee payments. */
36
- feePaymentMethod: 'fee_juice';
37
- /** True to not automatically setup or start the bot on initialization. */
38
- noStart: boolean;
39
- /** How long to wait for a tx to be mined before reporting an error. */
40
- txMinedWaitSeconds: number;
41
- /** Whether to wait for txs to be proven, to be mined, or no wait at all. */
42
- followChain: BotFollowChain;
43
- /** Do not send a tx if the node's tx pool already has this many pending txs. */
44
- maxPendingTxs: number;
45
- /** Whether to flush after sending each 'setup' transaction */
46
- flushSetupTransactions: boolean;
47
- /** Whether to skip public simulation of txs before sending them. */
48
- skipPublicSimulation: boolean;
49
- /** L2 gas limit for the tx (empty to have the bot trigger an estimate gas). */
50
- l2GasLimit: number | undefined;
51
- /** DA gas limit for the tx (empty to have the bot trigger an estimate gas). */
52
- daGasLimit: number | undefined;
53
- /** Token contract to use */
54
- contract: SupportedTokenContracts;
55
- /** The maximum number of consecutive errors before the bot shuts down */
56
- maxConsecutiveErrors: number;
57
- /** Stops the bot if service becomes unhealthy */
58
- stopWhenUnhealthy: boolean;
59
- };
60
- export declare const BotConfigSchema: z.ZodEffects<z.ZodObject<{
61
- nodeUrl: z.ZodOptional<z.ZodString>;
62
- pxeUrl: z.ZodOptional<z.ZodString>;
63
- l1RpcUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
64
- l1Mnemonic: z.ZodOptional<z.ZodString>;
65
- l1PrivateKey: z.ZodOptional<z.ZodString>;
66
- senderPrivateKey: z.ZodOptional<ZodFor<Fr>>;
67
- recipientEncryptionSecret: ZodFor<Fr>;
68
- tokenSalt: ZodFor<Fr>;
69
- txIntervalSeconds: z.ZodNumber;
70
- privateTransfersPerTx: z.ZodNumber;
71
- publicTransfersPerTx: z.ZodNumber;
72
- feePaymentMethod: z.ZodLiteral<"fee_juice">;
73
- noStart: z.ZodBoolean;
74
- txMinedWaitSeconds: z.ZodNumber;
75
- followChain: z.ZodEnum<["NONE", "PENDING", "PROVEN"]>;
76
- maxPendingTxs: z.ZodNumber;
77
- flushSetupTransactions: z.ZodBoolean;
78
- skipPublicSimulation: z.ZodBoolean;
79
- l2GasLimit: z.ZodOptional<z.ZodNumber>;
80
- daGasLimit: z.ZodOptional<z.ZodNumber>;
81
- contract: z.ZodNativeEnum<typeof SupportedTokenContracts>;
82
- maxConsecutiveErrors: z.ZodNumber;
83
- stopWhenUnhealthy: z.ZodBoolean;
84
- }, "strip", z.ZodTypeAny, {
85
- recipientEncryptionSecret: Fr;
86
- tokenSalt: Fr;
87
- txIntervalSeconds: number;
88
- privateTransfersPerTx: number;
89
- publicTransfersPerTx: number;
90
- feePaymentMethod: "fee_juice";
91
- noStart: boolean;
92
- txMinedWaitSeconds: number;
93
- followChain: "NONE" | "PENDING" | "PROVEN";
94
- maxPendingTxs: number;
95
- flushSetupTransactions: boolean;
96
- skipPublicSimulation: boolean;
97
- contract: SupportedTokenContracts;
98
- maxConsecutiveErrors: number;
99
- stopWhenUnhealthy: boolean;
100
- nodeUrl?: string | undefined;
101
- pxeUrl?: string | undefined;
102
- l1RpcUrls?: string[] | undefined;
103
- l1Mnemonic?: string | undefined;
104
- l1PrivateKey?: string | undefined;
105
- senderPrivateKey?: Fr | undefined;
106
- l2GasLimit?: number | undefined;
107
- daGasLimit?: number | undefined;
108
- }, {
109
- txIntervalSeconds: number;
110
- privateTransfersPerTx: number;
111
- publicTransfersPerTx: number;
112
- feePaymentMethod: "fee_juice";
113
- noStart: boolean;
114
- txMinedWaitSeconds: number;
115
- followChain: "NONE" | "PENDING" | "PROVEN";
116
- maxPendingTxs: number;
117
- flushSetupTransactions: boolean;
118
- skipPublicSimulation: boolean;
119
- contract: SupportedTokenContracts;
120
- maxConsecutiveErrors: number;
121
- stopWhenUnhealthy: boolean;
122
- nodeUrl?: string | undefined;
123
- pxeUrl?: string | undefined;
124
- l1RpcUrls?: string[] | undefined;
125
- l1Mnemonic?: string | undefined;
126
- l1PrivateKey?: string | undefined;
127
- senderPrivateKey?: any;
128
- recipientEncryptionSecret?: any;
129
- tokenSalt?: any;
130
- l2GasLimit?: number | undefined;
131
- daGasLimit?: number | undefined;
132
- }>, {
133
- recipientEncryptionSecret: Fr;
134
- tokenSalt: Fr;
135
- txIntervalSeconds: number;
136
- privateTransfersPerTx: number;
137
- publicTransfersPerTx: number;
138
- feePaymentMethod: "fee_juice";
139
- noStart: boolean;
140
- txMinedWaitSeconds: number;
141
- followChain: "NONE" | "PENDING" | "PROVEN";
142
- maxPendingTxs: number;
143
- flushSetupTransactions: boolean;
144
- skipPublicSimulation: boolean;
145
- contract: SupportedTokenContracts;
146
- maxConsecutiveErrors: number;
147
- stopWhenUnhealthy: boolean;
148
- nodeUrl: string | undefined;
149
- pxeUrl: string | undefined;
150
- l1RpcUrls: string[] | undefined;
151
- l1Mnemonic: string | undefined;
152
- l1PrivateKey: string | undefined;
153
- senderPrivateKey: Fr | undefined;
154
- l2GasLimit: number | undefined;
155
- daGasLimit: number | undefined;
156
- }, {
157
- txIntervalSeconds: number;
158
- privateTransfersPerTx: number;
159
- publicTransfersPerTx: number;
160
- feePaymentMethod: "fee_juice";
161
- noStart: boolean;
162
- txMinedWaitSeconds: number;
163
- followChain: "NONE" | "PENDING" | "PROVEN";
164
- maxPendingTxs: number;
165
- flushSetupTransactions: boolean;
166
- skipPublicSimulation: boolean;
167
- contract: SupportedTokenContracts;
168
- maxConsecutiveErrors: number;
169
- stopWhenUnhealthy: boolean;
170
- nodeUrl?: string | undefined;
171
- pxeUrl?: string | undefined;
172
- l1RpcUrls?: string[] | undefined;
173
- l1Mnemonic?: string | undefined;
174
- l1PrivateKey?: string | undefined;
175
- senderPrivateKey?: any;
176
- recipientEncryptionSecret?: any;
177
- tokenSalt?: any;
178
- l2GasLimit?: number | undefined;
179
- daGasLimit?: number | undefined;
180
- }>;
181
- export declare const botConfigMappings: ConfigMappingsType<BotConfig>;
182
- export declare function getBotConfigFromEnv(): BotConfig;
183
- export declare function getBotDefaultConfig(): BotConfig;
184
- export declare function getVersions(): Partial<ComponentsVersions>;
185
- export {};
186
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,cAAc,wCAAyC,CAAC;AAC9D,KAAK,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,oBAAY,uBAAuB;IACjC,aAAa,kBAAkB;IAC/B,wBAAwB,6BAA6B;CACtD;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,8EAA8E;IAC9E,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gCAAgC;IAChC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,gEAAgE;IAChE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,mEAAmE;IACnE,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,kDAAkD;IAClD,gBAAgB,EAAE,EAAE,GAAG,SAAS,CAAC;IACjC,iDAAiD;IACjD,yBAAyB,EAAE,EAAE,CAAC;IAC9B,8CAA8C;IAC9C,SAAS,EAAE,EAAE,CAAC;IACd,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4DAA4D;IAC5D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kCAAkC;IAClC,gBAAgB,EAAE,WAAW,CAAC;IAC9B,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,WAAW,EAAE,cAAc,CAAC;IAC5B,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,sBAAsB,EAAE,OAAO,CAAC;IAChC,oEAAoE;IACpE,oBAAoB,EAAE,OAAO,CAAC;IAC9B,+EAA+E;IAC/E,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,+EAA+E;IAC/E,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,4BAA4B;IAC5B,QAAQ,EAAE,uBAAuB,CAAC;IAClC,yEAAyE;IACzE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCK,CAAC;AAElC,eAAO,MAAM,iBAAiB,EAAE,kBAAkB,CAAC,SAAS,CAmI3D,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,SAAS,CAE/C;AAED,wBAAgB,mBAAmB,IAAI,SAAS,CAE/C;AAED,wBAAgB,WAAW,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAKzD"}
package/dest/factory.d.ts DELETED
@@ -1,50 +0,0 @@
1
- import { AztecAddress, type AztecNode, type PXE } from '@aztec/aztec.js';
2
- import { EasyPrivateTokenContract } from '@aztec/noir-contracts.js/EasyPrivateToken';
3
- import { TokenContract } from '@aztec/noir-contracts.js/Token';
4
- import { type BotConfig } from './config.js';
5
- export declare class BotFactory {
6
- private readonly config;
7
- private pxe;
8
- private node?;
9
- private log;
10
- constructor(config: BotConfig, dependencies?: {
11
- pxe?: PXE;
12
- node?: AztecNode;
13
- });
14
- /**
15
- * Initializes a new bot by setting up the sender account, registering the recipient,
16
- * deploying the token contract, and minting tokens if necessary.
17
- */
18
- setup(): Promise<{
19
- wallet: import("@aztec/aztec.js").AccountWalletWithSecretKey;
20
- token: TokenContract | EasyPrivateTokenContract;
21
- pxe: PXE;
22
- recipient: AztecAddress;
23
- }>;
24
- /**
25
- * Checks if the sender account contract is initialized, and initializes it if necessary.
26
- * @returns The sender wallet.
27
- */
28
- private setupAccount;
29
- private setupAccountWithPrivateKey;
30
- private setupTestAccount;
31
- /**
32
- * Registers the recipient for txs in the pxe.
33
- */
34
- private registerRecipient;
35
- /**
36
- * Checks if the token contract is deployed and deploys it if necessary.
37
- * @param wallet - Wallet to deploy the token contract from.
38
- * @returns The TokenContract instance.
39
- */
40
- private setupToken;
41
- /**
42
- * Mints private and public tokens for the sender if their balance is below the minimum.
43
- * @param token - Token contract.
44
- */
45
- private mintTokens;
46
- private bridgeL1FeeJuice;
47
- private advanceL2Block;
48
- private tryFlushTxs;
49
- }
50
- //# sourceMappingURL=factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EACZ,KAAK,SAAS,EAMd,KAAK,GAAG,EAIT,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAK/D,OAAO,EAAE,KAAK,SAAS,EAAwC,MAAM,aAAa,CAAC;AAMnF,qBAAa,UAAU;IAKT,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJnC,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,IAAI,CAAC,CAAY;IACzB,OAAO,CAAC,GAAG,CAAuB;gBAEL,MAAM,EAAE,SAAS,EAAE,YAAY,GAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAO;IAwBlG;;;OAGG;IACU,KAAK;;;;;;IAQlB;;;OAGG;YACW,YAAY;YAQZ,0BAA0B;YA4B1B,gBAAgB;IAc9B;;OAEG;YACW,iBAAiB;IAK/B;;;;OAIG;YACW,UAAU;IA8BxB;;;OAGG;YACW,UAAU;YAuCV,gBAAgB;YA+BhB,cAAc;YAMd,WAAW;CAU1B"}
package/dest/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { Bot } from './bot.js';
2
- export { BotRunner } from './runner.js';
3
- export { type 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,KAAK,SAAS,EACd,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/stdlib/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,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,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,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAIpE,OAAO,KAAK,EAAE,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;AAC1D,OAAO,KAAK,EAAE,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;IAY3E,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 { EasyPrivateTokenContract } from '@aztec/noir-contracts.js/EasyPrivateToken';
2
- import type { TokenContract } from '@aztec/noir-contracts.js/Token';
3
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
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,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;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"}