@panoptic-eng/sdk 1.0.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.
@@ -0,0 +1,249 @@
1
+ import { Address } from "viem";
2
+ import { ReactNode } from "react";
3
+ import { Config } from "wagmi";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+
6
+ //#region src/test/test-utils.d.ts
7
+ declare const spawnAnvil: (args?: AnvilArgs) => Promise<void>;
8
+ declare const killAnvilProcess: (port: number) => Promise<void>;
9
+ declare const killAllAnvilProcesses: () => Promise<void>;
10
+ type AnvilArgs = {
11
+ /**
12
+ * Number of dev accounts to generate and configure.
13
+ *
14
+ * @defaultValue 10
15
+ */
16
+ accounts?: number | undefined;
17
+ /**
18
+ * Set the Access-Control-Allow-Origin response header (CORS).
19
+ *
20
+ * @defaultValue *
21
+ */
22
+ allowOrigin?: string | undefined;
23
+ /**
24
+ * Enable autoImpersonate on startup
25
+ */
26
+ autoImpersonate?: boolean | undefined;
27
+ /**
28
+ * The balance of every dev account in Ether.
29
+ *
30
+ * @defaultValue 10000
31
+ */
32
+ balance?: number | bigint | undefined;
33
+ /**
34
+ * The base fee in a block.
35
+ */
36
+ blockBaseFeePerGas?: number | bigint | undefined;
37
+ /**
38
+ * Block time in seconds for interval mining.
39
+ */
40
+ blockTime?: number | undefined;
41
+ /**
42
+ * Path or alias to the Anvil binary.
43
+ */
44
+ binary?: string | undefined;
45
+ /**
46
+ * The chain id.
47
+ */
48
+ chainId?: number | undefined;
49
+ /**
50
+ * EIP-170: Contract code size limit in bytes. Useful to increase this because of tests.
51
+ *
52
+ * @defaultValue 0x6000 (~25kb)
53
+ */
54
+ codeSizeLimit?: number | undefined;
55
+ /**
56
+ * Sets the number of assumed available compute units per second for this fork provider.
57
+ *
58
+ * @defaultValue 350
59
+ * @see https://github.com/alchemyplatform/alchemy-docs/blob/master/documentation/compute-units.md#rate-limits-cups
60
+ */
61
+ computeUnitsPerSecond?: number | undefined;
62
+ /**
63
+ * Writes output of `anvil` as json to user-specified file.
64
+ */
65
+ configOut?: string | undefined;
66
+ /**
67
+ * Sets the derivation path of the child key to be derived.
68
+ *
69
+ * @defaultValue m/44'/60'/0'/0/
70
+ */
71
+ derivationPath?: string | undefined;
72
+ /**
73
+ * Disable the `call.gas_limit <= block.gas_limit` constraint.
74
+ */
75
+ disableBlockGasLimit?: boolean | undefined;
76
+ /**
77
+ * Dump the state of chain on exit to the given file. If the value is a directory, the state will be
78
+ * written to `<VALUE>/state.json`.
79
+ */
80
+ dumpState?: string | undefined;
81
+ /**
82
+ * Fetch state over a remote endpoint instead of starting from an empty state.
83
+ *
84
+ * If you want to fetch state from a specific block number, add a block number like `http://localhost:8545@1400000`
85
+ * or use the `forkBlockNumber` option.
86
+ */
87
+ forkUrl?: string | undefined;
88
+ /**
89
+ * Fetch state from a specific block number over a remote endpoint.
90
+ *
91
+ * Requires `forkUrl` to be set.
92
+ */
93
+ forkBlockNumber?: number | bigint | undefined;
94
+ /**
95
+ * Specify chain id to skip fetching it from remote endpoint. This enables offline-start mode.
96
+ *
97
+ * You still must pass both `forkUrl` and `forkBlockNumber`, and already have your required state cached
98
+ * on disk, anything missing locally would be fetched from the remote.
99
+ */
100
+ forkChainId?: number | undefined;
101
+ /**
102
+ * Specify headers to send along with any request to the remote JSON-RPC server in forking mode.
103
+ *
104
+ * e.g. "User-Agent: test-agent"
105
+ *
106
+ * Requires `forkUrl` to be set.
107
+ */
108
+ forkHeader?: Record<string, string> | undefined;
109
+ /**
110
+ * Initial retry backoff on encountering errors.
111
+ */
112
+ forkRetryBackoff?: number | undefined;
113
+ /**
114
+ * The block gas limit.
115
+ */
116
+ gasLimit?: number | bigint | undefined;
117
+ /**
118
+ * The gas price.
119
+ */
120
+ gasPrice?: number | bigint | undefined;
121
+ /**
122
+ * The EVM hardfork to use.
123
+ */
124
+ hardfork?: 'Frontier' | 'Homestead' | 'Dao' | 'Tangerine' | 'SpuriousDragon' | 'Byzantium' | 'Constantinople' | 'Petersburg' | 'Istanbul' | 'Muirglacier' | 'Berlin' | 'London' | 'ArrowGlacier' | 'GrayGlacier' | 'Paris' | 'Shanghai' | 'Cancun' | 'Prague' | 'Latest' | undefined;
125
+ /**
126
+ * The host the server will listen on.
127
+ */
128
+ host?: string | undefined;
129
+ /**
130
+ * Initialize the genesis block with the given `genesis.json` file.
131
+ */
132
+ init?: string | undefined;
133
+ /**
134
+ * Launch an ipc server at the given path or default path = `/tmp/anvil.ipc`.
135
+ */
136
+ ipc?: string | undefined;
137
+ /**
138
+ * Initialize the chain from a previously saved state snapshot.
139
+ */
140
+ loadState?: string | undefined;
141
+ /**
142
+ * BIP39 mnemonic phrase used for generating accounts.
143
+ */
144
+ mnemonic?: string | undefined;
145
+ /**
146
+ * Automatically generates a BIP39 mnemonic phrase, and derives accounts from it.
147
+ */
148
+ mnemonicRandom?: boolean | undefined;
149
+ /**
150
+ * Disable CORS.
151
+ */
152
+ noCors?: boolean | undefined;
153
+ /**
154
+ * Disable auto and interval mining, and mine on demand instead.
155
+ */
156
+ noMining?: boolean | undefined;
157
+ /**
158
+ * Disables rate limiting for this node's provider.
159
+ *
160
+ * @defaultValue false
161
+ * @see https://github.com/alchemyplatform/alchemy-docs/blob/master/documentation/compute-units.md#rate-limits-cups
162
+ */
163
+ noRateLimit?: boolean | undefined;
164
+ /**
165
+ * Explicitly disables the use of RPC caching.
166
+ *
167
+ * All storage slots are read entirely from the endpoint.
168
+ */
169
+ noStorageCaching?: boolean | undefined;
170
+ /**
171
+ * How transactions are sorted in the mempool.
172
+ *
173
+ * @defaultValue fees
174
+ */
175
+ order?: string | undefined;
176
+ /**
177
+ * Run an Optimism chain.
178
+ */
179
+ optimism?: boolean | undefined;
180
+ /**
181
+ * Port number to listen on.
182
+ *
183
+ * @defaultValue 8545
184
+ */
185
+ port?: number | undefined;
186
+ /**
187
+ * Don't keep full chain history. If a number argument is specified, at most this number of states is kept in memory.
188
+ */
189
+ pruneHistory?: number | undefined | boolean;
190
+ /**
191
+ * Number of retry requests for spurious networks (timed out requests).
192
+ *
193
+ * @defaultValue 5
194
+ */
195
+ retries?: number | undefined;
196
+ /**
197
+ * Don't print anything on startup and don't print logs.
198
+ */
199
+ silent?: boolean | undefined;
200
+ /**
201
+ * Slots in an epoch.
202
+ */
203
+ slotsInAnEpoch?: number | undefined;
204
+ /**
205
+ * Enable steps tracing used for debug calls returning geth-style traces.
206
+ */
207
+ stepsTracing?: boolean | undefined;
208
+ /**
209
+ * Interval in seconds at which the status is to be dumped to disk.
210
+ */
211
+ stateInterval?: number | undefined;
212
+ /**
213
+ * This is an alias for both `loadState` and `dumpState`. It initializes the chain with the state stored at the
214
+ * file, if it exists, and dumps the chain's state on exit
215
+ */
216
+ state?: string | undefined;
217
+ /**
218
+ * Timeout in ms for requests sent to remote JSON-RPC server in forking mode.
219
+ *
220
+ * @defaultValue 45000
221
+ */
222
+ timeout?: number | undefined;
223
+ /**
224
+ * The timestamp of the genesis block.
225
+ */
226
+ timestamp?: number | bigint | undefined;
227
+ /**
228
+ * Number of blocks with transactions to keep in memory.
229
+ */
230
+ transactionBlockKeeper?: number | undefined;
231
+ }; //#endregion
232
+ //#region src/test/react-test-utils.d.ts
233
+ declare const ReactTestWrapper: ({
234
+ children,
235
+ wagmiConfig
236
+ }: {
237
+ children?: ReactNode;
238
+ wagmiConfig: Config;
239
+ }) => react_jsx_runtime0.JSX.Element;
240
+
241
+ //#endregion
242
+ //#region src/test/test-accounts.d.ts
243
+ declare const alice: Address;
244
+ declare const bob: Address;
245
+ declare const charlie: Address;
246
+
247
+ //#endregion
248
+ export { ReactTestWrapper, alice, bob, charlie, killAllAnvilProcesses, killAnvilProcess, spawnAnvil };
249
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["spawnAnvil","AnvilArgs","Promise","killAnvilProcess","killAllAnvilProcesses","Record","ReactNode","Config","ReactTestWrapper","children","wagmiConfig","react_jsx_runtime0","JSX","Element","Address","alice","bob","charlie"],"sources":["../../src/test/test-utils.d.ts","../../src/test/react-test-utils.d.ts","../../src/test/test-accounts.d.ts"],"sourcesContent":null,"mappings":";;;;;;cAAqBA,oBAAoBC,cAAcC;cAClCC,oCAAoCD;cACpCE,6BAA6BF;KAC7CD,SAAAA;;;AAHL;;;EAAkD,QAAKC,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAO;AAC9D;AACA;AAAgE;;;;ACAhE;;EAG6C,eAHHO,CAAAA,EAAAA,OAAAA,GAAAA,SAAAA;EAAQ;;;;AAGL;;;;ACJ7C;EACqBO,kBAAKF,CAAAA,EAAAA,MAAO,GAAA,MAAA,GAAA,SAAA;EACZG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eFkGJZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCnGIG;;;;aACNF;eACEC;MACiBI,kBAAAA,CAAAC,GAAAA,CAAIC;;;;cCJjBE,OAAOD;cACPE,KAAKF;cACLG,SAASH"}